/* ==== JPM KIT v1 — base visual dos jogos (sincronizado; regras do jogo vêm depois do "fim da base") ==== */
.jpm-game[data-game="carro-de-policia"] {
  --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="carro-de-policia"] [hidden] { display: none; }
.jpm-game[data-game="carro-de-policia"] button { font: inherit; color: inherit; cursor: pointer; }
.jpm-game[data-game="carro-de-policia"] button:focus-visible { outline: 3px solid var(--ink, #172033); outline-offset: 2px; }
.jpm-game[data-game="carro-de-policia"] .g-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .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="carro-de-policia"] .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="carro-de-policia"] .g-chip--right { margin-left: auto; }
.jpm-game[data-game="carro-de-policia"] .g-chip--warn { background: var(--coral, #FF6868); }
.jpm-game[data-game="carro-de-policia"] .g-ico { width: 1.2em; height: 1.2em; flex: none; }
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .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="carro-de-policia"] .g-hearts { display: flex; gap: 4px; padding: 6px 10px; border-radius: var(--r-pill, 999px); background: var(--g-glass); }
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .g-heart.is-lost { color: rgba(255, 255, 255, .35); transform: scale(.85); }

/* telas */
.jpm-game[data-game="carro-de-policia"] .g-screen { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 12px; }
.jpm-game[data-game="carro-de-policia"] .g-intro, .jpm-game[data-game="carro-de-policia"] .g-over, .jpm-game[data-game="carro-de-policia"] .g-paused { background: rgba(23, 27, 52, .32); }
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .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="carro-de-policia"] .g-intro .g-card { width: min(56%, 400px); }
.jpm-game[data-game="carro-de-policia"] .g-card--small { width: auto; padding: 16px 22px; }
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .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="carro-de-policia"] .g-text { margin: 0 0 14px; color: var(--muted, #606B80); font-weight: 600; font-size: clamp(12px, 2.2cqw, 16px); }
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .g-btn:active { transform: scale(.96); }
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .g-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.jpm-game[data-game="carro-de-policia"] .g-results { display: flex; justify-content: center; gap: clamp(12px, 4cqw, 30px); margin: 10px 0; }
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .g-lbl { font-size: clamp(11px, 1.8cqw, 13px); color: var(--muted, #606B80); font-weight: 700; }
.jpm-game[data-game="carro-de-policia"] .g-best { margin: 0 0 14px; font-weight: 800; color: var(--g-accent); min-height: 1.2em; }
.jpm-game[data-game="carro-de-policia"] .g-stars { display: flex; justify-content: center; gap: 6px; margin: 4px 0 8px; font-size: clamp(22px, 5cqw, 36px); }
.jpm-game[data-game="carro-de-policia"] .g-star { width: 1em; height: 1em; color: var(--line, #E3E8EF); }
.jpm-game[data-game="carro-de-policia"] .g-star.is-on { color: var(--yellow, #FFD43B); }

.jpm-game[data-game="carro-de-policia"] .g-ready { pointer-events: none; align-content: center; gap: 12px; }
.jpm-game[data-game="carro-de-policia"] .g-howto { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .g-key { padding: 3px 9px; border-radius: 8px; background: var(--surface, #fff); color: var(--ink, #172033); font-weight: 900; }
.jpm-game[data-game="carro-de-policia"] .g-touch-only { display: none; }
.jpm-game[data-game="carro-de-policia"] .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: carro-de-policia-pop .8s ease-out infinite; }
@keyframes carro-de-policia-pop { from { transform: scale(1.25); opacity: .4; } 30% { transform: scale(1); opacity: 1; } }

/* botões de toque */
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .g-touch-group { display: flex; gap: 10px; align-items: flex-end; }
.jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .g-tbtn svg { width: 55%; height: 55%; }
.jpm-game[data-game="carro-de-policia"] .g-tbtn--action { background: rgba(96, 70, 255, .78); }
.jpm-game[data-game="carro-de-policia"] .g-tbtn.is-on, .jpm-game[data-game="carro-de-policia"] .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="carro-de-policia"] .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: carro-de-policia-toast .9s ease-out forwards; }
.jpm-game[data-game="carro-de-policia"] .g-toast.is-good { background: var(--green, #46D68C); color: var(--surface, #fff); }
.jpm-game[data-game="carro-de-policia"] .g-toast.is-bad { background: var(--coral, #FF6868); color: var(--surface, #fff); }
@keyframes carro-de-policia-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="carro-de-policia"] .g-touch-only { display: inline-flex; }
}
@container (max-width: 520px) {
  .jpm-game[data-game="carro-de-policia"] .g-intro { justify-items: center; padding-left: 12px; background: rgba(23, 27, 52, .3); }
  .jpm-game[data-game="carro-de-policia"] .g-intro .g-card { width: min(92%, 400px); }
}
@media (prefers-reduced-motion: reduce) {
  .jpm-game[data-game="carro-de-policia"] .g-count, .jpm-game[data-game="carro-de-policia"] .g-toast { animation: none; }
}
/* ==== fim da base ==== */

/* jogo */
.jpm-game[data-game="carro-de-policia"] { --g-accent: #3A86FF; }
.jpm-game[data-game="carro-de-policia"] .g-bar--short { width: clamp(50px, 11cqw, 110px); }
.jpm-game[data-game="carro-de-policia"] .g-fill { background: #EF476F; }
.jpm-game[data-game="carro-de-policia"] .g-fill--turbo { background: #FFD166; }
.jpm-game[data-game="carro-de-policia"] .g-level { margin: 0; padding: .3em 1em; border-radius: var(--r-pill, 999px); background: var(--g-glass); color: var(--surface, #fff); font-weight: 900; font-size: clamp(14px, 3cqw, 22px); }
.jpm-game[data-game="carro-de-policia"] .g-tbtn--siren { background: rgba(239, 71, 111, .7); }
