:root { color-scheme: dark; font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif; background: #0b0e0f; color: #e2ddcf; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% 30%, #232722 0, #101414 52%, #0b0e0f 85%); }
button, select, input { font: inherit; }
button, select { color: inherit; cursor: pointer; }
button { border: 0; background: none; }
button:disabled { opacity: .3; cursor: default; }
button:hover:not(:disabled), a:hover { color: #fff7dc; }
:focus-visible { outline: 1px solid #d9c392; outline-offset: 5px; }
[hidden] { display: none !important; }
.shell { width: min(960px, calc(100% - 64px), calc((100svh - 170px) * 4 / 3)); margin: 24px auto 18px; }
.masthead { display: flex; justify-content: space-between; font-size: 14px; letter-spacing: .17em; color: #b3b3a1; margin-bottom: 17px; }
.masthead small { font-size: 12px; color: #858879; }
.stage { aspect-ratio: 4/3; position: relative; overflow: hidden; background: #191d18; border: 1px solid #555845; box-shadow: 0 20px 85px #0009, 0 0 0 5px #141916; isolation: isolate; }
.backdrop, .shade, .grain { position: absolute; inset: 0; pointer-events: none; }
.backdrop { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: opacity 1.3s ease, filter 1.3s ease; opacity: 0; }
.backdrop.active { opacity: 1; }
.stage[data-tone="night"] .backdrop { filter: brightness(.32) saturate(.55); }
.stage[data-tone="unease"] .backdrop { filter: brightness(.68) saturate(.48); }
.shade { background: linear-gradient(180deg, #090e1030, #080d1020 20%, #080c10b3 49%, #070b10ef 100%); }
.grain { opacity: .15; background: repeating-linear-gradient(0deg, #0007 0, #0007 1px, transparent 1px, transparent 3px); }
.title-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 8%; text-shadow: 0 2px 14px #000; background: linear-gradient(90deg, transparent, #080e1333, transparent); }
.author { font-size: 16px; letter-spacing: .25em; margin: 0 0 24px; }
h1 { font-size: clamp(44px, 7.5vw, 84px); font-weight: 400; letter-spacing: .23em; padding-left: .23em; margin: 0; color: #ede5cf; }
.title-rule { width: 32px; height: 1px; background: #bdae80; margin: 35px 0 24px; }
.start { font-size: 17px; letter-spacing: .18em; padding: 13px 21px; border-bottom: 1px solid #b1a27b88; }
.start span { margin-left: 24px; color: #b6a77d; }
.sound-note { color: #b0afa0; font-size: 13px; margin-top: 24px; letter-spacing: .1em; }
.reading { position: absolute; inset: auto 6.7% 4.5%; }
.scene-label { display: flex; align-items: center; gap: 18px; color: #c4b38b; font-size: 13px; letter-spacing: .27em; margin-bottom: 14px; }
.hairline { width: 48px; height: 1px; background: #b4a37d77; }
.page-surface { min-height: 255px; cursor: pointer; }
.page-surface:focus-visible { outline: none; }
.page-surface:focus-visible + .page-footer #next { text-decoration: underline; text-underline-offset: 5px; }
.novel-text { margin: 0; font-size: 22px; line-height: 2.15; letter-spacing: .07em; font-weight: 500; text-shadow: 0 2px 4px #000; overflow-wrap: anywhere; line-break: strict; }
.novel-text rt { font-size: .48em; letter-spacing: .03em; }
.novel-text .gaiji { height: 1em; width: 1em; vertical-align: -.1em; filter: invert(1); }
.novel-text .notes { font-size: .75em; color: #c1b9a3; }
.asset-error { position: absolute; top: 10px; left: 5%; right: 5%; color: #ead9b8; background: #161b19; padding: 8px; font-size: 12px; }
#bookmark-status { margin-left: 0; }
.glyph.unrevealed { visibility: hidden; }
.page-footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #a19d8c; margin-top: 14px; letter-spacing: .14em; }
#next { padding: 10px 0 10px 22px; font-size: 14px; color: #d0c4a5; }
#next span { margin-left: 20px; }
.controls { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; border-bottom: 1px solid #4d514033; font-size: 13px; color: #b6b7a8; }
.controls button { padding: 10px 0; }
.settings { display: flex; align-items: center; gap: 24px; }
.settings label { display: flex; align-items: center; gap: 10px; }
select { border: 1px solid #4a5143; background: #151b18; padding: 5px 7px; border-radius: 0; font-size: 12px; }
input[type=range] { width: 75px; height: 3px; accent-color: #b1a27e; }
.colophon { color: #7f877c; font-size: 11px; line-height: 1.9; display: flex; justify-content: space-between; gap: 20px; padding-top: 12px; }
.colophon p { margin: 0; }
.colophon span { margin-left: 18px; }
a { color: inherit; text-decoration-color: #6f796644; text-underline-offset: 4px; }
.ending { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #080e12c9; text-align: center; }
.eyebrow { font-size: 13px; letter-spacing: .3em; color: #b2a581; }
h2 { font-size: clamp(21px, 3vw, 31px); letter-spacing: .12em; font-weight: 400; margin: 24px 0 10px; }
.ending > p:not(.eyebrow) { font-size: 14px; color: #999f93; margin-bottom: 35px; }
.quiet { font-size: 12px; margin-top: 25px; padding: 10px; color: #999f93; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
 .shell { width: calc(100% - 28px); margin-top: 20px; }
 .stage { aspect-ratio: auto; height: max(530px, 74svh); }
 .reading { inset: auto 7% 4%; }
 .novel-text { font-size: 18px; line-height: 2.05; letter-spacing: .04em; }
 .page-surface { min-height: 300px; }
 .settings { gap: 10px; }
 .volume-label { display: none !important; }
 .controls { font-size: 12px; }
 .colophon { display: block; font-size: 10px; }
 .colophon a { display: inline-block; margin-top: 5px; }
 .masthead { font-size: 12px; }
 .shade { background: linear-gradient(180deg,#090e1020,#080c10cf 40%,#070b10f5); }
}
@media (prefers-reduced-motion: reduce) { .backdrop { transition: none; } }
