:root {
  color-scheme: dark;
  background: #0a181b;
  color: #f7eddb;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --gold: #f5c88c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid #f7d49e; outline-offset: 5px; }
.site-header { position: absolute; z-index: 2; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 21px clamp(18px, 5.8vw, 88px); background: linear-gradient(#091214bd, transparent); }
.site-header .brand-mark { background: var(--gold); }
.site-header .brand-period { color: var(--gold); }
.restart { min-height: 42px; padding: 0 15px; border: 1px solid #f7e6ca77; border-radius: 30px; color: #fff0d8; background: #0b1b21bd; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.restart:hover { color: #132024; background: #f7e6ca; }
.scene { position: relative; isolation: isolate; display: grid; align-items: end; min-height: 100svh; padding: 117px clamp(23px, 7.1vw, 106px) clamp(45px, 8svh, 94px); }
.scenery { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #10242d; }
.scenery > * { position: absolute; inset: 0; pointer-events: none; }
.still { background-position: 60% center; background-size: cover; transition: opacity .55s ease, filter .5s ease; }
.harbor { background-image: url('./harbor.jpg'); opacity: 1; }
.tower { background-image: url('./tower.jpg'); opacity: 0; }
.scene:is([data-place=tower], [data-place=inside]) .tower { opacity: 1; }
.scene[data-place=inside] .tower { filter: brightness(.68) saturate(.65); }
.scene[data-light=warm] .still { filter: sepia(.15) saturate(1.16) brightness(1.16); }
.scene[data-light=dark] .still { filter: saturate(.65) brightness(.69); }
.beam { opacity: 0; background: conic-gradient(from 242deg at 78% 31%, transparent 0deg, #ffe1a72a 10deg, #ffdc985c 17deg, #fff0c921 26deg, transparent 38deg); mix-blend-mode: screen; transition: opacity .65s ease; }
.scene[data-light=warm] .beam { opacity: .9; }
.haze { background: radial-gradient(ellipse 58% 16% at 72% 62%, #b2bab63d, transparent 95%), radial-gradient(ellipse 67% 29% at 83% 39%, #82a2a333, transparent 89%); }
.shadows { background: linear-gradient(0deg, #061114f2, #06121791 32%, #0a151a27 68%, #09131530), linear-gradient(90deg,#071315bc, #07131542 60%, transparent 80%); }
.story { align-self: end; max-width: 740px; }
.place { display: flex; gap: 11px; align-items: center; margin: 0 0 14px; color: var(--gold); font-size: .94rem; font-weight: 740; }
.place::before { width: 26px; height: 1px; background: currentColor; content: ''; }
.story h1 { margin: 0 0 16px; outline: none; font-size: clamp(2.45rem, 8.45vw, 7.65rem); font-weight: 820; line-height: 1.025; letter-spacing: -.065em; word-spacing: .035em; text-wrap: balance; }
.scene-copy { max-width: 620px; }
.scene-copy p { margin: 0; color: #fff3dc; font-size: clamp(1rem, 1.56vw, 1.22rem); line-height: 1.72; text-wrap: pretty; }
.scene-copy p + p { margin-top: 11px; }
.choices { display: flex; align-items: stretch; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.choices:empty { display: none; }
.choice { min-height: 46px; min-width: 200px; padding: 8px 14px; border: 1px solid #e1d6b795; border-radius: 5px; background: #132a30df; color: #fff3db; font: inherit; font-size: .93rem; font-weight: 740; cursor: pointer; text-align: left; }
.choice:hover { border-color: var(--gold); background: #f3d7ae; color: #12262a; }
.ending { margin: 20px 0 0; color: var(--gold); font-size: .95rem; font-weight: 700; }
.replay { min-width: 0; margin-top: 12px; background: #f3d7ae; color: #12262a; }
.replay:hover { background: #fff2d9; }
.detail { position: absolute; right: clamp(22px, 5.8vw, 85px); bottom: clamp(23px, 5vh, 59px); display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 11px; border: 1px solid #e3c38670; border-radius: 6px; color: #ffdfab; background: #122225e8; font-size: .81rem; }
.detail span { width: 6px; height: 6px; border-radius: 50%; background: #f5c88c; box-shadow: 0 0 6px #f5c88c; }
.detail p { margin: 0; }
@media (max-width: 800px) {
  .detail { position: static; width: fit-content; margin-top: 16px; }
}
@media (max-width: 540px) {
  .site-header { padding: 13px 18px; }
  .site-header .brand { font-size: 19px; }
  .site-header .brand-mark { width: 18px; }
  .scene { padding-top: 95px; padding-bottom: 33px; }
  .choices { flex-direction: column; }
  .choice { min-width: 0; width: 100%; }
  .shadows { background: linear-gradient(0deg,#071418fa,#081518c3 45%,#08151830 88%); }
}
@media (prefers-reduced-motion: reduce) {
  .scenery > * { transition: none; }
}
