:root {
  color-scheme: light;
  --ink: #283324;
  --paper: #f1f1e6;
  --deep: #182820;
  --soft: #d4ddc2;
  --lime: #d7ef73;
  --rule: #c8cebc;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--body); }
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: #4e6a34; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #9a551c; outline-offset: 4px; }
.wrap { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3rem); }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 2; background: var(--lime); padding: .5rem 1rem; }
.skip:focus { top: .75rem; }
.masthead, .footer { border-block: 1px solid var(--rule); }
.masthead { border-top: 0; }
.masthead-inner, .footer-inner { min-height: 3.65rem; display: flex; align-items: center; justify-content: space-between; gap: .85rem; }
.masthead nav, .footer nav { display: flex; align-items: center; gap: clamp(.85rem, 3vw, 1.8rem); }
.masthead a, .footer a { text-decoration: none; }
.masthead a:hover, .footer a:hover { text-decoration: underline; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; white-space: nowrap; }
.wordmark span { width: 1rem; height: 1rem; background: #557447; border-radius: 0 60% 0 60%; transform: rotate(-12deg); }
.home { padding-block: 1.55rem 3rem; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: 1rem; }
h1, h2 { font-family: var(--display); line-height: .98; }
.intro h1 { margin: 0; font-size: clamp(3.4rem, 9.3vw, 7.3rem); letter-spacing: -.035em; }
.intro p { margin: .6rem 0 0; color: #43513b; }
.original { color: #354a2b; font-size: .9rem; font-weight: 700; margin-bottom: .2rem; white-space: nowrap; }
.stage { position: relative; overflow: hidden; isolation: isolate; background: var(--deep); color: #f4f6e9; border-radius: .85rem; height: clamp(24rem, calc(58vw + 9rem), 35rem); }
.stage:fullscreen { height: 100%; border-radius: 0; }
.stage iframe { position: absolute; inset: 0; height: 100%; width: 100%; border: 0; }
.cover, .loader { position: absolute; inset: 0; display: grid; place-items: center; }
.cover::before { position: absolute; inset: 0; content: ""; background: radial-gradient(ellipse at center, #17281eef 0%, #17281ed7 24%, #17281e3d 64%, #17281e1c 85%); z-index: 1; }
.mosaic { position: absolute; inset: -18% -10%; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); transform: rotate(-9deg) scale(1.1); gap: 5px; opacity: .77; }
.cover-light { position: absolute; inset: 0; background: #e6e1a04f; clip-path: polygon(83% 15%, 90% 91%, 55% 74%); }
.cover-copy { position: relative; z-index: 2; text-align: center; padding: 1rem; }
.cover-copy p { font-family: var(--display); font-weight: 800; font-size: clamp(2.3rem, 5vw, 4.5rem); line-height: 1; margin: 0 0 1rem; }
.primary { background: var(--lime); color: #202817; border: 2px solid #171e14; box-shadow: 3px 4px 0 #101813; border-radius: .48rem; padding: .65rem 1.05rem; font-weight: 700; }
.primary:hover { background: #edf9bf; }
.primary span { margin-left: .4rem; font-size: .78em; }
.loader { align-content: center; gap: .6rem; z-index: 2; pointer-events: none; }
.loader span { display: block; border: .18rem solid #70866a; border-top-color: var(--lime); border-radius: 50%; width: 2rem; height: 2rem; animation: turn .8s linear infinite; }
@keyframes turn { to { transform: rotate(1turn); } }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding-block: .8rem; border-bottom: 1px solid var(--rule); }
.actions button, .discussion button { color: var(--ink); border: 1px solid #aeb9a0; background: transparent; padding: .4rem .7rem; border-radius: .35rem; font-size: .9rem; }
.actions button:hover, .discussion button:hover { background: var(--soft); }
.actions .fullscreen { margin-inline-start: auto; }
.actions [aria-pressed=true] { background: #dde9b9; }
.details-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(1rem, 6vw, 5rem); margin: 1.75rem 0; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 1rem 0 .65rem; }
.guide p, .guide ol { max-width: 68ch; }
.guide li + li { margin-top: .35rem; }
.questions details { border-block-start: 1px solid var(--rule); padding: .65rem 0; }
.questions summary { cursor: pointer; font-weight: 700; }
.questions p { margin: .4rem 0 .1rem; font-size: .95rem; }
.discussion { border-top: 1px solid var(--rule); padding-top: .8rem; }
.discussion form { max-width: 39rem; }
.discussion label { display: grid; gap: .25rem; margin: 0 0 .65rem; }
.discussion input, .discussion textarea { border: 1px solid #aeb9a0; border-radius: .35rem; padding: .45rem .65rem; background: #f8f8f1; color: var(--ink); }
.discussion input { width: min(100%, 18rem); }
.discussion form button { margin-top: .15rem; }
.footer-inner { font-size: .92rem; }
.prose { padding-block: 2rem 4rem; min-height: 60vh; }
.prose h1 { font-size: clamp(2.8rem, 8vw, 4.5rem); margin: 0 0 1.25rem; }
.prose p { max-width: 65ch; }
.game-page { margin: 0; background: #1e2e25; color: #f2f2e4; }
.game { max-width: 40rem; margin: auto; padding: clamp(.65rem, 2vw, 1rem); }
.game-top, .game-controls { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.game-top h1 { font-size: clamp(1.8rem, 6vw, 3.2rem); margin: 0; }
.game-top p { margin: 0; color: #ccd9c6; font-size: .88rem; }
.alert { display: grid; gap: .15rem; font-size: .8rem; font-weight: 700; }
.alert progress { display: block; width: clamp(4rem, 23vw, 8rem); height: .72rem; accent-color: #fde073; }
.arena { display: block; width: 100%; height: auto; margin: .5rem 0; border-radius: .48rem; border: 1px solid #87a07b; background: #34493c; touch-action: none; }
.arena:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.game-controls { flex-wrap: wrap; }
.game-controls .primary { padding: .28rem .7rem; }
.game-controls .primary:disabled { opacity: .7; }
.mode { font-size: .88rem; font-weight: 700; margin: 0; color: #e0edc9; }
.mode[data-motion="visible"] { color: #ffe17d; }
.mode[data-motion="hidden"] { color: #c6efab; }
.status { min-height: 1.4em; margin: .23rem 0 0; font-size: .81rem; line-height: 1.35; color: #ccdbc0; }
.pattern { background-color: var(--tone, #778359); }
.fern { --tone: #6f8f65; }
.moss { --tone: #556c3f; }
.chalk { --tone: #bfd1a9; }
.lichen { --tone: #8ca797; }
.pink { --tone: #b98f88; }
.amber { --tone: #c2a36d; }
.fleck { background-image: radial-gradient(circle, #182820c4 0 24%, transparent 27%), radial-gradient(circle, #f5eed16e 0 22%, transparent 25%); background-size: 22px 22px; background-position: 0 0, 11px 11px; }
.grain { background-image: repeating-linear-gradient(-42deg,#14281d96 0 2px,transparent 2px 9px); }
.hatch { background-image: repeating-linear-gradient(55deg,#14281d7a 0 2px,transparent 2px 10px), repeating-linear-gradient(-55deg,#14281d7a 0 2px,transparent 2px 10px); }
.bars { background-image: repeating-linear-gradient(90deg,#14281d95 0 5px,transparent 5px 15px); }
@media (max-width: 40rem) {
  .intro { flex-wrap: wrap; gap: .45rem; }
  .details-grid { grid-template-columns: 1fr; gap: .4rem; }
  .mosaic { inset: -10% -70%; }
  .game-top { align-items: flex-start; }
}
@media (max-width: 23rem) {
  .masthead nav, .footer nav { gap: .6rem; font-size: .82rem; }
  .wordmark { gap: .3rem; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .loader span { animation: none; } }
