/* ==== JPM KIT v1 — base visual dos jogos (sincronizado; regras do jogo vêm depois do "fim da base") ==== */
.jpm-game[data-game="basquete"] {
  --g-glass: rgba(23, 27, 52, .72);
  --g-accent: var(--primary, #6046FF);
  font-family: inherit;
  color: var(--ink, #172033);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  container-type: size;
  font-size: clamp(11px, 2.1cqw, 17px);
}
.jpm-game[data-game="basquete"] [hidden] { display: none; }
.jpm-game[data-game="basquete"] button { font: inherit; color: inherit; cursor: pointer; }
.jpm-game[data-game="basquete"] button:focus-visible { outline: 3px solid var(--ink, #172033); outline-offset: 2px; }
.jpm-game[data-game="basquete"] .g-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
.jpm-game[data-game="basquete"] .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* HUD numa faixa só */
.jpm-game[data-game="basquete"] .g-hud { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; pointer-events: none; }
.jpm-game[data-game="basquete"] .g-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: var(--r-pill, 999px); background: var(--g-glass); color: var(--surface, #fff); font-weight: 900; font-size: clamp(13px, 2.3cqw, 19px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.jpm-game[data-game="basquete"] .g-chip--right { margin-left: auto; }
.jpm-game[data-game="basquete"] .g-chip--warn { background: var(--coral, #FF6868); }
.jpm-game[data-game="basquete"] .g-ico { width: 1.2em; height: 1.2em; flex: none; }
.jpm-game[data-game="basquete"] .g-bar { position: relative; width: clamp(70px, 18cqw, 180px); height: .7em; border-radius: var(--r-pill, 999px); background: rgba(255, 255, 255, .25); overflow: hidden; }
.jpm-game[data-game="basquete"] .g-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--yellow, #FFD43B); transition: width .2s linear; }
.jpm-game[data-game="basquete"] .g-hearts { display: flex; gap: 4px; padding: 6px 10px; border-radius: var(--r-pill, 999px); background: var(--g-glass); }
.jpm-game[data-game="basquete"] .g-heart { width: clamp(16px, 3cqw, 26px); height: clamp(16px, 3cqw, 26px); color: var(--coral, #FF6868); transition: transform .2s, opacity .2s; }
.jpm-game[data-game="basquete"] .g-heart.is-lost { color: rgba(255, 255, 255, .35); transform: scale(.85); }

/* telas */
.jpm-game[data-game="basquete"] .g-screen { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 12px; }
.jpm-game[data-game="basquete"] .g-intro, .jpm-game[data-game="basquete"] .g-over, .jpm-game[data-game="basquete"] .g-paused { background: rgba(23, 27, 52, .32); }
.jpm-game[data-game="basquete"] .g-intro { background: linear-gradient(90deg, rgba(23, 27, 52, .38), rgba(23, 27, 52, .05) 70%); justify-items: start; padding-left: 6cqw; }
.jpm-game[data-game="basquete"] .g-card { width: min(92%, 420px); padding: clamp(14px, 3.4cqw, 28px); border-radius: var(--r-card, 16px); background: var(--surface, #fff); color: var(--ink, #172033); text-align: center; box-shadow: var(--shadow2, 0 18px 44px rgba(23, 32, 51, .16)); }
.jpm-game[data-game="basquete"] .g-intro .g-card { width: min(56%, 400px); }
.jpm-game[data-game="basquete"] .g-card--small { width: auto; padding: 16px 22px; }
.jpm-game[data-game="basquete"] .g-kicker { margin: 0; font-size: clamp(10px, 1.8cqw, 13px); font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted, #606B80); }
.jpm-game[data-game="basquete"] .g-title { margin: 4px 0 6px; font-size: clamp(20px, 4.6cqw, 34px); line-height: 1.05; letter-spacing: -.04em; font-weight: 900; }
.jpm-game[data-game="basquete"] .g-text { margin: 0 0 14px; color: var(--muted, #606B80); font-weight: 600; font-size: clamp(12px, 2.2cqw, 16px); }
.jpm-game[data-game="basquete"] .g-btn { min-height: 46px; padding: 0 26px; border: 0; border-radius: var(--r-pill, 999px); background: var(--g-accent); color: var(--surface, #fff); font-weight: 900; font-size: clamp(15px, 2.6cqw, 19px); box-shadow: 0 8px 18px rgba(23, 32, 51, .22); transition: transform .12s; }
.jpm-game[data-game="basquete"] .g-btn:active { transform: scale(.96); }
.jpm-game[data-game="basquete"] .g-btn--ghost { background: var(--bg, #F3F6FA); color: var(--ink, #172033); box-shadow: inset 0 0 0 2px var(--line, #E3E8EF); }
.jpm-game[data-game="basquete"] .g-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.jpm-game[data-game="basquete"] .g-results { display: flex; justify-content: center; gap: clamp(12px, 4cqw, 30px); margin: 10px 0; }
.jpm-game[data-game="basquete"] .g-num { display: block; font-size: clamp(20px, 4.4cqw, 32px); font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.jpm-game[data-game="basquete"] .g-lbl { font-size: clamp(11px, 1.8cqw, 13px); color: var(--muted, #606B80); font-weight: 700; }
.jpm-game[data-game="basquete"] .g-best { margin: 0 0 14px; font-weight: 800; color: var(--g-accent); min-height: 1.2em; }
.jpm-game[data-game="basquete"] .g-stars { display: flex; justify-content: center; gap: 6px; margin: 4px 0 8px; font-size: clamp(22px, 5cqw, 36px); }
.jpm-game[data-game="basquete"] .g-star { width: 1em; height: 1em; color: var(--line, #E3E8EF); }
.jpm-game[data-game="basquete"] .g-star.is-on { color: var(--yellow, #FFD43B); }

.jpm-game[data-game="basquete"] .g-ready { pointer-events: none; align-content: center; gap: 12px; }
.jpm-game[data-game="basquete"] .g-howto { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.jpm-game[data-game="basquete"] .g-howto-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: var(--r-pill, 999px); background: var(--g-glass); color: var(--surface, #fff); font-weight: 700; font-size: clamp(12px, 2.1cqw, 16px); }
.jpm-game[data-game="basquete"] .g-key { padding: 3px 9px; border-radius: 8px; background: var(--surface, #fff); color: var(--ink, #172033); font-weight: 900; }
.jpm-game[data-game="basquete"] .g-touch-only { display: none; }
.jpm-game[data-game="basquete"] .g-count { font-size: clamp(48px, 14cqw, 120px); font-weight: 900; color: var(--surface, #fff); text-shadow: 0 6px 0 rgba(23, 27, 52, .35); line-height: 1; animation: basquete-pop .8s ease-out infinite; }
@keyframes basquete-pop { from { transform: scale(1.25); opacity: .4; } 30% { transform: scale(1); opacity: 1; } }

/* botões de toque */
.jpm-game[data-game="basquete"] .g-touch { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 10px; pointer-events: none; }
.jpm-game[data-game="basquete"] .g-touch-group { display: flex; gap: 10px; align-items: flex-end; }
.jpm-game[data-game="basquete"] .g-tbtn { pointer-events: auto; width: clamp(52px, 13cqw, 80px); height: clamp(52px, 13cqw, 80px); border: 0; border-radius: 50%; background: rgba(23, 27, 52, .45); color: var(--surface, #fff); display: grid; place-items: center; touch-action: none; font-weight: 900; font-size: clamp(11px, 2cqw, 14px); }
.jpm-game[data-game="basquete"] .g-tbtn svg { width: 55%; height: 55%; }
.jpm-game[data-game="basquete"] .g-tbtn--action { background: rgba(96, 70, 255, .78); }
.jpm-game[data-game="basquete"] .g-tbtn.is-on, .jpm-game[data-game="basquete"] .g-tbtn:active { transform: scale(.94); background: rgba(96, 70, 255, .9); }

/* aviso curto no meio da tela (+10, Combo!, Errou) */
.jpm-game[data-game="basquete"] .g-toast { position: absolute; left: 50%; top: 22%; z-index: 3; transform: translateX(-50%); padding: .4em 1em; border-radius: var(--r-pill, 999px); background: var(--surface, #fff); color: var(--ink, #172033); font-weight: 900; font-size: clamp(14px, 3cqw, 24px); white-space: nowrap; box-shadow: var(--shadow2, 0 18px 44px rgba(23, 32, 51, .16)); pointer-events: none; animation: basquete-toast .9s ease-out forwards; }
.jpm-game[data-game="basquete"] .g-toast.is-good { background: var(--green, #46D68C); color: var(--surface, #fff); }
.jpm-game[data-game="basquete"] .g-toast.is-bad { background: var(--coral, #FF6868); color: var(--surface, #fff); }
@keyframes basquete-toast { from { opacity: 0; transform: translate(-50%, 10px) scale(.9); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 80% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -12px) scale(1); } }

@media (pointer: coarse) {
  .jpm-game[data-game="basquete"] .g-touch-only { display: inline-flex; }
}
@container (max-width: 520px) {
  .jpm-game[data-game="basquete"] .g-intro { justify-items: center; padding-left: 12px; background: rgba(23, 27, 52, .3); }
  .jpm-game[data-game="basquete"] .g-intro .g-card { width: min(92%, 400px); }
}
@media (prefers-reduced-motion: reduce) {
  .jpm-game[data-game="basquete"] .g-count, .jpm-game[data-game="basquete"] .g-toast { animation: none; }
}
/* ==== fim da base ==== */

/* jogo */
.jpm-game[data-game="basquete"] { --g-accent: #FF9F1C; --bq-teal: #2EC4B6; --bq-purple: #8338EC; --bq-ink: #3b1d6e; }
.jpm-game[data-game="basquete"] .g-btn { background: #FF9F1C; color: #3b1d6e; box-shadow: 0 6px 0 #d9780a, 0 12px 20px rgba(23, 32, 51, .2); }
.jpm-game[data-game="basquete"] .g-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #d9780a; }
.jpm-game[data-game="basquete"] .g-best { color: var(--bq-purple); }
.jpm-game[data-game="basquete"] .g-kicker { color: var(--bq-purple); }
.jpm-game[data-game="basquete"] .g-intro .g-card { border-bottom: 6px solid var(--bq-teal); }
.jpm-game[data-game="basquete"] .bq-intro-best { margin: 10px 0 0; font-weight: 800; color: var(--bq-purple); min-height: 1em; font-size: clamp(11px, 2cqw, 15px); }
.jpm-game[data-game="basquete"] .g-toast { top: 27%; }
.jpm-game[data-game="basquete"] .g-toast.is-good { background: var(--bq-teal); }
.jpm-game[data-game="basquete"] .g-toast.is-swish { background: var(--bq-purple); color: #fff; }
.jpm-game[data-game="basquete"] .g-toast.is-gold { background: #FFD166; color: var(--bq-ink); }
.jpm-game[data-game="basquete"] .g-toast.is-lvl { top: 40%; background: #FF9F1C; color: var(--bq-ink); font-size: clamp(16px, 3.6cqw, 30px); animation-duration: 1.6s; }
.jpm-game[data-game="basquete"] .g-toast.is-small { top: 35%; font-size: clamp(12px, 2.4cqw, 19px); }

.jpm-game[data-game="basquete"] .bq-combo { transition: background .2s; }
.jpm-game[data-game="basquete"] .bq-combo.is-hot { background: rgba(131, 56, 236, .9); animation: basquete-pulse .4s ease-out; }
.jpm-game[data-game="basquete"] .bq-mult { min-width: 1.6em; color: #FFD166; }
.jpm-game[data-game="basquete"] .bq-pips { display: inline-flex; gap: 3px; }
.jpm-game[data-game="basquete"] .bq-pips i { width: .55em; height: .55em; border-radius: 50%; background: rgba(255, 255, 255, .28); }
.jpm-game[data-game="basquete"] .bq-pips i.is-on { background: #FF9F1C; box-shadow: 0 0 0 2px rgba(255, 159, 28, .35); }
.jpm-game[data-game="basquete"] .bq-arrow { display: inline-grid; width: 1.3em; height: 1.3em; transition: transform .3s; }
.jpm-game[data-game="basquete"] .bq-arrow svg { width: 100%; height: 100%; }
.jpm-game[data-game="basquete"] .bq-arrow.is-left { transform: scaleX(-1); }
.jpm-game[data-game="basquete"] .bq-goalstars { display: inline-flex; gap: 1px; }
.jpm-game[data-game="basquete"] .bq-gstar { width: 1em; height: 1em; color: rgba(255, 255, 255, .3); transition: color .3s, transform .3s; }
.jpm-game[data-game="basquete"] .bq-gstar.is-on { color: #FFD166; transform: scale(1.15); }
.jpm-game[data-game="basquete"] .bq-bar { width: clamp(46px, 13cqw, 140px); }
.jpm-game[data-game="basquete"] .bq-fill { background: linear-gradient(90deg, #2EC4B6, #FFD166); }
.jpm-game[data-game="basquete"] .bq-goalnum { font-size: .85em; opacity: .9; }

/* medidor de força ao lado da bola */
.jpm-game[data-game="basquete"] .bq-power { position: absolute; left: 60%; bottom: 7%; z-index: 2; width: clamp(14px, 2.4cqw, 24px); height: 34%; border-radius: 999px; background: rgba(23, 27, 52, .55); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .85); overflow: hidden; pointer-events: none; }
.jpm-game[data-game="basquete"] .bq-zone { position: absolute; z-index: 1; left: 0; right: 0; bottom: 40%; height: 16%; background: rgba(46, 196, 182, .35); border-top: 3px solid #fff; border-bottom: 3px solid #fff; }
.jpm-game[data-game="basquete"] .bq-pfill { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 0; border-radius: 999px; background: linear-gradient(0deg, #FFD166, #FF9F1C); }
.jpm-game[data-game="basquete"] .bq-power.is-good .bq-pfill { background: linear-gradient(0deg, #9ff5ea, #2EC4B6); }

/* dica de gesto */
.jpm-game[data-game="basquete"] .bq-hint { position: absolute; left: 50%; bottom: 6%; z-index: 2; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.jpm-game[data-game="basquete"] .bq-hand { width: clamp(38px, 8cqw, 70px); height: clamp(38px, 8cqw, 70px); filter: drop-shadow(0 3px 0 rgba(59, 29, 110, .4)); animation: basquete-swipe 1.4s ease-in-out infinite; }
.jpm-game[data-game="basquete"] .bq-hint-txt { padding: .25em .8em; border-radius: 999px; background: rgba(59, 29, 110, .78); color: #fff; font-weight: 900; font-size: clamp(11px, 2.1cqw, 17px); white-space: nowrap; }
.jpm-game[data-game="basquete"] .bq-level { margin: 0; padding: .3em 1em; border-radius: var(--r-pill, 999px); background: rgba(131, 56, 236, .88); color: #fff; font-weight: 900; font-size: clamp(14px, 3cqw, 22px); }
.jpm-game[data-game="basquete"] .g-results { gap: clamp(10px, 3cqw, 24px); }
.jpm-game[data-game="basquete"] .g-star.is-on { color: #FFD166; animation: basquete-star .5s ease-out backwards; }
.jpm-game[data-game="basquete"] .g-star.is-on:nth-child(2) { animation-delay: .15s; }
.jpm-game[data-game="basquete"] .g-star.is-on:nth-child(3) { animation-delay: .3s; }

@keyframes basquete-pulse { from { transform: scale(1.22); } to { transform: scale(1); } }
@keyframes basquete-swipe { 0% { transform: translateY(18%); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(-38%); opacity: 1; } 100% { transform: translateY(-38%); opacity: 0; } }
@keyframes basquete-star { from { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.3) rotate(8deg); } to { transform: scale(1) rotate(0); } }

@media (pointer: coarse) {
  .jpm-game[data-game="basquete"] .bq-desk { display: none; }
}
@container (max-width: 520px) {
  .jpm-game[data-game="basquete"] .g-hud { gap: 4px; padding: 6px 7px; }
  .jpm-game[data-game="basquete"] .g-chip { padding: 3px 8px 3px 5px; gap: 3px; font-size: 12px; }
  .jpm-game[data-game="basquete"] .bq-bar { width: 30px; }
  .jpm-game[data-game="basquete"] .bq-goalnum { display: none; }
  .jpm-game[data-game="basquete"] .g-ready { gap: 5px; padding-top: 30px; }
  .jpm-game[data-game="basquete"] .g-howto { gap: 4px; }
  .jpm-game[data-game="basquete"] .g-howto-item { font-size: 10.5px; padding: 3px 8px 3px 3px; gap: 5px; }
  .jpm-game[data-game="basquete"] .g-key { padding: 2px 6px; }
  .jpm-game[data-game="basquete"] .bq-level { font-size: 12px; }
  .jpm-game[data-game="basquete"] .g-count { font-size: 40px; }
  .jpm-game[data-game="basquete"] .g-over .g-card { padding: 10px 12px; }
  .jpm-game[data-game="basquete"] .g-over .g-title { font-size: 18px; margin: 2px 0; }
  .jpm-game[data-game="basquete"] .g-stars { font-size: 20px; margin: 2px 0; }
  .jpm-game[data-game="basquete"] .g-results { margin: 4px 0; gap: 10px; }
  .jpm-game[data-game="basquete"] .g-num { font-size: 17px; }
  .jpm-game[data-game="basquete"] .g-lbl { font-size: 10px; }
  .jpm-game[data-game="basquete"] .g-best { margin: 0 0 6px; font-size: 12px; }
  .jpm-game[data-game="basquete"] .g-btn { min-height: 40px; font-size: 14px; }
  .jpm-game[data-game="basquete"] .g-intro .g-text { margin-bottom: 8px; font-size: 11.5px; }
  .jpm-game[data-game="basquete"] .bq-intro-best { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .jpm-game[data-game="basquete"] .bq-hand, .jpm-game[data-game="basquete"] .bq-combo.is-hot, .jpm-game[data-game="basquete"] .g-star.is-on { animation: none; }
}
