:root {
  color-scheme: light;
  --paper: #f5f7f4;
  --ink: #142b23;
  --muted: #4d6058;
  --line: #dbe3db;
  --accent: #116a4b;
  font-family: "Avenir Next", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .17em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #247fc0; outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(100% - 36px, 1040px); margin-inline: auto; }
.site-header, .site-footer { border-color: var(--line); border-style: solid; border-width: 0 0 1px; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.header-inner, .footer-inner { min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; text-decoration: none; }
.plain-link { font-size: .88rem; font-weight: 700; }
.intro { margin: 25px 0 18px; }
h1 { font-size: clamp(2.1rem, 6vw, 4.25rem); letter-spacing: -.07em; line-height: 1.02; margin: 0; font-weight: 870; }
.intro p { margin: 8px 0 0; color: var(--muted); font-size: clamp(.93rem, 2vw, 1.1rem); }
.player { overflow: hidden; border-radius: 17px; border: 1px solid #ccd9ce; background: #a6aaa9; box-shadow: 0 8px 27px #1b3b2617; }
.game-viewport { position: relative; }
.game-viewport iframe { display: block; width: 100%; height: clamp(430px, 63svh, 630px); border: 0; background: #9aa3a9; touch-action: none; }
@supports (clip-path: inset(2px max(50%, calc(100% - 146px)) calc(100% - 48px) 6px)) {
  .game-viewport::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgb(20 14 6 / 28%) 100%), #9aa3a9;
    /* Clip the painted area and the pointer target to the embedded back link. */
    clip-path: inset(2px max(50%, calc(100% - 146px)) calc(100% - 48px) 6px);
    touch-action: none;
  }
}
.game-viewport:fullscreen { width: 100%; height: 100%; }
.game-viewport:fullscreen iframe { height: 100%; }
.player-bar { display: flex; justify-content: flex-end; background: #fff; padding: 7px 13px; }
.player-bar button {
  font: inherit; font-weight: 740; font-size: .79rem; text-decoration: none; white-space: nowrap;
  display: inline-flex; min-height: 42px; align-items: center; padding: 6px 11px; cursor: pointer;
  border: 1px solid #d1ddd4; border-radius: 9px; background: #f4f7f4; color: var(--ink);
}
.player-bar button:hover { background: #e8f2e9; }
.instructions { padding: clamp(30px, 5vw, 54px) 0 26px; }
.instructions h2, .guide h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -.05em;
}
.instructions p, .instructions dd, .guide p, .legal p { color: var(--muted); line-height: 1.58; }
.guide-header p { max-width: 62ch; margin: 10px 0 20px; }
.control-grid, .help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.control-card, .help-panel { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: clamp(16px, 2.5vw, 26px); }
.control-card h3, .guide h3 { margin: 0; font-size: 1.13rem; line-height: 1.3; }
.control-card dl { margin: 12px 0 0; }
.control-card dl div {
  display: grid;
  grid-template-columns: 4.3rem minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.control-card dt { font-weight: 750; }
.control-card dd { margin: 0; }
.control-card p { margin: 8px 0 0; color: var(--accent); font-size: .88rem; }
.guide-nav { display: flex; flex-wrap: wrap; column-gap: 20px; margin-top: 14px; }
.guide-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.guide-nav a, .back-to-game a { color: var(--accent); font-weight: 750; font-size: .9rem; }
.mud-guide { border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.mud-feature {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  align-items: center;
  min-width: 0;
  border-radius: 21px 21px 0 0;
  overflow: hidden;
  background: #173b2c;
  color: #f4fff5;
}
.feature-copy { padding: clamp(20px, 4vw, 42px); }
.feature-copy h2 { max-width: 11ch; font-size: clamp(2.35rem, 5.4vw, 4.25rem); line-height: .98; letter-spacing: -.06em; }
.guide .feature-copy p { margin: 16px 0 0; color: #e0eee3; }
.mud-feature img { display: block; width: 100%; height: auto; align-self: stretch; object-fit: cover; }
.mud-spots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; padding: clamp(18px, 3vw, 30px); }
.mud-spots > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.guide p { margin: 8px 0 0; }
.guide-disclosure { border-top: 1px solid var(--line); }
.guide-disclosure summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px 0; cursor: pointer; }
.guide-disclosure summary::-webkit-details-marker { display: none; }
.guide-disclosure summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 5px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); }
.guide-disclosure[open] summary::after { transform: rotate(225deg); }
.guide-disclosure[open] { padding-bottom: 14px; }
.guide-disclosure p { max-width: 65ch; margin-top: 0; }
.guide-disclosure p + p { margin-top: 10px; }
.mud-guide > details { margin-inline: clamp(18px, 3vw, 30px); }
.cleanup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  margin: clamp(24px, 4vw, 42px) 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #eaf4eb;
}
.cleanup-copy { padding: clamp(18px, 3vw, 30px); }
.cleanup h2 { max-width: 16ch; }
.cleanup img { display: block; width: 100%; height: auto; align-self: stretch; object-fit: cover; }
.guide-story { padding: clamp(24px, 4vw, 42px) 0; border-bottom: 1px solid var(--line); }
.guide-story h2 { margin-bottom: 20px; }
.guide-story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  grid-template-areas: "illustration copy";
  align-items: start;
  gap: clamp(16px, 3.5vw, 38px);
}
.guide-story-layout img {
  grid-area: illustration;
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.story-copy { grid-area: copy; }
.story-copy h3:not(:first-child) { margin-top: 14px; }
.replay-guide { padding-top: 0; margin-bottom: clamp(24px, 4vw, 42px); }
.replay-guide .guide-story-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-areas: "copy illustration";
}
.help-grid { align-items: start; }
.help-panel h2 { margin-bottom: 14px; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.help-panel h3 { font-size: 1rem; }
.back-to-game { margin: 18px 0 30px; }
.back-to-game a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer { border-width: 1px 0 0; font-size: .84rem; color: var(--muted); }
.legal { min-height: 65vh; padding: 35px 0; max-width: 710px; }
.legal h1 { margin-bottom: 17px; }
.legal h2 { margin: 24px 0 0; font-size: clamp(1.45rem, 3.5vw, 2rem); letter-spacing: -.045em; }
@media (max-width: 760px) {
  .mud-feature, .mud-spots, .cleanup, .help-grid { grid-template-columns: 1fr; }
  .mud-feature img, .cleanup img { align-self: auto; object-fit: contain; }
  .mud-spots > div + div { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
  .guide-story .guide-story-layout { grid-template-columns: 1fr; grid-template-areas: "illustration" "copy"; }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 24px); }
  .header-inner { min-height: 51px; }
  .intro { margin: 18px 0 13px; }
  .player { border-radius: 12px; }
  .game-viewport iframe { height: clamp(430px, 65svh, 620px); }
  .player-bar { padding: 5px 8px; }
  .player-bar button { font-size: .7rem; padding: 6px 7px; }
  .control-grid { grid-template-columns: 1fr; gap: 10px; }
  .guide-nav { column-gap: 14px; }
}
