/* =========================================================================
   Golfaventure (golf.html, js/golfaventure.js) — pixel art 8 bits
   ========================================================================= */
.ga-stage { height: min(74vh, 640px); min-height: 360px; background: #1f8f4e; }
.ga-canvas { image-rendering: pixelated; image-rendering: crisp-edges; touch-action: none; cursor: crosshair; }
.ga-hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; font-family: "Londrina", "Courier New", monospace; color: #fff; }
.ga-hud[hidden], .ga-msg[hidden], .ga-dialog[hidden], .ga-brake[hidden] { display: none; }
.ga-side {
  position: absolute; left: 0; top: 0; bottom: 0; width: 78px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 4px; background: #05050a; border-right: 3px solid #23233a;
}
.ga-club { image-rendering: pixelated; }
.ga-strokes { margin: 0; line-height: 1; text-align: center; }
.ga-strokes b { display: block; font-size: 2.5rem; font-weight: 900; letter-spacing: .02em; }
.ga-strokes span { font-size: 1rem; color: #a8e63a; letter-spacing: .06em; }
.ga-strokes.low b { color: #ef6a52; animation: ga-blink .6s steps(2) infinite; }
@keyframes ga-blink { 50% { opacity: .35; } }
.ga-keys { margin: 0; font: 900 .9rem "Londrina", "Courier New", monospace; color: #f6c445; letter-spacing: .04em; text-align: center; }
.ga-items { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.ga-items i { display: block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #5a5a70; background: transparent; position: relative; }
.ga-items i[data-item="brake"].on { background: #d8322b; border-color: #fff; }
.ga-items i[data-item="power"].on { background: #f6c445; border-color: #fff; }
.ga-items i[data-item="float"].on { background: #3a74e0; border-color: #fff; }
.ga-pieces { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 4px; }
.ga-pieces i { display: block; width: 14px; height: 14px; border: 2px solid #5a5a70; background: #1b1b2a; }
.ga-pieces i.on { background: #f6c445; border-color: #fff09a; }
.ga-power { position: relative; flex: 1 1 auto; min-height: 30px; width: 14px; margin-top: 6px; background: #3a0a0a; border: 2px solid #5a5a70; }
.ga-power i { position: absolute; left: 0; bottom: 0; width: 100%; height: calc(var(--p, 0) * 1%); background: #a8e63a; }
.ga-msg {
  position: absolute; left: calc(50% + 39px); top: 12px; transform: translateX(-50%); z-index: 2; max-width: calc(100% - 110px); text-align: center; pointer-events: none;
  padding: 5px 12px; background: #05050a; color: #fff; border: 3px solid #a8e63a; font: 800 .95rem "Nunito", system-ui, sans-serif;
}
.ga-dialog {
  position: absolute; left: calc(50% + 39px); bottom: 14px; transform: translateX(-50%); z-index: 3; width: min(460px, calc(100% - 110px)); cursor: pointer;
  padding: 10px 14px; background: #05050a; color: #fff; border: 3px solid #fff; font: 700 .95rem/1.35 "Nunito", system-ui, sans-serif;
}
.ga-brake { position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: #d8322b; color: #fff; font: 900 .95rem "Londrina", "Courier New", monospace; letter-spacing: .06em; cursor: pointer; touch-action: none; }
.ga-overlay { z-index: 4; }
.ga-card { width: min(480px, 100%); }
.ga-card h2 { margin-bottom: .3em; }
.ga-stack { display: grid; gap: 4px; justify-items: center; margin: 10px 0 4px; }
.ga-stack .btn { justify-content: center; min-width: min(300px, 100%); }
.ga-best { font-weight: 700; }
@media (orientation: portrait) and (max-width: 700px) {
  .ga-stage { height: calc(100dvh - 250px); min-height: 460px; max-height: 820px; }
  .ga-side { right: 0; bottom: auto; width: auto; height: 58px; flex-direction: row; justify-content: space-around; align-items: center; gap: 8px; padding: 4px 10px; border-right: 0; border-bottom: 3px solid #23233a; }
  .ga-strokes b { display: inline; font-size: 2rem; }
  .ga-items, .ga-pieces { flex-direction: row; margin: 0; }
  .ga-pieces { display: flex; gap: 3px; }
  .ga-items i { width: 18px; height: 18px; }
  .ga-power { flex: 0 0 auto; width: 70px; height: 14px; min-height: 0; margin: 0; }
  .ga-power i { width: calc(var(--p, 0) * 1%); height: 100%; }
  .ga-msg { left: 50%; top: 66px; max-width: calc(100% - 24px); }
  .ga-dialog { left: 50%; width: calc(100% - 24px); bottom: 12px; }
  .ga-brake { bottom: 90px; }
  .ga-card { padding: 16px 14px 14px; }
}
