:root {
  color-scheme: light;
  --paper: #f6f3e9;
  --ink: #273e2d;
  --muted: #78816d;
  --line: #d9ddcb;
  --orange: #dc7447;
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid var(--orange); outline-offset: 5px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.game {
  width: min(1480px, 100%);
  min-height: 100svh;
  margin: auto;
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.game-header { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 12px; }
h1 { margin: 0; font: 42px/1 "Iowan Old Style", Baskerville, Georgia, serif; letter-spacing: -2px; font-weight: normal; }
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: background .2s, border-color .2s;
}
.icon-button:hover { background: #eaeedc; border-color: #a5b093; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sound-waves { display: none; }
[aria-pressed="true"] .sound-waves { display: block; }
[aria-pressed="true"] .sound-off { display: none; }
.course { position: relative; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.course.is-dragging { cursor: grabbing; }
.course.is-playing { cursor: default; }
#course-art { display: block; width: 100%; height: auto; overflow: hidden; }
#ball-hint { transition: opacity .2s; }
.is-playing #ball-hint, .is-dragging #ball-hint { opacity: 0; }
.pulse { transform-origin: 414px 451px; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .15; transform: scale(.85); } 50% { opacity: .5; transform: scale(1.1); } }
.controls { display: flex; align-items: center; gap: 28px; padding: 24px 18px 0; }
.controls p { font-size: 14px; margin: 0; color: var(--muted); }
.controls.is-hidden { visibility: hidden; }
.power-meter { width: 74px; height: 3px; overflow: hidden; background: #dce1cc; border-radius: 4px; }
#power-fill { display: block; height: 100%; width: 0; background: var(--orange); border-radius: inherit; }
.shot-button { margin-left: auto; border: 0; padding: 12px 20px; border-radius: 24px; color: var(--paper); background: var(--ink); font-size: 13px; }
.shot-button span { margin-left: 16px; font-size: 18px; }
.shot-button:hover { background: #3b5941; }
.shot-button:disabled { opacity: .45; }
.result {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 30px;
  background: rgba(246, 243, 233, .94);
  cursor: default;
  animation: reveal .55s ease both;
}
.result h2 { max-width: 800px; margin: 0; text-align: center; font: 48px/1.2 "Iowan Old Style", Baskerville, Georgia, serif; letter-spacing: -.8px; font-weight: normal; text-wrap: balance; }
.result h2:focus { outline: none; }
.replay-button { width: 48px; height: 48px; border-color: #a9b29b; }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 1600px) { .game { padding-top: 64px; padding-bottom: 64px; } }
@media (max-width: 650px) {
  .game { padding: 32px 0; }
  .game-header { padding: 0 24px 32px; }
  h1 { font-size: 34px; }
  .course { margin-top: 28px; }
  #course-art { aspect-ratio: 1210 / 525; }
  .controls { padding: 24px; gap: 12px; flex-wrap: wrap; }
  .controls p { font-size: 12px; }
  .power-meter { width: 32px; }
  .shot-button { padding: 10px 15px; }
  .shot-button span { margin-left: 8px; }
  .result { padding: 18px 24px; gap: 20px; }
  .result h2 { font-size: clamp(24px, 7vw, 38px); }
  .replay-button { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
