/* ============================================================
   POKÉ BATALLA MASIVA — estilos. Misma identidad que Poké Gacha Frenzy: noche violeta, dorado y colores de equipo de Pokémon Tactics.
   ============================================================ */
:root {
  --ink: #090a22; --night: #11123a; --panel-a: rgba(40,34,110,.92); --panel-b: rgba(18,17,62,.94);
  --line: rgba(166,156,255,.24); --line2: rgba(166,156,255,.45);
  --text: #f4f2ff; --muted: #aaa7dc; --gold: #ffcf3a; --gold2: #ff9f1c; --red: #ff4262; --teal: #34e2c0; --blue: #4cc9f0; --violet: #a06bff;
  --t0: #ff4262; --t1: #4cc9f0; --t2: #5bd16a; --t3: #ffcf3a;
  --display: 'Lilita One', 'Arial Black', Impact, system-ui, sans-serif; --ui: 'Nunito', system-ui, sans-serif;
  --panelW: 372px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #05051a; color: var(--text); font-family: var(--ui); font-weight: 700; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; touch-action: none; }
button, input, select { font-family: inherit; color: inherit; }
button { cursor: pointer; border: 0; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hidden { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.22em; }
#view { position: fixed; inset: 0; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
.screen { position: absolute; inset: 0; }

/* ---------- medalla de tipo ---------- */
.tb { display: inline-flex; align-items: center; justify-content: center; width: var(--s, 22px); height: var(--s, 22px); border-radius: 50%; flex: none; color: #fff;
  background: radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--c) 45%, #fff) 0, var(--c) 46%, color-mix(in srgb, var(--c) 68%, #000) 100%);
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.38), 0 1px 3px rgba(0,0,0,.55); }
.tb svg { width: 64%; height: 64%; filter: drop-shadow(0 1px 0 rgba(0,0,0,.4)); }

/* ---------- botones ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; font: 18px/1 var(--display); letter-spacing: .4px; padding: 13px 12px; border-radius: 15px; text-align: center; color: #2a1a00;
  background: linear-gradient(#ffe27a, var(--gold) 55%, var(--gold2)); box-shadow: 0 4px 0 #a86a00, 0 6px 14px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.65); transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #a86a00, 0 3px 8px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.65); }
.btn.off { filter: grayscale(.85) brightness(.5); pointer-events: none; }
.btn.small { width: auto; padding: 10px 14px; font-size: 15px; color: #fff; background: linear-gradient(#4a3fb0, #2f2889); box-shadow: 0 3px 0 #14104a, inset 0 1px 0 rgba(255,255,255,.18); }
.btn.go { padding: 16px 10px; font-size: 22px; color: #032a22; background: linear-gradient(#7bf5d8, var(--teal) 55%, #17b394); box-shadow: 0 5px 0 #0c7d68, 0 8px 18px rgba(52,226,192,.22), inset 0 1px 0 rgba(255,255,255,.6); }
.btn.red { background: linear-gradient(#ff6b86, var(--red)); color: #fff; box-shadow: 0 3px 0 #8f1830, inset 0 1px 0 rgba(255,255,255,.3); }
.btn.ghost { background: rgba(255,255,255,.07); color: #fff; box-shadow: inset 0 0 0 1.5px var(--line2); }
.ibtn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1.5px var(--line2); color: #fff; font: 15px var(--display); transition: .12s; }
.ibtn:hover { background: rgba(255,255,255,.15); }
.ibtn.on { background: rgba(255,207,58,.22); box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold); }
.ibtn .ic { width: 22px; height: 22px; }

/* ---------- menú principal ---------- */
#menu { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; background: radial-gradient(90% 70% at 50% 40%, rgba(9,10,34,.2), rgba(9,10,34,.82)); }
#menu .logo { text-align: center; text-shadow: 0 4px 0 rgba(0,0,0,.55), 0 0 40px rgba(160,107,255,.45); }
#menu .logo small { display: block; font: 800 14px var(--ui); letter-spacing: 6px; color: var(--gold); margin-bottom: 6px; text-transform: uppercase; }
#menu .logo h1 { margin: 0; font: clamp(40px, 8vw, 84px)/.95 var(--display); letter-spacing: 1px; }
#menu .logo h1 span { color: var(--gold); }
#menu .logo p { margin: 10px 0 0; color: var(--muted); font-size: clamp(13px, 2vw, 17px); font-weight: 700; }
.mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(760px, 100%); }
.mcard { position: relative; text-align: left; padding: 16px 16px 14px; border-radius: 18px; background: linear-gradient(var(--panel-a), var(--panel-b)); box-shadow: inset 0 0 0 1.5px var(--line2), 0 8px 22px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 6px; transition: transform .12s, box-shadow .12s; min-height: 108px; }
.mcard:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--gold), 0 12px 26px rgba(0,0,0,.45); }
.mcard .ic { width: 30px; height: 30px; color: var(--gold); }
.mcard b { font: 21px/1 var(--display); letter-spacing: .4px; }
.mcard span { font-size: 13px; color: var(--muted); font-weight: 700; line-height: 1.3; }
.mcard.main { grid-column: span 3; flex-direction: row; align-items: center; gap: 16px; background: linear-gradient(#ffe27a, var(--gold) 55%, var(--gold2)); color: #2a1a00; box-shadow: 0 5px 0 #a86a00, 0 10px 24px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.7); min-height: 0; }
.mcard.main .ic { color: #2a1a00; width: 40px; height: 40px; }
.mcard.main span { color: #5a3a00; font-size: 14px; } .mcard.main > div { display: flex; flex-direction: column; gap: 5px; }
.mcard.main b { font-size: 26px; }
.mfoot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ver { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(170,167,220,.6); }

/* ---------- ventanas modales ---------- */
#modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(5,5,26,.74); backdrop-filter: blur(3px); z-index: 20; animation: fadein .18s; }
@keyframes fadein { from { opacity: 0; } }
.win { width: min(920px, 100%); max-height: 100%; display: flex; flex-direction: column; background: linear-gradient(var(--panel-a), var(--panel-b)); border-radius: 22px; box-shadow: inset 0 0 0 2px var(--line2), 0 20px 60px rgba(0,0,0,.6); overflow: hidden; animation: pop .22s cubic-bezier(.2,1.3,.4,1); }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.win.narrow { width: min(520px, 100%); }
.win > header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1.5px solid var(--line); }
.win > header h2 { margin: 0; flex: 1; font: 26px/1 var(--display); letter-spacing: .5px; }
.win > .body { padding: 14px 16px 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4a3fb0 transparent; }
.cat { font: 16px/1 var(--display); color: var(--gold); letter-spacing: .6px; margin: 14px 0 8px; display: flex; align-items: center; gap: 8px; }
.cat::after { content: ""; flex: 1; height: 1.5px; background: linear-gradient(90deg, var(--line2), transparent); }
.cat:first-child { margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.card { text-align: left; padding: 12px 13px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px var(--line); display: flex; flex-direction: column; gap: 5px; transition: .12s; position: relative; }
.card:hover { background: rgba(255,255,255,.11); box-shadow: inset 0 0 0 2px var(--gold); transform: translateY(-2px); }
.card b { font: 18px/1.05 var(--display); letter-spacing: .3px; }
.card span { font-size: 12.5px; color: var(--muted); line-height: 1.3; font-weight: 700; }
.card .meta { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.card.lock { opacity: .45; pointer-events: none; }
.stars { position: absolute; top: 10px; right: 10px; display: flex; gap: 1px; color: rgba(255,255,255,.18); }
.stars .ic { width: 16px; height: 16px; } .stars .on { color: var(--gold); filter: drop-shadow(0 0 4px rgba(255,207,58,.6)); }
.tag { display: inline-flex; align-items: center; gap: 4px; font: 12px/1 var(--display); letter-spacing: .3px; padding: 4px 8px; border-radius: 10px; background: rgba(0,0,0,.28); color: #fff; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border: 0; }
.row label { flex: 1; font-size: 15px; }
.row small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.row input[type=range] { width: 170px; accent-color: var(--gold); }
.sw { position: relative; width: 50px; height: 28px; border-radius: 16px; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1.5px var(--line2); flex: none; transition: .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.sw.on { background: var(--teal); } .sw.on::after { left: 25px; }
.help p { margin: 0 0 10px; line-height: 1.5; font-size: 15px; color: #dcd9ff; font-weight: 600; } .help b { color: var(--gold); }

/* ---------- preparación del ejército ---------- */
#setup { pointer-events: none; }
#setup > * { pointer-events: auto; }
#panel { position: absolute; left: 0; top: 0; bottom: 0; width: var(--panelW); display: flex; flex-direction: column; background: linear-gradient(rgba(23,21,76,.97), rgba(12,11,44,.98)); box-shadow: 4px 0 30px rgba(0,0,0,.5), inset -1.5px 0 0 var(--line2); }
#panel .ph { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }
#panel .ph h3 { flex: 1; margin: 0; font: 19px/1.05 var(--display); letter-spacing: .4px; min-width: 0; }
#panel .ph h3 small { display: block; font: 700 11.5px var(--ui); color: var(--muted); letter-spacing: 0; margin-top: 3px; }
.tabs { display: flex; gap: 6px; padding: 2px 12px 8px; }
.tab { flex: 1; min-width: 0; padding: 7px 4px 6px; border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px var(--line); text-align: center; font: 12px/1.15 var(--display); letter-spacing: .3px; color: #fff; position: relative; overflow: hidden; }
.tab i { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin: 0 auto 3px; box-shadow: 0 0 8px var(--c); }
.tab b { display: block; font: 17px/1 var(--display); }
.tab small { display: block; font: 700 10.5px var(--ui); color: var(--muted); margin-top: 1px; white-space: nowrap; }
.tab.on { background: color-mix(in srgb, var(--c) 22%, transparent); box-shadow: inset 0 0 0 2.5px var(--c); }
.tab.lockd::after { content: "🔒"; display: none; }
.tab.lockd { opacity: .75; }
.tab.over small { color: #ff8da3; }
.tools { display: flex; gap: 6px; padding: 0 12px 8px; align-items: center; }
.tools .ibtn { width: 38px; height: 38px; }
.tools .sp { flex: 1; }
.seg { display: flex; border-radius: 11px; overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--line2); background: rgba(255,255,255,.05); }
.seg button { flex: 1; background: transparent; padding: 7px 8px; font: 13px/1 var(--display); color: var(--muted); white-space: nowrap; }
.seg button.on { background: rgba(255,207,58,.2); color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold); border-radius: 10px; }
.sub { display: flex; gap: 8px; padding: 0 12px 8px; align-items: center; }
.sub .lab { font: 12px var(--display); color: var(--muted); letter-spacing: .4px; text-transform: uppercase; width: 52px; flex: none; }
.sub .seg { flex: 1; }
.search { display: flex; gap: 6px; padding: 0 12px 6px; }
.search input { flex: 1; min-width: 0; background: rgba(0,0,0,.28); border: 0; border-radius: 11px; padding: 9px 12px; font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--line); user-select: text; -webkit-user-select: text; }
.types { display: flex; gap: 4px; padding: 0 12px 6px; overflow-x: auto; scrollbar-width: none; flex: none; }
.types button { background: transparent; border-radius: 50%; padding: 2px; opacity: .55; flex: none; line-height: 0; }
.types button.on { opacity: 1; box-shadow: 0 0 0 2.5px var(--gold); }
.types .all { font: 11px var(--display); border-radius: 12px; padding: 5px 9px; color: #fff; line-height: 1; background: rgba(255,255,255,.1); }
#grid { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 8px 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-content: start; scrollbar-width: thin; scrollbar-color: #4a3fb0 transparent; min-height: 80px; }
.mon { position: relative; height: 92px; min-width: 0; border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px var(--line); padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; overflow: hidden; transition: .1s; }
.mon:hover { background: rgba(255,255,255,.13); }
.mon.sel { background: color-mix(in srgb, var(--tc) 24%, transparent); box-shadow: inset 0 0 0 2.5px var(--gold); }
.mon .sp { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); width: 72px; height: 72px; image-rendering: pixelated; background-image: url(assets/sprites.png); background-repeat: no-repeat; }
.mon .nm { position: relative; z-index: 1; width: 100%; font: 10px/1 var(--display); letter-spacing: .2px; text-align: center; padding: 3px 1px 3px; background: linear-gradient(transparent, rgba(0,0,0,.55) 40%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon .pr { position: absolute; top: 3px; right: 4px; font: 10px/1 var(--display); color: var(--gold); text-shadow: 0 1px 0 #000; z-index: 1; }
.mon .tb { position: absolute; top: 3px; left: 3px; --s: 14px; z-index: 1; }
.mon .tb + .tb { top: 18px; }
.mon .rar { position: absolute; bottom: 14px; left: 0; right: 0; height: 2px; background: var(--rc); opacity: .8; }
.pfoot { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; border-top: 1.5px solid var(--line); background: rgba(0,0,0,.16); }
.pfoot .info { font-size: 12px; color: var(--muted); font-weight: 700; min-height: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pfoot .info b { color: #fff; font: 14px var(--display); }
.opts { padding: 4px 12px 10px; max-height: 40vh; overflow-y: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 10px; border-radius: 11px; font: 13px/1 var(--display); background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); }
.chip.on { color: var(--gold); background: rgba(255,207,58,.16); box-shadow: inset 0 0 0 2px var(--gold); }
.chip.dis { opacity: .35; pointer-events: none; }
.note { color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.35; }
#hint { position: absolute; left: calc(var(--panelW) + 14px); right: 14px; top: 12px; display: flex; justify-content: center; pointer-events: none; }
#hint div { background: rgba(10,10,40,.8); padding: 8px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line2); font-size: 13px; color: #dcd9ff; font-weight: 700; text-align: center; max-width: 560px; }
#hint b { color: var(--gold); }
#zoomb { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- HUD de batalla ---------- */
#hud { pointer-events: none; }
#hud > * { pointer-events: auto; }
#hbar { position: absolute; left: 0; right: 0; top: 0; display: flex; gap: 8px; align-items: stretch; padding: 8px 10px; background: linear-gradient(rgba(5,5,26,.85), rgba(5,5,26,0)); pointer-events: none; }
#hbar > * { pointer-events: auto; }
#teams { flex: 1; display: flex; gap: 8px; min-width: 0; }
.tc { flex: 1; min-width: 0; max-width: 360px; padding: 6px 10px 7px; border-radius: 14px; background: rgba(10,10,40,.78); box-shadow: inset 0 0 0 2px var(--c); position: relative; overflow: hidden; transition: opacity .3s; }
.tc.dead { opacity: .4; filter: grayscale(.8); }
.tc .l1 { display: flex; align-items: baseline; gap: 8px; }
.tc .n { font: 24px/1 var(--display); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.tc .tn { font: 12px var(--display); letter-spacing: .5px; color: var(--c); text-transform: uppercase; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc .k { font: 700 11px var(--ui); color: var(--muted); white-space: nowrap; }
.tc .bar { height: 7px; border-radius: 5px; background: rgba(255,255,255,.12); margin-top: 5px; overflow: hidden; }
.tc .bar i { display: block; height: 100%; width: 100%; background: linear-gradient(var(--cl), var(--c)); border-radius: 5px; transition: width .2s; }
#hctl { display: flex; gap: 6px; align-items: center; flex: none; }
#clock { font: 20px var(--display); min-width: 62px; text-align: center; background: rgba(10,10,40,.78); padding: 9px 8px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line2); }
#hmsg { position: absolute; left: 0; right: 0; top: 76px; text-align: center; font: 30px var(--display); letter-spacing: 1px; text-shadow: 0 3px 0 rgba(0,0,0,.6); pointer-events: none; animation: fadeout 2.2s forwards; }
@keyframes fadeout { 0%, 60% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.12); } }
#cd { position: absolute; inset: 0; display: grid; place-items: center; font: 140px var(--display); color: #fff; text-shadow: 0 6px 0 rgba(0,0,0,.5), 0 0 60px var(--gold); pointer-events: none; }
#cd span { animation: cdp .6s ease-out; }
@keyframes cdp { from { transform: scale(2.3); opacity: 0; } }

/* ---------- resultado ---------- */
#result { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; background: radial-gradient(70% 60% at 50% 50%, rgba(5,5,26,.2), rgba(5,5,26,.78)); animation: fadein .4s; }
.rbox { width: min(640px, 100%); max-height: 100%; overflow-y: auto; background: linear-gradient(var(--panel-a), var(--panel-b)); border-radius: 24px; padding: 20px 18px 18px; text-align: center; box-shadow: inset 0 0 0 2px var(--c, var(--line2)), 0 0 60px color-mix(in srgb, var(--c, #000) 40%, transparent), 0 24px 60px rgba(0,0,0,.6); animation: pop .35s cubic-bezier(.2,1.3,.4,1); }
.rbox h2 { margin: 0; font: clamp(30px, 6vw, 48px)/1 var(--display); letter-spacing: 1px; color: var(--c, #fff); text-shadow: 0 3px 0 rgba(0,0,0,.55); }
.rbox .sub2 { color: var(--muted); font-size: 14px; margin: 6px 0 12px; font-weight: 700; }
.rbox .stars { position: static; justify-content: center; margin: 4px 0 8px; gap: 4px; } .rbox .stars .ic { width: 34px; height: 34px; }
.rt { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 14px; }
.rt th { font: 11.5px var(--display); color: var(--muted); letter-spacing: .5px; text-transform: uppercase; padding: 4px 6px; text-align: right; }
.rt td { padding: 7px 6px; text-align: right; border-top: 1px solid var(--line); font-weight: 800; }
.rt th:first-child, .rt td:first-child { text-align: left; }
.rt td:first-child { font: 15px var(--display); color: var(--c); }
.rt tr.w td { background: rgba(255,255,255,.06); }
.mvp { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px var(--line); margin-bottom: 14px; text-align: left; }
.mvp .sp2 { width: 64px; height: 64px; image-rendering: pixelated; background-image: url(assets/sprites.png); background-repeat: no-repeat; flex: none; }
.mvp b { font: 18px var(--display); color: var(--gold); display: block; } .mvp span { font-size: 13px; color: var(--muted); }
.rbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rbtns .btn.wide { grid-column: span 2; }

/* ---------- aviso ---------- */
#toast { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(10,10,40,.92); padding: 10px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--gold); font-size: 14px; z-index: 30; pointer-events: none; animation: fadeout 2.6s forwards; max-width: 90vw; text-align: center; }

.pbody { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- espacio publicitario discreto (placeholder, no monetiza por sí solo) ---------- */
.ad-slot { width: min(520px, 100%); align-self: center; flex: none; border: 1px solid rgba(166,156,255,.28); border-radius: 12px; overflow: hidden; background: rgba(18,17,62,.82); box-shadow: 0 4px 14px rgba(0,0,0,.18); user-select: text; -webkit-user-select: text; touch-action: auto; }
.ad-slot[hidden] { display: none !important; }
.ad-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px 2px 10px; color: rgba(170,167,220,.8); font: 800 9px/1.3 var(--ui); letter-spacing: 1px; }
.ad-slot-head button { width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,.08); color: var(--text); font: 20px/1 var(--ui); display: grid; place-items: center; }
.ad-slot-head button:hover { background: rgba(255,255,255,.18); }
.ad-slot-body { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 5px 12px 10px; text-align: center; flex-wrap: wrap; }
.ad-slot-body b { color: var(--gold); font: 15px/1.1 var(--display); }
.ad-slot-body span { color: var(--muted); font: 11px/1.35 var(--ui); }
@media (max-width: 820px) { .ad-slot { width: min(460px, 100%); } .ad-slot-body { padding: 4px 8px 8px; } .ad-slot-body span { font-size: 10px; } }

/* ---------- móvil ---------- */
@media (max-width: 820px) {
  :root { --panelW: 0px; }
  #panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: var(--sheetH, 46vh); border-radius: 20px 20px 0 0; box-shadow: 0 -4px 30px rgba(0,0,0,.5), inset 0 1.5px 0 var(--line2); }
  #panel.min { height: 112px; } #panel.min #grid, #panel.min .types, #panel.min .search, #panel.min .opts, #panel.min .pfoot .info { display: none; }
  #grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .pbody { overflow-y: auto; } #grid { overflow: visible; flex: none; }
  #panel { --sheetH: 58vh; } .tab small { font-size: 9.5px; } .sub { padding-bottom: 6px; }
  #hint { left: 10px; right: 10px; } #hint div { font-size: 12px; padding: 6px 10px; }
  #zoomb { bottom: auto; top: 64px; flex-direction: row; right: 10px; } #zoomb .ibtn { width: 34px; height: 34px; }
  .mgrid { grid-template-columns: 1fr 1fr; } .mcard.main { grid-column: span 2; } .mcard { min-height: 88px; padding: 12px; } .mcard b { font-size: 18px; } .mcard span { font-size: 12px; }
  #menu { gap: 12px; padding: 12px; overflow-y: auto; justify-content: flex-start; padding-top: 6vh; }
  #hbar { padding: 6px; gap: 5px; flex-wrap: wrap; } .tc { padding: 4px 7px 5px; } .tc .n { font-size: 19px; } .tc .k { display: none; } #teams { gap: 5px; flex-basis: 100%; order: 2; }
  #hctl { margin-left: auto; } #clock { font-size: 16px; padding: 7px 6px; min-width: 52px; }
  #hmsg { top: 100px; font-size: 22px; } #cd { font-size: 90px; }
  .row input[type=range] { width: 110px; }
}
