/* Shared interaction and reading tokens; cinematic artwork is intentionally untouched. */
:root { --ui-text:#e5e7e9; --ui-muted:#a3abb5; --ui-border:#343b43; --ui-radius:12px; --ui-space:16px; }
:focus-visible { outline:2px solid #c3d5e6; outline-offset:3px; }
.document-scan-dialog { max-width:min(520px,calc(100vw - 32px)); padding:24px; border:1px solid var(--ui-border); border-radius:var(--ui-radius); background:#101419; color:var(--ui-text); }
.document-scan-dialog p { line-height:1.8; color:var(--ui-muted); }
.document-scan-dialog button,.three-e-draft-recovery button { min-height:44px;padding:10px 16px;margin:8px 8px 0 0;border:1px solid var(--ui-border);background:#202832;color:var(--ui-text);border-radius:8px; }
.document-scan-dialog::backdrop { background:#000b; }
.forum-modal-close { color:var(--ui-text); }
.forum-modal-close svg { display:block; margin:auto; }
/* The legacy BACK control occupied the music dock and sat above dialogs. */
body:has(.cassell-audio-toggle) .cassell-back { left:96px; z-index:55; }
body:has(.forum-modal,dialog[open],.thread-compose) .cassell-back { visibility:hidden; pointer-events:none; }
.scriptorium-view .quiet-action,.thread-compose .quiet-action { min-height:44px; color:var(--ui-text); border:1px solid var(--ui-border); background:#10151b; padding:8px 14px; border-radius:8px; cursor:pointer; }
.relay-pending summary { cursor:pointer; line-height:1.8; color:var(--ui-text); padding:12px 0; }
.relay-pending footer,.thread-reply-head,.thread-compose-status { color:var(--ui-muted); }
.thread-page-v4 .thread-compose.is-compact { padding:10px 14px; }
.thread-compose.is-compact .thread-compose-side,.thread-compose.is-compact .thread-compose-foot,.thread-compose.is-compact #replyTargetPanel { display:none; }
.thread-compose.is-compact .thread-compose-workspace { display:block; }
.thread-page-v4 .thread-compose.is-compact textarea { width:100%; min-height:44px; height:44px; padding:10px 12px; resize:none; }
.thread-compose.is-compact .thread-compose-head { margin-bottom:4px; }
.thread-compose.is-compact .thread-compose-head h2 { font-size:14px; }
.thread-page-v4:has(.thread-compose.is-compact) .thread-shell { padding-bottom:150px; }
body:has(.thread-compose.is-compact) .cassell-audio-toggle { bottom:145px; }
@media(max-width:760px) {
  body.forum-editorial-v3:not([data-board="cafeteria"]) #boardHead { min-height:120px; height:auto; margin-top:8px; padding:18px 16px; }
  body.forum-editorial-v3:not([data-board="cafeteria"]) #boardHead .name { font-size:30px; line-height:1.2; letter-spacing:.04em; }
  body.forum-editorial-v3:not([data-board="cafeteria"]) #boardHead .desc { margin-top:8px; font-size:13px; }
  body.forum-editorial-v3 .nav { padding-top:8px; padding-bottom:8px; gap:8px; }
  body.forum-editorial-v3 .brand { min-height:40px; }
  body.forum-editorial-v3 .nav .actions { min-height:48px; padding-top:0; padding-bottom:0; }
  body.forum-editorial-v3 .crumb { padding-top:10px; padding-bottom:10px; margin:0; }
  body.forum-editorial-v3 #threadList .meta { color:var(--ui-muted); font-size:12px; }
  .scriptorium-view blockquote { font-size:16px; line-height:1.9; }
  .thread-page-v4 .thread-compose:not(.is-compact) .thread-compose-workspace { grid-template-columns:minmax(0,1fr) 88px; }
  .thread-page-v4 .thread-compose textarea { font-size:16px; }
}
@media(prefers-reduced-motion:reduce) {
  .forum-modal,.thread-compose,.scriptorium-dialog { scroll-behavior:auto; transition:none; }
}
