/* =============================================================
   GAME: Mini Golf
   ============================================================= */
.board-minigolf { display: flex; flex-direction: column; align-items: center; gap: 10px; outline: none; max-width: 100%; }
.mg-stage { position: relative; touch-action: none; }
.mg-canvas {
  display: block; height: min(calc(100vh - 270px), 720px, calc((100vw - 60px) * 8 / 5)); min-height: 360px; aspect-ratio: 5 / 8;
  border-radius: 18px; background: #0d2a14; cursor: crosshair; touch-action: none; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 0 2px #b8ff3d, 0 0 28px rgba(184, 255, 61, .3);
}
.board-minigolf:focus-visible .mg-canvas { box-shadow: 0 0 0 3px #fff, 0 0 28px rgba(184, 255, 61, .5); }
.mg-msg[hidden] { display: none; }
.mg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
.mg-num { color: #d4ff8a; font-variant-numeric: tabular-nums; }
.mg-rel { color: var(--muted); font-size: .85em; font-variant-numeric: tabular-nums; }

/* aim pad */
.mg-pad { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; touch-action: none; }
.mg-key {
  display: grid; place-items: center; width: 42px; height: 40px; padding: 0; border: 0; border-radius: 12px; cursor: pointer; color: #d4ff8a;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(184, 255, 61, .4), 0 3px 0 rgba(0, 0, 0, .35); -webkit-tap-highlight-color: transparent; user-select: none;
}
.mg-key svg { width: 22px; height: 22px; fill: currentColor; }
.mg-key:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px #b8ff3d, 0 1px 0 rgba(0, 0, 0, .35); }
.mg-key:focus-visible, .mg-shoot:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.mg-power { position: relative; width: 64px; height: 10px; border-radius: 99px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.mg-power span { position: absolute; inset: 0 auto 0 0; width: 50%; border-radius: inherit; background: #7dff5a; }
.mg-power[data-level="mid"] span { background: #ffd23f; }
.mg-power[data-level="hi"] span { background: #ff5a3d; }
.mg-shoot {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer; font: 800 .9rem var(--font-body); color: #142a00;
  background: linear-gradient(135deg, #d4ff8a, #8be02a); box-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 16px rgba(184, 255, 61, .3);
}
.mg-shoot:active { transform: translateY(2px); }
@media (max-width: 400px) { .mg-key { width: 38px; } .mg-power { width: 44px; } .mg-shoot { padding: 0 12px; } }

/* scorecard */
.mg-cardwrap { max-width: 100%; overflow-x: auto; }
.mg-card { border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; background: var(--bg); border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.mg-card caption { caption-side: top; text-align: left; padding: 0 2px 4px; font: 700 .78rem var(--font-head); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.mg-card th, .mg-card td { padding: 4px 6px; min-width: 24px; text-align: center; border-bottom: 1px solid var(--line); }
.mg-card th[scope="row"] { text-align: left; color: var(--muted); font-weight: 700; }
.mg-card thead th { color: var(--muted); font-weight: 700; }
.mg-card tr:last-child td, .mg-card tr:last-child th { border-bottom: 0; }
.mg-card .mg-cur { background: rgba(184, 255, 61, .12); }
.mg-best td { color: var(--muted); }
.mg-s { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; font-weight: 800; }
.mg-under { color: #142a00; background: #7dff5a; }
.mg-even { color: #d8f0ff; }
.mg-over { color: #ffb0a0; }
@media (max-width: 420px) { .mg-card { font-size: .74rem; } .mg-card th, .mg-card td { padding: 3px 3px; min-width: 18px; } }
@media (max-width: 600px) { .mg-canvas { height: min(calc(100vh - 340px), calc((100vw - 48px) * 8 / 5)); } }
