:root {
  --red: #d81e2c; --red-d: #8a0e1c; --blue: #1e5fd8; --yellow: #f2c21e;
  --pink: #f05aa0; --black: #0c0c10; --green: #1fa64a; --white: #f6f6f6;
  --ink: #0c0c10; --chrome-1: #ffffff; --chrome-2: #9aa3b5; --chrome-3: #3a4152;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; color: var(--white);
  font-family: 'Teko', sans-serif; user-select: none; }
#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
.hidden { display: none !important; }

/* ---------- telas ---------- */
.screen { position: fixed; inset: 0; display: none; z-index: 10; }
.screen.active { display: flex; }
.overlay { background: rgba(8, 4, 10, .72); flex-direction: column; align-items: center; justify-content: center; gap: 28px; }

/* ---------- botoes: blocos inclinados, borda grossa, sombra seca ---------- */
.btn { --bg: var(--red); position: relative; border: 4px solid var(--ink); background: var(--bg);
  color: var(--white); font-family: 'Teko', sans-serif; font-weight: 700; letter-spacing: 2px;
  transform: skewX(-12deg); box-shadow: 6px 6px 0 var(--ink); cursor: pointer; transition: transform .08s, box-shadow .08s; }
.btn span { display: inline-block; transform: skewX(12deg); }
.btn.big { font-size: 34px; padding: 4px 34px 0; }
.btn.small { font-size: 22px; padding: 2px 16px 0; --bg: #2a2a34; }
.btn.dark { --bg: #2a2a34; }
.btn:hover, .btn:focus-visible { transform: skewX(-12deg) translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); outline: none;
  background: linear-gradient(var(--bg), var(--bg)) padding-box; filter: brightness(1.12); }
.btn:active { transform: skewX(-12deg) translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }

/* ---------- titulo (abertura anos 90) ---------- */
#scr-title { background: #000; align-items: center; justify-content: center; overflow: hidden; }
.stripes { position: absolute; inset: -20%; display: flex; transform: skewX(-18deg); }
.stripes i { flex: 1; background: var(--c); border-right: 6px solid #000; animation: stripe 0.6s cubic-bezier(.2,.8,.2,1) both; }
.stripes i:nth-child(2) { animation-delay: .06s } .stripes i:nth-child(3) { animation-delay: .12s }
.stripes i:nth-child(4) { animation-delay: .18s } .stripes i:nth-child(5) { animation-delay: .24s }
.stripes i:nth-child(6) { animation-delay: .30s }
@keyframes stripe { from { transform: translateY(-110%) } to { transform: translateY(0) } }
#scr-title::after { content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 2px, transparent 2px 4px); pointer-events: none; }
.bolt { position: absolute; width: 90px; fill: #fff6a0; stroke: #000; stroke-width: 4; z-index: 1;
  animation: flash 2.4s infinite steps(1); }
.bolt.b1 { left: 8%; top: 12%; transform: rotate(-12deg); }
.bolt.b2 { right: 8%; bottom: 14%; transform: rotate(168deg); animation-delay: 1.2s; }
@keyframes flash { 0%, 6%, 12% { opacity: 1 } 3%, 9%, 100% { opacity: 0 } }
.title-wrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #000; border: 6px solid #fff; box-shadow: 12px 12px 0 #000; padding: 26px 48px 22px;
  transform: skewX(-6deg); animation: pop .5s .45s both cubic-bezier(.2,1.4,.4,1); }
.title-wrap > * { transform: skewX(6deg); }
@keyframes pop { from { transform: skewX(-6deg) scale(.2); opacity: 0 } to { transform: skewX(-6deg) scale(1); opacity: 1 } }
.pre { font-family: 'Bungee', sans-serif; font-size: 22px; color: var(--yellow); letter-spacing: 6px; }
.logo { position: relative; font-family: 'Bungee', sans-serif; font-size: clamp(42px, 8.5vw, 120px); line-height: .95; letter-spacing: 2px;
  background: linear-gradient(180deg, var(--chrome-1) 0%, #dfe5ef 38%, var(--chrome-3) 50%, var(--chrome-2) 64%, #fff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(4px 0 0 var(--red)) drop-shadow(-4px 0 0 var(--red)) drop-shadow(0 4px 0 var(--red)) drop-shadow(0 -4px 0 var(--red)) drop-shadow(6px 8px 0 #000); }
.sub { font-size: 30px; letter-spacing: 8px; color: #fff; margin-bottom: 16px; }
.press { font-family: 'Bungee', sans-serif; font-size: 16px; color: #fff; letter-spacing: 4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0 } }
.records { margin-top: 10px; font-size: 22px; color: #c9ced8; letter-spacing: 1px; display: flex; gap: 22px; }
.records b { color: var(--yellow); font-weight: 600; }
.legal { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; z-index: 2; font-size: 17px;
  color: #fff; text-shadow: 2px 2px 0 #000; letter-spacing: .5px; }

/* ---------- selecao ---------- */
#scr-select { background: repeating-linear-gradient(-18deg, #121218 0 40px, #18181f 40px 80px);
  flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.sel-head { position: absolute; top: 18px; left: 24px; right: 24px; display: flex; align-items: center; gap: 30px; }
.sel-head h2 { font-family: 'Bungee', sans-serif; font-size: 40px; color: #fff; text-shadow: 4px 4px 0 var(--red); }
.sel-row { display: flex; gap: 14px; margin-top: 40px; }
.rcard { --c: var(--red); width: 170px; height: 300px; position: relative; background: var(--c); border: 5px solid #000;
  transform: skewX(-8deg); box-shadow: 8px 8px 0 #000; cursor: pointer; overflow: hidden; transition: transform .1s; }
.rcard::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 10px, transparent 10px 20px); }
.rcard img { position: absolute; left: 50%; bottom: 46px; width: 200px; transform: translateX(-50%) skewX(8deg); image-rendering: pixelated; }
.rcard .rname { position: absolute; left: 0; right: 0; bottom: 0; background: #000; padding: 4px 10px 0;
  font-size: 30px; font-weight: 700; letter-spacing: 1px; }
.rcard .rname span { display: inline-block; transform: skewX(8deg); }
.rcard .rname small { display: block; font-size: 17px; font-weight: 400; color: #aaa; margin-top: -8px; }
.rcard.sel { transform: skewX(-8deg) translateY(-12px); outline: 5px solid #fff; outline-offset: -10px; }
.rcard.locked { cursor: not-allowed; }
.rcard.locked img { filter: brightness(0) opacity(.55); }
.rcard .lock { position: absolute; top: 40%; left: -20px; right: -20px; text-align: center; background: #000; color: #fff;
  font-family: 'Bungee', sans-serif; font-size: 18px; padding: 6px 0; transform: rotate(-14deg); border-top: 3px solid #fff; border-bottom: 3px solid #fff; }
.sel-info { min-height: 92px; background: #000; border: 4px solid #fff; padding: 10px 26px 6px; font-size: 24px;
  transform: skewX(-8deg); box-shadow: 8px 8px 0 var(--red); display: grid; grid-template-columns: auto auto; gap: 0 26px; }
.sel-info > div { transform: skewX(8deg); }
.sel-info b { color: var(--yellow); font-weight: 600; letter-spacing: 1px; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.panel { background: rgba(10, 10, 14, .86); border: 3px solid #000; box-shadow: 4px 4px 0 rgba(0,0,0,.6); }
.xpbar { position: absolute; top: 0; left: 0; right: 0; height: 12px; background: #111; border-bottom: 3px solid #000; }
#xp-fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, #3df07a 0 10px, #2ec765 10px 20px); transition: width .15s; }
#xp-lv { position: absolute; left: 50%; top: 134px; transform: translateX(-50%); font-size: 22px; font-weight: 700; color: #3df07a; text-shadow: 2px 2px 0 #000; z-index: 2; }
.hud-tl { position: absolute; top: 22px; left: 16px; display: flex; gap: 10px; padding: 6px 12px 6px 6px; transform: skewX(-8deg); }
.hud-tl > * { transform: skewX(8deg); }
#portrait { width: 64px; height: 64px; image-rendering: pixelated; background: var(--red); border: 3px solid #000; }
.who .name { font-size: 26px; font-weight: 700; letter-spacing: 1px; line-height: 1; margin-top: 4px; }
.who .name em { font-style: normal; font-weight: 400; font-size: 18px; color: #ff6a6a; margin-left: 6px; }
.hpbar { position: relative; width: 230px; height: 22px; background: #2a0a10; border: 3px solid #000; margin-top: 6px; }
#hp-fill { height: 100%; width: 100%; background: linear-gradient(#4cff8a, #19b64e); transition: width .12s; }
#hp-txt { position: absolute; inset: 0; text-align: center; font-size: 20px; line-height: 20px; font-weight: 600; text-shadow: 2px 2px 0 #000; }
.hud-tc { position: absolute; top: 22px; left: 50%; transform: translateX(-50%) skewX(-8deg); text-align: center; padding: 2px 30px 4px; }
.hud-tc > * { transform: skewX(8deg); }
#room-name { font-size: 18px; letter-spacing: 4px; color: var(--yellow); }
#timer { font-family: 'Bungee', sans-serif; font-size: 44px; line-height: 1; }
#timer.over { color: #ff4a4a; }
#timer-sub { font-size: 16px; letter-spacing: 2px; color: #aaa; }
.hud-tr { position: absolute; top: 22px; right: 16px; padding: 4px 16px; transform: skewX(-8deg); display: flex; gap: 10px; align-items: baseline; }
.hud-tr > * { transform: skewX(8deg); }
.hud-tr span { font-size: 18px; letter-spacing: 2px; color: #aaa; }
.hud-tr b { font-family: 'Bungee', sans-serif; font-size: 30px; font-weight: 400; }
.hud-bl { position: absolute; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
#slots { display: flex; gap: 8px; }
.slot { width: 92px; height: 58px; background: rgba(10,10,14,.86); border: 3px solid #000; transform: skewX(-8deg); padding: 2px 8px; }
.slot > div { transform: skewX(8deg); }
.slot .sn { font-size: 17px; line-height: 1.05; font-weight: 600; }
.slot .sl { font-family: 'Bungee', sans-serif; font-size: 14px; color: var(--yellow); }
.slot.empty { opacity: .35; }
#passives { display: flex; gap: 6px; flex-wrap: wrap; max-width: 320px; }
.pchip { background: #000; border: 2px solid #444; padding: 0 8px; font-size: 17px; }
.pchip b { color: var(--yellow); font-weight: 600; }
.hud-bc { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); }
.ult { display: flex; gap: 10px; align-items: center; padding: 6px 14px 6px 6px; transform: skewX(-8deg); }
.ult > * { transform: skewX(8deg); }
.ult-key { width: 42px; height: 42px; background: #333; border: 3px solid #000; font-family: 'Bungee', sans-serif; font-size: 24px;
  display: grid; place-items: center; color: #888; }
.ult.ready .ult-key { background: var(--yellow); color: #000; animation: blink .5s steps(1) infinite; }
.ult-name { font-size: 18px; letter-spacing: 2px; }
.ultbar { width: 220px; height: 12px; background: #222; border: 2px solid #000; }
#ult-fill { height: 100%; width: 0; background: var(--red); }
.ult.ready #ult-fill { background: var(--yellow); }
#bossbar { position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%); width: min(640px, 80vw); text-align: center; }
.bb-name { font-family: 'Bungee', sans-serif; font-size: 26px; color: #ffb0c4; text-shadow: 3px 3px 0 #000; }
.bb-bar { height: 22px; background: #2a0a10; border: 4px solid #000; transform: skewX(-12deg); box-shadow: 5px 5px 0 rgba(0,0,0,.6); }
#boss-fill { height: 100%; width: 100%; background: linear-gradient(#ff6a8a, #c81e4c); transition: width .1s; }
#banner { position: absolute; top: 36%; left: 0; right: 0; text-align: center; font-family: 'Bungee', sans-serif; font-size: 52px;
  color: #fff; text-shadow: 4px 4px 0 var(--red), 8px 8px 0 #000; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
#banner.show { opacity: 1; transform: scale(1); }
#banner small { display: block; font-family: 'Teko', sans-serif; font-size: 30px; letter-spacing: 3px; text-shadow: 2px 2px 0 #000; }
#dmg-layer { position: absolute; inset: 0; overflow: hidden; }
.dmg { position: absolute; font-family: 'Bungee', sans-serif; font-size: 18px; color: #fff; text-shadow: 2px 2px 0 #000;
  transform: translate(-50%, -50%); white-space: nowrap; }
.dmg.big { font-size: 26px; color: var(--yellow); }
.dmg.hurt { color: #ff4a4a; }

/* ---------- level up ---------- */
.lv-title { font-family: 'Bungee', sans-serif; font-size: 64px; color: #fff; background: var(--red); border: 5px solid #000;
  padding: 0 34px; transform: skewX(-10deg) rotate(-2deg); box-shadow: 8px 8px 0 #000; }
.cards { display: flex; gap: 22px; }
.card { --c: var(--red); width: 250px; background: #101016; border: 5px solid #000; box-shadow: 8px 8px 0 #000;
  transform: skewX(-6deg); cursor: pointer; position: relative; transition: transform .08s; }
.card:hover { transform: skewX(-6deg) translateY(-8px); outline: 4px solid #fff; }
.card > * { transform: skewX(6deg); }
.card .ctop { background: var(--c); padding: 6px 14px 0; border-bottom: 4px solid #000; display: flex; justify-content: space-between; }
.card .ctype { font-size: 20px; font-weight: 700; letter-spacing: 2px; color: #000; }
.card .ctag { font-family: 'Bungee', sans-serif; font-size: 14px; background: #000; color: #fff; padding: 2px 8px; align-self: center; }
.card .cname { font-size: 34px; font-weight: 700; line-height: 1; padding: 10px 14px 0; }
.card .clv { font-size: 20px; color: var(--yellow); padding: 0 14px; }
.card .cdesc { font-size: 21px; color: #c9ced8; padding: 6px 14px 34px; line-height: 1.1; }
.card .ckey { position: absolute; right: 10px; bottom: 8px; font-family: 'Bungee', sans-serif; font-size: 16px; background: #fff; color: #000; padding: 0 8px; }
.card.weapon { --c: var(--red); } .card.upgrade { --c: var(--blue); } .card.passive { --c: var(--yellow); } .card.heal { --c: var(--green); }
.hint { font-size: 22px; letter-spacing: 3px; color: #ddd; }
.col { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.col.row { flex-direction: row; }
.end-stats { background: #000; border: 4px solid #fff; padding: 14px 34px; display: grid; grid-template-columns: auto auto; gap: 2px 34px;
  font-size: 28px; transform: skewX(-6deg); box-shadow: 8px 8px 0 var(--red); }
.end-stats > div { transform: skewX(6deg); }
.end-stats .v { color: var(--yellow); text-align: right; font-weight: 600; }
.end-stats .rec { color: #3df07a; font-size: 20px; margin-left: 6px; }

@media (max-width: 900px) {
  .sel-row { flex-wrap: wrap; justify-content: center; }
  .rcard { width: 130px; height: 230px; }
  .rcard img { width: 160px; }
  .cards { flex-direction: column; }
}

/* ---------- conteudo da pedreira ---------- */
.hud-tr b.coin { color: var(--yellow); }
#minimap { position: absolute; top: 84px; right: 16px; width: 150px; height: 150px; image-rendering: pixelated; }
#prompt { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%) skewX(-8deg); background: #000; border: 3px solid #fff;
  padding: 4px 16px; font-size: 22px; letter-spacing: 2px; opacity: 0; transition: opacity .15s; pointer-events: none; white-space: nowrap; }
#prompt.show { opacity: 1; }
.pchip.item { border-color: var(--yellow); }
.lv-tools { display: flex; gap: 14px; margin-top: 4px; }
.lv-tools .btn b { color: var(--yellow); margin-left: 6px; }
#lv-ban.on { outline: 4px solid var(--red); }
@media (max-width: 700px) { #minimap { width: 100px; height: 100px; } #prompt { font-size: 16px; white-space: normal; } .lv-tools { flex-wrap: wrap; justify-content: center; } }

/* ---------- audio no menu de pausa ---------- */
.audio { margin-top: 22px; padding: 12px 22px; display: grid; gap: 8px; min-width: 340px; transform: skewX(-6deg); }
.audio > * { transform: skewX(6deg); }
.audio-title { font-family: 'Bungee', sans-serif; font-size: 20px; color: var(--yellow); }
.audio label { display: grid; grid-template-columns: 90px 1fr 52px; align-items: center; gap: 10px; font-size: 22px; letter-spacing: 2px; }
.audio input[type=range] { accent-color: var(--red); width: 100%; }
.audio b { color: var(--yellow); text-align: right; }
.audio-hint { font-size: 16px; color: #aaa; letter-spacing: 1px; }
@media (max-width: 700px) { .audio { min-width: 0; width: calc(100vw - 32px); } }

/* ---------- gamepad: carta com foco ---------- */
.card.focus { transform: skewX(-6deg) translateY(-8px); outline: 4px solid var(--yellow); }

/* ---------- toque (so aparece em aparelho de toque, durante a partida) ---------- */
#touch { display: none; }
body.touch #touch { display: block; position: fixed; inset: 0; z-index: 30; pointer-events: none; }
body.touch #hud.hidden ~ #touch, body.touch #touch.off { display: none; }
#touch .stick-zone { position: absolute; left: 0; top: 18%; bottom: 0; width: 50%; pointer-events: auto; touch-action: none; }
#touch .stick { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.5); background: rgba(0,0,0,.25); opacity: 0; transition: opacity .1s; }
#touch .stick.on { opacity: 1; }
#touch .knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.75); border: 3px solid #000; }
.tbtn { position: absolute; pointer-events: auto; touch-action: none; font-family: 'Bungee', sans-serif; color: #fff;
  border: 4px solid #000; box-shadow: 4px 4px 0 #000; border-radius: 50%; }
.tbtn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }
.tult { right: max(28px, env(safe-area-inset-right)); bottom: 34px; width: 92px; height: 92px; font-size: 22px; background: var(--red); }
.tuse { right: calc(max(28px, env(safe-area-inset-right)) + 104px); bottom: 26px; width: 66px; height: 66px; font-size: 22px; background: #333; }
.tpause { left: max(16px, env(safe-area-inset-left)); top: 74px; width: 44px; height: 44px; font-size: 15px; background: #222; border-radius: 8px; }
body.touch #prompt { bottom: 140px; }

/* HUD menor em celular deitado (altura pequena) */
@media (pointer: coarse) and (max-height: 520px) {
  .hud-tl, .hud-tc, .hud-tr { transform-origin: top center; transform: skewX(-8deg) scale(.72); }
  .hud-tl { transform-origin: top left; } .hud-tr { transform-origin: top right; }
  #minimap { top: 62px; width: 96px; height: 96px; }
  .hud-bl { transform: scale(.72); transform-origin: bottom left; }
  .hud-bc { transform: translateX(-50%) scale(.72); transform-origin: bottom center; }
  .cards { gap: 10px; } .card { width: 190px; } .card .cname { font-size: 24px; } .card .cdesc { font-size: 16px; padding-bottom: 26px; }
  .lv-title { font-size: 34px; } #banner { font-size: 32px; } #banner small { font-size: 20px; }
}
/* celular em pe: pede para girar */
#rotate { display: none; }
@media (pointer: coarse) and (orientation: portrait) {
  #rotate { display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; text-align: center;
    font-family: 'Bungee', sans-serif; font-size: 28px; }
  #rotate small { display: block; font-family: 'Teko', sans-serif; font-size: 22px; letter-spacing: 2px; color: #aaa; }
}

/* ---------- celular deitado: cartas em linha e compactas (corrige o empilhamento do max-width 900) ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .overlay { gap: 10px; }
  .cards { flex-direction: row; gap: 10px; }
  .card { width: min(30vw, 230px); border-width: 4px; box-shadow: 5px 5px 0 #000; }
  .card .ctop { padding: 3px 10px 0; } .card .ctype { font-size: 15px; } .card .ctag { font-size: 11px; }
  .card .cname { font-size: 22px; padding: 6px 10px 0; } .card .clv { font-size: 16px; padding: 0 10px; }
  .card .cdesc { font-size: 15px; padding: 4px 10px 26px; } .card .ckey { font-size: 12px; }
  .lv-title { font-size: 30px; padding: 4px 22px; }
  .lv-tools .btn { font-size: 14px; padding: 4px 10px; }
  .hint { font-size: 14px; }
  .audio { margin-top: 6px; padding: 6px 16px; } .audio label { font-size: 17px; }
}
/* com cartas, pausa ou fim na frente, os botoes de toque somem (nao cobrem as cartas) */
body.touch:has(.screen.overlay.active) #touch { display: none; }

/* ---------- celular deitado: titulo e selecao compactos ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .title-wrap { padding: 10px 26px 10px; gap: 2px; border-width: 4px; box-shadow: 8px 8px 0 #000; max-width: calc(100vw - 48px); }
  .pre { font-size: 14px; letter-spacing: 4px; }
  .logo { font-size: clamp(36px, 7.5vw, 64px); }
  .sub { font-size: 17px; letter-spacing: 5px; margin-bottom: 6px; }
  .btn.big { font-size: 22px; padding: 2px 22px 0; }
  .press { font-size: 11px; }
  .records { font-size: 14px; gap: 12px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
  .legal { font-size: 10px; bottom: 3px; text-shadow: 1px 1px 0 #000; }

  #scr-select { gap: 8px; justify-content: flex-start; padding-top: 8px; }
  .sel-head { position: static; gap: 16px; justify-content: center; }
  .sel-head h2 { font-size: 22px; text-shadow: 3px 3px 0 var(--red); }
  .sel-head .btn.small { font-size: 14px; }
  .sel-row { flex-wrap: nowrap; gap: 8px; margin-top: 4px; }
  .rcard { width: min(17vw, 132px); height: min(46vh, 176px); border-width: 4px; }
  .rcard img { width: min(15vw, 122px); bottom: 36px; }
  .rcard .rname { font-size: 18px; padding: 2px 6px 0; }
  .rcard .rname small { font-size: 11px; margin-top: -4px; }
  .rcard.sel { transform: skewX(-8deg) translateY(-6px); outline-width: 3px; outline-offset: -7px; }
  .sel-info { min-height: 0; font-size: 15px; padding: 4px 16px 2px; gap: 0 14px; grid-template-columns: auto auto auto auto auto auto; box-shadow: 5px 5px 0 var(--red); }
}
body.touch .audio-hint { display: none; }

/* ---------- comunicador (troca de musica) ---------- */
.comm { position: absolute; top: 242px; right: 16px; display: flex; align-items: center; gap: 6px; max-width: 190px; cursor: pointer;
  background: rgba(10,10,14,.86); border: 3px solid #000; box-shadow: 3px 3px 0 rgba(0,0,0,.6); padding: 3px 10px 3px 4px; color: #fff; pointer-events: auto; }
.comm svg { width: 34px; height: 34px; flex: none; }
.comm span { display: flex; flex-direction: column; line-height: 1; overflow: hidden; }
.comm small { font-size: 12px; color: var(--yellow); }
.comm b { font-size: 17px; font-weight: 600; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comm:hover { outline: 3px solid var(--yellow); }
.audio-track { display: flex; align-items: center; gap: 10px; font-size: 18px; flex-wrap: wrap; }
.audio-track span { color: #aaa; letter-spacing: 2px; } .audio-track b { color: #fff; font-weight: 600; }
.audio-track .btn { font-size: 14px; padding: 2px 10px 0; margin-left: auto; }
@media (max-height: 520px) and (orientation: landscape) { .comm { top: 162px; max-width: 150px; } .comm svg { width: 26px; height: 26px; } .comm b { font-size: 14px; } }

/* =====================================================================
   MENU v2 (blocos estilo PokeBonk, visual da abertura MMPR anos 90)
   ===================================================================== */
#scr-title { background: transparent; display: none; }
#scr-title.active { display: block; }
#scr-title::after { opacity: .5; }
.menu-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(6,4,12,.92) 0%, rgba(6,4,12,.75) 34%, rgba(6,4,12,0) 62%),
              linear-gradient(0deg, rgba(6,4,12,.7) 0%, rgba(6,4,12,0) 22%); }
.menu-top { position: absolute; top: 16px; left: 24px; right: 24px; display: flex; align-items: center; gap: 14px; z-index: 3; }
.lang { display: flex; border: 3px solid #000; box-shadow: 3px 3px 0 #000; transform: skewX(-10deg); }
.lang-btn { background: #1c1c24; color: #aaa; border: 0; font-family: 'Bungee', sans-serif; font-size: 15px; padding: 4px 12px; cursor: pointer; }
.lang-btn.on { background: var(--yellow); color: #000; }
.menu-comm { position: static; }

.menu-left { position: absolute; left: clamp(20px, 4vw, 64px); top: 50%; transform: translateY(-50%); width: min(560px, 48vw);
  display: flex; flex-direction: column; gap: 14px; z-index: 2; animation: menuin .5s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes menuin { from { opacity: 0; transform: translate(-40px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
.logo-wrap { display: flex; flex-direction: column; align-items: flex-start; }
.logo-wrap .pre { font-size: 18px; }
.logo-wrap .logo { font-size: clamp(40px, 6.6vw, 96px); }
.logo-wrap .sub { font-size: 24px; letter-spacing: 6px; margin: 2px 0 0; }

.tile { position: relative; display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer; color: #fff;
  border: 4px solid #000; box-shadow: 6px 6px 0 #000; transform: skewX(-8deg); font-family: 'Teko', sans-serif;
  transition: transform .08s, box-shadow .08s, filter .08s; }
.tile > * { transform: skewX(8deg); }
.tile:hover, .tile:focus-visible { transform: skewX(-8deg) translate(-3px, -3px); box-shadow: 9px 9px 0 #000; filter: brightness(1.12); outline: none; }
.tile:active { transform: skewX(-8deg) translate(3px, 3px); box-shadow: 2px 2px 0 #000; }
.tile.play { padding: 14px 22px; background: linear-gradient(135deg, #ff3a48, var(--red) 55%, #8a0e1c); min-height: 120px; }
.tile.play::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 12px, transparent 12px 24px); pointer-events: none; }
.tile-icon svg { width: 66px; height: 66px; filter: drop-shadow(3px 3px 0 #000); }
.tile-text { display: flex; flex-direction: column; line-height: 1; }
.tile-text b { font-family: 'Bungee', sans-serif; font-weight: 400; font-size: 46px; text-shadow: 3px 3px 0 #000; }
.tile-text small { font-size: 20px; letter-spacing: 1px; color: #ffe2e2; }
.tile-text .catch { font-family: 'Bungee', sans-serif; font-style: normal; font-size: 15px; color: var(--yellow); margin-top: 4px; text-shadow: 2px 2px 0 #000; }
.tile .tile-key { position: absolute; right: 14px; bottom: 8px; font-family: 'Bungee', sans-serif; font-size: 12px; letter-spacing: 2px;
  background: #000; padding: 2px 8px; animation: blink 1.2s steps(1) infinite; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tile.small { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 12px 6px; min-height: 76px; }
.tile.small b { font-size: 26px; font-weight: 700; letter-spacing: 1px; line-height: 1; }
.tile.small small { font-size: 16px; color: rgba(255,255,255,.75); }
.t-blue { background: var(--blue); } .t-yellow { background: var(--yellow); color: #000; } .t-yellow small { color: rgba(0,0,0,.7); }
.t-pink { background: var(--pink); } .t-black { background: #22222c; } .t-red { background: var(--red); }

.menu-right { position: absolute; right: clamp(16px, 3vw, 48px); bottom: 60px; width: 290px; padding: 10px 16px 12px; z-index: 2;
  transform: skewX(-6deg); border: 4px solid #000; }
.menu-right > * { transform: skewX(6deg); }
.mr-head { font-family: 'Bungee', sans-serif; font-size: 18px; color: var(--yellow); margin-bottom: 4px; }
.rec-list { display: grid; gap: 2px; }
.rec-row { display: flex; justify-content: space-between; gap: 12px; font-size: 20px; border-bottom: 1px dashed rgba(255,255,255,.12); }
.rec-row b { color: var(--yellow); font-weight: 600; }
.rec-empty { font-size: 19px; color: #bbb; }

/* selecao com ficha */
.sel-body { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.sel-sheet { display: flex; gap: 18px; align-items: stretch; background: #000; border: 4px solid #fff; box-shadow: 8px 8px 0 var(--red);
  padding: 10px 22px 10px 10px; transform: skewX(-6deg); max-width: 760px; }
.sel-sheet > * { transform: skewX(6deg); }
.sh-img { width: 120px; flex: none; background: var(--c); border: 3px solid #000; display: grid; place-items: end center; overflow: hidden; }
.sh-img img { width: 128px; image-rendering: pixelated; }
.sh-txt { display: flex; flex-direction: column; gap: 2px; }
.sh-name { font-family: 'Bungee', sans-serif; font-size: 28px; line-height: 1; }
.sh-name small { font-family: 'Teko', sans-serif; font-size: 20px; letter-spacing: 2px; margin-left: 8px; }
.sh-row { display: flex; gap: 12px; font-size: 22px; line-height: 1.1; margin-top: 4px; }
.sh-row b { color: var(--yellow); font-weight: 600; min-width: 90px; }
.sh-desc { font-size: 18px; color: #c9ced8; line-height: 1.05; }

/* modal */
.modal-body { min-width: min(560px, 90vw); max-width: 90vw; max-height: 62vh; overflow: auto; padding: 14px 22px; font-size: 20px; border: 4px solid #000; }
.mb-sec { font-family: 'Bungee', sans-serif; font-size: 17px; color: var(--yellow); margin: 10px 0 4px; }
.mb-sec:first-child { margin-top: 0; }
.mb-vol { display: grid; grid-template-columns: 100px 1fr 52px; align-items: center; gap: 10px; font-size: 20px; letter-spacing: 2px; }
.mb-vol i { font-style: normal; } .mb-vol input { accent-color: var(--red); } .mb-vol b { color: var(--yellow); text-align: right; }
.mb-lang { display: flex; gap: 10px; } .mb-lang .lang-btn { border: 3px solid #000; transform: skewX(-10deg); }
.mb-ctrl { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: 18px; } .mb-ctrl b { color: #fff; font-weight: 600; }
.mb-credits p { font-size: 18px; line-height: 1.15; margin-bottom: 8px; color: #d6d9e0; } .mb-credits b { color: var(--yellow); font-weight: 600; }
.mb-legal { font-size: 14px !important; color: #999 !important; }
.lv-tools .btn i, .audio label i { font-style: normal; }

/* menu em telas pequenas / celular deitado */
@media (max-width: 900px) and (min-height: 521px) { .menu-left { width: 70vw; } .menu-right { display: none; } }
@media (max-height: 520px) and (orientation: landscape) {
  .menu-top { top: 8px; left: 14px; right: 14px; }
  .menu-left { width: min(470px, 56vw); gap: 8px; left: 16px; top: 54%; }
  .logo-wrap .pre { font-size: 12px; } .logo-wrap .logo { font-size: clamp(30px, 6vw, 52px); } .logo-wrap .sub { font-size: 15px; letter-spacing: 4px; }
  .tile.play { min-height: 0; padding: 8px 14px; } .tile-icon svg { width: 42px; height: 42px; }
  .tile-text b { font-size: 30px; } .tile-text small { font-size: 14px; } .tile-text .catch { font-size: 11px; }
  .tile .tile-key { font-size: 9px; }
  .tiles { gap: 8px; } .tile.small { min-height: 0; padding: 5px 8px 3px; } .tile.small b { font-size: 18px; } .tile.small small { font-size: 12px; }
  .menu-right { display: none; }
  .sel-body { gap: 8px; } .sel-sheet { padding: 4px 14px 4px 4px; gap: 10px; box-shadow: 5px 5px 0 var(--red); }
  .sh-img { width: 64px; } .sh-img img { width: 72px; }
  .sh-name { font-size: 18px; } .sh-name small { font-size: 14px; } .sh-row { font-size: 15px; margin-top: 0; } .sh-row b { min-width: 60px; } .sh-desc { font-size: 13px; }
  .modal-body { max-height: 58vh; font-size: 16px; padding: 8px 14px; } .mb-credits p { font-size: 14px; } .mb-vol { font-size: 16px; }
}
.logo-wrap .sub, .sh-name small { text-transform: uppercase; }
.pad-focus { outline: 4px solid var(--yellow) !important; outline-offset: 2px; } input[type=range].pad-focus { outline-offset: 4px; }
body.pad-cards .card .ckey { display: none; }

/* ===== sala do multiplayer (lobby.js) ===== */
#scr-lobby { background: rgba(8, 4, 10, .78); flex-direction: column; align-items: center; justify-content: center; }
.lb-body { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 120px); overflow: auto; margin-top: 60px; padding: 14px 22px; border: 4px solid #000; font-size: 20px; color: #fff; display: flex; flex-direction: column; gap: 10px; }
.lb-sec { font-family: 'Bungee', sans-serif; font-size: 18px; color: var(--yellow); margin-top: 4px; }
.lb-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lb-me { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 22px; }
.lb-me b { font-family: 'Bungee', sans-serif; font-weight: 400; color: #fff; }
.lb-count { background: #000; padding: 0 8px; }
.lb-hint { font-size: 17px; color: rgba(255,255,255,.7); }
.lb-body input { font: inherit; font-size: 22px; padding: 4px 10px; background: #000; color: #fff; border: 3px solid #fff; width: min(260px, 60vw); }
.lb-body .btn:disabled { opacity: .45; cursor: not-allowed; }
.lb-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lb-slot { --c: #444; background: var(--c); border: 3px solid #000; padding: 4px 8px; line-height: 1.05; min-height: 52px; overflow: hidden; }
.lb-slot b { font-size: 18px; word-break: break-all; } .lb-slot small { display: block; font-size: 14px; color: rgba(255,255,255,.85); }
.lb-slot.empty { background: transparent; border-style: dashed; border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.4); }
.lb-rangers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lb-rcard { --c: var(--red); position: relative; background: var(--c); border: 4px solid #000; padding: 0 0 4px; cursor: pointer; color: #fff; font: inherit; font-size: 18px; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.lb-rcard img { width: 96px; height: 96px; image-rendering: pixelated; }
.lb-rcard.sel { outline: 4px solid #fff; outline-offset: -8px; transform: translateY(-4px); }
.lb-rcard.taken { cursor: not-allowed; filter: grayscale(.8) brightness(.6); }
.lb-rcard em { position: absolute; top: 36%; left: 0; right: 0; background: #000; font-style: normal; font-size: 14px; word-break: break-all; }
.lb-status { min-height: 24px; font-size: 18px; color: #7dffa0; } .lb-status.err { color: #ff8a8a; }
@media (max-height: 500px) {
  .lb-body { margin-top: 48px; max-height: calc(100vh - 56px); font-size: 16px; padding: 8px 12px; gap: 6px; }
  .lb-rcard img { width: 56px; height: 56px; } .lb-slot b { font-size: 14px; } .lb-slot small { font-size: 12px; }
}
/* multiplayer: lista de quem ainda esta escolhendo carta */
.wait-list { padding: 12px 24px; font-size: 26px; color: #fff; display: grid; gap: 4px; text-align: center; border: 4px solid #000; }
/* tela estreita (janela fina ou celular em pe): o tempo desce para baixo do nome e tudo encolhe para nao embolar */
@media (max-width: 760px) {
  .hud-tl { transform-origin: top left; transform: skewX(-8deg) scale(.8); left: 10px; }
  .hud-tr { transform-origin: top right; transform: skewX(-8deg) scale(.8); right: 10px; }
  .hud-tc { top: 92px; transform: translateX(-50%) skewX(-8deg) scale(.8); transform-origin: top center; }
  #minimap { top: 70px; right: 10px; }
  .comm { top: 182px; right: 10px; }
  #xp-lv { top: 182px; }
}
