/* UI-002: shared theme tokens; layout and typography remain unchanged. */
:root {
  color-scheme: dark;
  --bg: #100B18;
  --surface: #1B1327;
  --raised: #291A39;
  --accent: #A775DE;
  --accent-hover: #C295F2;
  --secondary: #76528F;
  --text: #F1E9F7;
  --muted: #B9ABC7;
  --line: #493453;
  --input: var(--bg);
  --error: #F0ABB9;
  --error-line: #885166;
  --error-surface: #321C2B;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --secondary-soft: color-mix(in srgb, var(--secondary) 18%, transparent);
  --surface-overlay: color-mix(in srgb, var(--surface) 92%, transparent);
  --line-soft: color-mix(in srgb, var(--secondary) 45%, transparent);
  --grid-line: color-mix(in srgb, var(--accent) 6%, transparent);
  font-family: 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: radial-gradient(ellipse at 80% 8%, var(--secondary-soft), transparent 38%), var(--bg); font-size: 14px; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--raised); padding: 10px 16px; font-weight: 600; }
button:hover:not(:disabled) { border-color: var(--accent); background: var(--raised); }
button:disabled { cursor: not-allowed; opacity: .65; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--secondary); color: var(--text); }
.site-header { position: relative; min-height: 83px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(32px, calc((100% - 1392px) / 2)); border-bottom: 1px solid var(--line); gap: 24px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-user { background: none; border: none; padding: 0; margin: 0; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.menu-button { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 12px 18px; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.menu-button:hover { color: var(--text); border-color: var(--line); }
.menu-button[aria-expanded="true"] { color: var(--accent); border-color: var(--secondary); background: var(--accent-soft); }
.app-drawer { position: absolute; top: 100%; right: max(32px, calc((100% - 1392px) / 2)); z-index: 40; display: flex; flex-direction: column; gap: 4px; min-width: 230px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.drawer-link { background: transparent; border: 1px solid transparent; color: var(--muted); padding: 10px 14px; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; text-align: left; font-weight: 600; }
.drawer-link:hover { color: var(--text); border-color: var(--line); }
.drawer-link[aria-pressed="true"] { color: var(--accent); border-color: var(--secondary); background: var(--accent-soft); }
.drawer-sep { height: 1px; background: var(--line-soft); margin: 6px 4px; }
.brand { display: inline-flex; align-items: center; gap: 14px; font-size: 17px; letter-spacing: 3px; font-weight: 700; }
.brand-symbol { color: var(--accent); font-size: 40px; font-weight: 300; line-height: 1; }
.brand-sub { border-left: 1px solid var(--line); padding-left: 17px; font-size: 10px; color: var(--muted); letter-spacing: 2px; font-weight: 500; }
.studio-tag { font-size: 10px; letter-spacing: 2px; color: var(--muted); }
main { max-width: 1392px; margin: auto; padding: 0 32px; }
.intro { display: flex; justify-content: space-between; align-items: center; min-height: 305px; padding: 46px 4px 38px; gap: 32px; }
#home-view .intro { min-height: 0; padding: 26px 4px 10px; }
.eyebrow { font-size: 10px; color: var(--accent); letter-spacing: 2.2px; font-weight: 600; margin: 0 0 15px; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.5px; }
h1 { font-size: clamp(32px, 3.5vw, 49px); margin: 0; line-height: 1.17; }
h1 span { color: var(--muted); }
.intro-copy { color: var(--muted); margin: 19px 0 0; font-size: 13px; }
.intro-mark { color: var(--accent); width: 245px; height: 198px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 126px; line-height: 1; background: radial-gradient(circle, var(--accent-soft), transparent 65%); position: relative; }
.intro-mark::before { content: ''; position: absolute; width: 145px; height: 145px; border: 1px solid var(--line-soft); border-radius: 50%; }
.intro-mark::after { content: ''; position: absolute; width: 185px; height: 185px; border: 1px dashed var(--secondary-soft); border-radius: 50%; }
.intro-mark span { font-family: 'Segoe UI', sans-serif; font-size: 8px; letter-spacing: 2px; margin-top: 25px; color: var(--muted); }
.draft-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--line); border-radius: 9px; padding: 14px 18px; background: var(--surface-overlay); }
.library, .save-actions { display: flex; align-items: center; gap: 14px; }
.library label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.library select { width: 225px; padding: 8px 34px 8px 11px; font-size: 12px; }
.quiet { background: transparent; color: var(--muted); padding: 8px 12px; font-size: 12px; }
.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); display: flex; align-items: center; justify-content: center; gap: 28px; padding: 10px 20px; font-size: 12px; }
.primary:hover:not(:disabled) { background: var(--accent-hover); color: var(--bg); }
.primary span { font-size: 19px; }
.draft-state { color: var(--accent-hover); font-size: 11px; white-space: nowrap; }
.status { color: var(--muted); font-size: 12px; min-height: 20px; margin: 9px 4px 13px; white-space: pre-wrap; }
.error { color: var(--error); border: 1px solid var(--error-line); padding: 15px 18px; border-radius: 8px; background: var(--error-surface); margin: 0 0 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.persona-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.persona-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.persona-card-top { display: flex; gap: 14px; align-items: center; }
.persona-avatar { width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--line-soft); background: var(--surface-overlay); color: var(--accent-hover); display: grid; place-items: center; font-size: 40px; flex-shrink: 0; overflow: hidden; }
.persona-avatar img { width: 100%; height: 100%; object-fit: cover; }
.persona-card h3 { margin: 0; font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; white-space: pre-wrap; }
.persona-meta { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
.default-indicator { color: var(--accent); font-size: 8px; letter-spacing: 1px; border: 1px solid var(--secondary); border-radius: 4px; background: var(--accent-soft); padding: 3px 7px; text-transform: uppercase; }
/* YOUR-CHARACTERS-UX-001: the card's actual publication status. */
.publication-pill { color: var(--muted); font-size: 9px; letter-spacing: 1px; border: 1px solid var(--line-soft); border-radius: 4px; padding: 3px 7px; text-transform: uppercase; margin-top: 6px; display: inline-block; }
.persona-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.persona-actions button { padding: 7px 11px; font-size: 11px; }
.persona-actions .danger { color: var(--error); }
.checkbox-field { display: flex; flex-direction: column; }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.checkbox-label input { width: 17px; height: 17px; accent-color: var(--accent); }
.selector-actions { display: flex; gap: 8px; margin-top: 8px; }
.empty-state { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 54px 24px 58px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-overlay); }
.empty-state-symbol { color: var(--accent); font-size: 42px; line-height: 1; }
.empty-state-hint { color: var(--muted); font-size: 12px; margin: 0; max-width: 420px; }
.empty-state-create { margin-top: 14px; }
.persona-profile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 34px 36px; }
.profile-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.profile-avatar { width: 96px; height: 96px; font-size: 52px; }
.profile-heading h2 { margin: 0; font-size: 32px; line-height: 1.2; overflow-wrap: anywhere; white-space: pre-wrap; }
.profile-heading .default-indicator { margin-left: 10px; vertical-align: middle; }
.profile-heading .persona-meta { font-size: 12px; }
.profile-section { border-top: 1px solid var(--line); padding: 20px 0 6px; margin-top: 14px; }
.profile-section h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); font-family: inherit; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.profile-section .hint { margin: 0 0 8px; }
.profile-section-private { border-top: 1px dashed var(--line-soft); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px; }
/* BETA-OWNER-FEEDBACK-005 (C): the destructive Delete action sits at the
   bottom-right of the Role Card detail page, visually separated from the
   navigation actions (Back/Edit stay on the left). */
.profile-delete { margin-left: auto; color: var(--error); background: transparent; border-color: var(--error-line); }
.profile-delete:hover:not(:disabled) { background: var(--error-surface); border-color: var(--error); }
.persona-toolbar { justify-content: space-between; }
/* Beta acceptance: a compact personal-library title replaces the workshop hero. */
.library-heading { padding: 26px 4px 12px; }
.library-title { font-size: 24px; margin: 0; line-height: 1.2; }
.persona-intro { min-height: 230px; padding: 30px 4px 24px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
/* UX-1c: compact creator test pane — sticky, independently scrollable,
   always available while the creator switches editor sections. */
.studio-mode-switch { display: none; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 18px; }
.studio-mode-switch button { flex: 1; min-height: 44px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 12px; border-radius: 6px; }
.studio-mode-switch button[aria-pressed="true"] { border-color: var(--secondary); background: var(--raised); color: var(--accent); }
.test-pane { position: sticky; top: 24px; min-width: 0; max-height: calc(100dvh - 48px); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--secondary) transparent; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.pane-header { display: flex; gap: 14px; align-items: center; }
.pane-heading { min-width: 0; }
.pane-heading h2 { font-size: 20px; margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.pane-heading .preview-tagline { margin: 4px 0 0; font-size: 12px; }
.pane-heading .badges { margin-bottom: 0; }
.pane-heading .preview-tags { margin-top: 6px; }
.preview-indicator { color: var(--accent); font-size: 8px; letter-spacing: .8px; text-transform: uppercase; border: 1px solid var(--line); border-radius: 4px; padding: 3px 9px; white-space: nowrap; flex-shrink: 0; }
/* UX-1c: the preview header keeps the back action stable on phones. */
#preview-back { white-space: nowrap; flex-shrink: 0; }
.editor { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0; }
.editor-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--surface); }
.editor-tabs button { position: relative; border: 0; border-radius: 0; background: transparent; flex: 1; padding: 21px 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.editor-tabs button span { font-size: 9px; color: var(--muted); margin-right: 5px; font-weight: 400; }
.editor-tabs button[aria-selected="true"] { color: var(--accent); background: var(--accent-soft); }
.editor-tabs button[aria-selected="true"]::after { content: ''; position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px; background: var(--accent); }
.editor-tabs button:focus-visible { outline-offset: -5px; }
form [role="tabpanel"] { padding: 28px 32px 8px; }
.section-heading { margin-bottom: 20px; }
.section-heading .eyebrow { font-size: 9px; margin-bottom: 8px; }
.section-heading h2 { font-size: 22px; margin: 0 0 7px; line-height: 1.3; }
.section-heading > p:last-child { font-size: 12px; color: var(--muted); margin: 0; }
.field { margin-bottom: 25px; min-width: 0; }
label, legend { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; letter-spacing: .15px; }
.optional { font-size: 8px; color: var(--muted); letter-spacing: 1px; font-weight: 400; margin-left: 8px; }
.required { color: var(--accent); }
input:not([type="file"]):not([type="checkbox"]), textarea, select { width: 100%; background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; transition: border-color .15s; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; font-size: 12px; }
input:not([type="file"]):hover, textarea:hover, select:hover { border-color: var(--secondary); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
select { padding-right: 32px; }
/* UX: show/hide password control inside password fields. The button sits in
   the input's reserved right padding, so fields do not change size. */
.password-field { position: relative; }
.password-field input { padding-right: 42px; }
.password-visibility { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: none; border-radius: 5px; background: transparent; color: var(--muted); }
.password-visibility:hover:not(:disabled) { background: transparent; border-color: transparent; color: var(--accent); }
.password-visibility:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.password-visibility svg { display: block; }
textarea { display: block; resize: vertical; min-height: 96px; line-height: 1.85; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.hint { font-size: 11px; line-height: 1.7; color: var(--muted); margin: 5px 0 12px; }
.field-note { color: var(--muted); font-size: 8px; letter-spacing: 1px; display: block; margin-top: 8px; }
.image-fieldset { border: 1px dashed var(--line); padding: 18px 20px; border-radius: 8px; background: var(--secondary-soft); margin: 0 0 29px; min-width: 0; }
.image-fieldset legend { padding: 0 6px; margin: 0; }
.upload-row { display: flex; gap: 21px; align-items: center; }
.upload-art { width: 80px; height: 91px; background: var(--raised); border: 1px solid var(--secondary); border-radius: 7px; display: grid; place-items: center; font-size: 28px; color: var(--accent); flex-shrink: 0; }
.upload-label { color: var(--accent); margin-bottom: 6px; display: inline-block; cursor: pointer; border: 1px solid var(--secondary); border-radius: 4px; background: var(--raised); padding: 6px 10px; }
/* Retain the native picker and keyboard access, but own its visible English copy. */
.upload-input { position: absolute; width: 1px !important; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.upload-label:has(+ .upload-input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.upload-label:has(+ .upload-input:disabled) { cursor: not-allowed; opacity: .65; }
input[type="file"] { font-size: 11px; color: var(--muted); max-width: 100%; width: 100%; }
input[type="file"]::file-selector-button { border: 1px solid var(--secondary); background: var(--raised); color: var(--accent); border-radius: 4px; padding: 6px 10px; font: inherit; cursor: pointer; margin-right: 9px; }
.image-fieldset > label { margin-top: 18px; font-size: 11px; }
.image-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.image-thumb { width: 90px; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 10px; color: var(--muted); }
.image-thumb img { width: 90px; height: 95px; object-fit: cover; display: block; }

.image-thumb .thumb-remove { position: absolute; top: 3px; right: 3px; background: var(--surface-overlay); width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 20px; }
.image-thumb .thumb-action { padding: 3px 9px; border-radius: 8px; font-size: 10px; white-space: nowrap; }
.image-thumb .thumb-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; width: 90px; height: 95px; flex-shrink: 0; }
.divider { border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 25px 0 22px; margin-top: 36px; color: var(--muted); font-size: 9px; letter-spacing: 1.3px; }
.private-badge { color: var(--accent-hover); border: 1px solid var(--line); background: var(--secondary-soft); border-radius: 4px; font-size: 8px; padding: 3px 7px; letter-spacing: .6px; }
.notice { border-left: 2px solid var(--accent-hover); background: var(--accent-soft); color: var(--muted); font-size: 11px; line-height: 1.8; padding: 13px 16px; margin: 0 0 25px; }
.editor-footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding: 21px 30px; }
.editor-footer > span { color: var(--accent); font-size: 24px; }
.editor-footer p { flex: 1; margin: 0; font-size: 10px; color: var(--muted); }
.preview-avatar { position: relative; width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--line-soft); background: var(--surface-overlay); color: var(--accent-hover); display: grid; place-items: center; font-size: 40px; box-shadow: 0 0 0 8px var(--accent-soft); overflow: hidden; flex-shrink: 0; }
.preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
.preview-avatar-sm { width: 48px; height: 48px; font-size: 26px; box-shadow: 0 0 0 5px var(--accent-soft); }
.test-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.test-controls .hint { margin: 0; }
.test-controls button { padding: 7px 10px; font-size: 11px; }
/* UX-1c: read-only preview composer mirrors the player composer styling but
   carries no interactive control. */
.chat-composer-readonly { align-items: stretch; }
.chat-composer-box { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--input); display: flex; align-items: center; padding: 10px 14px; color: var(--muted); font-size: 12px; }
.chat-send-static { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--raised); color: var(--muted); font-size: 12px; font-weight: 600; opacity: .75; }
/* UX-1c: mobile section selector (hidden on desktop) */
.section-select-wrap { display: none; }
.badges { color: var(--accent); font-size: 9px; letter-spacing: .5px; margin-bottom: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-tagline { font-style: italic; color: var(--muted); font-family: Georgia, serif; margin: 0 0 18px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.prose { overflow-wrap: anywhere; font-size: 12px; line-height: 1.85; margin: 0; }
/* UX-001a: sanitized-Markdown transcript prose (ADR 020). Structure comes
   from the allowlisted renderer, so the container is no longer pre-wrap. */
.prose p { margin: 0 0 .5em; }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: .25em 0 .5em; padding-left: 1.4em; }
.prose blockquote { margin: .25em 0 .5em; padding: .1em .75em; border-left: 2px solid var(--line); color: var(--muted); }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { font-size: 1em; font-weight: 600; margin: .4em 0 .2em; }
.muted { color: var(--muted); }
.preview-tags { color: var(--accent-hover); font-size: 10px; margin-top: 15px; }
.content-warning { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; color: var(--accent-hover); font-size: 11px; }
.chat-preview { padding: 23px 0 8px; }
.centered { text-align: center; margin: 8px 0 0; font-size: 9px; }
#model-guidance { font-family: 'Segoe UI', sans-serif; color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.site-footer { display: flex; gap: 20px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 29px 0; margin-top: 45px; color: var(--muted); font-size: 9px; }
.site-footer > span { letter-spacing: 2px; font-size: 8px; }
/* ACCOUNT-001: My Account */
.header-user-avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-soft); object-fit: cover; flex-shrink: 0; }
.header-user-name { font-size: 13px; letter-spacing: 0.4px; font-weight: 600; color: var(--text); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-user:hover .header-user-name, .header-user:focus-visible .header-user-name { color: var(--accent); }
.account-facts { display: flex; gap: 34px; margin: 0 0 21px; padding: 0; }
.account-fact { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.account-fact dt { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.account-fact dd { margin: 0; font-weight: 600; }
.account-identity-row { display: flex; align-items: flex-start; gap: 18px; }
.account-avatar { width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--line-soft); background: var(--surface-overlay); color: var(--accent-hover); display: grid; place-items: center; font-size: 40px; flex-shrink: 0; overflow: hidden; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar-fallback { font-size: 30px; line-height: 1; }
.account-avatar-click { cursor: pointer; }
.account-avatar-click:hover { border-color: var(--accent); }
.account-hero { display: flex; align-items: center; gap: 22px; margin: 0 0 27px; flex-wrap: wrap; }
.account-avatar-large { width: 108px; height: 108px; font-size: 56px; }
.account-avatar-large .account-avatar-fallback { font-size: 44px; }
.account-hero-text { flex: 0 1 auto; min-width: 0; }
.account-display-name { margin: 0; font-size: 27px; line-height: 1.2; overflow-wrap: anywhere; }
.account-handle { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.account-role-badge { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-soft); border-radius: 999px; padding: 2px 9px; }
.account-library { margin-top: 8px; }
.account-library-errors { margin: 0 0 14px; }
.account-collection { margin: 0 0 27px; }
.account-collection h2 { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
/* BETA-OWNER-FEEDBACK-005 (B): the account overview is a full-width dashboard
   — the earlier 72rem desktop cap is removed. The view now uses the page's
   full available content width (the site-wide main container keeps sensible
   gutters); the collection grid fills the width responsively. */
#account-view .auth-card { width: 100%; }
#creator-view .auth-card { width: 100%; }
.account-collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.account-collection .muted { margin: 0 0 10px; }
.lib-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lib-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; text-align: left; }
.lib-card:hover { border-color: var(--accent); }
.lib-card-static { cursor: default; }
.lib-card-static:hover { border-color: var(--line); }
.lib-card:focus-visible, .lib-tile-delete:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lib-card-avatar { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-soft); background: var(--surface-overlay); color: var(--accent-hover); display: grid; place-items: center; font-size: 24px; flex-shrink: 0; overflow: hidden; }
.lib-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lib-card-name { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
/* ACCOUNT-DELETE-001: the Delete control is its own row below the card,
   aligned bottom-left; it never overlaps or triggers the card's open action. */
.lib-tile-delete { align-self: flex-start; padding: 3px 10px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--error); background: transparent; border-color: var(--error-line); }
.lib-tile-delete:hover:not(:disabled) { background: var(--error-surface); border-color: var(--error); }

.account-security { margin-top: 34px; padding-top: 21px; border-top: 1px solid var(--line-soft); }
.account-security h2 { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.account-security .intro-copy { margin-bottom: 14px; }
.account-security form { margin-top: 14px; }
@media (max-width: 440px) { .account-facts { gap: 22px; } .account-identity-row { flex-direction: column; } }
@media (max-width: 1100px) { .workspace { grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; } .test-pane { padding: 16px; } form [role="tabpanel"] { padding: 26px 24px 8px; } .draft-toolbar { gap: 14px; } .library { gap: 9px; } .library label { display: none; } .library select { width: 190px; } .editor-tabs button span { display: none; } .editor-tabs button { font-size: 11px; } .preview { padding: 18px; } .editor-footer { padding: 18px; } }
@media (max-width: 800px) {
  main { padding: 0 20px; } .site-header { padding: 0 20px; min-height: 70px; gap: 12px; } .brand { font-size: 14px; letter-spacing: 2px; gap: 9px; min-width: 0; flex-shrink: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .brand-sub, .studio-tag { display: none; } .app-drawer { right: 20px; min-width: 200px; } .header-user { gap: 8px; min-width: 0; flex-shrink: 1; min-height: 44px; justify-content: flex-end; } .header-user-avatar { width: 32px; height: 32px; } .header-user-name { max-width: 130px; min-width: 0; font-size: 12px; }
  .intro { min-height: 260px; padding: 35px 0; } .intro-mark { display: none; } .intro-copy br { display: none; } .intro-copy { max-width: 500px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 25px; }
/* UX-1c mobile: one pane at a time; the mode switch decides which. */
.studio-mode-switch { display: flex; }
.workspace[data-mode="editor"] .test-pane { display: none; }
.workspace[data-mode="test"] .editor { display: none; }
.test-pane { position: static; max-height: none; overflow: visible; }
  .draft-toolbar { flex-wrap: wrap; padding: 14px; gap: 14px; } .library { width: 100%; } .library select { width: auto; flex: 1; min-width: 0; } .save-actions { justify-content: space-between; width: 100%; } .save-actions .primary { min-width: 180px; } #open-preview { min-width: 0; padding: 8px 10px; font-size: 11px; } .save-actions .primary { min-width: 150px; }
  .editor-tabs { display: none; }
  .section-select-wrap { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .section-select-wrap label { margin: 0; color: var(--muted); font-size: 11px; white-space: nowrap; }
  .section-select-wrap select { width: auto; flex: 1; min-width: 0; min-height: 44px; }
  form [role="tabpanel"] { padding: 28px 24px 8px; } 
  .site-footer > span:last-child { display: none; } .site-footer p { text-align: right; }
}
@media (max-width: 440px) { main { padding: 0 12px; } .site-header { padding: 0 16px; } h1 { font-size: 32px; } .intro { padding: 30px 5px; } .eyebrow { font-size: 9px; letter-spacing: 1.5px; } form [role="tabpanel"] { padding: 25px 18px 8px; } .form-grid { grid-template-columns: 1fr; } .section-heading h2 { font-size: 25px; } .upload-art { width: 57px; height: 70px; } .upload-row { gap: 12px; } .image-fieldset { padding: 12px; } .divider { flex-wrap: wrap; } .editor-footer { flex-wrap: wrap; } .editor-footer button { width: 100%; } .test-pane { padding: 18px; } .primary { gap: 15px; } .header-user-name { display: none; } .header-user { padding: 0 6px; min-width: 44px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* AUTH-001 auth gate */
.auth-gate{display:grid;place-items:center;min-height:70vh;padding:2rem 1rem;}
.auth-card{width:min(28rem,100%);background:var(--surface);border:1px solid var(--line);border-radius:1rem;padding:2rem;}
.auth-brand{font-size:2rem;color:var(--accent);margin-bottom:.5rem;}
.auth-card h1{margin:.25rem 0 .5rem;}
.auth-card .field{margin-bottom:1rem;}
.auth-card form button[type=submit]{width:100%;margin-top:.5rem;}
.auth-card ul{list-style:none;padding:0;margin:.5rem 0 1rem;display:grid;gap:.5rem;}
.auth-card ul li{display:flex;align-items:center;justify-content:space-between;gap:.5rem;border:1px solid var(--line);border-radius:.5rem;padding:.5rem .75rem;}
.auth-card input[readonly]{opacity:.8;}

/* CHAT-001 play view + creator sandbox (Breeze cards 6542055 + 6546841) */
/* STORIES-CARD-LAYOUT-001: one visual card container — title top,
   metadata beneath, actions in a bottom row (Resume left, Delete right).
   The grid uses stretch so cards in a row share one height; wrapping
   text is never clipped (no fixed heights, overflow-wrap everywhere). */
.campaign-card { display: flex; flex-direction: column; width: 100%; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.campaign-card:hover { border-color: var(--accent); }
.campaign-head { min-width: 0; }
.campaign-title { display: block; min-width: 0; font-size: 1.02em; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.campaign-meta { display: block; min-width: 0; margin-top: 5px; color: var(--muted); font-size: 0.85em; line-height: 1.5; overflow-wrap: anywhere; }
.campaign-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; }
.campaign-open { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; background: transparent; border: none; color: var(--accent); padding: 0; cursor: pointer; font: inherit; font-size: 0.85em; letter-spacing: 0.4px; }
.campaign-open:hover { color: var(--accent-hover); }
.campaign-delete { flex: 0 0 auto; background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 8px 14px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 0.85em; }
.campaign-delete:hover { border-color: var(--error); color: var(--error); }
.campaign-resume { flex-shrink: 0; white-space: nowrap; }
.campaign-card:hover .campaign-resume { color: var(--accent-hover); }
.msg { padding: 12px 14px; margin: 8px 0; border-radius: 0 10px 10px 10px; background: var(--raised); border: 1px solid var(--line); }
.msg-player { border-radius: 10px 0 10px 10px; margin-left: 8%; }
.msg-author { display: block; font-size: 0.78em; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
#thread-log, #test-transcript { max-height: 45vh; overflow-y: auto; }
#test-panel { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px; margin-top: 12px; }
/* HOME-001: character discovery (HOME) */
/* Owner review: the catalog aligns with the main HOME content edge (the
   heading/logo column inside main) — no centered sub-container of its own,
   so the first card never sits in an oversized inset column. */
.home-catalog { padding: 0 4px 48px; }
.home-empty-state { display: grid; gap: 10px; justify-items: center; text-align: center; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 48px 24px; }
.home-empty-title { font-size: 1.1rem; }
/* HOME-CATALOG-001: a real responsive card grid. Fixed 272px tracks (the
   approved card width) collapse to a single column below 272px+gap without
   ever overflowing the container; cards fill rows left to right and are
   never stretched to fill a track. */
.home-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(272px, 100%), 272px)); justify-content: start; gap: 20px; }
/* HOME-CATALOG-002: the approved compact portrait card (~272px). The card is
   fixed-size regardless of tagline length — the tagline, tags and Play live
   only inside an in-bounds overlay, so expanding it can never shift the grid.
   Image framing stays non-destructive: default cover centering, no global
   object-position rule (per-character framing is not a universal crop). */
.home-card { position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; overflow: hidden; width: 100%; max-width: 272px; min-width: 0; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.home-card:hover, .home-card.open { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 10px 28px rgba(0, 0, 0, .5); outline: none; }
.home-card:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }
.home-card-imgwrap { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.home-card-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .18s ease; }
.home-card:hover .home-card-img { transform: scale(1.04); }
.home-card-noart { aspect-ratio: 3 / 4; }
.home-card-grad { position: absolute; inset: auto 0 0 0; height: 38%; background: linear-gradient(to top, rgba(10, 7, 16, .92) 0%, rgba(10, 7, 16, .5) 55%, transparent 100%); pointer-events: none; }
.home-card-name { position: absolute; left: 14px; right: 14px; bottom: 10px; margin: 0; font-size: 17px; font-weight: 700; color: var(--text); text-shadow: 0 1px 4px rgba(0, 0, 0, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .15s ease, visibility .15s ease; }
/* Owner review: the hidden name must never ghost through the open overlay —
   visibility:hidden removes it entirely (no mid-transition residue), while
   the just-closed rule below restores it immediately on dismissal. */
.home-card:hover .home-card-name, .home-card.open .home-card-name { opacity: 0; visibility: hidden; }
.home-card-rating { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: rgba(20, 12, 26, .72); border: 1px solid rgba(255, 255, 255, .22); color: var(--text); padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(4px); }
/* Adaptive overlay: a light bottom-edge gradient by default (short/medium
   taglines keep the artwork clearly visible); long taglines densify the scrim
   so the scrollable text stays legible. */
.home-card-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 14px; background: linear-gradient(to top, rgba(10, 7, 16, .9) 0%, rgba(10, 7, 16, .35) 40%, transparent 68%); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, visibility .18s ease; }
.home-card:hover .home-card-overlay, .home-card.open .home-card-overlay { opacity: 1; visibility: visible; pointer-events: auto; }
/* Issue 1: after a close-× click the pointer still hovers the card; this
   suppresses the :hover reveal until mouseleave removes .just-closed, so the
   dismissal is visible immediately and later hovers reopen without flicker. */
.home-card.just-closed:hover .home-card-overlay { opacity: 0; visibility: hidden; pointer-events: none; }
/* Issue 1 (name restore): the hover/open rule above hides the name while the
   overlay is visible; a just-closed card shows the overlay suppressed, so the
   underlying name must come back immediately — still while the pointer stays. */
.home-card.just-closed:hover .home-card-name { opacity: 1; visibility: visible; }
.home-card-dense .home-card-overlay { background: linear-gradient(to top, rgba(10, 7, 16, .96) 0%, rgba(10, 7, 16, .8) 45%, rgba(10, 7, 16, .3) 100%); }
.home-card-scroll { max-height: 52%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.home-card-tlabel { display: block; margin: 0 0 4px; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-hover); }
.home-card-full { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.home-card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-card-tags { display: flex; gap: 6px; min-width: 0; flex-wrap: wrap; }
.home-card-tag { font-size: 10.5px; color: var(--accent-hover); background: rgba(167, 117, 222, .12); border: 1px solid rgba(167, 117, 222, .35); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.home-card-play { flex: none; padding: 8px 18px; border: none; border-radius: 9px; background: var(--accent); color: var(--bg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.home-card-play:hover, .home-card-play:focus-visible { background: var(--accent-hover); color: var(--bg); }
/* MODERATION-001: report control + inline form inside the card overlay. */
.home-report { margin-top: 10px; }
.home-report-form { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-overlay); }
.home-report-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.home-report-form select, .home-report-form textarea { width: 100%; font: inherit; font-size: 13px; color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; }
.home-report-privacy { margin: 0; font-size: 11px; color: var(--muted); }
.home-report-actions { display: flex; gap: 8px; }
.home-report-thanks { margin: 0; font-size: 12px; color: var(--text); }
@media (max-width: 640px) {
  .home-card-grid { grid-template-columns: 1fr; gap: 16px; justify-items: center; }
}


/* ---- UX-1b (Breeze 6549009): immersive player chat ---- */
/* The thread is a fixed-height column: header, optional context panel, an
   independently scrolling transcript and the composer always in view. */
/* CHAT-UI-FIXES-001: the column owns the viewport under the site header
   (~83px) so the transcript — not dead margin — gets the space. */
#play-thread.chat-thread, #preview-thread.chat-thread { display: flex; flex-direction: column; height: min(calc(100dvh - 100px), 1200px); padding: 0; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.chat-portrait { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line-soft); background: var(--raised); display: flex; align-items: center; justify-content: center; color: var(--secondary); }
/* CHAT-UI-FIXES-001: portrait art is usually 3:4 with the face in the upper
   third; a dead-center cover crop chins the subject. Bias the focal point up. */
.chat-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; display: block; }
.chat-heading { min-width: 0; flex-shrink: 1; overflow: hidden; }
.chat-heading h2 { margin: 0; font-size: 15px; letter-spacing: 0.04em; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.chat-heading p { margin: 0; font-size: 12px; }
#thread-model { margin: 0 0 0 auto; font-size: 11px; }
.chat-context-toggle { min-height: 44px; flex-shrink: 0; }
.chat-context { border-bottom: 1px solid var(--line); padding: 12px 18px 16px; background: color-mix(in srgb, var(--raised) 55%, transparent); }
/* PLAY-DIRECT-001: the Role Card selector is its own row under the header —
   never squeezed into the header flex line. */
.thread-rolecard { padding: 10px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0; }
.chat-context h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.14em; color: var(--muted); }
.context-list { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.context-list dt { color: var(--muted); font-size: 12px; letter-spacing: 0.06em; }
.context-list dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
/* STORY-CONTEXT-001A: creator-authored Public Description in Story info. */
.context-description p { margin: 0 0 10px; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.context-description p:last-child { margin-bottom: 0; }
.chat-scroll { position: relative; flex: 1; min-height: 0; display: flex; }
#play-thread #thread-log { flex: 1; max-height: none; overflow-y: auto; padding: 18px 22px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
/* CHAT-UI-FIXES-001: the status line must not hold ~42px of blank space
   between transcript and composer when idle. */
#play-thread #thread-status { min-height: 0; margin: 2px 18px 4px; }
/* PREVIEW-LAYOUT-001: the preview thread shares the immersive chat column
   (#play-thread rules above) but styles its own log element. Without these
   rules the log is a plain block: it does not flex, does not scroll, and its
   bubbles collapse to intrinsic width, overflowing under the composer. */
#preview-thread #preview-log { flex: 1; max-height: none; overflow-y: auto; padding: 18px 22px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#preview-thread .msg { max-width: min(720px, 94%); }
#play-thread .msg { max-width: min(720px, 94%); }
.jump-latest { position: absolute; right: 16px; bottom: 12px; min-height: 44px; border-radius: 999px; color: var(--accent); background: var(--surface-overlay); box-shadow: 0 4px 14px color-mix(in srgb, var(--bg) 60%, transparent); }
.jump-latest:hover:not(:disabled) { color: var(--accent-hover); }
.chat-composer { display: flex; gap: 10px; align-items: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-overlay); }
/* CHAT-REGEN-CONTINUE-001: discreet regenerate/continue controls above the composer. */
.chat-turn-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 18px 0; }
.chat-turn-actions button { min-height: 36px; font-size: 12px; }
@media (max-width: 640px) { .chat-turn-actions { padding: 6px 12px 0; } .chat-turn-actions button { min-height: 40px; } }
.chat-composer .field { flex: 1; min-width: 0; margin: 0; }
/* CHAT-UI-FIXES-001: the composer starts at ONE line (autosizer owns height;
   the global textarea min-height:96px would clamp it to three). */
.chat-composer textarea, #test-input { width: 100%; min-height: 0; }
.chat-composer button { min-height: 44px; flex-shrink: 0; }
@media (max-width: 640px) {
  #play-thread.chat-thread, #preview-thread.chat-thread { height: calc(100dvh - 160px); }
  #preview-thread .chat-header { padding: 8px 10px; gap: 8px; }
  #preview-back { padding: 8px 10px; font-size: 11px; min-height: 40px; }
  #preview-subtitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .preview-indicator { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; flex-shrink: 1; min-width: 0; text-align: center; font-size: 8px; padding: 3px 7px; }
  .chat-heading { flex: 1 1 0; min-width: 100px; }
  .chat-heading h2 { white-space: normal; }
  #play-thread #thread-log { padding: 12px 12px; }
  .chat-header { padding: 10px 12px; }
  #thread-model { display: none; }
  .chat-composer { padding: 10px 12px; }
}

/* CREATOR-UX-ADULT-AVATAR-001: circular avatar framing editor (metadata-only
   crop preview; the original image is never modified). */
.avatar-framing { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-overlay); }
.framing-preview { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; background: var(--surface-overlay); border: 1px solid var(--line); cursor: grab; touch-action: none; }
.framing-preview img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; user-select: none; }
.framing-controls { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.framing-controls input[type="range"] { width: 180px; }

/* NOTIFICATIONS-001: bell + history panel (tokens only). */
.notif-root { display: inline-flex; margin-right: 10px; }
.notif-bell { position: relative; background: none; border: none; padding: 8px 10px; font-size: 16px; line-height: 1; cursor: pointer; color: var(--muted); border-radius: 6px; }
.notif-bell:hover, .notif-bell:focus-visible { color: var(--accent); background: var(--accent-soft); }
.notif-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--bg); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.notification-panel { position: fixed; top: 70px; right: 20px; width: min(360px, calc(100vw - 40px)); max-height: 60vh; overflow-y: auto; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 14px; z-index: 60; box-shadow: 0 8px 30px var(--surface-overlay); }
.notification-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.notification-mark-all { margin-left: auto; font-size: 11px; padding: 4px 8px; white-space: nowrap; }
.notification-mark-all[disabled] { opacity: 0.6; cursor: default; }
.notification-panel-header h2 { margin: 0; font-size: 14px; letter-spacing: 0.5px; color: var(--text); }
.notification-error { margin: 0 0 8px; font-size: 12px; color: var(--error); }
.notification-list { list-style: none; margin: 0; padding: 0; }
.notification-row { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.notification-row:last-child { border-bottom: none; }
.notification-unread { background: var(--accent-soft); }
.notification-message { margin: 0; font-size: 13px; color: var(--text); }
.notification-time { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.notification-mark { margin-top: 4px; font-size: 11px; padding: 4px 8px; }
.notification-empty { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 440px) { .notification-panel { top: 60px; right: 12px; width: calc(100vw - 24px); } }

/* BETA-FEEDBACK-CENTER-001: two-pane admin queue (compact list + detail)
   and the shared reply-thread presentation. Overrides the generic
   .auth-card ul li flex rule for feedback cards only. */
.feedback-center { display: grid; grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.feedback-center-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.feedback-center-list ul li, .feedback-thread-list li, .auth-card ul li.feedback-thread-message, #account-view .auth-card ul li.feedback-thread-message { display: block; border: 0; padding: 0; background: transparent; }
.feedback-card { width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: .5rem; padding: .6rem .75rem; display: flex; flex-direction: column; gap: .15rem; cursor: pointer; }
.feedback-card:hover { border-color: var(--secondary); }
.feedback-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.feedback-card-selected { border-color: var(--accent); background: var(--accent-soft); }
.feedback-card-meta { color: var(--muted); font-size: .75rem; }
.feedback-card-author { font-size: .8rem; }
.feedback-card-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.feedback-center-detail { background: var(--raised); border: 1px solid var(--line); border-radius: .75rem; padding: 1rem 1.25rem; min-width: 0; }
.feedback-detail-meta { margin: 0 0 .25rem; color: var(--muted); font-size: .8rem; }
.feedback-detail-author { margin: 0 0 .5rem; font-size: .9rem; }
.feedback-detail-description { white-space: pre-line; overflow-wrap: anywhere; margin: 0 0 1rem; }
.feedback-thread-empty { color: var(--muted); }
.feedback-thread-list { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: .5rem; }
.feedback-thread-message { border: 1px solid var(--line); border-radius: .5rem; padding: .5rem .75rem; background: var(--surface); }
.feedback-thread-admin { border-color: var(--accent); }
.feedback-thread-meta { display: block; color: var(--muted); font-size: .75rem; margin-bottom: .15rem; }
.feedback-thread-message p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.feedback-reply-form, .feedback-resolve-form { display: grid; gap: .35rem; margin: .75rem 0; }
.feedback-reply-form label, .feedback-resolve-form label { display: grid; gap: .25rem; font-size: .85rem; color: var(--muted); }
.feedback-reply-form textarea, .feedback-resolve-form textarea { width: 100%; resize: vertical; }
.feedback-thread-closed { color: var(--muted); font-style: italic; }
.feedback-detail-history-list { list-style: none; padding: 0; margin: .25rem 0 0; color: var(--muted); font-size: .8rem; display: grid; gap: .15rem; }
.feedback-detail-note-label { color: var(--muted); font-size: .8rem; margin: .5rem 0 0; }
.feedback-detail-note { white-space: pre-line; overflow-wrap: anywhere; }
.feedback-thread-list h4 { margin: .5rem 0 .25rem; }
#account-feedback-thread { margin-top: 1rem; background: var(--raised); border: 1px solid var(--line); border-radius: .75rem; padding: 1rem 1.25rem; }
.account-collection h3 { margin: 1.25rem 0 .25rem; }
@media (max-width: 720px) {
  .feedback-center { grid-template-columns: 1fr; }
}
/* BETA-FEEDBACK-CENTER-001: the admin panel container opens up to the full
   admin area width (the owner's core complaint: a cramped narrow column with
   dead space to the right). Inner queues keep their own row layout. */
#admin-view .auth-card { width: min(72rem, 100%); }

/* MY-ACCOUNT-CREATOR-REDESIGN-001: creator profile hero, accessible tabs
   and image-forward library cards. Uses only existing design tokens. */
.account-hero { align-items: center; gap: 22px; margin: 4px 0 21px; padding: 21px 22px; background: linear-gradient(135deg, var(--accent-soft), transparent 55%), var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.account-bio { margin: 8px 0 0; color: var(--muted); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 60ch; }
.account-hero-actions { display: flex; flex-direction: column; gap: 8px; margin-left: auto; flex-shrink: 0; }
.account-tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; margin: 0 0 18px; overflow-x: auto; }
.account-tabs button { flex: 1; min-height: 44px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 12px; border-radius: 6px; white-space: nowrap; padding: 8px 12px; }
.account-tabs button:hover { color: var(--text); }
.account-tabs button[aria-selected="true"] { border-color: var(--secondary); background: var(--raised); color: var(--accent); }
.account-tab-count { color: var(--muted); margin-left: 7px; font-size: 11px; }
.account-tabs button[aria-selected="true"] .account-tab-count { color: var(--accent-hover); }
/* Image-forward cards: the artwork leads, the name follows. */
.lib-card { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
.lib-card .lib-card-avatar { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 8px; font-size: 44px; }
.lib-card .lib-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lib-card .publication-pill { align-self: flex-start; margin-top: 0; }
.creator-card-tagline { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.creator-hero { margin-top: 14px; }
@media (max-width: 440px) {
  .account-hero { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .account-hero-actions { flex-direction: row; margin-left: 0; }
  .account-avatar-large { width: 88px; height: 88px; }
}

