:root {
  color-scheme: light;
  --paper: #f5f2e8;
  --surface: #fffdf5;
  --ink: #18241c;
  --muted: #4d5c50;
  --green: #286445;
  --green-dark: #183b2a;
  --lime: #c5f17b;
  --line: #d4dbca;
  --dark: #111d16;
  --dark-raised: #1a2b20;
  --dark-line: #3c5441;
  --on-dark: #f4f7ed;
  --muted-dark: #c4d0bd;
  --body-font: "Inter", system-ui, sans-serif;
  --heading-font: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 var(--body-font);
}
main { min-height: 65vh; }
a { color: var(--green); text-underline-offset: .24em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #976000; outline-offset: 4px; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3, p, dt, dd, figure { margin: 0; }
h1, h2, h3, .brand { font-family: var(--heading-font); }
h1, h2, h3 { line-height: 1.1; }
h2 { font-size: clamp(1.85rem, 3.5vw, 3rem); letter-spacing: -.045em; }
h3 { font-size: 1.25rem; letter-spacing: -.025em; }
img { display: block; }
.wrap { width: min(calc(100% - 64px), 1120px); margin-inline: auto; }
.skip-link {
  position: fixed;
  inset: 8px auto auto 8px;
  z-index: 2;
  transform: translateY(-150%);
  background: var(--surface);
  padding: 8px 16px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  border-bottom: 1px solid var(--dark-line);
  background: var(--dark);
  color: var(--on-dark);
}
.header-inner, .site-nav, .brand, .game-bar {
  display: flex;
  align-items: center;
}
.header-inner { min-height: 68px; justify-content: space-between; gap: 16px; }
.brand {
  gap: 8px;
  flex-shrink: 0;
  color: inherit;
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: -.05em;
  text-decoration: none;
}
.brand-sub { color: var(--lime); }
.brand img { border: 1px solid var(--dark-line); border-radius: 8px; }
.site-nav { gap: clamp(4px, 1.5vw, 20px); }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .91rem;
}
.site-nav a {
  padding-inline: 10px;
  border-radius: 6px;
  color: var(--on-dark);
  font-weight: 680;
  text-decoration: none;
}
.site-nav a:hover { background: var(--dark-raised); }
.site-nav .nav-play { color: var(--lime); }

.play-zone {
  padding-bottom: 28px;
  border-bottom: 1px solid #64814a;
  background-color: var(--dark);
  background-image:
    linear-gradient(180deg, transparent 36%, var(--dark) 88%),
    radial-gradient(ellipse at 78% 0%, #315139 0%, transparent 60%),
    linear-gradient(90deg, #a9d18e12 1px, transparent 1px),
    linear-gradient(#a9d18e12 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  color: var(--on-dark);
}
.play-zone a { color: var(--lime); }
.play-zone :focus-visible, .site-header :focus-visible {
  outline-color: var(--lime);
}

.hero {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  align-items: center;
  gap: 24px;
  padding-block: 36px 27px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.65rem);
  letter-spacing: -.07em;
  font-weight: 900;
}
.hero h1 span { color: var(--lime); }
.hero-subtitle {
  margin-top: 8px;
  color: var(--muted-dark);
  font-size: clamp(1.025rem, 2.2vw, 1.35rem);
  font-weight: 680;
}
.hero-intro { max-width: 38ch; color: var(--muted-dark); }
.text-link { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; font-weight: 680; }

.game-shell {
  overflow: hidden;
  background: var(--dark-raised);
  border: 1px solid #5c7954;
  border-radius: 12px;
  box-shadow: 0 5px 0 #080f0b, 0 16px 40px #070e0a65;
}
.game-bar {
  min-height: 58px;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 14px 6px 20px;
  color: var(--on-dark);
}
.game-bar h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 750 .94rem/1.25 var(--body-font);
  letter-spacing: normal;
}
.game-bar h2::before {
  content: "";
  display: block;
  flex: 0 0 9px;
  height: 9px;
  background: var(--lime);
  box-shadow: 2px 2px 0 #6a934f;
}
.game-bar .fullscreen, .game-loader button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding-inline: 12px;
  border: 1px solid #627364;
  border-radius: 8px;
  color: var(--on-dark);
  background: transparent;
  font-size: .85rem;
  font-weight: 670;
  text-decoration: none;
  white-space: nowrap;
}
.game-bar .fullscreen { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.game-bar .fullscreen:hover, .game-loader button:hover { filter: brightness(1.12); }
.game-stage { position: relative; background: #201b15; }
.game-stage iframe { display: block; width: 100%; height: 704px; border: 0; }
.game-loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 12px;
  padding: clamp(24px, 14vh, 128px) 12px 16px;
  background: radial-gradient(ellipse at center top, var(--dark-raised), var(--dark) 72%);
  color: var(--on-dark);
  text-align: center;
}
.game-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--dark-line);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: game-spin .85s linear infinite;
}
@keyframes game-spin {
  to { transform: rotate(1turn); }
}
@media (prefers-reduced-motion: reduce) {
  .game-spinner { animation: none; }
}
.game-shell:is(:fullscreen, .game-expanded) { display: flex; flex-direction: column; border: 0; border-radius: 0; }
.game-shell:is(:fullscreen, .game-expanded) .game-stage { flex: 1; min-height: 0; }
.game-shell:is(:fullscreen, .game-expanded) iframe { height: 100%; }
.game-expanded { position: fixed; inset: 0; z-index: 5; }
body:has(.game-expanded) { overflow: hidden; }
.game-credit { margin: 16px 2px 0; color: var(--muted-dark); font-size: .85rem; }

.section { padding-block: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); }
.play-zone + .section { border-top: 0; }
.section-intro { max-width: 70ch; margin-bottom: 26px; }
.section-intro p, .section li p, .section h3 + p { margin-top: 12px; }
.section p, .section dd { color: var(--muted); }
.section .followup { margin-top: 12px; }
.rules-grid, .mode-grid, .extra-tips { display: grid; gap: 16px; }
.rules-grid {
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding-left: 0;
  list-style-position: inside;
}
.rules-grid li, .mode-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid #8fa878;
  border-radius: 10px;
  padding: clamp(17px, 2.4vw, 27px);
}
.rules-grid li::marker { color: var(--green); font-weight: 800; }
.rules-grid h3 { display: inline; }
.clues { margin-top: 30px; }
.recipe-example {
  display: grid;
  grid-template-columns: 1.55fr minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 5vw, 60px);
  margin-block: 26px;
  padding: clamp(18px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e8eddc;
}
.recipe-example h3 { font-size: clamp(1.3rem, 2.5vw, 1.85rem); }
.recipe-example .text-link { margin-top: 8px; }
.gameplay-photo {
  width: min(100%, 360px);
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  background: var(--dark);
  color: var(--on-dark);
}
.gameplay-photo img { width: 100%; height: auto; }
.gameplay-photo figcaption { padding: 9px 13px; font-size: .85rem; }
.clue-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-block: 12px; }
.clue-list div { padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.clue-list dt { display: flex; align-items: center; gap: 8px; font-weight: 750; }
.clue-list dd { margin-top: 3px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.correct { background: #36724b; color: #fff; }
.move { background: #df9a45; color: #231809; }
.absent { background: #59635d; color: #fff; }

.tips-layout { display: grid; grid-template-columns: minmax(210px, .57fr) 1fr; align-items: start; gap: 28px; }
.example {
  background-color: var(--green-dark);
  background-image: linear-gradient(145deg, #ffffff11, transparent 68%);
  color: #f2f7ee;
  border-radius: 14px;
  padding: 24px;
}
.example-board {
  width: min(100%, 180px);
  margin: 0 auto 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.example-board span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 5px;
  font-weight: 750;
}
.example-board span:empty { background: #365643; }
.example figcaption { max-width: 32ch; margin-inline: auto; font-size: .9rem; }
.tips-copy h3:not(:first-child) { margin-top: 22px; }
.extra-tips, .mode-grid { grid-template-columns: repeat(2, 1fr); margin-block: 20px; }
.extra-tips > div { border-top: 1px solid var(--line); padding-top: 18px; }
.mode-card p + p { margin-top: 10px; }
.mode-card.random { background: #e9f1db; border-top-color: #5d8747; }
.mode-note { max-width: 74ch; }

.faq-list {
  margin-block: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.faq details { padding-inline: clamp(16px, 3vw, 26px); }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  gap: 16px;
  padding-block: 10px;
  font-weight: 720;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-bottom: 2px solid var(--green);
  border-right: 2px solid var(--green);
  transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(225deg); }
.faq details p { padding-bottom: 14px; max-width: 72ch; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 8px;
  background: var(--green-dark);
  color: white;
  font-weight: 650;
  text-decoration: none;
}
.button:hover { text-decoration: underline; }

.prose {
  width: min(calc(100% - 64px), 840px);
  margin: clamp(22px, 5vw, 62px) auto;
  padding: clamp(20px, 5vw, 52px);
  border: 1px solid var(--line);
  border-top: 4px solid #7a9b62;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 6px 0 #e8e8db;
}
.prose h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.055em; }
.prose :is(h2, h3) { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.prose h2 { font-size: clamp(1.45rem, 3.5vw, 2rem); }
.prose p { margin-top: 14px; color: var(--muted); }

.site-footer {
  --footer-text: #e5e7eb;
  --footer-muted: #9ca3af;
  --footer-link-hover: #60a5fa;
  --footer-line: rgb(59 130 246 / 20%);
  padding-block: 48px;
  border-top: 1px solid var(--footer-line);
  background: #252b3b;
  color: var(--footer-muted);
  font-size: .875rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
  gap: 24px;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: inherit;
  text-decoration: none;
}
.site-footer a:hover { color: var(--footer-link-hover); text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--footer-link-hover); }
.site-footer .footer-brand {
  gap: 8px;
  margin-bottom: 14px;
  color: var(--footer-text);
  font-size: 1.125rem;
  font-weight: 700;
}
.footer-brand img { border-radius: 8px; }
.footer-site p { margin-bottom: 6px; }
.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.footer-nav h2 {
  margin-bottom: 10px;
  color: var(--footer-text);
  font: 600 .9375rem/1.3 var(--body-font);
  letter-spacing: normal;
}
.footer-nav ul { margin: 0; padding: 0; list-style: none; }
.footer-bottom {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--footer-line);
  text-align: center;
}
.footer-bottom p + p { margin-top: 8px; }

@media (max-width: 991px) {
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 740px) {
  .wrap, .prose { width: calc(100% - 32px); }
  .hero { grid-template-columns: 1fr; gap: 8px; padding-block: 22px 12px; }
  .hero-intro { max-width: 60ch; }
  .hero-subtitle { margin-top: 4px; }
  .game-stage iframe { height: 732px; }
  .rules-grid, .tips-layout, .recipe-example { grid-template-columns: 1fr; }
  .section { padding-block: 34px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer a { min-height: 44px; }
}
@media (max-width: 470px) {
  .header-inner { flex-wrap: wrap; min-height: auto; justify-content: flex-start; gap: 0; padding-top: 8px; }
  .header-inner .brand, .site-nav { min-height: 44px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 4px; }
  .site-nav a { padding-inline: 4px; }
  .game { width: calc(100% - 16px); }
  .game-bar { padding-inline: 10px; gap: 6px; }
  .game-bar .fullscreen { padding-inline: 9px; font-size: .8rem; }
  .game-bar h2 { font-size: .78rem; gap: 6px; }
  .game-bar h2::before { flex-basis: 6px; height: 6px; }
  .clue-list, .mode-grid, .extra-tips { grid-template-columns: 1fr; }
  .clue-list { gap: 0; }
  .clue-list div + div { border-top: 0; }
}
