/* The author's own tools, in the family design (docs/design/FAMILY.md). 3 October 2026.

   Four small things that float over or sit beside a text, so they share one sheet of styles:
     .bs-confirm   the app's own "are you sure" dialog (index.html, confirmDanger), which names what will go
     .pp-own       the author's menu on a post's own page: Edit and Delete (views/post.js)
     .pz-          the line under a composer's text after Polish: what happened, and Undo (views/polish.js)
     .mn-          mentions: the list that opens on @, the token in the field, the link once posted (views/mention.js)
   Tokens only, no colour literals. Real glass only on what floats (the dialog, the menu, the list). */

/* ── the confirm dialog ── */
.bs-confirm .bs-confirm__veil { background: color-mix(in srgb, var(--canvas) 62%, transparent) !important; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.bs-confirm .bs-confirm__card { max-width: 380px; padding: 26px 24px 22px; border: 1px solid var(--frost-line); border-radius: 26px; background: var(--frost-float); box-shadow: var(--frost-rim), var(--frost-pop) !important; -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6); }
.bs-confirm #cfTitle { font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.bs-confirm__what { margin: 12px 0 2px; padding: 11px 14px; overflow: hidden; border: 1px solid var(--frost-line); border-radius: 16px; background: var(--frost-well, var(--color-muted)); font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--color-foreground); text-align: left; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.bs-confirm #cfNote { margin-top: 10px; font-size: 14px; line-height: 1.5; }
.bs-confirm [data-cf-cancel], .bs-confirm [data-cf-ok] { height: 46px; border-radius: 999px; font-size: 14.5px; }
.bs-confirm [data-cf-cancel] { border-color: var(--frost-line); background: var(--frost-strong); box-shadow: var(--frost-rim); }
.bs-confirm :is([data-cf-cancel], [data-cf-ok]):focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }
.bs-confirm .mt-4 { margin-top: 20px; gap: 10px; }

/* ── the author's menu on the post page ── */
.pp-own { position: relative; flex: none; }
.pp-own__btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 14px; border: 1px solid var(--frost-line); border-radius: 999px; background: var(--frost-strong); box-shadow: var(--frost-rim); font-size: 13.5px; font-weight: 600; color: var(--color-foreground); cursor: pointer; transition: background-color .16s var(--ease-out), box-shadow .22s var(--ease-out); }
.pp-own__btn:hover, .pp-own__btn[aria-expanded="true"] { background: var(--color-card); box-shadow: var(--frost-rim), var(--frost-shadow-up, var(--frost-shadow)); }
.pp-own__btn:active { scale: .96; }
.pp-own__btn i { font-size: 16px; color: var(--color-muted-foreground); }
.pp-own__btn .ph-caret-down { font-size: 12px; }
.pp-own__menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 216px; padding: 6px; border: 1px solid var(--frost-line); border-radius: 20px; background: var(--frost-float); box-shadow: var(--frost-rim), var(--frost-pop); -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6); transform-origin: 100% 0; animation: pp-own-in .2s var(--ease-out); }
.pp-own__menu[hidden] { display: none; }
.pp-own__item { display: flex; width: 100%; align-items: center; gap: 11px; min-height: 44px; padding: 0 12px; border-radius: 14px; font-size: 14.5px; font-weight: 500; color: var(--color-foreground); text-align: left; cursor: pointer; transition: background-color .15s var(--ease-out); }
.pp-own__item i { font-size: 18px; color: var(--oryn-text-2); }
.pp-own__item:hover, .pp-own__item:focus-visible { background: var(--oryn-surface-hover); outline: 0; }
.pp-own__item--del, .pp-own__item--del i { color: var(--color-alert); }
.pp .pp-own :is(.pp-own__btn):focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }
@keyframes pp-own-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

/* ── Polish: the line under the text ── */
.pz-note { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 10px 9px 14px; border: 1px solid var(--frost-line); border-radius: 18px; background: var(--frost-strong); box-shadow: var(--frost-rim); font-size: 13.5px; line-height: 1.45; color: var(--color-foreground); animation: pz-in .26s var(--ease-out); }
.pz-note > i, .pz-note > .ai-spinner { flex: none; font-size: 18px; }
.pz-note > span:not(.ai-spinner) { flex: 1; min-width: 0; }
.pz-note--ok > i { color: var(--color-success, var(--color-brand)); }
.pz-note--busy { color: var(--color-muted-foreground); }
.pz-note--busy > .ai-spinner { width: 16px; height: 16px; color: var(--color-brand); }
.pz-note--ask > i { color: var(--color-brand); }
.pz-note--bad { border-color: color-mix(in srgb, var(--color-alert) 34%, transparent); background: color-mix(in srgb, var(--color-alert) 7%, var(--color-card)); }
.pz-note--bad > i { color: var(--color-alert); }
.pz-undo { flex: none; height: 32px; padding: 0 14px; border: 1px solid var(--frost-line); border-radius: 999px; background: var(--color-card); font-size: 13px; font-weight: 600; color: var(--color-brand-ink); cursor: pointer; transition: background-color .15s var(--ease-out); }
.pz-undo:hover { background: var(--brand-soft); }
.pz-undo:active { scale: .96; }
.pz-undo:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }
.composer-paper.is-polishing textarea { opacity: .55; transition: opacity .2s var(--ease-out); }
#crImprove[aria-busy="true"], [data-ai="improve"][aria-busy="true"] { cursor: progress; }
.cf-sheet .cr-dock .composer-tool .pz-spin { position: static; width: 18px; height: 18px; margin: 0; overflow: visible; clip-path: none; }
@keyframes pz-in { from { opacity: 0; transform: translateY(-4px); } }

/* ── mentions: the list ── */
.mn-list { position: fixed; z-index: 600; display: flex; flex-direction: column; width: 320px; padding: 6px; overflow: hidden; border: 1px solid var(--frost-line); border-radius: 22px; background: var(--frost-float); box-shadow: var(--frost-rim), var(--frost-pop); -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6); }
.mn-list[hidden] { display: none; }
.mn-list.is-in { animation: mn-in .2s var(--ease-out); }
.mn-list[data-side="over"].is-in { animation-name: mn-in-over; }
.mn-rows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mn-head { flex: none; padding: 8px 12px 6px; font-size: 12.5px; font-weight: 500; color: var(--color-muted-foreground); }
.mn-opt { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: 16px; cursor: pointer; transition: background-color .12s var(--ease-out); }
.mn-opt[aria-selected="true"] { background: var(--brand-soft); }
.mn-who { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 1px; }
.mn-name { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; line-height: 1.3; color: var(--color-foreground); }
.mn-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-name mark { border-radius: 4px; background: transparent; color: var(--color-brand-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.mn-seal { flex: none; font-size: 15px; color: var(--color-brand); }
.mn-sub { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--color-muted-foreground); }
.mn-sub > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-badge { flex: none; padding: 1px 8px; border: 1px solid var(--frost-line); border-radius: 999px; background: var(--frost-strong); font-size: 11.5px; font-weight: 500; color: var(--oryn-text-2); }
.mn-none { display: flex; align-items: center; gap: 9px; padding: 14px 14px; font-size: 14px; color: var(--color-muted-foreground); }
.mn-none i { font-size: 17px; }
.mn-keys { flex: none; margin-top: 2px; padding: 8px 12px 6px; border-top: 1px solid var(--frost-line); font-size: 11.5px; color: var(--color-muted-foreground); }
.mn-keys kbd { display: inline-block; min-width: 18px; margin: 0 2px; padding: 0 5px; border: 1px solid var(--frost-line); border-radius: 6px; background: var(--frost-strong); font: inherit; font-size: 11px; line-height: 17px; text-align: center; color: var(--oryn-text-2); }
@media (hover: none) { .mn-keys { display: none; } .mn-opt { min-height: 60px; } }
@keyframes mn-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes mn-in-over { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* ── mentions: the token in the field, and the link once posted ── */
.mn-layer { position: absolute; z-index: 1; box-sizing: border-box; overflow: hidden; border: 0; margin: 0; white-space: pre-wrap; overflow-wrap: break-word; color: transparent; pointer-events: none; -webkit-user-select: none; user-select: none; }
.mn-chip { border-radius: 6px; background: color-mix(in srgb, var(--color-brand) 16%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-brand) 16%, transparent); }
.mn-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--brand-soft); font: inherit; font-weight: 600; color: var(--color-brand-ink); cursor: pointer; transition: background-color .15s var(--ease-out); }
.mn-tag:hover { background: color-mix(in srgb, var(--color-brand) 22%, transparent); }
.mn-tag:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .pp-own__menu, .pz-note, .mn-list.is-in { animation: none; }
}
html.a11y-reduce-motion :is(.pp-own__menu, .pz-note, .mn-list.is-in) { animation: none; }

/* ── Writing help: the menu over the sparkle (20 October 2026) ── */
.pz-menu { position: fixed; z-index: 620; width: 320px; max-width: calc(100vw - 24px); padding: 6px; border: 1px solid var(--frost-line); border-radius: 22px; background: var(--frost-float); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: var(--frost-rim), var(--frost-shadow-up, var(--frost-shadow)); }
.pz-menu.is-in { animation: pz-menu-in .2s var(--ease-out); }
.pz-menu[data-side="under"].is-in { animation-name: pz-menu-in-under; }
.pz-menu__head { padding: 10px 12px 8px; }
.pz-menu__head b { display: block; font-size: 13px; font-weight: 600; color: var(--color-foreground); }
.pz-menu__head small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--color-muted-foreground); text-wrap: pretty; }
.pz-item { display: flex; width: 100%; align-items: center; gap: 12px; min-height: 52px; padding: 7px 12px; border-radius: 16px; text-align: left; color: var(--color-foreground); transition: background-color .12s var(--ease-out); }
.pz-item i { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); font-size: 17px; color: var(--color-brand); }
.pz-item span { min-width: 0; flex: 1; }
.pz-item b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; line-height: 1.3; }
.pz-item small { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.35; color: var(--color-muted-foreground); }
.pz-item:hover, .pz-item:focus-visible { background: var(--oryn-surface-hover); outline: 0; }
.pz-item:active { scale: .98; }
#crImprove[aria-expanded="true"], [data-ai="improve"][aria-expanded="true"] { background: var(--brand-soft); }
@keyframes pz-menu-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes pz-menu-in-under { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .pz-menu.is-in { animation: none; } }
html.a11y-reduce-motion .pz-menu.is-in { animation: none; }
