:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, sans-serif;
  --ink: #233c2c;
  --green: #376746;
  --muted: #526453;
  --paper: #faf7ef;
  --card: #fffdf6;
  --line: #e0ddcc;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button { color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, canvas:focus-visible { outline: 3px solid #ab581f; outline-offset: -4px; }
h1, h2, p { margin: 0; }
.game { width: min(1320px, 100%); margin: 0 auto; padding: clamp(12px, 3vw, 38px); }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: clamp(12px, 2.3vw, 24px); }
.title-group { display: flex; gap: clamp(9px, 2vw, 19px); align-items: center; }
.logo { display: grid; place-items: center; position: relative; background: #deead3; border: 1px solid #cbdcbd; border-radius: 27%; width: clamp(40px, 5.75vw, 72px); aspect-ratio: 1; flex: none; }
.logo i { width: 53%; height: 40%; margin-top: 17%; display: block; position: relative; border-radius: 50% 50% 44% 44%; background: #fff8e7; box-shadow: 0 2px 0 #8ba27b; }
.logo i::before { content: ""; position: absolute; width: 25%; height: 105%; background: #fff8e7; border-radius: 70% 70% 15% 15%; left: 16%; top: -80%; box-shadow: .76em .12em 0 #fff8e7; transform: rotate(-9deg); }
.logo i::after { content: ""; position: absolute; width: 12%; aspect-ratio: 1; background: #233c2c; border-radius: 50%; left: 25%; top: 35%; box-shadow: .56em 0 0 #233c2c, .28em .28em 0 #de8b7a; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 4.9vw, 3.9rem); font-weight: 700; line-height: .98; letter-spacing: -.048em; }
.heading p { color: var(--muted); font-size: clamp(.875rem, 1.8vw, 1.12rem); margin-top: 7px; }
.score { display: flex; align-items: center; gap: 9px; flex: none; padding: 10px 15px; border: 1px solid #ead8ac; background: #fff1cf; border-radius: 15px; color: #6e421d; }
.score strong { white-space: nowrap; font-size: clamp(.9rem, 2vw, 1.25rem); font-variant-numeric: tabular-nums; }
.carrot-icon { position: relative; display: inline-block; width: 24px; height: 25px; transform: rotate(23deg); }
.carrot-icon i { position: absolute; top: 7px; left: 5px; width: 14px; height: 17px; background: #e6873b; border: 2px solid #b85829; border-radius: 45% 45% 75% 75%; }
.carrot-icon i::after { content: ""; position: absolute; width: 5px; height: 2px; background: #ad5428; top: 5px; left: 0; }
.carrot-icon::before, .carrot-icon::after { content: ""; position: absolute; height: 10px; width: 5px; background: #4b824b; left: 10px; top: 0; border-radius: 70% 70% 0 0; transform-origin: bottom center; }
.carrot-icon::before { transform: rotate(-31deg); }
.carrot-icon::after { transform: rotate(30deg); }
.game-board { border: 1px solid #d8d8c6; background: var(--card); border-radius: 23px; overflow: hidden; box-shadow: 0 7px 26px #33492f17; }
.scene { position: relative; height: clamp(420px, calc(100svh - 221px), 735px); background: #b6d29b; overflow: hidden; }
#game-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
#game-canvas[data-overview="true"] { cursor: default; }
.stage, .map-toggle { position: absolute; top: 14px; display: flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid #d3d9c0; border-radius: 11px; background: #fffdf1; font-weight: 750; line-height: 1.2; box-shadow: 0 2px 0 #44664135; }
.stage { left: 14px; pointer-events: none; }
.stage span { font-family: Georgia, serif; color: #27777a; font-size: 1.5rem; line-height: 1; }
.map-toggle { right: 14px; min-height: 42px; }
.map-toggle span:first-child { color: #3f8057; font-size: 1.2rem; }
.map-toggle:hover, .clear:hover:not(:disabled) { background: #e9f0db; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; min-height: 57px; }
.hint { display: flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 550; }
.hint-icon { font-size: 1.25rem; color: #326944; background: #e7efdc; border-radius: 9px; width: 33px; height: 33px; display: grid; place-items: center; flex: none; }
.clear { min-height: 39px; flex: none; padding: 5px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); font-weight: 700; }
.clear span { margin-right: 4px; font-size: 1.1rem; }
.finish { position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(1040px, calc(100% - 26px)); padding: clamp(12px, 2.4vw, 24px); border: 1px solid #d1dabd; border-radius: 22px; background: var(--card); box-shadow: 0 10px 45px #243c2e55; text-align: center; }
.finish[hidden] { display: none; }
.finish h2 { font-family: Georgia, serif; font-size: clamp(1.3rem, 3.4vw, 2.35rem); line-height: 1.12; }
.finish h2:focus { outline: none; }
.finish img { display: block; max-width: 100%; max-height: 37svh; height: auto; margin: 14px auto; border: 1px solid #d1dabd; border-radius: 10px; background: #b9d49a; }
#restart { border: 0; border-radius: 10px; background: #356645; color: #fffdf4; padding: 10px 20px; min-height: 46px; font-weight: 750; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
@media (max-width: 600px) {
  .game { padding: 11px; }
  .title-group { align-items: center; }
  .heading { min-height: 58px; }
  .score { padding: 7px 9px; gap: 3px; }
  .logo i::before { box-shadow: .53em .08em 0 #fff8e7; }
  .logo i::after { box-shadow: .32em 0 0 #233c2c, .16em .16em 0 #de8b7a; }
  .scene { height: clamp(350px, calc(100svh - 154px), 710px); }
  .game-board { border-radius: 16px; }
  .stage, .map-toggle { top: 9px; font-size: .875rem; padding: 7px 9px; }
  .stage { left: 9px; }
  .map-toggle { right: 9px; min-height: 40px; }
  .controls { padding: 7px 8px; font-size: .875rem; }
  .hint-icon { width: 28px; height: 30px; }
}
@media (max-width: 340px) { .logo { display: none; } }
