.block-mention { --mention-purple: #b316ab; width: min(680px, 100%); color: #000; }
.mention-byline { min-height: 18px; display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin: 0 10px 6px; color: #777; font-size: 12px; line-height: 16px; }
.mention-byline strong { color: #777; font-weight: 500; }
.mention-surface { position: relative; padding: 14px 16px 13px; border: 1px solid rgb(179 22 171 / 13%); border-radius: 14px; background: #e8e6f9; box-shadow: 0 8px 20px rgb(65 47 120 / 7%); transition: box-shadow 160ms ease, border-color 160ms ease; }
.block-mention.is-notification-focus .mention-surface { border-color: var(--mention-purple); box-shadow: 0 0 0 3px rgb(179 22 171 / 10%), 0 10px 26px rgb(65 47 120 / 10%); }
.mention-heading { min-height: 30px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mention-recipient-control, .mention-actions { position: relative; }
.mention-recipient-trigger { max-width: min(480px, calc(100vw - 130px)); min-height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 4px; border: 0; border-radius: 8px; background: transparent; color: var(--mention-purple); font: 600 17px/22px Inter, Arial, sans-serif; }
.mention-recipient-trigger > span:first-child { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid rgb(179 22 171 / 26%); border-radius: 50%; font-size: 15px; }
.mention-recipient-trigger:not(.has-recipient) .mention-recipient-label { color: #8a668b; font-weight: 500; }
.mention-recipient-trigger:hover, .mention-recipient-trigger:focus-visible { background: rgb(255 255 255 / 46%); outline: 0; }
.block-mention:not(.is-draft):not(.is-editing) .mention-recipient-trigger { cursor: default; }
.mention-actions[hidden] { display: none; }
.mention-actions-trigger { width: 30px; height: 30px; display: grid; place-items: center; padding: 0 0 7px; border: 0; border-radius: 50%; background: transparent; color: #616161; font: 600 15px/15px Inter, Arial, sans-serif; letter-spacing: 1px; }
.mention-actions-trigger:hover, .mention-actions-trigger:focus-visible { background: rgb(255 255 255 / 50%); color: #111; outline: 0; }
.mention-recipient-picker, .mention-actions-menu { position: absolute; z-index: 24; border: 1px solid #dedede; background: #fff; box-shadow: 0 14px 34px rgb(0 0 0 / 14%); }
.mention-recipient-picker { top: 35px; left: 0; width: min(270px, calc(100vw - 48px)); padding: 8px; border-radius: 12px; }
.mention-recipient-search { height: 36px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; padding: 0 9px; border: 1px solid #dedede; border-radius: 8px; color: var(--mention-purple); }
.mention-recipient-search input { width: 100%; height: 32px; padding: 0; border: 0; outline: 0; background: transparent; color: #111; font: 500 14px/18px Inter, Arial, sans-serif; }
.mention-recipient-options { max-height: 214px; display: grid; gap: 2px; margin-top: 7px; overflow-y: auto; }
.mention-recipient-option { width: 100%; min-height: 48px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 5px 7px; border: 0; border-radius: 8px; background: #fff; color: #111; text-align: left; }
.mention-recipient-option:hover, .mention-recipient-option:focus-visible, .mention-recipient-option.is-active { background: #f5f5f5; outline: 0; }
.mention-recipient-option > span:nth-child(2) { min-width: 0; display: grid; }
.mention-recipient-option strong { overflow: hidden; font-size: 14px; font-weight: 500; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.mention-recipient-option small { color: #888; font-size: 12px; line-height: 16px; }
.mention-recipient-option em { padding: 2px 6px; border-radius: 7px; background: #e8e6f9; color: var(--mention-purple); font-size: 11px; font-style: normal; }
.mention-picker-empty { margin: 0; padding: 12px 8px; color: #888; font-size: 13px; }
.mention-actions-menu { top: 34px; right: 0; width: 126px; padding: 6px; border-radius: 10px; }
.mention-actions-menu button { width: 100%; min-height: 31px; padding: 0 9px; border: 0; border-radius: 7px; background: #fff; color: #222; font: 500 13px/17px Inter, Arial, sans-serif; text-align: left; }
.mention-actions-menu button:hover, .mention-actions-menu button:focus-visible { background: #f4f4f4; outline: 0; }
.mention-actions-menu button:last-child { color: #b42318; }
.mention-message { min-height: 48px; margin-top: 8px; padding: 3px 4px; border-radius: 7px; color: #000; font-size: 16px; font-weight: 400; line-height: 24px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mention-message:empty::before, .mention-reply-input:empty::before { content: attr(data-placeholder); color: #9692a4; pointer-events: none; }
.mention-message[contenteditable="true"]:focus, .mention-reply-input[contenteditable="true"]:focus { background: rgb(255 255 255 / 44%); outline: 0; box-shadow: none; }
.mention-footer { min-height: 27px; display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.mention-publish { min-height: 30px; padding: 0 11px; border: 1px solid rgb(179 22 171 / 23%); border-radius: 9px; background: rgb(255 255 255 / 55%); color: var(--mention-purple); font: 600 13px/17px Inter, Arial, sans-serif; }
.mention-publish:hover, .mention-publish:focus-visible { border-color: rgb(179 22 171 / 42%); background: #fff; outline: 0; }
.mention-reply-toggle, .mention-reply-count { min-height: 27px; padding: 0; border: 0; background: transparent; color: #222; font: 500 14px/19px Inter, Arial, sans-serif; }
.mention-reply-toggle { display: inline-flex; align-items: center; gap: 9px; }
.mention-reply-toggle > span { width: 2px; height: 20px; border-radius: 2px; background: var(--mention-purple); }
.mention-reply-count { margin-left: auto; color: #6f6573; font-size: 12px; }
.mention-reply-toggle:hover, .mention-reply-count:hover { color: var(--mention-purple); }
.mention-replies { display: grid; gap: 11px; margin: 11px 0 0; padding: 13px 4px 2px; border-top: 1px solid rgb(179 22 171 / 13%); }
.mention-reply { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) 24px; align-items: start; gap: 9px; }
.mention-avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border: 1px solid #fff; border-radius: 50%; background: #d9d4f1; color: #68426b; font-size: 11px; font-weight: 600; }
.mention-avatar.is-everyone { background: #e8e6f9; color: var(--mention-purple); font-size: 15px; }
.mention-reply > div { min-width: 0; }
.mention-reply p { display: flex; align-items: baseline; gap: 7px; margin: 0 0 2px; }
.mention-reply p strong { color: var(--mention-purple); font-size: 13px; font-weight: 600; }
.mention-reply p time { color: #8c8893; font-size: 11px; }
.mention-reply-text { color: #111; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.mention-reply-remove { width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #777; font-size: 17px; opacity: 0; }
.mention-reply:hover .mention-reply-remove, .mention-reply-remove:focus-visible { opacity: 1; }
.mention-reply-remove:hover { background: rgb(255 255 255 / 50%); color: #b42318; }
.mention-reply-composer { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: end; gap: 9px; margin-top: 10px; }
.mention-reply-input { min-height: 38px; padding: 8px 10px; border: 1px solid rgb(179 22 171 / 17%); border-radius: 10px; background: rgb(255 255 255 / 42%); color: #000; font-size: 14px; line-height: 20px; }
.mention-reply-send { min-height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: var(--mention-purple); color: #fff; font: 600 12px/16px Inter, Arial, sans-serif; }
.mention-reply-send:hover, .mention-reply-send:focus-visible { background: #971092; outline: 0; }

#mention-notifications-panel { position: fixed; z-index: 145; top: 44px; right: 45px; width: min(330px, calc(100vw - 24px)); max-height: min(430px, calc(100vh - 64px)); padding: 9px; overflow-y: auto; border: 1px solid #dedede; border-radius: 13px; background: #fff; box-shadow: 0 15px 38px rgb(0 0 0 / 15%); }
#mention-notifications-panel > header { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px 5px 8px; border-bottom: 1px solid #ededed; }
#mention-notifications-panel > header strong { font-size: 14px; font-weight: 600; }
.mention-notifications-close { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #666; font-size: 18px; }
.mention-notifications-close:hover { background: #f3f3f3; }
.mention-notification-list { display: grid; gap: 3px; padding-top: 6px; }
.mention-notification-item { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 9px; padding: 9px; border: 0; border-radius: 10px; background: #fff; color: #222; text-align: left; }
.mention-notification-item:hover, .mention-notification-item:focus-visible { background: #f6f5fb; outline: 0; }
.mention-notification-item > span:last-child { min-width: 0; font-size: 13px; line-height: 18px; }
.mention-notification-item strong { color: var(--mention-purple, #b316ab); font-weight: 600; }
.mention-notification-item em { font-style: normal; font-weight: 500; }
.mention-notification-item small { display: -webkit-box; margin-top: 3px; overflow: hidden; color: #777; font-size: 12px; line-height: 17px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mention-notifications-empty { margin: 0; padding: 18px 10px; color: #888; font-size: 13px; text-align: center; }

body.is-structure-mode .structure-block-shell > .block-mention { pointer-events: none; }
@media (max-width: 600px) {
  .mention-surface { padding: 12px; }
  .mention-byline { justify-content: flex-start; margin-left: 6px; }
  .mention-reply-composer { grid-template-columns: 30px minmax(0, 1fr); }
  .mention-reply-send { grid-column: 2; justify-self: end; }
  #mention-notifications-panel { right: 12px; }
}
