/* Sketch005: warm night palette. Artwork and pixel sprite colours are untouched. */
:root{--theme-surface:#e8e5da;--theme-solid-ink:#20221f;--theme-panel:#11140f;--theme-panel-text:#f4f1e8}
html[data-theme=dark]{--paper:#181a17;--ink:#f2efe5;--muted:#b0b3a6;--line:#4a4d43;--theme-surface:#252922;color-scheme:dark}
html[data-theme=light]{color-scheme:light}
html[data-theme=dark] ::selection{background:var(--accent);color:var(--theme-solid-ink)}
html[data-theme=dark] .rail{background:var(--paper);border-color:var(--line)}
html[data-theme=dark] :is(.topline,.section-head,.support-topline,.case-topline){border-color:var(--line)}
html[data-theme=dark] .tag{border-color:#777b6e}
html[data-theme=dark] :is(.logo-mark,.heading-arrow,.media-open,.dialog-close,.case-period,.art-enlarge,.case-map-label h2>span,.case-next>div>a>span:last-child){color:var(--theme-solid-ink)}
html[data-theme=dark] .home-play :is(.hero-scroll i,.tag:not(.pending-tag),.magic-media .media-corner){color:var(--theme-solid-ink)}
html[data-theme=dark] .experience-row:hover{color:var(--theme-solid-ink)}
html[data-theme=dark] .experience-row:hover :is(.role-pending,i){color:var(--theme-solid-ink)}
html[data-theme=dark] .experience-row:hover:focus-visible{outline-color:var(--ink)}
html[data-theme=dark] .experiments-strip{color:var(--theme-solid-ink);border-color:var(--theme-solid-ink)}
html[data-theme=dark] .experiments-strip :is(.experiment-link,a:focus-visible){border-color:var(--theme-solid-ink);outline-color:var(--theme-solid-ink)}
html[data-theme=dark] .placeholder{background:#2b3029;color:#d7dbcd}
html[data-theme=dark] .placeholder-type{color:#d7dbcd}
html[data-theme=dark] .cobalt-placeholder::before{border-color:#686f5e}
html[data-theme=dark] .cloth-placeholder{background:#353028}
html[data-theme=dark] .cloth-grid{opacity:.23}
html[data-theme=dark] .cloth-type{background:#24231f;color:#eee8dc;box-shadow:0 4px 20px #0003}
html[data-theme=dark] :is(.site-footer,.case-feature,.results-chapter,.experiment-empty){background:var(--theme-panel);color:var(--theme-panel-text)}
html[data-theme=dark] .case-feature-art figcaption{color:var(--theme-panel-text)}
html[data-theme=dark] .case-scene-heading{color:var(--theme-panel-text)}
html[data-theme=dark] .case-feature-note{background:var(--accent);color:var(--theme-solid-ink)}
html[data-theme=dark] .case-feature-note :is(.case-feature-statement span,.case-cross,.feature-facts .eyebrow){color:var(--theme-solid-ink)}
html[data-theme=dark] .case-scene-ticket{background:var(--theme-solid-ink);color:var(--theme-panel-text);border-color:var(--theme-solid-ink)}
html[data-theme=dark] .case-feature-note>.case-scene-ticket{color:var(--theme-panel-text)}
html[data-theme=dark] .art-open{background:var(--theme-panel)}
html[data-theme=dark] .art-archive>summary{background:var(--theme-surface)}
html[data-theme=dark] .art-archive>summary:hover{background:#f86c3929;color:var(--ink)}
html[data-theme=dark] .results-chapter .section-head .eyebrow{color:var(--accent)}
html[data-theme=dark] .results-chapter :is(.case-chapter-note,.art-figure figcaption .eyebrow){color:#b9bcaf}
html[data-theme=dark] .results-chapter .art-archive>summary{background:transparent}
html[data-theme=dark] .results-chapter .art-archive>summary:hover{background:#f4f1e810;color:var(--theme-panel-text)}
html[data-theme=dark] :is(dialog.art-dialog,.art-dialog-bar){background:var(--theme-panel);color:var(--theme-panel-text)}
html[data-theme=dark] .art-dialog-bar button{color:var(--theme-panel-text)}
html[data-theme=dark] .support-placeholder{background-color:var(--theme-surface);background-image:linear-gradient(#8e948125 1px,transparent 1px),linear-gradient(90deg,#8e948125 1px,transparent 1px)}
html[data-theme=dark] .support-placeholder-word{color:#b8bead}
html[data-theme=dark] .character-study :is(.study-stage,.atlas,.emotion-atlas){background:var(--theme-surface)}
html[data-theme=dark] .character-study button:is(:hover,[aria-pressed=true]){color:var(--theme-solid-ink)}
html[data-theme=dark] .review-tools{background:#10130fee;color:var(--theme-panel-text);border:1px solid #59614e}
html[data-theme=dark] .review-tools button{color:var(--theme-panel-text)}
html[data-theme=dark] .review-tools button[aria-pressed=true]{color:var(--theme-solid-ink)}
html[data-theme=dark] .font-controls .font-sample{color:var(--theme-panel-text)}
html[data-theme=dark] .first-arrival :is(.arrival-mark,.arrival-mark>span){color:var(--theme-solid-ink)}

/* Compact product control; the larger selector lives inside its dialog. */
.theme-controls{position:fixed;bottom:112px;right:12px;display:flex;align-items:stretch;z-index:28;border:1px solid var(--ink);background:var(--paper);box-shadow:3px 3px 0 var(--ink);font-family:Space,Arial,sans-serif}
.theme-controls[hidden]{display:none}
.theme-controls button{appearance:none;border:0;border-radius:0;background:transparent;color:var(--ink);min-height:38px;font:500 11px/1.2 Space,Arial,sans-serif;padding:8px 11px;touch-action:manipulation}
.theme-controls .theme-open{display:flex;align-items:center;gap:9px}
.theme-controls .theme-open::before{content:'';display:block;width:8px;height:8px;background:var(--accent);border-radius:50%}
.theme-controls .theme-toggle{display:grid;place-items:center;border-left:1px solid var(--ink);min-width:40px;padding:8px}
.theme-controls .theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-controls button:hover{background:var(--accent);color:var(--theme-solid-ink)}
.theme-controls button:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.theme-dialog{width:min(510px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:2px solid var(--ink);border-radius:0;background:var(--paper);color:var(--ink);box-shadow:10px 10px 0 #0005;overflow:auto}
.theme-dialog::backdrop{background:#10130f99;backdrop-filter:blur(3px)}
.theme-dialog-inner{position:relative;padding:31px 32px 28px;isolation:isolate}
.theme-dialog .theme-close{position:absolute;right:14px;top:14px;width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--line);background:transparent;color:var(--ink);font:28px/1 Space,Arial,sans-serif;padding:0}
.theme-close:hover{border-color:var(--ink);background:var(--theme-surface)}
.theme-dialog .theme-kicker{font:10px/1.5 var(--mono);letter-spacing:.045em;text-transform:uppercase;padding-right:30px;color:var(--muted)}
.theme-dialog .theme-eyes{display:flex;align-items:center;justify-content:center;gap:7px;height:108px;margin:23px 0 19px;transform:rotate(-7deg);position:relative}
.theme-eyes .theme-eye{display:block;position:relative;width:64px;height:82px;background:var(--ink);border-radius:48% 52% 44% 56%;transform:rotate(8deg)}
.theme-eyes .theme-eye:last-child{width:58px;height:77px;transform:rotate(-8deg)}
.theme-eye::before{content:'';position:absolute;inset:18px 10px 13px 19px;border-radius:50%;background:var(--accent);transform:rotate(-10deg)}
.theme-eye::after{content:'';position:absolute;right:18px;top:29px;background:var(--paper);width:8px;height:12px;transform:rotate(-9deg);border-radius:50%}
.theme-eyes::before,.theme-eyes::after{content:'';position:absolute;width:24px;height:3px;background:var(--accent);top:18px;left:calc(50% - 114px);transform:rotate(32deg)}
.theme-eyes::after{left:auto;right:calc(50% - 112px);top:76px;transform:rotate(24deg)}
.theme-dialog h2{font:600 clamp(34px,5vw,52px)/1.02 Space,Arial,sans-serif;letter-spacing:-.065em;text-align:center;margin:0 0 13px;text-wrap:balance}
.theme-dialog .theme-subcopy{font:14px/1.45 Space,Arial,sans-serif;color:var(--muted);text-align:center;max-width:310px;margin:0 auto 23px;text-wrap:pretty}
.theme-dialog .theme-main-action{display:flex;align-items:center;justify-content:space-between;gap:15px;width:100%;min-height:54px;padding:13px 17px;border:0;background:var(--accent);color:var(--theme-solid-ink);font:600 15px/1.3 Space,Arial,sans-serif;box-shadow:3px 3px 0 var(--ink)}
.theme-main-action span:last-child{font:25px/1 Space,Arial,sans-serif}
.theme-main-action:hover{box-shadow:5px 5px 0 var(--ink)}
.theme-dialog fieldset{padding:0;border:0;margin:27px 0 0;min-width:0}
.theme-dialog legend{font:10px/1.5 var(--mono);text-transform:uppercase;letter-spacing:.025em;margin-bottom:10px;color:var(--muted)}
.theme-variants{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.theme-variant{display:flex;gap:8px;align-items:center;justify-content:center;cursor:pointer;min-height:42px;padding:8px 4px;border:1px solid var(--line);font:500 11px/1.25 Space,Arial,sans-serif}
.theme-variant input{width:13px;height:13px;margin:0;accent-color:var(--theme-solid-ink);flex:none}
.theme-variant:has(input:checked){background:var(--accent);color:var(--theme-solid-ink);border-color:var(--accent)}
.theme-variant:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:3px}
.theme-dialog .theme-later{display:block;margin:20px auto 0;padding:6px 0;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--muted);font:11px/1.35 Space,Arial,sans-serif}
.theme-later:hover{color:var(--ink);border-color:var(--ink)}
.theme-dialog :is(button,input):focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.theme-dialog .theme-main-action:focus-visible{outline-color:var(--ink);outline-offset:7px}
.theme-dialog .theme-variant input:focus-visible{outline:none}
.theme-status{position:fixed;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* Finite cartoon covers: no snapshots, page recolouring, scrolling or input traps. */
.theme-transition{position:fixed;inset:0;z-index:2147482000;pointer-events:none!important;overflow:hidden;contain:strict;isolation:isolate;color:#f4f1e8}
.theme-transition svg{width:100%;height:100%;display:block;overflow:visible}
.theme-transition .theme-cover-eyes{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-6deg);display:flex;gap:6px;opacity:0}
.theme-cover-eyes span{width:38px;height:57px;border-radius:50%;background:#f4f1e8;position:relative}
.theme-cover-eyes span:last-child{height:54px;transform:rotate(8deg)}
.theme-cover-eyes span::after{content:'';position:absolute;left:16px;top:14px;width:15px;height:23px;background:#181a17;border-radius:50%}
.theme-curtain{position:absolute;inset:-15% 0 auto;height:125%;background:#181a17;background-image:repeating-linear-gradient(90deg,transparent 0,transparent calc(10vw - 1px),#f86c3912 10vw,transparent calc(10vw + 1px));transform:translateY(-100%);will-change:transform}
.theme-curtain::after{content:'';position:absolute;inset:auto 0 -32px;height:34px;background:#181a17;border-bottom:4px solid #f86c39;clip-path:polygon(0 0,100% 0,100% 72%,96% 100%,92% 72%,88% 100%,84% 72%,80% 100%,76% 72%,72% 100%,68% 72%,64% 100%,60% 72%,56% 100%,52% 72%,48% 100%,44% 72%,40% 100%,36% 72%,32% 100%,28% 72%,24% 100%,20% 72%,16% 100%,12% 72%,8% 100%,4% 72%,0 100%)}
.theme-comic-panel{position:absolute;inset:-2px;background:#181a17;will-change:transform}
.theme-comic-panel[data-panel=top]{clip-path:polygon(0 0,100% 0,52% 49%)}
.theme-comic-panel[data-panel=right]{clip-path:polygon(100% 0,100% 100%,52% 49%)}
.theme-comic-panel[data-panel=bottom]{clip-path:polygon(100% 100%,0 100%,52% 49%)}
.theme-comic-panel[data-panel=left]{clip-path:polygon(0 100%,0 0,52% 49%)}
.theme-comic-word{position:absolute;top:49%;left:52%;width:clamp(150px,27vw,290px);aspect-ratio:1.7;display:grid;place-items:center;transform:translate(-50%,-50%) rotate(-9deg);background:#f86c39;clip-path:polygon(0 20%,27% 22%,23% 0,45% 15%,58% 0,66% 18%,100% 7%,91% 43%,100% 79%,74% 76%,80% 100%,50% 83%,33% 100%,31% 79%,0 94%,12% 56%);color:#20221f;font:700 clamp(28px,7vw,65px)/1 Space,Arial,sans-serif;letter-spacing:-.075em;opacity:0}
@media(max-width:600px){.theme-controls{bottom:52px;right:12px}.theme-controls button{min-height:36px;padding:7px 10px;font-size:10px}.theme-controls .theme-toggle{min-width:37px}.theme-dialog-inner{padding:27px 23px 25px}.theme-dialog .theme-eyes{height:88px;margin:17px 0}.theme-eyes .theme-eye{width:53px;height:69px}.theme-eyes .theme-eye:last-child{width:49px;height:66px}.theme-eye::before{inset:15px 8px 11px 16px}.theme-eye::after{right:16px;top:24px;width:6px;height:9px}.theme-dialog .theme-subcopy{font-size:13px}.theme-dialog .theme-main-action{font-size:14px}.theme-dialog h2{font-size:39px}.theme-variant{gap:5px;font-size:10px}.theme-variant input{width:11px;height:11px}.theme-dialog fieldset{margin-top:23px}}
@media(prefers-reduced-motion:reduce){.theme-transition{display:none}.theme-main-action:hover{box-shadow:3px 3px 0 var(--ink)}}

.footer-bottom>.footer-copyright{text-transform:none;letter-spacing:0}
