/* Appearance is independent of the saved life. Native radios keep keyboard support. */
.appearance-settings{border:0;padding:0;margin:0 0 26px;min-width:0}
.appearance-settings legend{padding:0;font-size:15px;font-weight:600}
.appearance-intro{color:var(--muted);font-size:13px;line-height:1.5;margin:8px 0 15px}
.theme-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.theme-option{position:relative;cursor:pointer;min-width:0}
.theme-option input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.theme-card{display:flex;flex-direction:column;padding:12px;border:1px solid var(--line);border-radius:17px;background:var(--panel);height:100%;transition:border-color .18s,box-shadow .18s}
.theme-option:hover .theme-card{border-color:var(--muted)}
.theme-option input:checked+.theme-card{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.theme-option input:focus-visible+.theme-card{outline:2px solid var(--accent);outline-offset:4px}
.theme-preview{display:flex;height:76px;border-radius:9px;overflow:hidden;border:1px solid #7773;margin-bottom:12px}
.theme-preview-art{width:35%;background:linear-gradient(155deg,#bd9c72,#7f8b82 52%,#455d65)}
.theme-preview-page{flex:1;padding:14px 12px;display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.theme-preview-page i{height:3px;width:100%;border-radius:3px;opacity:.55;background:currentColor}
.theme-preview-page i:first-child{width:62%;height:5px;opacity:1;margin-bottom:3px}
.theme-preview-page i:nth-child(3){width:80%}
.theme-preview-page b{height:10px;width:55%;border-radius:3px;margin-top:3px}
.theme-preview-dark{background:#11151c;color:#bdc4cd}
.theme-preview-dark b{background:#e9aa82}
.theme-preview-light{background:#f6f2e9;color:#514b43}
.theme-preview-light b{background:#92502e}
.theme-option-title{display:flex;align-items:center;justify-content:space-between;font-size:14px;font-weight:600;gap:8px}
.theme-selected{height:19px;width:19px;display:grid;place-items:center;border:1px solid var(--muted);border-radius:50%;flex-shrink:0}
.theme-selected svg{width:13px;height:13px;visibility:hidden}
.theme-option input:checked+.theme-card .theme-selected{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.theme-option input:checked+.theme-card .theme-selected svg{visibility:visible}
.theme-option-description{font-size:12px;color:var(--muted);line-height:1.5;margin-top:5px}
.appearance-note{font-size:12px;line-height:1.5;color:var(--muted);margin:13px 0 0}

/* Warm paper, charcoal ink, and copper; the original dark palette stays intact. */
:root[data-theme="light"]{
 color-scheme:light;
 --bg:#f6f2e9;
 --panel:#fffcf7;
 --panel-2:#eae3d7;
 --ink:#302c27;
 --soft:#514b43;
 --muted:#6b6258;
 --line:#55432b26;
 --accent:#92502e;
 --accent-ink:#fffaf3;
 --good:#326546;
 --bad:#a43e32;
 --light-tint:#92502e0d;
 --light-border:#92502e66;
 --light-hover:#e8ddcb;
 --light-inset:#f0eade;
 --light-glass:#fffcf7ed;
}
[data-theme="light"] ::selection{background:#e7c6a6;color:var(--ink)}
[data-theme="light"] .icon-button{background:var(--panel-2);color:var(--soft)}
[data-theme="light"] .icon-button:hover{background:var(--light-hover);color:var(--ink)}
[data-theme="light"] .primary:hover{background:#7d4226}
[data-theme="light"] .secondary:hover{background:var(--light-hover)}
[data-theme="light"] dialog{background:var(--panel);border-color:var(--line);box-shadow:0 28px 90px #49331c30;scrollbar-color:#b8aa98 transparent}
[data-theme="light"] dialog::backdrop{background:#302c2759}
[data-theme="light"] dialog:before,
[data-theme="light"] .creator-header:before{background:#b8aa98}
[data-theme="light"] .settings-group,
[data-theme="light"] .mini-attrs,
[data-theme="light"] .allocate,
[data-theme="light"] .tabs,
[data-theme="light"] .track-list,
[data-theme="light"] .roll-result,
[data-theme="light"] .delta,
[data-theme="light"] .voyage-thread{background:var(--light-inset)}
[data-theme="light"] .name-input{background:var(--panel);border-color:#a99c8b}
[data-theme="light"] .name-input::placeholder{color:var(--muted)}
[data-theme="light"] .creator-footer{background:var(--panel)}
[data-theme="light"] .creator-progress li{color:var(--muted)}
[data-theme="light"] .creator-progress .current{color:var(--ink)}
[data-theme="light"] .creator-progress li>span{border-color:var(--line)}
[data-theme="light"] .creator-progress .current>span{border-color:var(--accent)}
[data-theme="light"] .archetype.selected,
[data-theme="light"] .creator-progress .done>span,
[data-theme="light"] .creator-prologue>span,
[data-theme="light"] .avatar{background:var(--light-tint);border-color:var(--light-border)}
[data-theme="light"] .points-header b,
[data-theme="light"] .memory{background:var(--light-tint)}
[data-theme="light"] .resource-warning{background:#a43e320c}
[data-theme="light"] .dots i{background:#cfc5b6}
[data-theme="light"] .dots i.on{background:var(--accent)}
[data-theme="light"] .item,
[data-theme="light"] .relation-initials{background:var(--panel-2)}
[data-theme="light"] .tabs button.selected{background:var(--panel);box-shadow:0 2px 5px #49331c12}
[data-theme="light"] .journal-entry{border-color:var(--line)}
[data-theme="light"] .switch{background:#938777}
[data-theme="light"] .switch.on{background:var(--accent)}
[data-theme="light"] .music-cover{background:linear-gradient(135deg,#f2e5d1,#e5e7df);border-color:var(--line)}
[data-theme="light"] .resource-detail{background:var(--light-inset);border-color:var(--line)}
[data-theme="light"] .resource-detail.selected{background:var(--light-tint);border-color:var(--light-border)}
[data-theme="light"] .resource-detail meter{background:#d8cdbd}
[data-theme="light"] .resource-detail meter::-webkit-meter-bar{background:#d8cdbd}
[data-theme="light"] .journey-track i{background:#d8cdbd}
[data-theme="light"] .journey-track i.visited{background:#bb8967}
[data-theme="light"] .journey-track i.current{background:var(--accent)}
[data-theme="light"] .journey-timeline .visited .journey-number{border-color:var(--light-border)}
[data-theme="light"] #toast{background:var(--ink);color:var(--accent-ink);border-color:transparent;box-shadow:0 8px 35px #49331c26}

/* Reading and decisions, including locked options and the mobile reading gate. */
[data-theme="light"] .narrative-scroll,
[data-theme="light"] .is-playing .choices,
[data-theme="light"] .creator-body{scrollbar-color:#b8aa98 transparent}
[data-theme="light"] .dialogue-block{border-color:#92502e59}
[data-theme="light"] .read-hint{color:var(--muted)}
[data-theme="light"] .decision-tray,
[data-theme="light"] .reaction-footer{border-color:var(--line)}
[data-theme="light"] .is-playing .decisions-heading h2{color:var(--ink)}
[data-theme="light"] .is-playing .choice{background:var(--panel);border-color:var(--line);box-shadow:0 2px 6px #49331c05}
[data-theme="light"] .is-playing .choice:not(:disabled):hover{background:#f0e5d5;border-color:var(--light-border)}
[data-theme="light"] .is-playing .choice:not(:disabled):active{background:#ead8c1;border-color:var(--accent)}
[data-theme="light"] .is-playing .choice-key{color:var(--accent);background:var(--light-tint);border-color:var(--light-border)}
[data-theme="light"] .is-playing .choice-meta{color:var(--soft)}
[data-theme="light"] .is-playing .choice.special .choice-meta{color:var(--accent)}
[data-theme="light"] .is-playing .choice.danger .choice-meta{color:var(--bad)}
[data-theme="light"] .choice-arrow{color:var(--muted)}
[data-theme="light"] .is-playing .choice:disabled{background:#ede8df;border-color:#a99c8b;box-shadow:none}
[data-theme="light"] .is-playing .choice:disabled .choice-title,
[data-theme="light"] .is-playing .choice:disabled .choice-meta{color:var(--muted)}
[data-theme="light"] .reaction-footer .primary:disabled{background:#e5ddcf;color:var(--muted);border-color:#c7baa7}
[data-theme="light"] .game-resources,
[data-theme="light"] .character-access,
[data-theme="light"] .menu-access{background:var(--light-glass);border-color:#55432b30;box-shadow:0 3px 12px #49331c0d;color:var(--ink)}
[data-theme="light"] .resource-chip+.resource-chip:before{background:var(--line)}
[data-theme="light"] .resource-chip svg{color:var(--accent)}
[data-theme="light"] .resource-chip:first-child svg{color:var(--bad)}
[data-theme="light"] .resource-chip:hover,
[data-theme="light"] .character-access:hover,
[data-theme="light"] .menu-access:hover{background:var(--light-hover);color:var(--ink)}
/* Labels on the full-height illustration retain their own light ink. */
[data-theme="light"] .scene-location svg{color:#e9aa82}

/* The title screen opens onto paper, with the illustration visible on the right. */
[data-theme="light"] .home-screen{background:var(--bg)}
[data-theme="light"] .home-veil{background:linear-gradient(90deg,#f6f2e9 0%,#f6f2e9f5 26%,#f6f2e9c7 44%,#f6f2e91a 76%),linear-gradient(0deg,#f6f2e9 0%,#f6f2e999 13%,transparent 35%,#f6f2e966 82%,#f6f2e9cc 100%)}
[data-theme="light"] .brand{color:var(--ink);filter:none}
[data-theme="light"] .is-home .game-header .glass{background:var(--light-glass);border-color:var(--line);color:var(--soft)}
[data-theme="light"] .is-home .game-header .glass.playing{color:var(--accent)}
[data-theme="light"] .home-nav button{color:var(--soft)}
[data-theme="light"] .home-nav button:hover{color:var(--accent)}
[data-theme="light"] .home-title,
[data-theme="light"] .home-tagline{color:var(--ink);text-shadow:none}
[data-theme="light"] .home-eyebrow,
[data-theme="light"] .home-description{color:var(--soft)}
[data-theme="light"] .home-year i{background:linear-gradient(90deg,transparent,var(--accent))}
[data-theme="light"] .home-year i:last-child{background:linear-gradient(90deg,var(--accent),transparent)}
[data-theme="light"] .home-play{box-shadow:0 6px 24px #92502e1a}
[data-theme="light"] .home-play-buttons .home-new{background:#fffcf7b3;color:var(--soft);border-color:#55432b40}
[data-theme="light"] .home-new:hover{background:var(--light-hover);border-color:var(--light-border)}
[data-theme="light"] .home-save>img{border-color:var(--line)}
[data-theme="light"] .home-save small,
[data-theme="light"] .home-first-save,
[data-theme="light"] .home-meta,
[data-theme="light"] .home-studio,
[data-theme="light"] .home-footer>p,
[data-theme="light"] .home-footer>p>span{color:var(--muted)}
[data-theme="light"] .home-saved-dot{background:var(--good)}
[data-theme="light"] .home-meta i{background:var(--muted)}
[data-theme="light"] .home-scene-controls{padding:18px 20px 8px;background:#fffcf7ed;border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 28px #49331c0d;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
[data-theme="light"] .home-scene-caption{text-shadow:none}
[data-theme="light"] .home-scene-caption>span,
[data-theme="light"] .home-scene-caption p{color:var(--soft)}
[data-theme="light"] .home-slide-selectors button>span{background:#b8aa98}
[data-theme="light"] .home-slide-selectors button.selected>span,
[data-theme="light"] .home-slide-selectors button:hover>span{background:var(--accent)}
[data-theme="light"] .home-motion{color:var(--soft);background:var(--light-inset);border-color:var(--line)}
[data-theme="light"] .home-hero-bottom,
[data-theme="light"] .home-invitation,
[data-theme="light"] .home-footer>p,
[data-theme="light"] .postmode-credit a{border-color:var(--line)}
[data-theme="light"] .home-discover,
[data-theme="light"] .home-studio b{color:var(--soft)}
[data-theme="light"] .postmode-credit a:hover{background:var(--light-hover)}
@media(max-width:760px){
 [data-theme="light"] .home-veil{background:linear-gradient(0deg,#f6f2e9 0%,#f6f2e9fa 30%,#f6f2e9e8 58%,#f6f2e9b8 80%,#f6f2e980 100%)}
 [data-theme="light"] .home-scene-controls{padding:17px 0 0;background:none;box-shadow:none;border:0;border-top:1px solid var(--line);border-radius:0;backdrop-filter:none;-webkit-backdrop-filter:none}
 [data-theme="light"] .home-motion{background:none}
 [data-theme="light"] .is-playing .art-shade{background:linear-gradient(180deg,#302c2726,transparent 38%,#f6f2e9b3 72%,var(--bg))}
 [data-theme="light"] .scene-location{text-shadow:none}
 [data-theme="light"] .scene-location>span:first-child,[data-theme="light"] .scene-location-link{color:var(--ink)}
 [data-theme="light"] .scene-location svg{color:var(--accent)}
}
@media(max-width:360px){
 .theme-options{gap:10px}
 .theme-card{padding:10px}
 .theme-option-description{font-size:11px}
}
