/* AuthorOS's blue glass, thin bezel and original rotating chapter art. */
:root{--product-accent:#a4ceff;--product-bg:#071529;--product-line:#8eb8e775;--product-paper:#edf5ff;--os-text:#edf5ff;--os-bg:#071529;--os-accent:#a4ceff;--accent:#a4ceff;--dim:#ccddf2;--fg:#edf5ff;--glass:#071529b8;--reading-paper:#061020e8}
html[data-theme=light]{--product-accent:#124583;--product-bg:#edf3fc;--product-line:#254e7c80;--product-paper:#10243c;--os-text:#10243c;--os-bg:#edf3fc;--os-accent:#124583;--accent:#124583;--dim:#29415d;--fg:#10243c;--glass:#edf3fcd9;--reading-paper:#edf3fcf2}
body.product-app{background:#071529!important;color:var(--fg)!important;font-weight:500;text-shadow:0 1px 2px #020812}
.landscape{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:#09182b;isolation:isolate}
.institution-camera{position:absolute;inset:0;animation:institution-float 180s ease-in-out infinite alternate;transform-origin:center}
.institution-scene img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;filter:brightness(.78) saturate(.92)}
.landscape:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#02091808,#02091820)}
#institution-sprites{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
@keyframes institution-float{from{transform:scale(1.015) translate(-.25%,.2%)}to{transform:scale(1.035) translate(.25%,-.2%)}}
.institution-scene.scene-hidden *,body.scene-paused .institution-camera,body.no-crt .institution-camera{animation-play-state:paused!important}
html[data-theme=light] .landscape:after{background:#edf3fc99}
.product-app .os{position:relative;z-index:1}
html[data-reader-boundary] .console,body.product-app .console{border:1px solid var(--product-line)!important;background:#08152630!important;border-radius:2px;box-shadow:0 0 0 1px #02081299,0 10px 40px #02081255}
.product-app .reader-header,.product-app .reader-footer,.product-app .bezel,.product-app .transport,.product-app .instrument-title,.product-app .narrative-window{background:var(--glass)!important;color:var(--fg);border-color:var(--product-line)!important;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.product-app .reader-header,.product-app .reader-footer,.product-app .bezel,.product-app .transport{font:500 11px/1.35 ui-monospace,monospace}
.product-app .reader-wordmark{font:600 12px/1.3 ui-monospace,monospace;color:var(--product-accent)}
.product-app button,.product-app select,.product-app input{font:inherit;color:var(--fg);border-color:var(--product-line);background:#071529c7}
html[data-theme=light] .product-app button,html[data-theme=light] .product-app select,html[data-theme=light] .product-app input{background:#f6faffeb}
.product-app .transport #volume-select{display:none}.product-app .transport #chapter-select{max-width:420px;min-width:100px}
.product-app .transport{min-height:38px;padding:5px 8px;gap:7px}.product-app .transport #position-text{font-size:11px}
.product-app .bezel{min-height:38px;padding:4px 8px!important}.product-app .bezel button,.product-app .bezel select{font-size:11px;min-height:28px;padding:4px 7px}
.product-app .operating-system,.product-app .work-area,.product-app .instrument,.product-app .visual-panes,.product-app .geometry-space{background:transparent!important}
.product-app .instrument{padding:0 4px!important}.product-app .instrument-title{height:24px;min-height:24px;padding:3px 7px!important}.product-app .instrument-title h2{font-size:10px}
.product-app .geometry-space{overflow:hidden}.product-app .narrative-window{min-height:0!important;max-height:23%!important;padding:8px 16px!important}.product-app #current-passage{font-size:clamp(18px,1.7vw,25px)!important;color:var(--fg)}
.product-app dialog{background:#0b1a2ef5;color:var(--fg);border:1px solid var(--product-line);text-shadow:none;backdrop-filter:blur(16px)}
html[data-theme=light] .product-app dialog{background:#edf3fcf5}
.console:after{content:"";position:absolute;inset:0;pointer-events:none;z-index:80;background:repeating-linear-gradient(to bottom,transparent 0,transparent 3px,#09132914 4px);opacity:.5}
body.no-crt .console:after{display:none}
html[data-theme=light] body.product-app{text-shadow:none}
.product-app .console[data-cartridge=finite-frontiers-film] .instrument-title{display:none}
.product-app .console[data-cartridge=finite-frontiers-film] .geometry-space{background:transparent!important}
/* Quiet reading preserves all native controls, paragraph anchors and MathML. */
body:has(.read-layout){background:#071529;color:var(--fg)}
.read-layout{position:relative;z-index:1}.read-header,.read-footer{z-index:20}
.read-main,.read-contents,.listen-rail{color:var(--fg);background:var(--reading-paper);border-color:var(--product-line);backdrop-filter:blur(14px)}
.read-header,.read-footer{background:var(--glass);color:var(--fg);border-color:var(--product-line);backdrop-filter:blur(14px)}
.read-layout a,.read-header a,.read-footer a{color:var(--product-accent)}
.read-layout button,.read-layout select,.read-layout input,.read-header button,.read-footer button{color:var(--fg);background:var(--glass);border-color:var(--product-line)}
.read-main .byline,.listen-rail p,.read-contents a{color:var(--dim)}
.read-main math{color:inherit;max-width:100%;overflow:auto}.read-main section{scroll-margin-top:60px}
@media(prefers-reduced-motion:reduce){.institution-camera{animation:none!important}.console:after{display:none}}
@media(max-width:850px){.product-app .reader-wordmark{font-size:11px}.product-app .transport .library-select{flex:1 0 100%}.product-app .transport #position{max-width:none}.product-app .bezel>div{gap:4px}.product-app .bezel .cartridge-picker{font-size:10px;gap:4px}.product-app .bezel button,.product-app .bezel select{font-size:10px}.product-app .reader-footer{font-size:10px}.product-app .narrative-window{max-height:20%!important}}

:root{--ink:var(--fg);--muted:var(--dim);--line:var(--product-line);--paper:var(--reading-paper)}
html[data-theme=dark],html[data-theme=light]{--accent:var(--product-accent);--ink:var(--fg);--muted:var(--dim);--line:var(--product-line);--paper:var(--reading-paper)}
body.product-app:not(.book-host) #current-passage{font-size:clamp(18px,1.7vw,25px)!important;line-height:1.45!important}

/* Missile Command: precise center hotspot, large ring and contrasting fine ticks.
   Native cursor follows the pointer without an animation clock or input overlay. */
.console[data-cartridge="defense"] #system-grid,
.console[data-cartridge="defense"] #system-grid.manual-defense {
 cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2280%22%20height%3D%2280%22%20viewBox%3D%220%200%2080%2080%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%2303151f%22%20stroke-width%3D%224.5%22%3E%3Ccircle%20cx%3D%2240%22%20cy%3D%2240%22%20r%3D%2227%22%2F%3E%3Cpath%20d%3D%22M40%203v21m0%2032v21M3%2040h21m32%200h21M40%2031v5m0%208v5M31%2040h5m8%200h5%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%239cecff%22%20stroke-width%3D%221.5%22%3E%3Ccircle%20cx%3D%2240%22%20cy%3D%2240%22%20r%3D%2227%22%2F%3E%3Ccircle%20cx%3D%2240%22%20cy%3D%2240%22%20r%3D%2232%22%20stroke-opacity%3D%22.5%22%20stroke-dasharray%3D%223%209.566%22%2F%3E%3Cpath%20d%3D%22M40%203v21m0%2032v21M3%2040h21m32%200h21%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23ffe4a0%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M40%2031v5m0%208v5M31%2040h5m8%200h5%22%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D%2240%22%20cy%3D%2240%22%20r%3D%222%22%20fill%3D%22%23ffe4a0%22%20stroke%3D%22%2303151f%22%20stroke-width%3D%221%22%2F%3E%3C%2Fsvg%3E") 40 40, crosshair !important;
}
