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

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

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

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

/* jogo */

/* jogo */
.jpm-game[data-game="monstro"] { --mo-violet: #6046FF; --mo-cyan: #28D7E5; --mo-yellow: #FFD43B; }
.jpm-game[data-game="monstro"] .mo-hud { gap: 6px; padding: 8px 10px; }
.jpm-game[data-game="monstro"] .mo-hbtn { pointer-events: auto; width: clamp(34px, 6.4cqw, 46px); height: clamp(34px, 6.4cqw, 46px); border: 0; border-radius: 50%; background: var(--g-glass); color: var(--surface, #fff); display: grid; place-items: center; padding: 0; }
.jpm-game[data-game="monstro"] .mo-hbtn svg { width: 52%; height: 52%; }
.jpm-game[data-game="monstro"] .mo-hbtn:active { transform: scale(.92); }
.jpm-game[data-game="monstro"] .mo-bar { width: clamp(54px, 15cqw, 150px); }
.jpm-game[data-game="monstro"] .mo-fill { background: linear-gradient(90deg, var(--mo-cyan), #9FF0E8); }
.jpm-game[data-game="monstro"] .mo-belly.is-full { background: rgba(96, 70, 255, .88); }
.jpm-game[data-game="monstro"] .mo-belly.is-full .mo-fill { background: linear-gradient(90deg, var(--mo-yellow), #FFF1A8); }
.jpm-game[data-game="monstro"] .g-chip.is-bump, .jpm-game[data-game="monstro"] .g-hearts.is-bump { animation: monstro-bump .3s ease-out; }
@keyframes monstro-bump { 40% { transform: scale(1.14); } }
.jpm-game[data-game="monstro"] .g-level { margin: 0; padding: .3em .9em; border-radius: var(--r-pill, 999px); background: var(--mo-violet); color: var(--surface, #fff); font-weight: 900; font-size: clamp(14px, 2.8cqw, 22px); }
.jpm-game[data-game="monstro"] .g-ready { background: rgba(23, 27, 52, .18); justify-items: center; }
.jpm-game[data-game="monstro"] .mo-tip { margin: 0; max-width: 80%; padding: .35em .9em; border-radius: 12px; background: var(--surface, #fff); color: var(--ink, #172033); font-weight: 800; text-align: center; font-size: clamp(12px, 2.2cqw, 17px); }
.jpm-game[data-game="monstro"] .mo-tot { margin-left: .3em; padding: .05em .45em; border-radius: var(--r-pill, 999px); background: var(--mo-yellow); color: var(--ink, #172033); font-size: .8em; }
.jpm-game[data-game="monstro"] .mo-tt { display: none; }
@media (pointer: coarse) {
  .jpm-game[data-game="monstro"] .mo-kb { display: none; }
  .jpm-game[data-game="monstro"] .mo-tt { display: inline-block; }
}

/* números que saltam da comida */
.jpm-game[data-game="monstro"] .mo-pop { position: absolute; z-index: 2; transform: translate(-50%, -50%); padding: .15em .6em; border-radius: var(--r-pill, 999px); background: var(--surface, #fff); color: var(--mo-violet); font-weight: 900; font-size: clamp(12px, 2.4cqw, 20px); white-space: nowrap; pointer-events: none; box-shadow: 0 4px 10px rgba(23, 32, 51, .18); animation: monstro-rise .8s ease-out forwards; }
.jpm-game[data-game="monstro"] .mo-pop.is-gold { background: var(--mo-yellow); color: var(--ink, #172033); }
.jpm-game[data-game="monstro"] .mo-pop.is-bad { background: var(--coral, #FF6868); color: var(--surface, #fff); }
@keyframes monstro-rise { from { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 20% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); } to { opacity: 0; transform: translate(-50%, -160%) scale(1); } }

/* joystick que aparece onde o dedo toca */
.jpm-game[data-game="monstro"] .mo-joy { position: absolute; z-index: 2; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: rgba(255, 255, 255, .28); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .7); pointer-events: none; }
.jpm-game[data-game="monstro"] .mo-knob { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: rgba(96, 70, 255, .85); box-shadow: 0 3px 8px rgba(23, 32, 51, .25); transform: translate(var(--jx, 0), var(--jy, 0)); }
.jpm-game[data-game="monstro"] .mo-touch { padding: 8px 10px; }
.jpm-game[data-game="monstro"] .mo-hint { padding: .3em .8em; border-radius: var(--r-pill, 999px); background: var(--g-glass); color: var(--surface, #fff); font-weight: 800; font-size: clamp(10px, 2cqw, 13px); opacity: .85; }
.jpm-game[data-game="monstro"] .g-tbtn.is-cool { opacity: .55; }

/* fim */
.jpm-game[data-game="monstro"] .mo-over .g-row { align-items: center; }
.jpm-game[data-game="monstro"] .mo-sq { padding: 0; width: 46px; display: inline-grid; place-items: center; }
.jpm-game[data-game="monstro"] .mo-sq svg { width: 20px; height: 20px; }

/* tela de fases */
.jpm-game[data-game="monstro"] .mo-levels { background: rgba(23, 27, 52, .4); }
.jpm-game[data-game="monstro"] .mo-lcard { width: min(94%, 640px); max-height: 92%; display: flex; flex-direction: column; padding: clamp(10px, 2.4cqw, 20px); }
.jpm-game[data-game="monstro"] .mo-lhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.jpm-game[data-game="monstro"] .mo-lhead .g-title { margin: 0; }
.jpm-game[data-game="monstro"] .mo-tot2 { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; color: var(--muted, #606B80); }
.jpm-game[data-game="monstro"] .mo-tot2 svg { width: 1.2em; height: 1.2em; }
.jpm-game[data-game="monstro"] .mo-close { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg, #F3F6FA); display: grid; place-items: center; padding: 0; }
.jpm-game[data-game="monstro"] .mo-close svg { width: 18px; height: 18px; }
.jpm-game[data-game="monstro"] .mo-grid { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(78px, 17cqw, 108px), 1fr)); gap: 8px; padding: 2px; }
.jpm-game[data-game="monstro"] .mo-card { position: relative; min-height: 68px; border: 0; border-radius: 14px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #FFF1DE; color: var(--ink, #172033); box-shadow: inset 0 -3px 0 rgba(23, 32, 51, .1); }
.jpm-game[data-game="monstro"] .mo-card.mo-th1 { background: #E3F6D4; }
.jpm-game[data-game="monstro"] .mo-card.mo-th2 { background: #FFE2F1; }
.jpm-game[data-game="monstro"] .mo-card.mo-th3 { background: #E4E8FF; }
.jpm-game[data-game="monstro"] .mo-card.is-next { box-shadow: inset 0 0 0 3px var(--mo-violet); }
.jpm-game[data-game="monstro"] .mo-card.is-locked { opacity: .5; cursor: default; }
.jpm-game[data-game="monstro"] .mo-cnum { font-weight: 900; font-size: clamp(16px, 3cqw, 22px); line-height: 1; }
.jpm-game[data-game="monstro"] .mo-cname { font-size: clamp(9px, 1.6cqw, 11px); font-weight: 700; line-height: 1.1; color: var(--muted, #606B80); text-align: center; }
.jpm-game[data-game="monstro"] .mo-cstars { display: flex; gap: 1px; }
.jpm-game[data-game="monstro"] .mo-cstars svg { width: 14px; height: 14px; color: rgba(23, 32, 51, .16); }
.jpm-game[data-game="monstro"] .mo-cstars svg.is-on { color: var(--mo-yellow); }
.jpm-game[data-game="monstro"] .mo-lock { width: 20px; height: 20px; color: var(--muted, #606B80); }

@container (max-height: 300px) {
  .jpm-game[data-game="monstro"] .mo-hud { padding: 5px 6px; gap: 4px; }
  .jpm-game[data-game="monstro"] .mo-hud .g-chip { padding: 3px 8px 3px 5px; font-size: 12px; gap: 4px; }
  .jpm-game[data-game="monstro"] .mo-hud .g-hearts { padding: 3px 6px; }
  .jpm-game[data-game="monstro"] .mo-hud .g-heart { width: 14px; height: 14px; }
  .jpm-game[data-game="monstro"] .mo-hbtn { width: 28px; height: 28px; }
  .jpm-game[data-game="monstro"] .mo-score { display: none; }
  .jpm-game[data-game="monstro"] .g-card { padding: 10px 12px; }
  .jpm-game[data-game="monstro"] .g-results { margin: 4px 0; }
  .jpm-game[data-game="monstro"] .g-best { margin-bottom: 6px; }
  .jpm-game[data-game="monstro"] .g-stars { margin: 0; }
  .jpm-game[data-game="monstro"] .g-btn { min-height: 38px; padding: 0 16px; }
  .jpm-game[data-game="monstro"] .mo-sq { width: 38px; }
  .jpm-game[data-game="monstro"] .g-howto-item { font-size: 11px; padding: 3px 8px 3px 3px; }
  .jpm-game[data-game="monstro"] .g-ready { gap: 6px; }
  .jpm-game[data-game="monstro"] .mo-card { min-height: 54px; }
  .jpm-game[data-game="monstro"] .mo-hint { display: none; }
  .jpm-game[data-game="monstro"] .mo-hw3 { display: none; }
  .jpm-game[data-game="monstro"] .g-level { font-size: 13px; }
  .jpm-game[data-game="monstro"] .mo-tip { font-size: 11px; }
  .jpm-game[data-game="monstro"] .g-count { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .jpm-game[data-game="monstro"] .mo-pop, .jpm-game[data-game="monstro"] .g-chip.is-bump { animation: none; }
}
