@font-face { font-family: 'Lilita One'; src: url('./assets/fonts/LilitaOne-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Nunito'; font-weight: 800; src: url('./assets/fonts/Nunito-800.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Nunito'; font-weight: 900; src: url('./assets/fonts/Nunito-900.woff2') format('woff2'); font-display: swap; }

:root {
  --chung: #1f5bff; --hong: #ff2a2a; --gold: #ffd21f; --orange: #ff9b2e; --ink: #0b1020; --panel: #142240;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --title: 'Lilita One', 'Arial Black', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: #fff; font: 800 15px/1.3 Nunito, system-ui, sans-serif; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.outline, .logo-main, h1, h2, .btn-play, .btn-strike, .score, .clock b, .call { text-shadow: 0 2px 0 #000, 2px 0 0 #000, -2px 0 0 #000, 0 -2px 0 #000, 0 4px 0 rgba(0,0,0,.4); }

.screen { position: fixed; inset: 0; display: none; flex-direction: column; align-items: center; padding: calc(var(--safe-t) + 64px) 16px calc(var(--safe-b) + 92px); pointer-events: none; }
.screen > * { pointer-events: auto; }
body[data-screen="loading"] #loading, body[data-screen="home"] #home, body[data-screen="cards"] #cards, body[data-screen="dojang"] #dojang,
body[data-screen="profile"] #profile, body[data-screen="shop"] #shop, body[data-screen="lesson"] #lesson, body[data-screen="practice"] #practice,
body[data-screen="fight"] #fight, body[data-screen="result"] #result { display: flex; }
.menu-only { display: none; }
body[data-screen="home"] .menu-only, body[data-screen="cards"] .menu-only, body[data-screen="dojang"] .menu-only,
body[data-screen="profile"] .menu-only, body[data-screen="shop"] .menu-only { display: flex; }
.scroll { overflow-y: auto; pointer-events: auto; background: linear-gradient(180deg, rgba(11,16,32,.55), rgba(11,16,32,.92) 30%); }
.spacer { flex: 1; pointer-events: none; }

/* Carga */
#loading { justify-content: center; gap: 22px; background: radial-gradient(circle at 50% 40%, #1d3a8a, var(--ink) 70%); padding-top: 0; }
.logo { display: flex; flex-direction: column; align-items: center; transform: rotate(-3deg); }
.logo-top { font: 900 16px Nunito; letter-spacing: 6px; background: var(--hong); padding: 2px 12px; border-radius: 6px; box-shadow: 0 3px 0 #7a0d12; }
.logo-main { font: 54px/1 var(--title); color: var(--gold); letter-spacing: 1px; margin-top: 4px; -webkit-text-stroke: 2px #4a2a00; }
.logo.small .logo-main { font-size: 34px; }
.logo.small .logo-top { font-size: 11px; }
.bar { width: min(320px, 80vw); height: 16px; border-radius: 10px; background: #0006; border: 2px solid #000; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(#ffe36b, #ff9b2e); transition: width .2s; }

/* Barra superior */
#topbar { position: fixed; top: calc(var(--safe-t) + 8px); left: 8px; right: 8px; gap: 8px; align-items: center; z-index: 5; }
.belt-chip { display: flex; align-items: center; gap: 8px; background: #0009; border: 2px solid #000; border-radius: 12px; padding: 4px 10px 4px 6px; min-width: 0; flex: 1; max-width: 190px; }
.belt-swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #000; box-shadow: inset 0 -4px 0 #0004; flex: none; }
.belt-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; text-align: left; }
.belt-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xpbar { height: 7px; border-radius: 4px; background: #0008; overflow: hidden; margin-top: 2px; }
.xpbar i { display: block; height: 100%; background: #6ee7ff; }
.res { display: flex; align-items: center; gap: 4px; background: #0009; border: 2px solid #000; border-radius: 12px; padding: 3px 3px 3px 8px; }
.res b { min-width: 34px; text-align: right; }
.plus { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(#7bea4c, #2fa51e); border: 2px solid #000; font: 20px/1 var(--title); box-shadow: inset 0 -3px 0 #0003; }

/* Inicio */
.profile-banner { display: flex; align-items: center; gap: 10px; width: min(460px, 100%); background: linear-gradient(#2b4fa8, #1a2f6b); border: 3px solid #000; border-radius: 14px; padding: 6px 12px; box-shadow: 0 4px 0 #0007; }
.profile-banner small { display: block; opacity: .8; font-size: 12px; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; background: #fff2; border-radius: 10px; font-size: 24px; }
.trophy { margin-left: auto; background: #0006; border-radius: 10px; padding: 3px 10px; }
#home .logo { margin-top: 10px; }
.deck-row { display: flex; gap: 8px; margin-bottom: 10px; }
.mini-card { width: 66px; height: 84px; border-radius: 10px; border: 3px solid #000; background: linear-gradient(#24365f, #142240); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 4px; position: relative; font: 10px/1.05 Nunito; text-align: center; box-shadow: 0 4px 0 #0007; }
.mini-card .emo { position: absolute; top: 6px; font-size: 28px; }
.mini-card .lv { position: absolute; top: -8px; right: -6px; background: var(--gold); color: #000; border: 2px solid #000; border-radius: 8px; padding: 0 4px; font-size: 10px; }
.mini-card.empty { opacity: .45; border-style: dashed; }
.cpu-pick { display: flex; align-items: center; gap: 8px; background: #0008; border: 2px solid #000; border-radius: 12px; padding: 4px 8px; margin-bottom: 10px; font-size: 12px; max-width: 100%; }
.chips { display: flex; gap: 4px; overflow-x: auto; }
.chips button { width: 30px; height: 26px; border-radius: 7px; border: 2px solid #000; box-shadow: inset 0 -3px 0 #0003; flex: none; }
.chips button.on { outline: 3px solid #fff; outline-offset: 1px; }
.btn-play { width: min(300px, 86vw); padding: 10px 0 8px; border-radius: 18px; border: 3px solid #000; background: linear-gradient(#ffd56a, #ff9b2e 55%, #f07d0c); font: 40px/1 var(--title); box-shadow: 0 6px 0 #9b4a00, 0 10px 18px #0008; display: flex; flex-direction: column; align-items: center; animation: pulse 1.6s ease-in-out infinite; }
.btn-play small { font: 900 12px Nunito; text-shadow: none; color: #4a2300; margin-top: 2px; }
.btn-play:active { transform: translateY(4px); box-shadow: 0 2px 0 #9b4a00; }
@keyframes pulse { 50% { transform: scale(1.04); } }

/* Pestañas */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; padding: 6px 6px calc(var(--safe-b) + 6px); background: linear-gradient(#2a3f73, #172650); border-top: 3px solid #000; justify-content: space-around; z-index: 5; }
#tabs button { display: flex; flex-direction: column; align-items: center; font-size: 11px; padding: 4px 6px; border-radius: 10px; min-width: 56px; }
#tabs button span { font-size: 24px; line-height: 1.1; }
#tabs button.on { background: #fff2; }
#tabs .center { transform: translateY(-14px); background: linear-gradient(#5ea0ff, #2a5bd6); border: 3px solid #000; box-shadow: 0 4px 0 #0007; padding: 6px 12px; }

/* Encabezados de madera */
h2.wood { margin: 0 0 8px; padding: 6px 18px; font: 24px var(--title); background: linear-gradient(#b8794a, #8a5530); border: 3px solid #000; border-radius: 12px; box-shadow: 0 4px 0 #0007; display: flex; gap: 10px; align-items: baseline; }
h2.wood small { font: 900 12px Nunito; text-shadow: none; color: #ffe9c9; }
.hint { max-width: 520px; text-align: center; opacity: .85; font-size: 13px; margin: 2px 0 12px; }

/* Cartas */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; width: min(560px, 100%); padding-bottom: 20px; }
.tcard { position: relative; aspect-ratio: 3/4.2; border-radius: 12px; border: 3px solid #000; background: linear-gradient(160deg, var(--rc, #9fb4c8), #1a2440 62%); padding: 6px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; box-shadow: 0 5px 0 #0008; overflow: hidden; }
.tcard .art { position: absolute; top: 8px; left: 0; right: 0; font-size: 44px; filter: drop-shadow(0 3px 0 #0006); }
.tcard .nm { font: 13px/1.05 var(--title); text-shadow: 0 2px 0 #000; }
.tcard .rar { font-size: 9px; letter-spacing: 1px; opacity: .9; }
.tcard .pts { position: absolute; top: 4px; left: 4px; width: 26px; height: 30px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #ff9bf0, #b45cff); border: 2px solid #000; font: 15px/26px var(--title); }
.tcard .eq { position: absolute; top: 4px; right: 4px; background: #2fa51e; border: 2px solid #000; border-radius: 6px; font-size: 9px; padding: 0 4px; }
.tcard .mbar { width: 100%; height: 8px; border-radius: 4px; background: #0008; border: 1px solid #000; margin-top: 4px; overflow: hidden; }
.tcard .mbar i { display: block; height: 100%; background: linear-gradient(90deg, #6ee7ff, #b45cff); }
.tcard.locked { filter: grayscale(1) brightness(.5); }
.tcard.locked::after { content: '🔒'; position: absolute; top: 34%; font-size: 30px; }

/* Modal */
.modal { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; z-index: 20; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: min(420px, 100%); max-height: 90vh; overflow-y: auto; background: linear-gradient(#24365f, #142240); border: 3px solid #000; border-radius: 16px; padding: 16px; box-shadow: 0 8px 0 #0008; }
.modal-box.center { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.modal-box h3 { font: 30px var(--title); margin: 0; }
.close { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 10px; background: var(--hong); border: 2px solid #000; }
.detail-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.detail-head .art { font-size: 54px; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 14px; border: 3px solid #000; background: linear-gradient(160deg, var(--rc), #1a2440); }
.detail-head h3 { font-size: 24px; line-height: 1; }
.detail-head small { display: block; opacity: .85; }
.statrow { display: grid; grid-template-columns: 92px 1fr 34px; gap: 8px; align-items: center; font-size: 13px; margin: 5px 0; }
.statrow .sb { height: 10px; border-radius: 5px; background: #0008; overflow: hidden; }
.statrow .sb i { display: block; height: 100%; background: linear-gradient(90deg, #ffd21f, #ff9b2e); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tags span { background: #0006; border-radius: 8px; padding: 2px 8px; font-size: 12px; }
.evo { display: flex; gap: 4px; margin: 8px 0; font-size: 11px; }
.evo span { flex: 1; text-align: center; padding: 3px 0; border-radius: 6px; background: #0006; }
.evo span.on { background: linear-gradient(#b45cff, #6b2bd6); }
.btn-wide { width: 100%; padding: 10px; border-radius: 12px; border: 3px solid #000; background: linear-gradient(#7bea4c, #2fa51e); font: 20px var(--title); text-shadow: 0 2px 0 #000; box-shadow: 0 4px 0 #0007; margin-top: 8px; }
.btn-wide.ghost { background: linear-gradient(#5d6b8c, #3b4663); }
.btn-wide.blue { background: linear-gradient(#5ea0ff, #2a5bd6); }
.btn-wide:disabled { filter: grayscale(1); opacity: .6; }
.row { display: flex; gap: 10px; width: 100%; }

/* Dojang */
.train-list { display: flex; flex-direction: column; gap: 8px; width: min(520px, 100%); }
.train-item { display: flex; align-items: center; gap: 10px; background: #0009; border: 2px solid #000; border-radius: 12px; padding: 8px 10px; text-align: left; }
.train-item .art { font-size: 30px; }
.train-item small { display: block; opacity: .8; font-size: 12px; }
.train-item .go { margin-left: auto; background: linear-gradient(#ffd56a, #ff9b2e); color: #3a1c00; border: 2px solid #000; border-radius: 10px; padding: 4px 10px; font-size: 13px; }
.soon-box { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: #0009; border: 2px dashed #fff6; border-radius: 12px; padding: 12px; width: min(520px, 100%); text-align: center; }
.soon-box.big { padding: 28px 16px; }
.soon-box b { font: 22px var(--title); color: var(--gold); }

/* Perfil */
.field { display: flex; flex-direction: column; gap: 4px; width: min(420px, 100%); font-size: 13px; }
.field input { font: 900 18px Nunito; padding: 8px 10px; border-radius: 10px; border: 2px solid #000; background: #fff; color: #000; user-select: text; }
.fighter-pick { display: flex; gap: 8px; margin: 12px 0; }
.fighter-pick button { padding: 8px 14px; border-radius: 10px; border: 2px solid #000; background: #0009; }
.fighter-pick button.on { background: linear-gradient(#5ea0ff, #2a5bd6); }
.belt-path { display: flex; gap: 4px; width: min(420px, 100%); }
.belt-path span { flex: 1; height: 26px; border-radius: 6px; border: 2px solid #000; position: relative; }
.belt-path span.cur { outline: 3px solid #fff; }
.belt-path span.off { opacity: .35; }
.stats { margin-top: 12px; width: min(420px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats div { background: #0009; border-radius: 10px; padding: 8px; text-align: center; }
.stats b { display: block; font: 22px var(--title); }

/* Lección y práctica */
#lesson, #practice { padding-top: calc(var(--safe-t) + 10px); }
.lesson-top { display: flex; align-items: center; gap: 12px; width: min(560px, 100%); background: #000a; border: 2px solid #000; border-radius: 12px; padding: 6px 10px; }
.lesson-top b { font: 22px var(--title); display: block; line-height: 1; }
.lesson-top small { opacity: .8; }
.back { background: #fff2; border-radius: 10px; padding: 6px 10px; }
.phase-box { margin-top: auto; display: flex; gap: 10px; align-items: center; background: #000c; border: 3px solid #000; border-radius: 14px; padding: 8px 16px; }
.phase-box span { background: var(--gold); color: #000; border-radius: 8px; padding: 2px 8px; font-size: 13px; }
.phase-box b { font: 22px var(--title); }
.phase-track { display: flex; gap: 3px; width: min(520px, 100%); margin: 8px 0; }
.phase-track i { flex: 1; height: 8px; border-radius: 4px; background: #fff3; }
.phase-track i.on { background: var(--gold); }
.lesson-controls { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.lesson-controls button { background: #000a; border: 2px solid #000; border-radius: 10px; padding: 8px 10px; }
.lesson-controls button.on { background: #2a5bd6; }
.lesson-controls .go { background: linear-gradient(#ffd56a, #ff9b2e); color: #3a1c00; font: 18px var(--title); }
.timing { margin-top: auto; position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.timing .target { position: absolute; width: 56px; height: 56px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 18px #fff8; }
.timing .ring { position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 5px solid var(--gold); }
.timing b { position: absolute; top: -34px; font: 28px var(--title); white-space: nowrap; }
.practice-info { display: flex; gap: 16px; margin: 8px 0; background: #000a; border-radius: 10px; padding: 4px 12px; }
.btn-strike { width: min(260px, 80vw); padding: 14px 0; border-radius: 18px; border: 3px solid #000; background: linear-gradient(#ff7a7a, #e0262f); font: 32px var(--title); box-shadow: 0 6px 0 #7a0d12; }
.btn-strike:active { transform: translateY(4px); box-shadow: 0 2px 0 #7a0d12; }

/* HUD del combate */
#fight { padding: 0; }
.hud-top { position: absolute; top: calc(var(--safe-t) + 6px); left: 6px; right: 6px; display: grid; grid-template-columns: 1fr auto auto auto 1fr; gap: 6px; align-items: start; pointer-events: none; }
.hud-top .side { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hud-top .side.hong { align-items: flex-end; }
.nm { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-shadow: 0 2px 0 #000; }
.bars { display: flex; flex-direction: column; gap: 3px; width: 100%; max-width: 220px; }
.bars i { display: block; height: 9px; border-radius: 5px; border: 2px solid #000; background: #0008; position: relative; overflow: hidden; }
.bars i::before { content: ''; position: absolute; inset: 0; width: var(--v, 100%); background: var(--c); transition: width .1s; }
.side.hong .bars i::before { left: auto; right: 0; }
.bars .st { --c: linear-gradient(90deg, #ffd21f, #ff9b2e); }
.bars .ba { --c: linear-gradient(90deg, #6ee7ff, #2fa5ff); height: 6px; }
.gj { font-size: 11px; color: #ffd0d0; min-height: 14px; }
.score { min-width: 54px; height: 54px; border-radius: 12px; border: 3px solid #000; display: grid; place-items: center; font: 34px var(--title); }
.score.chung { background: var(--chung); }
.score.hong { background: var(--hong); }
.clock { display: flex; flex-direction: column; align-items: center; background: #000c; border: 3px solid #000; border-radius: 12px; padding: 2px 10px; min-width: 76px; }
.clock b { font: 24px/1.1 var(--title); color: var(--gold); }
.clock small { font-size: 10px; opacity: .85; }
.dots { display: flex; gap: 4px; margin: 2px 0; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #000; background: #fff3; }
.hud-btn { position: absolute; top: calc(var(--safe-t) + 74px); width: 40px; height: 40px; border-radius: 12px; background: #000a; border: 2px solid #000; }
.hud-btn.pause { left: 8px; }
.hud-btn.cam { right: 8px; }
.call { position: absolute; top: 34%; left: 0; right: 0; text-align: center; font: 52px var(--title); color: var(--gold); opacity: 0; pointer-events: none; }
.call.show { animation: call 1.1s ease-out forwards; }
@keyframes call { 0% { opacity: 0; transform: scale(2); } 15% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }
#pops { position: absolute; inset: 0; pointer-events: none; }
.pop { position: absolute; transform: translate(-50%, -50%); font: 28px var(--title); text-shadow: 0 2px 0 #000, 2px 0 0 #000, -2px 0 0 #000, 0 -2px 0 #000; animation: pop 1.2s ease-out forwards; white-space: nowrap; text-align: center; }
.pop small { display: block; font: 900 13px Nunito; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }
.pad-move { position: absolute; left: 12px; bottom: calc(var(--safe-b) + 18px); display: flex; gap: 10px; }
.pad-move button { width: 70px; height: 70px; border-radius: 50%; background: #ffffff22; border: 3px solid #0008; font-size: 30px; backdrop-filter: blur(4px); }
.pad-act { position: absolute; right: 12px; bottom: calc(var(--safe-b) + 14px); display: grid; grid-template-columns: repeat(2, 72px); gap: 8px; }
.pad-act button { height: 64px; border-radius: 16px; border: 3px solid #000; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 4px 0 #0007; }
.pad-act button span { font-size: 10px; }
.a-punch { background: linear-gradient(#ffd56a, #ff9b2e); color: #3a1c00; }
.a-kick { background: linear-gradient(#ff7a7a, #e0262f); }
.a-block { background: linear-gradient(#5ea0ff, #2a5bd6); }
.a-dodge { background: linear-gradient(#9ff2c4, #2fbf7a); color: #053a20; }
.pad-act button.held, .pad-move button.held, .pad-act button:active, .pad-move button:active { transform: translateY(3px); filter: brightness(1.2); }
.btn-tech { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 18px); transform: translateX(-50%); padding: 12px 18px; border-radius: 16px; border: 3px solid #000; background: linear-gradient(#d9a2ff, #8b3df0); font: 20px var(--title); text-shadow: 0 2px 0 #000; box-shadow: 0 5px 0 #4a1694; }
.tech-tray { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 84px); transform: translateX(-50%); display: flex; gap: 8px; background: #000c; border: 3px solid #000; border-radius: 16px; padding: 8px; }
.tech-tray[hidden] { display: none; }
.tech-tray button { width: 74px; height: 92px; border-radius: 12px; border: 3px solid #000; background: linear-gradient(160deg, var(--rc), #1a2440 65%); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 4px; font: 10px/1.05 Nunito; position: relative; }
.tech-tray button .emo { position: absolute; top: 6px; font-size: 28px; }
.tech-tray button .en { position: absolute; top: 3px; right: 3px; background: var(--gold); color: #000; border-radius: 6px; padding: 0 3px; font-size: 10px; border: 1px solid #000; }
.tech-tray button .k { position: absolute; top: 3px; left: 4px; opacity: .7; }
.tech-tray button:disabled { filter: grayscale(1) brightness(.6); }
.keys { position: absolute; bottom: calc(var(--safe-b) + 2px); left: 0; right: 0; text-align: center; font-size: 10px; opacity: .5; margin: 0; pointer-events: none; }
@media (pointer: coarse) { .keys { display: none; } }
@media (max-width: 560px) {
  .btn-tech { bottom: calc(var(--safe-b) + 166px); left: auto; right: 12px; transform: none; padding: 8px 14px; font-size: 17px; }
  .tech-tray { bottom: calc(var(--safe-b) + 214px); left: auto; right: 8px; transform: none; }
  .keys { display: none; }
  .nm { font-size: 11px; }
  .tech-tray button { width: 62px; height: 80px; }
  .score { min-width: 42px; height: 44px; font-size: 26px; }
  .clock { min-width: 60px; padding: 2px 6px; }
  .clock b { font-size: 20px; }
}

/* Resultado */
#result { justify-content: center; background: #0008; padding-top: 16px; }
.result-box { width: min(420px, 100%); background: linear-gradient(#24365f, #142240); border: 3px solid #000; border-radius: 18px; padding: 18px; text-align: center; box-shadow: 0 8px 0 #0008; }
.result-box h1 { margin: 0; font: 46px var(--title); color: var(--gold); }
.result-box h1.lose { color: #9fb4c8; }
.rewards { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.rewards div { background: #0008; border-radius: 12px; padding: 8px 12px; }
.rewards b { display: block; font: 22px var(--title); }
.new-card { margin: 8px auto; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: reveal .8s ease-out; }
.new-card[hidden] { display: none; }
.new-card .tcard { width: 120px; }
@keyframes reveal { 0% { transform: rotateY(90deg) scale(.6); } 100% { transform: none; } }

.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 70px); transform: translateX(-50%); background: #000d; border: 2px solid #000; border-radius: 12px; padding: 8px 14px; z-index: 30; max-width: 90vw; text-align: center; }
.toast[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .btn-play { animation: none; } }

/* ===== Plantel, modos, torneo y efectos (08/10) ===== */
body[data-screen="select"] #select, body[data-screen="bracket"] #bracket { display: flex; }
body[data-screen="bracket"] .menu-only { display: flex; }
.row.narrow, .btn-wide.narrow { width: min(420px, 100%); }
/* Arte de cartas de Meshy */
.tcard .cart { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard .shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(8,12,28,.94) 80%); }
.tcard .nm, .tcard .rar, .tcard .mbar { position: relative; z-index: 1; }
.tcard .pts, .tcard .eq { z-index: 2; }
.mini-card, .tech-tray button { overflow: hidden; }
.mini-card .cart, .tech-tray button .cart { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-card .shade, .tech-tray button .shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(8,12,28,.92)); }
.mini-card .txt, .tech-tray button .txt { position: relative; z-index: 2; text-shadow: 0 1px 0 #000, 0 0 4px #000; }
.mini-card .lv, .tech-tray button .en, .tech-tray button .k { z-index: 3; }
.mini-card .lv { top: 2px; right: 2px; }
.detail-head .art { overflow: hidden; padding: 0; }
.detail-head .art img { width: 100%; height: 100%; object-fit: cover; }

/* Chip del luchador en el inicio */
.char-chip { display: flex; align-items: center; gap: 10px; background: #000a; border: 2px solid #000; border-radius: 14px; padding: 4px 12px 4px 4px; margin-bottom: 8px; text-align: left; }
.char-chip img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border: 2px solid #000; background: #24365f; }
.char-chip small { display: block; font-size: 11px; opacity: .75; }
.char-chip b { font: 20px var(--title); text-shadow: 0 2px 0 #000; }
.char-chip em { font-style: normal; font-size: 12px; color: var(--gold); margin-left: 6px; }
/* Selector de modo */
.mode-row { display: flex; gap: 6px; margin-bottom: 8px; }
.mode-row button { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 6px 8px; border-radius: 14px; border: 3px solid #000; background: linear-gradient(#3a4b77, #24304f); font-size: 22px; box-shadow: 0 4px 0 #0007; }
.mode-row button span { font: 14px var(--title); text-shadow: 0 2px 0 #000; }
.mode-row button.on { background: linear-gradient(#ffd56a, #ff9b2e); transform: translateY(-3px); }
.mode-row button[data-mode="calle"].on { background: linear-gradient(#ff7ad1, #b43ce0); }
.mode-row button[data-mode="rapido"].on { background: linear-gradient(#7bd8ff, #2a5bd6); }
.btn-play.small { font-size: 30px; padding: 8px 0; width: min(240px, 80vw); }

/* Selección */
.char-info { width: min(520px, 100%); background: #000c; border: 3px solid #000; border-radius: 16px; padding: 10px 14px; margin-bottom: 8px; }
.char-info h3 { margin: 0; font: 30px var(--title); line-height: 1; text-shadow: 0 2px 0 #000, 2px 0 0 #000, -2px 0 0 #000; }
.char-info .sub { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; margin: 4px 0 6px; }
.char-info .sub span { background: #fff2; border-radius: 8px; padding: 1px 8px; }
.char-info p { margin: 4px 0 6px; font-size: 13px; opacity: .9; }
.char-info .spc { display: flex; gap: 8px; align-items: center; background: #ffffff12; border-radius: 10px; padding: 4px; margin-top: 6px; }
.char-info .spc img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 2px solid #000; }
.char-info .spc b { font: 16px var(--title); }
.char-info .spc small { display: block; font-size: 11px; opacity: .85; }
.char-row { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 6px 4px 10px; }
.char-card { flex: none; width: 86px; border-radius: 12px; border: 3px solid #000; background: #142240; overflow: hidden; position: relative; box-shadow: 0 4px 0 #0007; }
.char-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.char-card span { display: block; font: 13px var(--title); padding: 2px 0 4px; text-align: center; text-shadow: 0 2px 0 #000; }
.char-card small { position: absolute; top: 3px; right: 3px; background: #000b; border-radius: 6px; padding: 0 4px; font-size: 10px; }
.char-card.on { outline: 3px solid var(--gold); outline-offset: 1px; transform: translateY(-4px); }

/* Torneo */
.bracket { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: min(640px, 100%); }
.bracket .col { display: flex; flex-direction: column; justify-content: space-around; gap: 6px; }
.bracket .col h4 { margin: 0; font: 900 10px Nunito; text-align: center; opacity: .75; }
.slot { display: flex; align-items: center; gap: 4px; background: #000a; border: 2px solid #000; border-radius: 8px; padding: 2px; font-size: 11px; min-height: 30px; }
.slot img { width: 24px; height: 24px; border-radius: 5px; object-fit: cover; }
.slot.me { background: linear-gradient(90deg, #2a5bd6, #142240); }
.slot.out { opacity: .35; }
.slot.champ { background: linear-gradient(90deg, #ffd21f, #ff9b2e); color: #3a1c00; }
.next-fight { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0 6px; font: 22px var(--title); text-shadow: 0 2px 0 #000; text-align: center; }
.next-fight img { width: 72px; height: 72px; border-radius: 12px; border: 3px solid #000; object-fit: cover; }
.next-fight .vs { color: var(--gold); font-size: 34px; }

/* HUD: vida, especial, caras */
.who { display: flex; align-items: center; gap: 5px; max-width: 100%; }
.who img { width: 26px; height: 26px; border-radius: 7px; border: 2px solid #000; object-fit: cover; background: #142240; }
.bars .hp { display: none; --c: linear-gradient(90deg, #ff4d4d, #ffd21f); height: 13px; }
body[data-rules="street"] .bars .hp { display: block; }
body[data-rules="street"] .score { display: none; }
.bars .sp { --c: linear-gradient(90deg, #b45cff, #ff6ec7); height: 6px; }
.bars .sp.full::before { animation: spfull .5s ease-in-out infinite alternate; }
@keyframes spfull { to { filter: brightness(1.8); } }
.btn-special { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 84px); transform: translateX(-50%); width: 104px; height: 50px; border-radius: 16px; border: 3px solid #000; background: #1a1030; overflow: hidden; font: 16px var(--title); text-shadow: 0 2px 0 #000; box-shadow: 0 5px 0 #0008; opacity: .8; }
.btn-special i { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; background: linear-gradient(#ff9bf0, #8b3df0); transition: height .15s; }
.btn-special span { position: relative; }
.btn-special.full { opacity: 1; box-shadow: 0 0 22px #ff6ec7, 0 5px 0 #4a1694; animation: glow .7s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 36px #ffd21f, 0 5px 0 #4a1694; } }
.ticker { position: absolute; top: calc(var(--safe-t) + 74px); left: 56px; right: 56px; text-align: center; font: 900 15px Nunito; text-shadow: 0 2px 0 #000, 0 0 6px #000; color: #fff; opacity: 0; transition: opacity .25s; pointer-events: none; }
.ticker.show { opacity: 1; }
.combo { position: absolute; left: 14px; top: 34%; font: 30px var(--title); color: var(--gold); text-shadow: 0 2px 0 #000, 2px 0 0 #000, -2px 0 0 #000; opacity: 0; pointer-events: none; }
.combo.show { animation: comboin .9s ease-out forwards; }
@keyframes comboin { 0% { opacity: 0; transform: scale(1.8); } 15% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.super { position: absolute; left: 0; right: 0; top: 13%; display: flex; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(90deg, transparent, rgba(0,0,0,.82) 18%, rgba(0,0,0,.82) 82%, transparent); padding: 8px 0; pointer-events: none; animation: superin 1.5s ease-out forwards; }
.super[hidden] { display: none; }
.super img { width: 96px; height: 96px; border-radius: 14px; border: 3px solid #fff; object-fit: cover; }
.super b { display: block; font: 34px var(--title); color: var(--sc, #ffd21f); text-shadow: 0 2px 0 #000, 2px 0 0 #000, -2px 0 0 #000; }
.super small { font: 900 14px Nunito; }
@keyframes superin { 0% { transform: translateX(-100%); } 12% { transform: none; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(30%); } }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.show { animation: flash .35s ease-out; }
@keyframes flash { 0% { opacity: .7; } 100% { opacity: 0; } }
.mvp { font-size: 12px; opacity: .8; margin: 8px 0 0; }
@media (max-width: 560px) {
  .btn-special { left: auto; right: 12px; transform: none; bottom: calc(var(--safe-b) + 214px); width: 92px; height: 44px; font-size: 14px; }
  .tech-tray { bottom: calc(var(--safe-b) + 266px); }
  .mode-row button { min-width: 80px; font-size: 18px; }
  .ticker { top: calc(var(--safe-t) + 118px); left: 12px; right: 12px; font-size: 13px; }
  .bracket { gap: 3px; } .slot { font-size: 9px; } .slot img { width: 18px; height: 18px; }
}

/* ===== Cartel BETA (08/10) ===== */
.logo { position: relative; }
.logo-beta { position: absolute; right: -34px; top: -10px; transform: rotate(14deg); background: linear-gradient(#ff4d4d, #c8102e); color: #fff; border: 3px solid #000; border-radius: 10px; padding: 1px 10px; font: 20px var(--title); letter-spacing: 2px; text-shadow: 0 2px 0 #000; box-shadow: 0 4px 0 #0008; animation: betawobble 2.4s ease-in-out infinite; }
.logo.small .logo-beta { font-size: 14px; right: -30px; top: -8px; padding: 0 7px; }
@keyframes betawobble { 50% { transform: rotate(8deg) scale(1.08); } }
.beta-pill { display: block; font: 900 9px Nunito; font-style: normal; letter-spacing: 2px; color: #fff; background: #c8102e; border-radius: 6px; padding: 0 5px; margin-top: 1px; }
.beta-banner { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 92px); transform: translateX(-50%); z-index: 25; width: min(520px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; background: linear-gradient(#2b1d4a, #160f2b); border: 3px solid #000; border-radius: 16px; padding: 10px 12px; box-shadow: 0 6px 0 #0008, 0 0 24px #c8102e66; }
.beta-banner[hidden] { display: none; }
.beta-banner p { margin: 0; font-size: 13px; line-height: 1.25; flex: 1; }
.beta-tag { flex: none; background: linear-gradient(#ff4d4d, #c8102e); border: 2px solid #000; border-radius: 10px; padding: 4px 8px; font: 20px var(--title); letter-spacing: 2px; text-shadow: 0 2px 0 #000; transform: rotate(-6deg); }
.beta-banner button { flex: none; background: linear-gradient(#7bea4c, #2fa51e); border: 2px solid #000; border-radius: 10px; padding: 8px 12px; font: 16px var(--title); text-shadow: 0 2px 0 #000; box-shadow: 0 3px 0 #0007; }
