/* Tenis Pintar: lapangan di kanvas, papan skor, tombol kontrol dua sisi, panel kuis */
.bd-wrap { flex: 1; min-height: 0; display: flex; padding: clamp(4px, 1vw, 12px); background: #1e3a8a; }
.bd-stage { position: relative; flex: 1; min-height: 0; border-radius: 16px; overflow: hidden; border: 3px solid #fff; touch-action: none; user-select: none; -webkit-user-select: none; background: #bfdbfe; }
.bd-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bd-hud { position: absolute; left: 0; right: 0; top: 6px; display: flex; justify-content: center; align-items: stretch; gap: 8px; pointer-events: none; }
.bd-pl { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 2px 14px; font-weight: 800; font-size: clamp(13px, 1.8vw, 22px); box-shadow: 0 3px 0 rgba(15,23,42,.2); }
.bd-pl b { font-size: 1.9em; line-height: 1; font-variant-numeric: tabular-nums; min-width: 1ch; text-align: center; }
.bd-pl.a { border-left: 8px solid #e11d48; } .bd-pl.b { border-right: 8px solid #0284c7; }
.bd-pl .sv { opacity: 0; font-size: 1.1em; } .bd-pl .sv.on { opacity: 1; }
.bd-goal { align-self: center; background: rgba(15,23,42,.65); color: #fff; border-radius: 999px; padding: 2px 12px; font-weight: 700; font-size: clamp(11px, 1.3vw, 16px); }
.bd-pad { position: absolute; bottom: 8px; display: flex; gap: clamp(6px, 1.4vw, 14px); z-index: 3; }
.bd-pad.left { left: 8px; } .bd-pad.right { right: 8px; }
.bd-pad button { width: clamp(46px, 8vw, 86px); height: clamp(46px, 8vw, 86px); border: 0; border-radius: 50%; background: rgba(255,255,255,.88); color: #0f172a; font: inherit; font-weight: 800; font-size: clamp(20px, 3.4vw, 40px); cursor: pointer; box-shadow: 0 4px 0 rgba(15,23,42,.3); touch-action: none; padding: 0; }
.bd-pad button.down, .bd-pad button:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(15,23,42,.3); background: #fde68a; }
.bd-pad button.hit { width: clamp(72px, 12vw, 130px); border-radius: 999px; font-size: clamp(16px, 2.6vw, 30px); color: #fff; }
.bd-pad.left button.hit { background: #e11d48; } .bd-pad.right button.hit { background: #0284c7; }
.bd-pad[hidden] { display: none; }
.bd-quiz { display: none; position: absolute; top: clamp(36px, 7vh, 64px); width: min(46%, 520px); background: rgba(255,255,255,.97); border: 4px solid var(--sky); border-radius: 18px; padding: clamp(6px, 1.2vw, 14px); z-index: 4; box-shadow: 0 10px 26px rgba(15,23,42,.35); }
.bd-quiz.show { display: block; }
.bd-quiz.s0 { left: 8px; border-color: #e11d48; } .bd-quiz.s1 { right: 8px; border-color: #0284c7; }
.bd-qwho { font-weight: 800; color: var(--muted); font-size: clamp(11px, 1.4vw, 16px); }
.bd-qq { font-weight: 800; color: var(--ink); font-size: clamp(14px, 2.2vw, 28px); line-height: 1.2; margin: 2px 0 6px; }
.bd-qch { display: grid; gap: 6px; }
.bd-qb { display: flex; align-items: center; gap: 8px; text-align: left; min-height: 40px; padding: 4px 10px; border: 3px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 700; color: var(--ink); font-size: clamp(13px, 1.9vw, 24px); cursor: pointer; }
.bd-qb i { flex: 0 0 auto; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--sky); color: #fff; font-style: normal; display: flex; align-items: center; justify-content: center; font-size: .85em; }
.bd-qb:disabled { cursor: default; }
.bd-qb.ok { background: #bbf7d0; border-color: var(--ok); } .bd-qb.bad { background: var(--rose-100); border-color: var(--bad); }
.bd-quiz.wait .bd-qb { pointer-events: none; }
.bd-qres { font-weight: 700; font-size: clamp(11px, 1.5vw, 17px); line-height: 1.3; margin-top: 4px; color: var(--muted); }
.bd-fb { position: absolute; left: 50%; top: 46%; transform: translate(-50%, 10px); background: var(--ink); color: #fff; padding: 8px 18px; border-radius: 16px; font-weight: 800; font-size: clamp(14px, 2vw, 26px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 5; text-align: center; max-width: 80%; }
.bd-fb.show { opacity: 1; transform: translate(-50%, 0); }
.bd-fb.ok { background: var(--ok); }
@media (max-height: 520px) {
  .bd-wrap { padding: 3px 6px; }
  .bd-stage { border-width: 2px; border-radius: 12px; }
  .bd-quiz { top: 30px; width: min(48%, 400px); padding: 5px 8px; border-width: 3px; }
  .bd-qb { min-height: 30px; padding: 2px 8px; border-width: 2px; }
  .bd-pad button { width: 44px; height: 44px; } .bd-pad button.hit { width: 70px; }
}
@media (max-width: 700px) and (orientation: portrait) { .bd-quiz { width: 92%; left: 4% !important; right: auto !important; } }
@media (prefers-reduced-motion: reduce) { .bd-fb { transition: none; } }
@media (max-width: 700px) { .bd-pad button { width: 38px; height: 38px; font-size: 18px; } .bd-pad button.hit { width: 56px; font-size: 14px; } .bd-pad { gap: 5px; } }
.bd-pad button:not(.hit) { display: flex; align-items: center; justify-content: center; }
.bd-pad button svg { width: 60%; height: 60%; fill: currentColor; display: block; pointer-events: none; }
