:root {
  color-scheme: dark;
  --bg: oklch(0.19 0.007 160);
  --surface: oklch(0.23 0.008 160);
  --ink: oklch(0.93 0.006 160);
  --muted: oklch(0.72 0.01 160);
  --line: oklch(0.34 0.009 160);
  --accent: oklch(0.80 0.09 160);
  --danger: oklch(0.78 0.10 25);
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-section: 48px;
  --header-layer: 10;
  --toast-layer: 20;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; letter-spacing: 0; }
html { min-width: 320px; background: var(--bg); color: var(--ink); }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
button:disabled { cursor: default; opacity: .4; }
svg.lucide { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.6; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; top: -80px; left: 16px; color: var(--ink); background: var(--surface); padding: 12px; z-index: var(--toast-layer); }
.skip-link:focus { top: 8px; }
.player-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner {
  width: min(100% - 48px, 1000px); margin-inline: auto; min-height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.book-picker { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--muted); }
.book-picker select {
  width: 100%; max-width: 420px; min-width: 0; height: 44px; padding: 6px 22px 6px 0;
  border: 0; border-radius: 0; background: var(--bg); color: var(--ink);
  font-size: 14px; font-weight: 600; text-overflow: ellipsis;
}
.player-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.save-status { font-size: 12px; color: var(--muted); min-width: 40px; margin-right: 12px; }
.icon-button {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 4px; background: transparent; color: var(--muted);
  transition: color 160ms ease-out, background 160ms ease-out;
}
.icon-button:hover:not(:disabled), .icon-button.is-active { background: var(--surface); color: var(--accent); }
.reader { width: min(100% - 48px, 700px); margin: 0 auto; padding: 54px 0 64px; }
.scene-heading { margin-bottom: 34px; }
.scene-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.8; }
h1 { font-size: 26px; line-height: 1.5; font-weight: 600; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
.scene-goal { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.story-log { max-width: 70ch; }
.story-copy { margin: 0 0 28px; white-space: pre-line; font-size: 16px; line-height: 2; overflow-wrap: anywhere; text-wrap: pretty; }
.last-choice { display: flex; align-items: flex-start; gap: 10px; color: var(--accent); font-size: 13px; line-height: 1.8; margin: 0 0 24px; }
.last-choice svg { margin-top: 3px; }
.actions { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 16px; }
.choices { display: grid; gap: 0; }
.choice {
  width: 100%; min-height: 56px; display: flex; align-items: center; gap: 18px;
  padding: 14px 8px; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; background: transparent; color: var(--ink); text-align: left;
  font-size: 14px; line-height: 1.8;
  transition: color 160ms ease-out, background 160ms ease-out;
}
.choice:hover:not(:disabled) { color: var(--accent); background: var(--surface); }
.choice > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.choice > svg { color: var(--muted); }
.choice-number { color: var(--muted); font-size: 12px; flex: 0 0 16px; text-align: center; }
.freeform { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.freeform textarea {
  flex: 1; min-width: 0; min-height: 48px; padding: 12px 8px; border: 0; border-radius: 0;
  max-height: 260px; resize: vertical; line-height: 1.8;
  background: transparent; color: var(--ink); font-size: 14px;
}
.freeform textarea::placeholder { color: var(--muted); opacity: 1; }
.turn-status { min-height: 20px; margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.journey-history { margin: -8px 0 26px; color: var(--muted); font-size: 12px; }
.journey-history summary { cursor: pointer; padding-block: 8px; }
.journey-history > div { padding-top: 12px; border-bottom: 1px solid var(--line); }
.journey-history p { font-size: 14px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }
.history-choice { color: var(--accent); }
.journal { padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.journal h2 { margin: 0 0 20px; font-size: 16px; font-weight: 600; }
.journal h3 { color: var(--muted); font-size: 12px; font-weight: 400; margin: 24px 0 10px; }
.journal-stats { display: flex; flex-wrap: wrap; gap: 24px; margin: 0; font-size: 13px; }
.journal-stats > div { display: flex; gap: 10px; }
.journal-stats dt { color: var(--muted); }
.journal-stats dd { margin: 0; }
.journal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.journal-list li { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.journal-list strong { font-weight: 400; flex-shrink: 0; }
.journal-list li > span:last-child:not(:only-child) { color: var(--muted); text-align: right; }
.journal-list .fact-label { flex-shrink: 0; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.8; }
.text-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 4px; border: 0; background: transparent;
  color: var(--muted); font-size: 13px; border-radius: 4px;
}
.text-button:hover:not(:disabled) { color: var(--ink); }
.new-journey, .confirm-button { color: var(--accent); }
.story-entry { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.entry-heading { margin-bottom: var(--space-lg); }
.entry-title { font-size: 1.75rem; line-height: 1.5; }
.entry-title:focus, #scene-title:focus { outline: none; }
.entry-synopsis { max-width: 70ch; }
.entry-synopsis p {
  margin: 0; font-size: 1rem; line-height: 2; white-space: pre-line;
  overflow-wrap: anywhere; text-wrap: pretty;
}
.entry-role { margin: var(--space-xl) 0 0; max-width: 70ch; }
.entry-role dt { color: var(--muted); font-size: .875rem; line-height: 1.8; margin-bottom: var(--space-xs); }
.entry-role dd { margin: 0; font-size: .875rem; line-height: 1.9; overflow-wrap: anywhere; }
.entry-journey { margin-top: var(--space-section); border-top: 1px solid var(--line); padding-top: var(--space-lg); }
.saved-caption { color: var(--muted); font-size: .875rem; line-height: 1.8; margin: 0 0 var(--space-xs); }
.saved-scene { font-size: 1rem; font-weight: 600; line-height: 1.8; margin: 0 0 var(--space-xs); overflow-wrap: anywhere; }
.saved-journey .scene-meta { align-items: center; margin-bottom: 0; font-size: .875rem; }
.save-note { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.9; }
.saved-journey .save-note { margin-top: var(--space-sm); }
.entry-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-lg); }
.saved-journey + .entry-actions, .save-note + .entry-actions { margin-top: var(--space-lg); }
.primary-button {
  min-width: 180px; min-height: 52px; padding: var(--space-sm) var(--space-lg);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  border: 0; border-radius: 4px; color: var(--bg); background: var(--accent);
  font-size: 1rem; font-weight: 600; line-height: 1.6;
  transition: background 160ms ease-out;
}
.primary-button:hover:not(:disabled) { background: var(--ink); }
.primary-button:active:not(:disabled) { background: var(--muted); }
.notice { width: min(100% - 48px, 700px); margin: 24px auto 0; padding-block: 12px; border-bottom: 1px solid var(--line); }
.notice p { margin: 0; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.error-notice { color: var(--danger); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.error-notice .text-button { flex-shrink: 0; }
.restart-notice p span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.restart-notice > div { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 10px; }
.empty { padding-block: 100px; }
.empty p { font-size: 14px; color: var(--muted); }
.loading-lines { display: grid; gap: 16px; padding-top: 20px; }
.loading-lines > div { height: 14px; background: var(--surface); border-radius: 3px; }
.loading-lines > div:first-child { width: 44%; height: 24px; margin-bottom: 16px; }
.loading-lines > div:last-child { width: 76%; }
.toast-region { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: min(100% - 32px, 480px); z-index: var(--toast-layer); pointer-events: none; }
.toast { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px 18px; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.app-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.app-header-inner { width: min(100% - 48px, 1080px); min-height: 70px; margin: auto; display: flex; align-items: center; gap: 28px; }
.brand-mark { border: 0; padding: 0; background: transparent; color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-item { min-height: 42px; padding: 8px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 13px; }
.nav-item:hover, .nav-item.is-active { color: var(--ink); background: var(--surface); }
.account-menu { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.account-name { color: var(--muted); font-size: 12px; }
.auth-page { min-height: calc(100vh - 1px); display: grid; place-items: center; padding: 32px 20px; }
.auth-panel { width: min(100%, 380px); padding: 36px 0; }
.auth-kicker, .page-kicker { margin: 0 0 12px; color: var(--accent); font-size: 12px; }
.auth-panel h1, .page-heading h1 { margin: 0; font-size: 28px; line-height: 1.4; }
.auth-copy, .page-heading p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.auth-form { display: grid; gap: 18px; margin-top: 30px; }
.auth-form label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
.auth-form input { min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface); }
.auth-form input:focus { border-color: var(--accent); outline: 2px solid color-mix(in oklch, var(--accent) 40%, transparent); outline-offset: 2px; }
.auth-form .primary-button { width: 100%; margin-top: 8px; }
.auth-switch { margin-top: 18px; }
.form-error { margin: 0; color: var(--danger); font-size: 13px; }
.product-page { width: min(100% - 48px, 900px); margin: auto; padding: 56px 0 80px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.page-heading h1 { font-size: 30px; }
.page-count { color: var(--muted); font-size: 12px; }
.story-list, .template-list, .settings-list { display: grid; }
.story-row, .template-row, .setting-row { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.story-row-main h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.story-row-main p, .save-list, .account-section p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.row-action { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--accent); font-size: 13px; white-space: nowrap; }
.row-action:hover { color: var(--ink); }
.save-section, .account-section { margin-top: 44px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-heading h2, .account-section h2 { margin: 0; font-size: 16px; }
.save-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.save-list li { display: flex; justify-content: space-between; gap: 20px; }
.save-list time { color: var(--muted); }
.creation-empty, .empty-state { padding: 90px 0; color: var(--muted); }
.creation-empty h2, .empty-state h2 { margin: 14px 0 8px; color: var(--ink); font-size: 18px; }
.creation-empty p, .empty-state p { max-width: 48ch; line-height: 1.8; font-size: 14px; }
.empty-symbol { color: var(--accent); }
.template-row { width: 100%; padding: 18px 0; border-top: 0; border-left: 0; border-right: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.template-row span { display: grid; gap: 5px; }
.template-row strong { font-size: 15px; font-weight: 600; }
.template-row small, .template-row em { color: var(--muted); font-size: 12px; font-style: normal; line-height: 1.7; }
.template-row > svg { color: var(--muted); }
.template-row:hover strong, .template-row:hover > svg { color: var(--accent); }
.setting-row { min-height: 76px; }
.setting-row span { display: grid; gap: 5px; }
.setting-row strong { font-size: 14px; font-weight: 600; }
.setting-row small { color: var(--muted); font-size: 12px; line-height: 1.7; }
.setting-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.account-section { border-top: 1px solid var(--line); padding-top: 24px; }
.is-compact .story-copy { margin-bottom: 16px; line-height: 1.75; }
@media (max-width: 600px) {
  .app-header-inner { width: calc(100% - 32px); min-height: 62px; gap: 12px; }
  .main-nav { gap: 0; overflow-x: auto; }
  .nav-item { padding-inline: 8px; font-size: 12px; white-space: nowrap; }
  .account-name { display: none; }
  .product-page { width: calc(100% - 40px); padding-top: 36px; }
  .page-heading { align-items: start; flex-direction: column; gap: 12px; }
  .page-heading h1 { font-size: 26px; }
  .story-row, .template-row { min-height: 78px; }
  .story-row-main h2 { font-size: 15px; }
  .story-row-main p { font-size: 12px; }
  .header-inner { width: calc(100% - 32px); min-height: 66px; gap: 12px; }
  .book-picker { gap: 8px; flex: 1; }
  .book-picker > svg { display: none; }
  .book-picker select { font-size: 13px; padding-right: 2px; }
  .player-tools { gap: 0; }
  .player-tools .icon-button { width: 44px; height: 44px; }
  .save-status { display: none; }
  .reader { width: calc(100% - 40px); padding-top: 34px; }
  h1 { font-size: 23px; }
  .scene-heading { margin-bottom: 28px; }
  .story-copy { font-size: 1rem; line-height: 1.95; }
  .story-entry { padding-top: var(--space-xl); }
  .entry-title { font-size: 1.5rem; }
  .entry-journey { margin-top: var(--space-xl); }
  .choice { gap: 12px; padding-inline: 4px; }
  .notice { width: calc(100% - 40px); }
  .journal-list li { gap: 12px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* The product shell stays separate from the focused reader. */
:root { --text-caption: .75rem; --text-secondary: .875rem; --text-body: 1rem; --text-section: 1.125rem; --text-heading: 1.75rem; }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: oklch(.985 0 0); --surface: oklch(.95 .004 160);
  --ink: oklch(.24 .01 160); --muted: oklch(.44 .01 160);
  --line: oklch(.82 .007 160); --accent: oklch(.43 .10 160); --danger: oklch(.46 .15 25);
}
a { color: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.product-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100dvh; }
.product-sidebar { position: sticky; top: 0; height: 100dvh; padding: 32px 16px 16px; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
.side-brand { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 32px; font-size: 1.5rem; }
.side-brand span { color: var(--muted); font-size: var(--text-caption); font-weight: 400; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-label { color: var(--muted); font-size: var(--text-caption); margin: 24px 16px 8px; }
.side-nav-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 12px 16px; border-radius: 4px; text-decoration: none; color: var(--muted); font-size: var(--text-secondary); }
.side-nav-item:hover { color: var(--ink); background: var(--bg); }
.side-nav-item.is-active { color: var(--accent); background: var(--bg); }
.side-nav a[aria-disabled="true"] { cursor: progress; opacity: .6; }
.sidebar-account { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); min-width: 0; }
.sidebar-account .account-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; font-size: var(--text-secondary); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 4px; background: var(--bg); color: var(--accent); font-size: var(--text-secondary); }
.product-content { width: min(100% - 96px, 1000px); margin: 0 auto; padding: 48px 0 64px; min-width: 0; }
.page-heading { align-items: center; padding-bottom: 32px; gap: 24px; }
.page-heading h1, .auth-panel h1 { font-size: var(--text-heading); }
.page-heading p { margin: 12px 0 0; font-size: var(--text-secondary); }
.page-heading .primary-button { min-height: 44px; min-width: 0; font-size: var(--text-secondary); white-space: nowrap; }
.auth-brand { font-size: 1.25rem; font-weight: 600; color: var(--accent); margin: 0 0 48px; }
.auth-panel { padding: 32px 0; }
.auth-copy { font-size: var(--text-secondary); }
.library-tools { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0 16px; }
.segmented { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.segmented button { min-height: 44px; border: 0; border-radius: 4px; padding: 8px 12px; background: transparent; color: var(--muted); font-size: var(--text-secondary); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }
.segmented span { font-size: var(--text-caption); margin-left: 4px; }
.search-field { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); min-width: 0; max-width: 240px; }
.search-field input { width: 100%; min-width: 0; min-height: 44px; border: 0; background: transparent; color: var(--ink); font-size: var(--text-secondary); }
.story-row { min-height: 120px; gap: 24px; padding: 24px 0; }
.story-row-main { min-width: 0; }
.story-row-main h2, .creation-row h2, .template-row h2 { font-size: var(--text-section); font-weight: 600; margin: 0 0 8px; overflow-wrap: anywhere; }
.item-meta { font-size: var(--text-caption) !important; margin: 0 0 8px !important; }
.row-action { min-height: 44px; padding: 8px; font-size: var(--text-secondary); flex-shrink: 0; text-decoration: none; }
.story-row-main p { font-size: var(--text-secondary); }
.save-excerpt { max-width: 60ch; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.creation-row, .template-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 120px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.creation-row > div:first-child, .template-row > div:first-child { min-width: 0; }
.creation-row p, .template-row p { font-size: var(--text-secondary); line-height: 1.8; color: var(--muted); margin: 0 0 8px; overflow-wrap: anywhere; max-width: 65ch; }
.creation-row small { color: var(--muted); font-size: var(--text-caption); }
.creation-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.empty-state { padding: 64px 0; }
.empty-state h2 { font-size: var(--text-section); }
.empty-state p { font-size: var(--text-secondary); }
.creation-form { display: grid; gap: 16px; padding: 32px 0; }
.creation-form > label, .prompt-label label { font-size: var(--text-secondary); }
.creation-form > label { display: grid; gap: 8px; }
.creation-form input, .creation-form textarea, .save-panel input, .settings-list select { border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); padding: 12px; min-width: 0; width: 100%; font-size: var(--text-body); line-height: 1.7; }
.creation-form textarea { resize: vertical; }
.creation-form #rules-input { min-height: 320px; }
.prompt-label, .editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.editor-actions { justify-content: flex-start; padding-top: 8px; }
.editor-actions .muted { margin-right: auto; }
.file-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px; cursor: pointer; color: var(--accent); position: relative; }
.file-button input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.file-button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-list select { width: 120px; flex-shrink: 0; }
.setting-row { gap: 24px; padding: 16px 0; }
.setting-row > span { min-width: 0; }
.setting-row strong { font-size: var(--text-secondary); }
.setting-row small { font-size: var(--text-caption); }
.settings-actions { padding-top: 32px; }
.account-section h2 { font-size: var(--text-section); margin-bottom: 16px; }
.book-title { min-width: 0; flex: 1; background: transparent; border: 0; color: var(--ink); text-align: left; font-size: var(--text-secondary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 44px; }
.header-inner { gap: 12px; }
.player-tools { gap: 0; }
.save-panel { width: min(100% - 48px, 700px); margin: 24px auto 0; border-bottom: 1px solid var(--line); padding: 0 0 24px; }
.save-panel h2 { font-size: var(--text-section); }
.save-panel form { display: flex; gap: 12px; }
.save-panel input { flex: 1; }
.save-panel .primary-button { min-width: 96px; min-height: 44px; font-size: var(--text-secondary); }
.bookmark-list { padding: 0; list-style: none; margin: 0; }
.bookmark-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.bookmark-list li > div { min-width: 0; display: grid; gap: 8px; }
.bookmark-list strong { font-size: var(--text-secondary); font-weight: 600; overflow-wrap: anywhere; }
.bookmark-list small { color: var(--muted); font-size: var(--text-caption); }
.font-large .story-copy { font-size: 1.125rem; }
.font-small .story-copy { font-size: .9375rem; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
.reader { padding-top: 48px; }
.scene-heading { margin-bottom: 32px; }
.story-copy { margin-bottom: 24px; }
.actions { margin-top: 32px; }
.notice { font-size: var(--text-secondary); }
@media (max-width: 900px) {
  .product-shell { grid-template-columns: 184px minmax(0, 1fr); }
  .product-content { width: calc(100% - 48px); }
  .library-tools { align-items: flex-start; flex-direction: column; gap: 12px; }
  .search-field { max-width: 100%; width: 100%; }
}
@media (max-width: 600px) {
  .product-shell { display: block; }
  .product-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 16px 8px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .side-brand { font-size: 1.25rem; padding: 0; flex-direction: row; align-items: center; }
  .side-brand span { display: none; }
  .side-nav { flex-direction: row; width: 100%; order: 2; justify-content: space-between; gap: 0; }
  .side-label { display: none; }
  .side-nav-item { padding: 12px 8px; gap: 6px; font-size: .75rem; flex: 1; justify-content: center; }
  .side-nav-item svg { width: 16px; height: 16px; flex-basis: 16px; }
  .sidebar-account { border: 0; padding: 0; margin: 0 0 0 auto; gap: 8px; }
  .sidebar-account .account-name { display: inline; max-width: 120px; }
  .sidebar-account .avatar { display: none; }
  .product-content { width: calc(100% - 40px); padding: 32px 0 48px; }
  .page-heading { gap: 16px; padding-bottom: 24px; }
  .page-heading h1 { font-size: 1.5rem; }
  .story-row, .template-row, .creation-row { gap: 12px; }
  .creation-row { flex-wrap: wrap; }
  .creation-actions { margin-left: auto; }
  .story-row-main h2, .creation-row h2, .template-row h2 { font-size: 1rem; }
  .row-action { gap: 4px; padding: 8px 0 8px 8px; }
  .book-title { flex-basis: calc(100% - 64px); }
  .header-inner { flex-wrap: wrap; gap: 0 8px; padding: 8px 0; }
  .player-tools { flex: 1; justify-content: flex-end; }
  .player-tools .save-status { display: block; margin-right: auto; font-size: var(--text-caption); }
  .save-panel { width: calc(100% - 40px); }
  .save-panel form { flex-wrap: wrap; }
  .save-panel input { flex-basis: 100%; }
  .empty-state { padding: 48px 0; }
  .editor-actions .primary-button { min-width: 140px; }
  .reader { padding-top: 32px; }
}
