:root {
  color-scheme: light;
  --paper: #fff9ed;
  --cream: #fffdf8;
  --ink: #17392f;
  --forest: #153e34;
  --berry: #8f263d;
  --gold: #ffd879;
  --line: #decfb8;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #c76730; outline-offset: 3px; }
.skip { position: fixed; z-index: 10; inset: 8px auto auto 8px; translate: 0 -150%; padding: .7rem; background: var(--cream); }
.skip:focus { translate: 0; }
.masthead, .footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: .85rem max(1rem, calc((100% - 55rem)/2)); }
.masthead { color: var(--cream); background: var(--forest); border-bottom: 3px solid var(--gold); }
.wordmark { font: 700 1.35rem Georgia, serif; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
nav a { font-size: .9rem; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.shell { max-width: 57rem; margin: auto; padding: .85rem 1rem 3rem; }
.game-heading { margin: .25rem 0 .85rem; }
h1, h2 { font-family: Georgia, serif; line-height: 1.12; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.45rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.game-heading p { margin: .3rem 0 0; }
.stage { position: relative; aspect-ratio: 5 / 3; max-height: 33rem; overflow: hidden; isolation: isolate; border-radius: 1rem; background: var(--forest); }
.stage iframe { display: block; width: 100%; height: 100%; border: 0; }
.cover, .loading { position: absolute; inset: 0; }
.cover { display: grid; place-items: end center; padding: clamp(.8rem, 4vw, 2.6rem); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--forest); }
.cover::after { content: ""; position: absolute; inset: 42% 0 0; background: linear-gradient(transparent, #112820c9); pointer-events: none; }
.play { position: relative; z-index: 1; min-height: 48px; padding: .55rem 1.4rem; border: 2px solid var(--gold); background: var(--berry); color: white; border-radius: 2rem; font-weight: 750; box-shadow: 0 4px 20px #0005; }
.play:hover { background: #a82c46; }
.loading { display: none; gap: .65rem; place-content: center; justify-items: center; color: white; text-align: center; padding: .6rem; }
[data-gf-state="loading"] .loading { display: grid; }
[data-gf-state="loading"] .cover, [data-gf-state="playing"] .cover, [hidden] { display: none !important; }
.lights { display: flex; gap: .4rem; }
.lights i { width: .6rem; height: .6rem; border-radius: 100%; background: var(--gold); animation: glow 1.2s infinite alternate; }
.lights i:nth-child(2) { animation-delay: .2s; }
.lights i:nth-child(3) { animation-delay: .4s; }
@keyframes glow { from { opacity: .35; } to { opacity: 1; } }
.exit { position: absolute; z-index: 3; right: .5rem; top: .5rem; }
.stage:fullscreen { max-height: none; border-radius: 0; }
.game-privacy { margin: 0 0 .55rem; font-size: .85rem; }
.stage:not([data-gf-state]) ~ .controls :is([data-gf-fullscreen], [data-close-game]) { display: none; }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding: .65rem 0; }
.controls button, .exit, form button { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: .5rem; color: var(--forest); background: var(--cream); font-weight: 650; }
.controls [aria-pressed="true"] { background: var(--forest); color: var(--cream); }
.controls a { margin-inline-start: auto; font-size: .88rem; }
.next { margin: 1.25rem 0 2rem; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.cards a { display: grid; grid-template-columns: minmax(0, 6rem) 1fr; column-gap: .7rem; align-content: center; border: 1px solid var(--line); border-radius: .7rem; background: var(--cream); padding: .6rem; text-decoration: none; }
.cards a:hover strong { text-decoration: underline; }
.cards img { width: 100%; height: auto; grid-row: span 2; border-radius: .35rem; }
.cards span { font-size: .85rem; }
.reading { max-width: 69ch; margin: 1.7rem auto; }
.reading section { margin-block: 2rem; }
details { border-top: 1px solid var(--line); padding: .55rem 0; }
summary { cursor: pointer; font-weight: 650; }
form { display: grid; gap: .65rem; justify-items: start; }
form label { display: grid; width: min(100%, 32rem); gap: .2rem; }
input, textarea { width: 100%; padding: .45rem; border: 1px solid #9b9384; border-radius: .35rem; background: var(--cream); color: var(--ink); }
.footer { border-top: 1px solid var(--line); }
@media (max-width: 37rem) {
  .shell { padding-inline: .7rem; }
  .cover { padding: .6rem; }
  .play { min-height: 44px; padding-inline: .8rem; }
  .cards a { grid-template-columns: 1fr; }
  .cards img { grid-row: auto; margin-bottom: .35rem; }
}
@media (prefers-reduced-motion: reduce) { .lights i { animation: none; } }
