* { box-sizing: border-box; }
:root { color-scheme: dark; --ink: #f4ebd8; --muted: #adbaac; --accent: #efbd72; --night: #162621; }
body { margin: 0; background: radial-gradient(ellipse at 35% 10%, #22352b 0%, var(--night) 57%, #12201c 100%); color: var(--ink); font: 16px/1.5 system-ui, sans-serif; }
button, select, input { font: inherit; }
button, select, a { color: inherit; }
button, select { cursor: pointer; }
button:focus-visible, select:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.experience { width: min(100% - 112px, 1600px); min-height: 100svh; margin: auto; padding: 22px 0 16px; display: grid; grid-template-rows: auto auto minmax(360px, 1fr) auto auto; gap: clamp(14px, 2.3vh, 27px); }
.masthead { display:flex; align-items:center; justify-content:space-between; border-bottom: 1px solid #c0d0b62e; padding-bottom: 12px; }
.identity, .sheet-header, .sheet-footer, #counter, #time { font: 600 11px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .15em; text-transform: uppercase; }
.identity { display:flex; align-items:center; gap: 12px; }
.identity-divider { height: 12px; width: 1px; background: #b6c4ad55; }
.edition { color: var(--muted); }
.emblem { font-size: 21px; color: var(--accent); }
button { background: transparent; border: 0; display: inline-grid; place-items: center; }
#fullscreen { color: var(--muted); font-size: 23px; line-height: 1; width: 36px; height: 32px; }
.intro h1, h2 { font-family: Georgia, serif; font-weight: 400; margin: 0; }
.intro h1 { font-size: clamp(50px, 6vw, 100px); line-height: .99; letter-spacing: -.06em; }
.intro h1 em { color: var(--accent); font-weight: 400; }
.intro p { margin: 10px 0 0; color: var(--muted); font-size: clamp(15px, 1.35vw, 21px); }
.scene { display:grid; grid-template-columns: minmax(0, 2.65fr) minmax(236px, 1fr); align-items: stretch; gap: clamp(26px, 5vw, 88px); }
.sheet { min-width: 0; min-height: 0; position: relative; display:grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; border-radius: 8px; background: #f0e7d0; color:#455849; box-shadow: 0 12px 36px #09171255; }
.sheet canvas { width: 100%; height: 100%; min-height: 0; display: block; object-fit: contain; position: absolute; inset: 0; }
.sheet-header, .sheet-footer { pointer-events: none; z-index: 1; padding: 17px 22px; display:flex; justify-content:space-between; gap: 12px; }
.sheet-footer { grid-row: 3; align-items:center; }
#legend { display:flex; align-items:center; flex-wrap:wrap; gap: 5px 13px; }
#legend span { display:flex; align-items:center; gap: 5px; }
#legend i { display:block; width: 8px; height: 8px; border-radius:50%; }
aside { align-self:center; padding: 16px 0; max-width: 350px; }
aside.enter { animation: enter .65s ease-out both; }
@keyframes enter { from {opacity:0;transform:translateX(10px)} to {opacity:1;transform:translateX(0)} }
#counter { display:block; color:var(--accent); margin-bottom: 16px; }
h2 { font-size: clamp(33px, 4.15vw, 69px); line-height: .99; letter-spacing: -.045em; text-wrap: balance; }
#chapter-copy { font-size: clamp(15px, 1.34vw, 21px); color:#e9e8d7; margin: 22px 0; }
#chapter-note { border-left: 1px solid #efbd7288; padding-left: 14px; color: var(--muted); font-size: clamp(13px, 1.1vw, 17px); }
.playback { justify-self:center; width: min(100%, 660px); background: #101d19; border: 1px solid #bac7ac2a; border-radius: 10px; padding: 12px 17px; }
#timeline { display:block; width: 100%; margin: 0 0 8px; height: 15px; accent-color:var(--accent); cursor:pointer; }
.transport, .buttons { display:flex; align-items:center; }
.transport { gap: 15px; }
.buttons { gap: 6px; }
.buttons button { width: 33px; height:33px; border-radius:50%; }
.buttons button:hover, #fullscreen:hover { background:#ffffff17; }
.buttons button:disabled { opacity:.32; cursor:default; }
.buttons svg { width:16px; height:16px; stroke:currentColor; stroke-width:1.65; fill:none; stroke-linecap:round; stroke-linejoin:round; }
#play { background:var(--accent); color:var(--night); width:40px; height:40px; }
#play svg { fill:currentColor; }
#time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .035em; }
select { margin-left:auto; max-width: 53%; border: 1px solid #becab346; border-radius: 5px; background:#1e2f27; font-size: 13px; padding: 7px 9px; }
footer { text-align:right; font-size:12px; color:var(--muted); }
footer a { text-underline-offset:3px; }
footer span { margin: 0 6px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (min-width: 850px) and (min-height: 760px) { .experience { height: 100svh; } }
@media (max-width: 849px) {
  .experience { width: min(100% - 36px, 680px); grid-template-rows: auto; gap:16px; }
  .scene { grid-template-columns: 1fr; gap: 4px; }
  .sheet { aspect-ratio: 1.45; }
  aside { max-width: 580px; min-height: 230px; }
  #chapter-copy { margin: 12px 0; }
  #counter { margin-bottom: 8px; }
  .sheet-header, .sheet-footer { padding: 10px 12px; font-size: 9px; }
}
@media (max-width: 420px) { .transport { gap: 6px; } #time { font-size: 9px; } select { max-width: 48%; } }
@media (prefers-reduced-motion: reduce) { aside.enter { animation: none; } }
