:root {
  --paper: #faf8f2;
  --surface: #ffffff;
  --ink: #303c35;
  --muted: #727c73;
  --line: #e5e0d4;
  --orange: #e97859;
  --orange-dark: #c95d40;
  --rose: #f4e0d8;
  --green: #287d68;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input { font: inherit; }
.topbar { max-width: 1120px; margin: 0 auto; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: 'Nunito Sans', sans-serif; font-weight: 800; font-size: 16px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--orange); color: white; font-size: 24px; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font: 700 9px 'Inter', sans-serif; letter-spacing: 1.5px; }
.back-link { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.back-link:hover { color: var(--orange-dark); }
.page { width: min(920px, calc(100% - 32px)); margin: 22px auto 56px; }
.intro { text-align: center; margin: 0 auto 26px; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 2px; margin: 0 0 10px; }
h1 { margin: 0; font: 800 clamp(30px, 5vw, 44px)/1.15 'Nunito Sans', sans-serif; letter-spacing: -1.4px; }
h1 span { color: var(--orange); }
.intro-copy { margin: 11px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.game-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 12px 36px rgba(48,60,53,.055); }
.game-topline { min-height: 52px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 8px; }
.scoreline { display: flex; gap: 18px; font-size: 10px; letter-spacing: 1px; font-weight: 700; }
.scoreline strong { color: var(--ink); font-size: 13px; letter-spacing: 0; margin-left: 4px; }
.field-wrap { position: relative; width: 100%; background: #e9f1e1; line-height: 0; }
#gameCanvas { display: block; width: 100%; height: auto; aspect-ratio: 2.15 / 1; }
.field-hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 8px 12px; border: 1px solid rgba(255,255,255,.8); border-radius: 99px; background: rgba(255,255,255,.83); color: var(--ink); font-size: 11px; font-weight: 600; white-space: nowrap; box-shadow: 0 3px 12px rgba(48,60,53,.06); }
.controls { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 24px; padding: 22px; border-bottom: 1px solid var(--line); }
.control-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.control-heading label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.control-heading output { font: 800 19px 'Nunito Sans', sans-serif; color: var(--ink); }
input[type="range"] { appearance: none; width: 100%; height: 5px; border-radius: 10px; background: #eee8e1; outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 17px; height: 17px; border-radius: 50%; background: var(--orange); border: 3px solid white; box-shadow: 0 0 0 1px var(--orange); }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: var(--orange); border: 3px solid white; box-shadow: 0 0 0 1px var(--orange); }
.range-labels { display: flex; justify-content: space-between; margin-top: 8px; color: #9b9f98; font-size: 10px; }
.shoot-button { min-width: 128px; align-self: stretch; border: 0; border-radius: 12px; padding: 0 20px; background: var(--orange); color: white; font-weight: 800; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; box-shadow: 0 5px 0 #d86447; }
.shoot-button span { display: inline-block; margin-right: 6px; transform: rotate(-25deg); }
.shoot-button:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 6px 0 #b95036; }
.shoot-button:active { transform: translateY(3px); box-shadow: 0 2px 0 #b95036; }
.shoot-button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.result-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 22px; }
.result-label { display: block; margin-bottom: 5px; color: #9b9f98; font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.result-row strong { font-size: 13px; font-weight: 600; }
.reset-button { border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); padding: 10px 13px; font-size: 11px; font-weight: 700; cursor: pointer; }
.reset-button:hover { border-color: var(--orange); color: var(--orange-dark); }
.footnote { margin: 16px 8px 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.6; }
@media (max-width: 650px) {
  .topbar { padding: 16px; }
  .page { margin-top: 16px; width: min(100% - 20px, 920px); }
  .intro { margin-bottom: 20px; }
  .game-topline { padding: 0 14px; }
  .scoreline { gap: 10px; }
  #gameCanvas { aspect-ratio: 1.35 / 1; }
  .controls { grid-template-columns: 1fr 1fr; gap: 18px 16px; padding: 18px 16px; }
  .shoot-button { grid-column: 1 / -1; min-height: 48px; }
  .result-row { padding: 15px 16px; }
  .field-hint { top: 9px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
