:root {
  color-scheme: dark;
  --bg: #0c111a;
  --surface: #151d29;
  --border: #313c4d;
  --text: #f6eee0;
  --muted: #bec6d1;
  --accent: #f4c37e;
  font: 16px/1.55 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-underline-offset: .2em; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img { display: block; width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
h1, h2 { font-family: Georgia, serif; font-weight: 500; }
h1 { font-size: clamp(2.4rem, 6vw, 4.7rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); letter-spacing: -.025em; }
p { margin: 0; color: var(--muted); }
.shell { width: min(1120px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -5rem; padding: .5rem; background: var(--surface); z-index: 3; }
.skip:focus { top: .5rem; }
.header { border-bottom: 1px solid var(--border); }
.bar, .footer { display: flex; justify-content: space-between; align-items: center; gap: .8rem 2rem; padding-block: 1rem; }
nav { display: flex; flex-wrap: wrap; gap: .5rem 1.35rem; }
nav a, .brand { color: var(--text); text-decoration: none; }
nav a:hover, .brand:hover { color: var(--accent); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 740; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 5px; background: var(--accent); color: var(--bg); }
.intro { padding-top: clamp(1.9rem, 5vw, 3.5rem); }
.intro > p { margin: .65rem 0 1.4rem; max-width: 630px; }
.hero { min-height: clamp(360px, 40vw, 500px); display: grid; align-items: end; position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; isolation: isolate; background: var(--surface); }
.hero img, .game-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after, .game-cover::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #080c13eb, #080c1366 53%, #080c130b), linear-gradient(0deg, #080c13d9, transparent 68%); }
.hero-copy { padding: clamp(1.3rem, 4.5vw, 3.2rem); max-width: 480px; }
.hero-copy h2 { font-size: clamp(2.8rem, 6.6vw, 5.5rem); line-height: .93; margin: .65rem 0 .85rem; }
.hero-copy p { color: var(--text); }
.label { font-size: .75rem; font-weight: 720; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.primary { display: inline-flex; align-items: center; gap: .6rem; justify-content: center; min-height: 46px; padding: .65rem 1.1rem; color: #17110a; background: var(--accent); border: 1px solid transparent; border-radius: 7px; font: inherit; font-weight: 750; text-decoration: none; }
.primary:hover { background: #ffd8a5; }
.hero-copy .primary { margin-top: 1.35rem; }
.shelf { margin-top: 3rem; scroll-margin-top: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1rem; margin-top: 1.05rem; }
.card { display: block; color: inherit; text-decoration: none; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.card:hover { border-color: var(--accent); }
.card img { aspect-ratio: 16/9; object-fit: cover; background: #202a37; }
.card-copy { padding: .9rem 1rem 1.1rem; }
.card h3 { margin: .35rem 0; font-size: 1.08rem; }
.card h3 span { color: var(--accent); }
.card p { font-size: .9rem; }
.lower { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem 4rem; margin-top: 3.5rem; }
.faq details { border-bottom: 1px solid var(--border); padding: .8rem 0; }
.faq h2 { margin-bottom: .45rem; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin-top: .45rem; }
.footer { border-top: 1px solid var(--border); margin-top: 4rem; padding-block: 1.5rem; font-size: .9rem; }
.article { padding-top: 3rem; }
.article .reading, .game .reading { max-width: 700px; margin: 1.3rem 0 2rem; }
.reading h2 { margin-block: 1.5rem .6rem; }
.reading > h2:first-child { margin-top: 0; }
.reading p + p, .reading p + ul { margin-top: .85rem; }
.reading li { margin-bottom: .35rem; }
.game { padding-top: 1.8rem; }
.game h1 { margin: .4rem 0 1.1rem; }
.back { display: inline-block; }
.stage { position: relative; aspect-ratio: 5/3; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.stage:fullscreen { width: 100%; height: 100%; }
.stage iframe { width: 100%; height: 100%; border: 0; }
.game-cover, .loader { position: absolute; inset: 0; display: grid; place-items: center; isolation: isolate; }
.loader { display: none; }
.stage[data-gf-state="loading"] .loader { display: grid; }
.stage[data-gf-state] .game-cover { display: none; }
.game-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.game-actions button, .puzzle button:not(.primary) { color: var(--text); background: #202b3a; border: 1px solid var(--border); border-radius: 7px; padding: .55rem .8rem; min-height: 44px; }
.game-actions button:hover, .puzzle button:hover:not(:disabled) { border-color: var(--accent); }
.game-actions [aria-pressed="true"] { color: var(--accent); }
.hero-small .hero-copy h2 { font-size: clamp(2rem, 6vw, 4rem); }
.puzzle { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: clamp(1rem, 4vw, 2.4rem); }
.room-top, .room-bottom { display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.spots { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; margin-block: 1rem; }
.findings { border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; min-height: 80px; }
.findings form, .findings > button, .hint { margin-top: .7rem; }
.lock-row { display: flex; align-items: stretch; gap: .5rem; margin-top: .45rem; }
.lock-row input { width: 6rem; border: 1px solid var(--border); border-radius: 7px; padding: .4rem .6rem; background: var(--bg); color: var(--text); }
@media (max-width: 650px) {
  .shell { width: calc(100% - 32px); }
  .bar, .footer { flex-wrap: wrap; }
  .bar nav { font-size: .9rem; }
  .hero img { object-position: 64% center; }
  .lower { grid-template-columns: 1fr; }
  .footer { margin-top: 3rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
