:root {
  --bg: #f7f1e8;
  --card: #fffaf2;
  --text: #2b2118;
  --muted: #6b5b4b;
  --primary: #c2562f;
  --accent: #e0a03a;
  --lawn: #dce7ba;
  --lawn-ink: #314324;
  --soil: color-mix(in srgb, var(--primary) 68%, var(--text));
  --soil-dark: color-mix(in srgb, var(--primary) 55%, var(--text));
  --line: color-mix(in srgb, var(--bg) 74%, var(--muted));
  --lawn-border: color-mix(in srgb, var(--lawn) 62%, var(--lawn-ink));
  --lawn-rule: color-mix(in srgb, var(--lawn) 78%, var(--lawn-ink));
  --lawn-card: color-mix(in srgb, var(--lawn) 65%, var(--card));
  --lawn-grid: color-mix(in srgb, var(--lawn-ink) 6%, transparent);
  --shadow: color-mix(in srgb, var(--text) 10%, transparent);
  --radius: 12px;
  --title-font: Fraunces, Georgia, serif;
  --body-font: Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.site-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body-font);
}
.site-body h1, .site-body h2, .site-body h3 {
  margin: 0;
  font-family: var(--title-font);
  line-height: 1.2;
}
.site-body p { margin: 0; }
.site-body a { color: var(--soil-dark); }
.site-body a:hover { color: var(--text); }
.site-body :focus-visible {
  outline: 2px solid var(--lawn-ink);
  outline-offset: 3px;
}
.site-body button, .site-body input, .site-body textarea { font: inherit; }
.site-body button { cursor: pointer; }
.site-wrap {
  width: calc(100% - 48px);
  max-width: 1120px;
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 20;
  padding: 8px 16px;
  background: var(--card);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.masthead, .footer-inner {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-body .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font: 700 22px/1.2 var(--title-font);
  text-decoration: none;
  white-space: nowrap;
}
.route-mark {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--lawn-ink);
  border-radius: 8px;
  background: var(--lawn);
}
.route-mark::before {
  display: block;
  width: 16px;
  height: 16px;
  background: var(--lawn-ink);
  clip-path: polygon(0 75%, 35% 75%, 35% 35%, 65% 35%, 65% 0, 100% 0, 100% 25%, 85% 25%, 85% 60%, 55% 60%, 55% 100%, 0 100%);
  content: '';
}
.masthead nav, .footer-inner nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.masthead nav a, .footer-inner nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.masthead nav a:hover, .footer-inner nav a:hover { text-decoration-color: currentColor; }
.play-area { margin-top: 32px; }
.play-heading { margin-bottom: 24px; }
.site-body .play-heading h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.025em;
}
.play-heading p { max-width: 66ch; color: var(--muted); }
.yard-stage {
  position: relative;
  height: 584px;
  overflow: hidden;
  border: 1px solid var(--lawn-border);
  border-radius: var(--radius);
  background: var(--lawn);
}
.yard-stage > iframe { display: block; width: 100%; height: 100%; border: 0; }
.yard-cover {
  display: grid;
  height: 100%;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: 32px;
  padding: 32px;
  background-image: repeating-linear-gradient(90deg, transparent 0 24px, var(--lawn-grid) 24px 25px), repeating-linear-gradient(0deg, transparent 0 24px, var(--lawn-grid) 24px 25px);
}
.yard-cover-copy { max-width: 24rem; padding-left: 16px; }
.site-body .yard-cover-copy h2 {
  margin-bottom: 8px;
  color: var(--lawn-ink);
  font-size: clamp(36px, 6vw, 72px);
  letter-spacing: -0.05em;
}
.yard-cover-copy p { max-width: 28ch; margin-bottom: 24px; color: var(--lawn-ink); font-size: 18px; }
.yard-cover-art {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--lawn-border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 8px 24px var(--shadow);
}
.yard-cover-art img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
}
.site-body .button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid var(--soil);
  border-radius: var(--radius);
  background: var(--soil);
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.site-body .button:hover { background: var(--soil-dark); color: white; }
.yard-cover .play-button { min-width: 174px; }
.site-body .official-link {
  display: block;
  width: fit-content;
  padding: 12px 0;
  margin-top: 4px;
  color: var(--lawn-ink);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 4px;
}
.yard-loading { display: none; }
.yard-stage[data-gf-state="loading"] .yard-cover,
.yard-stage[data-gf-state="playing"] .yard-cover { display: none; }
.yard-stage[data-gf-state="loading"] .yard-loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: var(--lawn);
  color: var(--lawn-ink);
  font-weight: 700;
}
.charge-loader { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--lawn-ink); border-radius: 8px; }
.charge-loader i { width: 16px; height: 24px; border-radius: 4px; background: var(--lawn-ink); animation: charge 1.1s ease-in-out infinite alternate; }
.charge-loader i:nth-child(2) { animation-delay: 85ms; }
.charge-loader i:nth-child(3) { animation-delay: 170ms; }
.charge-loader i:nth-child(4) { animation-delay: 255ms; }
@keyframes charge { from { opacity: .25; } to { opacity: 1; } }
.game-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; }
.action-button {
  min-height: 44px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.action-button:hover { border-color: var(--lawn-ink); }
.action-button[data-gf-liked] { border-color: var(--soil); color: var(--soil); }
.game-actions .fullscreen { margin-left: auto; }
.share-msg { color: var(--muted); font-size: 14px; }
.home-details {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  align-items: start;
  gap: 48px;
  padding-top: 48px;
}
.route-rule {
  padding: 24px;
  border: 1px solid var(--lawn-rule);
  border-radius: var(--radius);
  background: var(--lawn-card);
  color: var(--lawn-ink);
}
.route-rule h2 { font-size: 22px; }
.route-rule dl { margin-block: 16px; }
.route-rule dl div { padding: 8px 0; border-bottom: 1px solid var(--lawn-rule); }
.route-rule dt { font-weight: 700; }
.route-rule dd { margin: 0; color: var(--lawn-ink); font-size: 14px; }
.site-body .text-link { font-weight: 600; text-underline-offset: 4px; }
.site-body .prose h2 { margin-block: 32px 8px; font-size: 28px; }
.site-body .prose h3 { margin-block: 24px 8px; font-size: 22px; }
.site-body .prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { max-width: 70ch; margin-block: 0 16px; }
.prose li + li { margin-top: 4px; }
.inner-page { max-width: 760px; min-height: 58vh; padding-block: 48px 64px; }
.site-body .inner-page h1 { margin-bottom: 24px; font-size: clamp(28px, 4vw, 48px); }
.site-body .inner-page .back-to-game { margin-top: 32px; }
.questions, .feedback { margin-block: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.questions h2, .feedback h2 { margin-bottom: 16px; font-size: 28px; }
.question-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; }
.question-list details { border-bottom: 1px solid var(--line); }
.question-list summary { min-height: 44px; padding: 12px 4px; font-weight: 600; cursor: pointer; }
.question-list details p { padding: 0 4px 16px; color: var(--muted); }
.feedback { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 48px; }
.feedback-title p { color: var(--muted); }
.feedback-form { display: grid; gap: 8px; }
.feedback-form input, .feedback-form textarea {
  min-height: 44px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
}
.feedback-form label { font-weight: 600; }
.feedback-form small, .form-note { color: var(--muted); font-size: 14px; }
.feedback-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.replying { display: none; }
[data-gf-replying] .replying { display: flex; align-items: center; gap: 8px; }
.text-button { padding: 4px 0; border: 0; background: none; color: var(--soil-dark); font-weight: 600; }
.note { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.note-byline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.note-byline time { color: var(--muted); font-size: 14px; }
.note-owner { color: var(--lawn-ink); font-size: 12px; font-weight: 700; }
.note-reply { margin-right: 4px; color: var(--muted); }
.note-replies { margin-left: 16px; }
.site-footer { padding-block: 16px; border-top: 1px solid var(--line); }
.embed-body { margin: 0; }

@media (max-width: 840px) {
  .yard-cover { gap: 16px; padding: 24px; }
  .yard-cover-copy { padding-left: 0; }
  .home-details, .feedback { grid-template-columns: 13rem minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 640px) {
  .site-wrap { width: calc(100% - 32px); }
  .masthead, .footer-inner { min-height: 56px; gap: 8px; }
  .masthead nav, .footer-inner nav { gap: 0 12px; }
  .play-area { margin-top: 24px; }
  .play-heading { margin-bottom: 16px; }
  .yard-stage { height: 648px; }
  .yard-cover { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: start; padding: 24px 16px; }
  .yard-cover-copy { max-width: none; }
  .yard-cover-copy p { margin-bottom: 16px; }
  .yard-cover .play-button { width: 100%; }
  .yard-cover-art { align-self: center; }
  .yard-cover-art img { max-height: 360px; }
  .home-details, .feedback, .question-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .home-details { padding-top: 24px; }
  .route-rule { padding: 16px; }
  .route-rule dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .footer-inner { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .charge-loader i { animation: none; }
}
