:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, sans-serif;
  color: #20352a;
  background: white;
  --green: #275c43;
  --muted: #50665a;
  --line: #d9e5d9;
}

* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #275c43; outline-offset: 3px; }
button:disabled { cursor: default; }
.shell { width: min(920px, calc(100% - 32px)); margin: auto; padding: clamp(32px, 7vw, 76px) 0; }
header { margin-bottom: 30px; }
header p { margin: 8px 0 0; color: var(--muted); }
.eyebrow { margin: 0; color: var(--green); font-size: 13px; font-weight: 700; letter-spacing: .13em; }
h1 { margin: 5px 0 12px; font-size: clamp(52px, 9vw, 88px); line-height: 1; letter-spacing: -.075em; }
h1 span { color: #337657; }
h2 { margin: 8px 0 18px; font-size: 26px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 20px; padding: clamp(14px, 3vw, 25px); }
.game { background: #f4f8f1; }
.game-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.metric { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.metric strong { color: #20352a; font-size: clamp(20px, 4vw, 28px); font-variant-numeric: tabular-nums; }
#start, #retry { border: 0; border-radius: 9px; padding: 10px 14px; background: var(--green); color: white; font-weight: 700; }
#start:disabled { background: #dce7dc; color: #43594b; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hole {
  display: grid; place-items: center; aspect-ratio: 1.15;
  border: 1px solid #d0dfd0; border-radius: 14px; background: #e5efe3;
  color: #204932; padding: 0; touch-action: manipulation;
}
.hole.active { border-color: #47805d; background: #c4e8ae; }
.bean {
  display: grid; place-items: center; width: 58%; aspect-ratio: 1.2;
  transform: rotate(-15deg); border-radius: 60% 48% 60% 44%;
  background: #77ba5e; border: 2px solid #47805d; font-weight: 800;
  box-shadow: inset -3px -4px #4a8d4a66;
}
#message, #ranking-status { color: var(--muted); font-size: 14px; }
#message { min-height: 1.5em; margin-bottom: 0; }
#retry { margin-top: 8px; }
#ranking { margin: 0; padding-left: 28px; }
#ranking li { padding: 10px 0 10px 4px; border-bottom: 1px solid var(--line); }
#ranking li:last-child { border-bottom: 0; }
#ranking li span { float: right; font-weight: 700; color: var(--green); }

@media (max-width: 650px) {
  .layout { grid-template-columns: 1fr; }
}
