/* One reading page and continuous lists, using the console's cycle palette. */
body[data-cycle], body {
  --cycle-sidebar: var(--bg);
  --cycle-sidebar-deep: var(--panel);
  --cycle-sidebar-line: var(--line);
  --cycle-sidebar-card: var(--panel);
  --cycle-sidebar-card-active: var(--accent-soft);
  --cycle-sidebar-card-hover: var(--accent-soft);
  --cycle-sidebar-text: var(--ink);
  --cycle-sidebar-muted: var(--muted);
  --cycle-sidebar-label: var(--muted);
  --cycle-sidebar-accent: var(--accent-strong);
  --cycle-sidebar-accent-line: var(--accent);
  --cycle-sidebar-button: var(--accent-strong);
  --cycle-sidebar-card-line: var(--line);
  --cycle-sidebar-hover-line: var(--accent);
  --shadow: none;
}
body { line-height: 1.6; grid-template-columns: clamp(270px, 25vw, 420px) minmax(0, 1fr); }
.sidebar { background: var(--cycle-sidebar); background: color-mix(in srgb, var(--cycle-sidebar) 95%, #000); padding: 32px 20px; border-right: 1px solid var(--line); min-width: 0; }
.brand { margin-bottom: 20px; gap: 8px; }
.brand h1, .reader h2, .battle-subheading, .character-title {
  font-family: "Songti SC", "Noto Serif CJK SC", SimSun, Georgia, serif;
  font-weight: 600;
  color: var(--accent-strong);
  letter-spacing: .04em;
}
.brand h1 { font-size: 23px; }
.mark { flex-shrink: 0; width: 40px; }
.story-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
.home-link { margin: 0; border-radius: 0; font-weight: 600; font-size: 12px; }
.home-link:not(.record-link) { grid-column: 1 / -1; background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }
.record-link { background: transparent; border: 0; min-height: 28px; color: var(--accent-strong); }
.record-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.field { gap: 6px; margin-bottom: 14px; }
.field span { font-size: 12px; font-weight: 600; }
button, select, input, textarea, .reader button, .sidebar button { border-radius: 0; }
.tts-select, .tts-config-btn, .tts-btn-close, .tts-status.collapsed .tts-status-actions button, .aibp-hint-close { border-radius: 0; }
#ttsStatusToggle { background: var(--accent); color: #fff; border: 1px solid var(--accent); box-shadow: none; }
#ttsStatusToggle:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
select, input { background: var(--panel); color: var(--ink); border-color: var(--line); min-width: 0; }
button { font-weight: 600; }
.quick-row button, .memory-tools button, .tts-btn { background: var(--accent-strong); }
#backButton { background: var(--panel); color: var(--accent-strong); border: 1px solid var(--line); }
.memory-tools button { background: var(--panel); color: var(--accent-strong); border: 1px solid var(--line); }
:is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.chapter-summary { border-top: 1px solid var(--line); padding-top: 12px; }
.memory-panel { padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-list, .memory-list { gap: 0; }
.result-item, .memory-jump, .battle-shortcut { border: 0; border-bottom: 1px solid var(--line); background: transparent; box-shadow: none; padding: 10px 8px; }
.result-item.active { border-left: 3px solid var(--accent); border-bottom-color: var(--line); background: var(--accent-soft); padding-left: 5px; }
.result-item:hover, .memory-jump:hover, .battle-shortcut:hover { background: var(--accent-soft); }
.memory-remove { background: var(--panel); border: 1px solid var(--line); color: var(--accent-strong); }
.memory-item { padding: 6px 0; align-items: center; }
.reader { margin: 24px; padding: 28px clamp(20px, 3vw, 48px); border: 0; background: transparent; }
.reader-head { gap: 16px; }
.reader-actions { flex-wrap: wrap; align-items: center; overflow: visible; }
.reader-actions > :is(button, select) { min-height: 34px; }
.section-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.reader h2 { font-size: clamp(26px, 3vw, 40px); line-height: 1.35; }
.entry-badge { border: 0; border-left: 1px solid var(--line); background: transparent; border-radius: 0; box-shadow: none; font-family: Georgia, serif; font-weight: 400; min-width: 60px; }
.story-text { font-size: 17px; line-height: 1.95; margin-top: 24px; }
.story-html p { margin-bottom: 1em; }
.reader-foot { border-top: 1px solid var(--line); }
.second-screen-mode-toggle, .entity-bio-toggle, .link-chip { border-radius: 0; background: var(--panel); }
.entity-bio-toggle:hover { background: var(--accent-soft); }
.entity-bio-toggle.active { background: var(--accent-strong); color: #fff; }
.ai-translation, .source-original { border: 0; border-left: 2px solid var(--accent); border-radius: 0; background: var(--bg); box-shadow: none; }
.ai-translation-label, .source-original-text, .battle-image, .battle-page { border-radius: 0; }
.character-card, .character-entry { border-radius: 0; box-shadow: none; }
.character-meta span, .character-aliases span { border-radius: 0; background: var(--bg); }
.tts-config, .tts-status-panel, .tts-status, .tts-modal, .tts-modal-dialog, .aibp-hint-box, .page-viewer-dialog { border-radius: 0; }

@media (max-width: 1500px) { .reader-head { display: grid; grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  body { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 24px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .reader { margin: 16px; padding: 20px 16px; }
  .story-text { font-size: 16px; }
  .reader-actions { overflow: visible; }
  .reader-actions > * { max-width: 100%; }
}
@media print {
  body { display: block; background: #fff; }
  .sidebar, .reader-actions { display: none; }
  .reader { margin: 0; padding: 0; border: 0; }
}
