/* Chiaro: warm paper, ivory panels and restrained gold actions. Artwork and the dark theme stay intact. */
html[data-theme="light"] {
  color-scheme: light;
  --ink: #f6f3ec;
  --surface: #eee7da;
  --panel: #fffdf8;
  --text: #182e42;
  --muted: #625b50;
  --line: #c8bdab;
  --gold: #785014;
  --light-control-line: #94856f;
  --light-selected: #eadfca;
  --light-action: #efd28c;
  --light-paper-shadow: 0 10px 25px rgb(57 45 26 / 13%);
  --portal-surface: #fffdf8;
  --portal-text: var(--text);
  --portal-line: var(--light-control-line);
  --portal-accent: var(--gold);
  --signup-text: var(--text);
  --signup-muted: var(--muted);
  --signup-surface: var(--panel);
  --signup-panel: var(--panel);
  --signup-line: var(--light-control-line);
  --signup-link: var(--gold);
  --signup-gold: var(--light-action);
}
html[data-theme="light"] ::selection { background: #efd28c; color: #182e42; }
html[data-theme="light"] * { scrollbar-color: #94856f #eee7da; }
html[data-theme="light"] :is(input, select, textarea) { caret-color: #182e42; accent-color: #785014; }
html[data-theme="light"] :focus-visible { outline: 2px solid #785014; outline-offset: 5px; }
html[data-theme="light"] .site-header { background: #fffdf8; }
html[data-theme="light"] .site-header nav > a:is(:hover, [aria-current], .is-active) { color: #785014; }
html[data-theme="light"] :is(.button-outline, .icon-button, .theme-picker-panel button) { border-color: var(--light-control-line); }
html[data-theme="light"] :is(.button-outline, .icon-button):hover:not(:disabled) { background: var(--light-selected); }
html[data-theme="light"] :is(.theme-picker-panel, .privacy-choice) { background: #fffdf8; box-shadow: 0 12px 32px rgb(57 45 26 / 16%); }
html[data-theme="light"] :is(.theme-picker-panel button[aria-pressed="true"], .art-zoom[aria-pressed="true"]) { background: #182e42; color: #fffdf8; border-color: #182e42; }
html[data-theme="light"] .privacy-actions button:not(.privacy-quiet) { background: var(--light-action); color: var(--text); }
html[data-theme="light"] .privacy-actions .privacy-quiet { background: #fff; color: var(--text); }
html[data-theme="light"] .privacy-choice :is(h2, p) { color: var(--text); }
html[data-theme="light"] .privacy-choice a { color: var(--gold); }

/* The illustration stays intact; the reading veil follows the paper palette. */
html[data-theme="light"] .hero { background: var(--ink); color: var(--text); }
html[data-theme="light"] .hero-scene::after {
  background: linear-gradient(90deg, #f6f3ec 0%, #f6f3ecf5 12%, #f6f3ecb8 32%, #f6f3ec00 62%), linear-gradient(0deg, #f6f3ec 0%, #f6f3ec00 22%);
}
html[data-theme="light"] .hero-wordmark { color: #182e42; }
html[data-theme="light"] :is(.hero-copy, .hero-signature, .hero-author, .trailer-link) { color: #3d3b35; }
html[data-theme="light"] .hero-signature strong { color: var(--gold); }
html[data-theme="light"] .hero-actions > .text-link { color: var(--text); border-color: #94856f; }
html[data-theme="light"] .hero-author { border-color: #b9aa93; }
html[data-theme="light"] .trailer-link small { color: var(--muted); }
html[data-theme="light"] .trailer-link .icon { border-color: #785014; }
html[data-theme="light"] .hero-art-link { background: #fffdf8; color: #182e42; border-color: #94856f; }

/* White reading links stay recognisable against the warm paper surface. */
html[data-theme="light"] .reading-languages { background: #fffdf8; }
html[data-theme="light"] .reading-option strong { color: var(--text); }
html[data-theme="light"] a.reading-option:hover { background: #f4e6bc; }
html[data-theme="light"] .reading-option[aria-disabled] { opacity: 1; background: #e8e1d4; color: var(--muted); }
html[data-theme="light"] .reading-option[aria-disabled] :is(strong, small) { color: var(--muted); }
html[data-theme="light"] .reading-option[aria-disabled] .flag { opacity: .65; }
html[data-theme="light"] .manga-page { box-shadow: var(--light-paper-shadow); }
@media (hover:hover) {
  html[data-theme="light"] .manga-page:hover { box-shadow: 0 18px 32px rgb(57 45 26 / 20%); }
}
html[data-theme="light"] .character-tabs button[aria-selected="true"] { background: var(--light-selected); color: var(--text); border-color: var(--text); }
html[data-theme="light"] .character-tabs img { opacity: 1; }
html[data-theme="light"] .character-panel > .character-art.character-original { box-shadow: var(--light-paper-shadow); }
html[data-theme="light"] .character-copy h3 { color: var(--text); }
html[data-theme="light"] .vikypedia-book-link > img { filter: drop-shadow(0 10px 12px rgb(57 45 26 / 16%)); }
html[data-theme="light"] .editions-grid .edition { background: #fffdf8; }
html[data-theme="light"] .promo-strip .art-button { background: #fff; }
html[data-theme="light"] .merch-track .art-button { background: #fff; box-shadow: 0 1px 0 #c8bdab; }
html[data-theme="light"] .site-footer { background: #e7ddcd; }
html[data-theme="light"] .site-footer a:hover { color: #785014; }

/* A white record with an illustrated plate, not one undifferentiated grey panel. */
html[data-theme="light"] :is(.dex-tools input, .dex-tools select, .book77-tools select) { background: #fff; border-color: var(--light-control-line); }
html[data-theme="light"] .dex-record { background: #fff; border: 1px solid var(--line); }
html[data-theme="light"] .dex-portrait { background: var(--surface); }
html[data-theme="light"] .dex-art-window:is(.is-design, .is-original-sheet) { box-shadow: 0 6px 16px rgb(57 45 26 / 10%); }
html[data-theme="light"] .dex-index :is(button,a[data-entry])[aria-current="true"],
html[data-theme="light"] .dex-index :is(button,a[data-entry])[aria-pressed="true"] { background: var(--light-selected); color: var(--text); border-color: var(--text); }
html[data-theme="light"] .dex-index :is(button,a[data-entry]):hover { background: #eee7da; color: var(--text); }
html[data-theme="light"] :is(.dex-modes a, .book77-modes a)[aria-current] { color: var(--text); border-color: var(--text); }
html[data-theme="light"] .book77-spread { --book-paper: #fffaf1; box-shadow: 0 14px 34px rgb(57 45 26 / 19%); }
html[data-theme="light"] .book77-index button[aria-pressed="true"] { color: var(--text); background: var(--light-selected); border-color: var(--text); }
html[data-theme="light"] .book77-index button { padding-inline: 10px; }
html[data-theme="light"] :is(.book77-turner button, .dex-step button, .merch-controls button):disabled { opacity: 1; color: #716653; background: transparent; border-color: var(--line); }
html[data-theme="light"] dialog { background: #fffdf8; box-shadow: 0 22px 60px rgb(57 45 26 / 24%); }
html[data-theme="light"] dialog::backdrop { background: rgb(57 45 26 / 64%); }
html[data-theme="light"] .art-scroll { background: #e7ddcd; }
html[data-theme="light"] .art-zoom { background: #eee7da; border-color: var(--light-control-line); }
html[data-theme="light"] .art-zoom[aria-pressed="true"] { background: #182e42; color: #fffdf8; }

/* Signup, confirmation/privacy surfaces and the standalone Guild share the light palette. */
html[data-theme="light"] .signup-consent input { accent-color: #785014; }
html[data-theme="light"] .newsletter-page:not(.signup-compact) { background: var(--ink); }
html[data-theme="light"] :is(.signup-status, fieldset:disabled button) { background: #eee7da; }
html[data-theme="light"] body.privacy-page { background: var(--ink); color: var(--text); }
html[data-theme="light"] .privacy-page :is(h1, h2, h3) { color: var(--text); }
html[data-theme="light"] .privacy-page section { border-color: var(--line); }
html[data-theme="light"] .privacy-page a { color: var(--gold); }
html[data-theme="light"] .privacy-page a:hover { color: #182e42; }
html[data-theme="light"] body.join-page { background: var(--ink); color: var(--text); --join-gold: #785014; --join-soft: #625b50; }
html[data-theme="light"] .join-page :is(.join-header, .join-footer, .join-no-signup) { border-color: var(--line); }
html[data-theme="light"] .join-page :is(.join-story-note, .join-footer) { color: var(--muted); }
html[data-theme="light"] .join-page .join-explore { color: var(--text); border-color: var(--light-control-line); background: #fff; }
html[data-theme="light"] .join-page .join-explore:hover { background: var(--light-selected); }
html[data-theme="light"] .join-page .join-skip { background: var(--light-action); color: var(--text); }
html[data-theme="light"] .join-page .join-form-panel { background: #fff; color: var(--text); border-color: var(--line); box-shadow: none; }
html[data-theme="light"] .join-page .join-art { background: var(--surface); box-shadow: none; border-color: var(--line); }
html[data-theme="light"] .join-page .join-art figcaption { background: var(--surface); color: var(--text); }
html[data-theme="light"] .join-page .join-story-note a:hover { color: var(--text); }
html[data-theme="light"] .join-page :is(.join-form-help, .join-footer, .join-art figcaption, .join-no-signup p, .join-no-signup > span) { font-size: 13px; }
@media (max-width:1200px) {
  html[data-theme="light"] .site-header #primary-nav { background: #fffdf8; box-shadow: 0 14px 24px rgb(57 45 26 / 13%); }
}
@media (max-width:700px) {
  html[data-theme="light"] .hero-scene::after { background: linear-gradient(0deg, #f6f3ec 0%, #f6f3ec00 28%); }
  html[data-theme="light"] .dex-record { border-inline: 0; }
}
