:root {
  --bg: #0a1430;
  --panel: #142356;
  --panel2: #1b2e6c;
  --line: #2a3f8a;
  --ink: #f2f4ff;
  --dim: #9aa6d8;
  --yellow: #ffd23f;
  --red: #ff5050;
  --green: #5fe08a;
  --blue: #4aa8ff;
  --f: 'Pixelify Sans', monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--f); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
a { color: var(--yellow); }
.px, canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
.hidden { display: none !important; }
#bg { position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 110%, #24306a 0%, transparent 60%), radial-gradient(1px 1px at 20% 30%, #fff6 50%, transparent 51%), radial-gradient(1px 1px at 70% 20%, #fff5 50%, transparent 51%), radial-gradient(1px 1px at 40% 80%, #fff4 50%, transparent 51%), linear-gradient(#071027, #0a1430); background-size: 100% 100%, 260px 260px, 310px 310px, 280px 280px, 100% 100%; }
.screen { position: fixed; inset: 0; display: none; flex-direction: column; }
.screen.active { display: flex; }

.btn { font-size: 17px; font-weight: 700; padding: 9px 16px; background: var(--panel2); border: 0; border-radius: 6px; box-shadow: 0 3px 0 #050a1c, inset 0 0 0 2px var(--line); }
.btn:hover { background: #24398a; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #050a1c, inset 0 0 0 2px var(--line); }
.btn:disabled { opacity: .45; }
.btn.big { font-size: 22px; padding: 14px 30px; }
.btn.primary { background: #f0a020; color: #2a1600; box-shadow: 0 3px 0 #8a5000, inset 0 0 0 2px #ffd060; }
.btn.small { font-size: 14px; padding: 6px 10px; }
.btn.danger { background: #8a2232; }

.title-wrap { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 20px; }
.logo { margin: 0; font-size: clamp(40px, 9vw, 84px); font-weight: 700; color: #fff; letter-spacing: 1px; text-shadow: 0 4px 0 #1a2a6a, 0 8px 0 #050a1c; line-height: 1; }
.logo span { color: var(--yellow); }
.logo.small { font-size: clamp(28px, 4vw, 44px); }
.tag { margin: 0; font-size: 20px; color: var(--dim); }
.parade { display: flex; gap: 8px; align-items: flex-end; justify-content: center; flex-wrap: wrap; max-width: 760px; min-height: 80px; }
.parade img { width: 64px; height: 64px; border-radius: 8px; box-shadow: 0 0 0 2px var(--line); animation: hop 1.2s ease-in-out infinite; }
.parade img:nth-child(2n) { animation-delay: .3s; } .parade img:nth-child(3n) { animation-delay: .6s; }
@keyframes hop { 50% { transform: translateY(-6px); } }
.fine { font-size: 13px; color: #6c78b0; text-align: center; margin: 0; padding: 6px; }

.panel { background: var(--panel); border-radius: 10px; box-shadow: 0 0 0 3px var(--line), 0 8px 0 #050a1c; padding: 18px; }
.center-panel { margin: auto; width: min(760px, 94vw); max-height: 94vh; overflow: auto; text-align: center; }
.center-panel h2 { margin: 0 0 6px; color: var(--yellow); font-size: 28px; }
.sub { color: var(--dim); font-size: 17px; margin: 0 0 14px; }
.starter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.starter { background: #0b1638; border: 0; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--line); padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.starter:hover { box-shadow: inset 0 0 0 3px var(--yellow); }
.starter img { width: 80px; height: 80px; border-radius: 8px; }
.starter b { font-size: 18px; }
.bar { position: relative; height: 8px; background: #200a14; border-radius: 4px; overflow: hidden; }
.bar.hp { height: 11px; }
.bar i { display: block; height: 100%; background: var(--green); transition: width .1s; }
.bar.xp { height: 4px; background: #0b1638; }
.bar.xp i { background: var(--blue); }
.bar span { position: absolute; right: 4px; top: -2px; font-size: 11px; text-shadow: 0 1px 0 #000; }
.banner { position: absolute; top: 24%; left: 50%; transform: translateX(-50%); text-align: center; background: #0a1430e8; padding: 8px 18px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--bc, var(--yellow)); max-width: 86%; animation: bin .25s ease-out; }
.banner b { display: block; font-size: 20px; color: var(--bc, var(--yellow)); }
.banner small { display: block; font-size: 15px; color: var(--ink); }
@keyframes bin { from { opacity: 0; transform: translate(-50%, -10px); } }
.modal { position: fixed; inset: 0; background: #000a; display: flex; align-items: center; justify-content: center; z-index: 30; padding: 12px; }
.modal-box { background: var(--panel); border-radius: 10px; box-shadow: 0 0 0 3px var(--line), 0 8px 0 #050a1c; padding: 18px; max-width: min(860px, 96vw); max-height: 94vh; overflow: auto; text-align: center; }
.modal-box h2 { margin: 0 0 6px; color: var(--yellow); font-size: 28px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #0a1430f0; padding: 10px 16px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--yellow); font-size: 17px; z-index: 40; }

/* ================= PokéIdle ================= */
img.pix { image-rendering: pixelated; vertical-align: middle; }
.ico { display: inline-flex; vertical-align: middle; }
.top { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #0a1430e8; box-shadow: 0 2px 0 #050a1c, inset 0 -2px 0 var(--line); z-index: 2; }
.logo.tiny { font-size: 22px; text-shadow: 0 2px 0 #1a2a6a; margin-right: auto; }
.cur { display: flex; align-items: center; gap: 5px; background: #050c24; padding: 3px 10px 3px 4px; border-radius: 20px; box-shadow: inset 0 0 0 2px var(--line); min-width: 92px; }
.cur b { font-size: 18px; }
.cur small { font-size: 12px; color: var(--dim); }
.cur.coins b { color: var(--yellow); }
.cur.gems b { color: #9fe8ff; }
.cur.pulse { animation: pulse .25s; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.icobtn { background: var(--panel2); border: 0; border-radius: 6px; padding: 4px; box-shadow: inset 0 0 0 2px var(--line); display: flex; }

.layout { flex: 1; display: grid; grid-template-columns: 1fr minmax(360px, 440px); gap: 10px; padding: 10px; min-height: 0; }
.arena-wrap { display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; }
.arena { position: relative; width: 100%; max-width: calc((100vh - 90px) * 5 / 3); aspect-ratio: 5 / 3; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 3px var(--line), 0 8px 0 #050a1c; cursor: pointer; touch-action: manipulation; }
.arena canvas { width: 100%; height: 100%; display: block; }
.a-top { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; }
.st-mid { background: #0a1430d8; padding: 3px 12px 5px; border-radius: 8px; text-align: center; box-shadow: inset 0 0 0 2px var(--line); min-width: 170px; }
.st-mid b { display: block; font-size: 15px; color: var(--yellow); }
.st-mid span { font-size: 13px; color: var(--dim); }
.st-arrow { background: #0a1430d8; border: 0; border-radius: 6px; width: 30px; height: 30px; font-size: 22px; line-height: 1; box-shadow: inset 0 0 0 2px var(--line); }
.st-arrow:disabled { opacity: .3; }
.pips { display: flex; gap: 2px; justify-content: center; margin-top: 3px; }
.pips i { width: 9px; height: 5px; background: #24305a; border-radius: 2px; }
.pips i.on { background: var(--green); }
.pips.boss i { background: #ff5050; width: 20px; }
.enemy-box { position: absolute; right: 3%; top: 19%; width: 34%; text-align: center; pointer-events: none; }
.enemy-box b { font-size: clamp(11px, 1.6vw, 15px); text-shadow: 0 1px 0 #000, 0 0 3px #000; display: block; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enemy-box .bar.hp { height: 12px; box-shadow: 0 0 0 2px #000; }
.enemy-box .bar.hp i { background: linear-gradient(#ff8080, #d03040); transition: width .08s; }
.enemy-box .bar.hp span { right: 50%; transform: translateX(50%); top: -1px; font-size: 11px; }
.enemy-box .bar.timer { height: 5px; margin-top: 3px; box-shadow: 0 0 0 1px #000; }
.enemy-box .bar.timer i { background: var(--yellow); transition: none; }
.boss-btn { position: absolute; right: 3%; bottom: 5%; font-size: 15px; animation: hop 1s infinite; }
.dps { position: absolute; left: 6px; bottom: 6px; background: #0a1430d0; padding: 2px 8px; border-radius: 6px; font-size: 13px; color: var(--dim); pointer-events: none; }
.dps b { color: #fff; }
.tap-hint { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); font-size: 16px; color: #fff; text-shadow: 0 2px 0 #000; animation: hop 1s infinite; pointer-events: none; }
.side { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-radius: 10px; box-shadow: 0 0 0 3px var(--line), 0 8px 0 #050a1c; overflow: hidden; }
.tabs { display: grid; grid-template-columns: repeat(7, 1fr); background: #0b1638; }
.tabs button { background: none; border: 0; padding: 6px 2px 5px; font-size: 12px; color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 1px; position: relative; box-shadow: inset 0 -2px 0 var(--line); }
.tabs button.on { color: var(--yellow); background: var(--panel); box-shadow: inset 0 3px 0 var(--yellow); }
.tabs .dot { position: absolute; top: 4px; right: 18%; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #0b1638; }
.tab-body { flex: 1; overflow-y: auto; padding: 10px; }
.tab-body h3 { margin: 4px 0 8px; font-size: 18px; color: var(--yellow); }
.hint { font-size: 13px; color: var(--dim); margin: 2px 0 8px; }
.seg { display: flex; gap: 4px; margin-bottom: 8px; }
.seg button { flex: 1; background: #0b1638; border: 0; border-radius: 5px; padding: 4px; font-size: 14px; box-shadow: inset 0 0 0 2px var(--line); }
.seg button.on { background: var(--yellow); color: #2a1600; box-shadow: none; }

.card { display: flex; align-items: center; gap: 8px; background: #0b1638; border-radius: 8px; padding: 6px; margin-bottom: 6px; box-shadow: inset 0 0 0 2px var(--rc, var(--line)); }
.card .por { width: 48px; height: 48px; border-radius: 6px; flex: none; background: #050c24; image-rendering: pixelated; cursor: pointer; }
.card .info { flex: 1; min-width: 0; }
.card .info b { font-size: 16px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .info small { font-size: 12px; color: var(--dim); display: block; }
.card .info small.evo { color: #7ff0a0; }
.card .buy { flex: none; min-width: 92px; font-size: 14px; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.card .buy small { font-size: 12px; color: #2a1600; display: flex; align-items: center; gap: 2px; }
.card .buy:disabled { filter: grayscale(.8); opacity: .5; }
.card.locked { justify-content: space-between; opacity: .9; }
.stars { color: var(--yellow); font-size: 12px; letter-spacing: -1px; }
.stars i { color: #3a4870; font-style: normal; }
.shiny-tag { color: #fff3a8; font-size: 12px; }
.types { display: inline-flex; gap: 3px; }
.type { font-size: 11px; padding: 0 5px; border-radius: 3px; color: #fff; text-shadow: 0 1px 0 #0006; }

.ball-card { background: #0b1638; border-radius: 10px; padding: 10px; margin-bottom: 8px; box-shadow: inset 0 0 0 2px var(--line); display: grid; grid-template-columns: 52px 1fr; gap: 4px 10px; align-items: center; }
.ball-card .bi { grid-row: span 2; }
.ball-card b { font-size: 18px; }
.ball-card p { margin: 0; font-size: 12px; color: var(--dim); }
.ball-card .rates { grid-column: span 2; font-size: 11px; color: var(--dim); display: flex; gap: 6px; flex-wrap: wrap; }
.ball-card .btns { grid-column: span 2; display: flex; gap: 6px; }
.ball-card .btns .btn { flex: 1; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.feat { position: relative; background: linear-gradient(135deg, #3a1a6a, #142356 60%); border-radius: 10px; padding: 10px; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; box-shadow: inset 0 0 0 2px #c47bff; overflow: hidden; }
.feat img { width: 72px; height: 72px; border-radius: 8px; image-rendering: pixelated; background: #0006; }
.feat b { font-size: 18px; color: #fff; display: block; }
.feat small { color: #e0c8ff; font-size: 13px; }
.feat .tagx { position: absolute; top: 6px; right: 8px; font-size: 11px; background: #c47bff; color: #1a0630; padding: 1px 6px; border-radius: 4px; }
.pity { font-size: 13px; color: var(--dim); text-align: center; margin: 4px 0 10px; }
.pity .bar { margin-top: 3px; height: 6px; }
.pity .bar i { background: linear-gradient(90deg, #c47bff, #ffd23f); }

.dexhead { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14px; color: var(--dim); }
.dexgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 5px; }
.dexgrid button { position: relative; background: #0b1638; border: 0; border-radius: 6px; padding: 3px; box-shadow: inset 0 0 0 2px var(--rc, #1d2a5a); display: flex; flex-direction: column; align-items: center; }
.dexgrid img { width: 44px; height: 44px; image-rendering: pixelated; border-radius: 4px; }
.dexgrid .q { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #2a3f8a; }
.dexgrid .n { font-size: 10px; color: var(--dim); }
.dexgrid .inteam::after { content: ''; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.dexgrid .lv { position: absolute; left: 3px; top: 2px; font-size: 10px; color: #fff; text-shadow: 0 1px 0 #000; }

.quest { background: #0b1638; border-radius: 8px; padding: 8px; margin-bottom: 6px; box-shadow: inset 0 0 0 2px var(--line); display: flex; align-items: center; gap: 8px; }
.quest .qi { flex: 1; }
.quest .qi b { font-size: 14px; display: block; }
.quest .qi small { font-size: 12px; color: var(--dim); }
.quest .bar { margin-top: 4px; height: 6px; }
.quest .btn { font-size: 13px; padding: 6px 10px; display: flex; align-items: center; gap: 3px; }
.quest.done { opacity: .5; }
.quest.ready { box-shadow: inset 0 0 0 2px var(--yellow); }

.league { text-align: center; }
.league .big { font-size: 40px; color: var(--yellow); }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; text-align: left; margin-top: 12px; color: var(--dim); }
.statgrid b { color: #fff; float: right; }

.monbig { display: flex; gap: 14px; align-items: center; text-align: left; }
.monbig canvas { width: 144px; height: 144px; background: radial-gradient(#24306a, #0b1638); border-radius: 10px; flex: none; }
.monbig .stats { font-size: 13px; color: var(--dim); }
.monbig .stats b { color: #fff; }
.slotpick { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.slotpick button { width: 54px; height: 54px; padding: 2px; border: 0; border-radius: 6px; background: #0b1638; box-shadow: inset 0 0 0 2px var(--line); }
.slotpick button img { width: 44px; height: 44px; image-rendering: pixelated; }
.slotpick button.cur { box-shadow: inset 0 0 0 3px var(--green); }
.row { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.setrow { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 8px 0; font-size: 16px; }

/* ---- animación del gacha ---- */
.gacha-fx { position: fixed; inset: 0; z-index: 50; background: radial-gradient(#1a2a6aee, #050a1cf8); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 14px; }
.gacha-fx .ballbig { animation: shake .45s ease-in-out infinite; }
.gacha-fx .ballbig img { width: 120px; height: 120px; }
.gacha-fx .flash { position: fixed; inset: 0; background: var(--fc, #fff); animation: flash .6s forwards; pointer-events: none; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg) translateY(-4px); } 75% { transform: rotate(14deg) translateY(-4px); } }
.pulls { display: grid; grid-template-columns: repeat(5, minmax(0, 120px)); gap: 8px; max-width: 660px; width: 100%; justify-content: center; }
.pulls.one { grid-template-columns: minmax(0, 220px); }
.pull { background: #0b1638; border-radius: 10px; padding: 8px 4px; text-align: center; box-shadow: inset 0 0 0 3px var(--rc), 0 0 18px var(--rg, transparent); animation: pin .35s backwards; position: relative; }
.pull img { width: 64px; height: 64px; image-rendering: pixelated; border-radius: 6px; }
.pulls.one .pull img { width: 128px; height: 128px; }
.pull b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pull small { font-size: 11px; color: var(--rc); display: block; }
.pull .new { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); background: var(--red); font-size: 11px; padding: 0 6px; border-radius: 4px; }
.pull .dup { font-size: 11px; color: var(--dim); }
@keyframes pin { from { opacity: 0; transform: scale(.4) rotate(-8deg); } }
.gacha-fx .tapclose { color: var(--dim); font-size: 15px; }

.banner { position: fixed; top: 64px; z-index: 20; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 6px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; padding: 6px; gap: 6px; }
  .arena { max-width: none; }
  .logo.tiny { font-size: 18px; }
  .cur { min-width: 0; }
  .cur b { font-size: 16px; }
  .cur small { display: none; }
  .pulls { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .pull img { width: 48px; height: 48px; }
  .pull b { font-size: 11px; }
  .st-mid { min-width: 140px; padding: 2px 8px 4px; }
  .st-mid b { font-size: 13px; }
  .st-mid span { font-size: 11px; }
  .monbig { flex-direction: column; text-align: center; }
}

/* ---- v2: regiones, habilidades, mapa, polvo ---- */
.cur.dust b { color: #e0c8ff; }
.cur { min-width: 0; }
.mapbtn { position: absolute; left: 6px; top: 6px; background: #0a1430d8; border: 0; border-radius: 6px; padding: 3px; box-shadow: inset 0 0 0 2px var(--line); display: flex; z-index: 2; }
.skills { position: absolute; left: 6px; bottom: 34px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.skill { position: relative; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; background: #0a1430e0; box-shadow: inset 0 0 0 2px var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.skill i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: #000a; }
.skill small { position: absolute; right: 2px; bottom: 0; font-size: 11px; color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.skill:not(:disabled) { box-shadow: inset 0 0 0 2px var(--yellow); animation: pulse 1.2s infinite; }
.skill.on { box-shadow: inset 0 0 0 2px #ff8040, 0 0 10px #ff8040; animation: none; }
.skill:disabled { color: inherit; }
.feat.free { background: linear-gradient(135deg, #1a5a3a, #142356 70%); box-shadow: inset 0 0 0 2px #5fe08a; }
.feat.free .btn { margin-left: auto; }
.ball-card.locked { opacity: .55; grid-template-columns: 52px 1fr; }
.maplist h3 { text-align: left; }
.maprow { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: center; width: 100%; text-align: left; background: #0b1638; border: 0; border-radius: 8px; padding: 6px 10px; margin-bottom: 4px; box-shadow: inset 0 0 0 2px var(--line); }
.maprow b { font-size: 15px; }
.maprow small { grid-column: 1; color: var(--dim); font-size: 12px; }
.maprow .mb { grid-row: span 2; grid-column: 2; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--yellow); }
.maprow .mb img { width: 36px; height: 36px; border-radius: 6px; background: #050c24; }
.maprow.cur { box-shadow: inset 0 0 0 2px var(--green); }
.maprow:disabled { opacity: .4; }
.maprow:not(:disabled):hover { box-shadow: inset 0 0 0 2px var(--yellow); }
.modal-box .maplist { max-height: 62vh; overflow-y: auto; text-align: left; }
@media (max-width: 860px) { .cur.dust { display: none; } .skill { width: 34px; height: 34px; } .skills { bottom: 30px; } }

.sel { width: 100%; background: #0b1638; color: var(--ink); border: 0; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 15px; box-shadow: inset 0 0 0 2px var(--line); }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 28%; }
.seg button:disabled { opacity: .35; }
.ball-row { display: flex; align-items: center; gap: 8px; background: #0b1638; border-radius: 8px; padding: 5px 8px; margin-bottom: 4px; box-shadow: inset 0 0 0 2px var(--line); }
.ball-row b { flex: 1; font-size: 15px; }
.ball-row small { color: var(--dim); font-size: 12px; }
.ball-row.locked { opacity: .55; }
.ball-row .btn { display: flex; align-items: center; gap: 3px; }

/* ================= v3 ================= */
/* --- barras de desplazamiento propias --- */
* { scrollbar-width: thin; scrollbar-color: #5a7aff #0b1638; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #0b1638; border-radius: 6px; box-shadow: inset 0 0 0 2px #1d2a5a; }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #7a96ff, #3a5ad0); border-radius: 6px; box-shadow: inset 0 0 0 2px #0b1638, inset 0 2px 0 #b8c8ff55; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #98b0ff, #5a7aff); }
::-webkit-scrollbar-corner { background: #0b1638; }

/* --- desplegables propios --- */
.dd { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: #0b1638; color: var(--ink); border: 0; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 15px; font-weight: 700; box-shadow: inset 0 0 0 2px var(--line), 0 2px 0 #050a1c; text-align: left; margin-bottom: 8px; }
.dd:hover { box-shadow: inset 0 0 0 2px var(--yellow), 0 2px 0 #050a1c; }
.dd i { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid var(--yellow); flex: none; }
.dd-pop { position: fixed; z-index: 70; max-height: 50vh; overflow-y: auto; background: #0e1b46; border-radius: 8px; padding: 4px; box-shadow: 0 0 0 3px var(--line), 0 10px 0 #050a1c88; animation: ddin .12s ease-out; }
@keyframes ddin { from { opacity: 0; transform: translateY(-6px); } }
.dd-pop button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; font-size: 15px; padding: 7px 12px; border-radius: 5px; }
.dd-pop button:hover { background: #1d2f70; }
.dd-pop button.on { background: var(--yellow); color: #2a1600; font-weight: 700; }
.pickbar .dd { margin: 0; width: auto; min-width: 150px; }
.search { flex: 1; min-width: 0; background: #0b1638; color: var(--ink); border: 0; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 15px; box-shadow: inset 0 0 0 2px var(--line); outline: none; user-select: text; -webkit-user-select: text; }
.search:focus { box-shadow: inset 0 0 0 2px var(--yellow); }
.search::placeholder { color: #5a68a8; }
.area { width: 100%; min-height: 110px; resize: none; font-size: 12px; word-break: break-all; margin: 6px 0; }

/* --- equipo --- */
.card .acts { display: flex; flex-direction: column; gap: 4px; flex: none; }
.card .acts .buy { min-width: 96px; }
.card.empty { box-shadow: inset 0 0 0 2px var(--line); border: 0; background: repeating-linear-gradient(45deg, #0b1638, #0b1638 8px, #0d1a42 8px, #0d1a42 16px); }
.card .info small.mv { display: flex; align-items: center; gap: 5px; color: var(--ink); }
.card .info small.mv i { width: 9px; height: 9px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px #0008; }
.mvlist { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin: 10px 0 4px; }
.mvchip { display: inline-flex; flex-direction: column; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 13px; background: #0b1638; color: #5a68a8; box-shadow: inset 0 0 0 2px #1d2a5a; }
.mvchip small { font-size: 10px; }
.mvchip.on { color: #fff; background: color-mix(in srgb, var(--tc) 35%, #0b1638); box-shadow: inset 0 0 0 2px var(--tc); }

.modal-box.wide { width: min(760px, 96vw); }
.pickbar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pickwrap { max-height: 50vh; overflow-y: auto; padding: 2px 4px 2px 2px; margin-bottom: 6px; }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.pk { position: relative; background: #0b1638; border: 0; border-radius: 8px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px; box-shadow: inset 0 0 0 2px var(--rc, var(--line)); }
.pk:hover { background: #14245a; transform: translateY(-2px); }
.pk.cur { box-shadow: inset 0 0 0 3px var(--green); }
.pk img { width: 56px; height: 56px; image-rendering: pixelated; border-radius: 6px; background: #050c24; }
.pk b { font-size: 13px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk small { font-size: 11px; color: var(--dim); }
.pk .slot { position: absolute; top: 3px; right: 3px; background: var(--green); color: #052a10; font-size: 11px; font-weight: 700; border-radius: 50%; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; }

/* --- tickets --- */
.tkgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.tkbox { background: #0b1638; border-radius: 8px; padding: 6px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; box-shadow: inset 0 0 0 2px var(--tc); }
.tkbox b { font-size: 20px; color: var(--tc); line-height: 1; }
.tkbox small { font-size: 11px; color: var(--dim); text-align: center; }
.tkbox .btn { margin-top: 4px; font-size: 12px; padding: 4px 4px; display: flex; align-items: center; gap: 2px; justify-content: center; width: 100%; }
#btn-tk { background: #050c24; color: inherit; font: inherit; border: 0; }
#btn-tk b { color: #ff9ab0; }
.tkgrid > .btn { display: flex; align-items: center; justify-content: center; gap: 3px; }

/* --- números de daño (HTML, nítidos) --- */
.dmg-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; container-type: inline-size; }
.dn { position: absolute; transform: translate(-50%, -50%); font-weight: 700; font-size: clamp(15px, 4.4cqw, 34px); color: #fff; white-space: nowrap; letter-spacing: .5px; text-shadow: -2px -2px 0 #0a0a1a, 2px -2px 0 #0a0a1a, -2px 2px 0 #0a0a1a, 2px 2px 0 #0a0a1a, 0 -2px 0 #0a0a1a, 0 2px 0 #0a0a1a, -2px 0 0 #0a0a1a, 2px 0 0 #0a0a1a, 0 4px 0 #0006; animation: dnpop 1s cubic-bezier(.2, .8, .3, 1) forwards; will-change: transform, opacity; }
.dmg-layer:not(.big) .dn { font-size: clamp(11px, 3cqw, 22px); }
.dn.crit { color: #ffe14d; font-size: clamp(22px, 6.4cqw, 48px); animation-name: dncrit; }
.dn.eff { color: #ff9040; font-size: clamp(17px, 5cqw, 38px); }
.dn.weak { color: #a8b0c8; }
.dn.tap { color: #8fe8ff; }
.dn.coin { color: #ffd23f; font-size: clamp(13px, 3.6cqw, 26px); animation-duration: 1.2s; }
.dn.gem { color: #5fe0ff; }
.dn.tk { color: #ff9ab0; font-size: clamp(13px, 3.6cqw, 26px); }
@keyframes dnpop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.4); } 14% { opacity: 1; transform: translate(-50%, -60%) scale(1.25); } 30% { transform: translate(-50%, -70%) scale(1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -190%) scale(.9); } }
@keyframes dncrit { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.3) rotate(-8deg); } 12% { opacity: 1; transform: translate(-50%, -60%) scale(1.6) rotate(4deg); } 26% { transform: translate(-50%, -70%) scale(1.15) rotate(-2deg); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -210%) scale(1); } }

/* --- gacha: nueva animación --- */
.gacha-fx { overflow-y: auto; }
.gacha-fx.legend { animation: gshake .5s 2 .45s; }
@keyframes gshake { 25% { transform: translate(-4px, 3px); } 50% { transform: translate(4px, -3px); } 75% { transform: translate(-3px, -2px); } }
.gx-rays { position: fixed; inset: -50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 28%, transparent) 0 8deg, transparent 8deg 20deg); animation: gspin 14s linear infinite; opacity: .55; pointer-events: none; mask-image: radial-gradient(circle, #000 5%, transparent 55%); -webkit-mask-image: radial-gradient(circle, #000 5%, transparent 55%); }
.gx-rays.on { opacity: .9; animation-duration: 8s; }
@keyframes gspin { to { transform: rotate(360deg); } }
.gx-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gx-ticket { position: absolute; top: -90px; animation: gticket .7s cubic-bezier(.3, 1.4, .5, 1) forwards; }
@keyframes gticket { 0% { transform: translateY(-80px) rotate(-30deg) scale(.4); opacity: 0; } 55% { opacity: 1; } 100% { transform: translateY(70px) rotate(0) scale(.9); opacity: 0; } }
.gx-ball { position: relative; animation: gidle 1.2s .6s ease-in-out infinite; }
.gx-ball img { position: relative; z-index: 1; image-rendering: pixelated; filter: drop-shadow(0 8px 0 #0006); }
.gx-ball.s1 { animation: gwob .55s ease-in-out infinite; }
.gx-ball.s2 { animation: gwob .4s ease-in-out infinite; }
.gx-ball.s3 { animation: gwob .26s ease-in-out infinite; }
@keyframes gidle { 50% { transform: translateY(-8px); } }
@keyframes gwob { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg) translateY(-6px); } 75% { transform: rotate(16deg) translateY(-6px); } }
.gx-aura { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, var(--ac, #ffffff) 0%, transparent 65%); opacity: .0; transform: scale(var(--as, 1)); transition: all .5s; }
.gx-ball.s1 .gx-aura, .gx-ball.s2 .gx-aura, .gx-ball.s3 .gx-aura { opacity: .75; animation: gpulse .5s infinite alternate; }
@keyframes gpulse { to { transform: scale(calc(var(--as, 1) * 1.25)); opacity: .45; } }
.gx-txt { font-size: 20px; color: #fff; text-shadow: 0 2px 0 #000; min-height: 26px; }
.gx-skip { position: fixed; right: 16px; bottom: 16px; background: #ffffff18; color: var(--dim); border: 0; border-radius: 6px; padding: 6px 12px; font: inherit; }
.gacha-fx .flash { position: fixed; inset: 0; background: var(--fc, #fff); animation: flash .7s forwards; pointer-events: none; z-index: 5; }
.gx-label { position: relative; z-index: 2; font-size: clamp(28px, 7vw, 54px); font-weight: 700; color: var(--c); text-shadow: 0 3px 0 #000, 0 0 24px var(--c); animation: glabel .6s .25s cubic-bezier(.3, 1.5, .5, 1) backwards; }
.gx-label.sh { color: #fff3a8; font-size: clamp(20px, 5vw, 34px); text-shadow: 0 3px 0 #000, 0 0 20px #ffd23f; animation-delay: .5s; }
@keyframes glabel { from { opacity: 0; transform: scale(2.4); } }
.pulls { position: relative; z-index: 2; }
.pull { position: relative; overflow: hidden; background: linear-gradient(#0b1638, #0e1d4a); animation: pflip .55s backwards cubic-bezier(.3, 1.3, .5, 1); }
@keyframes pflip { 0% { opacity: 0; transform: perspective(500px) rotateY(95deg) scale(.6); } 60% { opacity: 1; } 100% { transform: perspective(500px) rotateY(0) scale(1); } }
.pull.r4 { box-shadow: inset 0 0 0 3px var(--rc), 0 0 22px var(--rc); }
.pull.r5 { box-shadow: inset 0 0 0 3px var(--rc), 0 0 34px var(--rc), 0 0 70px color-mix(in srgb, var(--rc) 50%, transparent); background: linear-gradient(#1a1440, #2a1a50); }
.pull.r3 { box-shadow: inset 0 0 0 3px var(--rc), 0 0 12px color-mix(in srgb, var(--rc) 70%, transparent); }
.pull .gl { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, #ffffff55 50%, transparent 65%); transform: translateX(-120%); animation: gsweep 2.4s 1s infinite; pointer-events: none; }
.pull.r1 .gl, .pull.r2 .gl { display: none; }
@keyframes gsweep { 35%, 100% { transform: translateX(120%); } }
.pull.shiny { background: linear-gradient(#2a2410, #1a1a40); }
.pull.shiny::after { content: ''; position: absolute; inset: 0; background: radial-gradient(2px 2px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 80% 20%, #ffe14d 50%, transparent 51%), radial-gradient(2px 2px at 60% 70%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 30% 80%, #ffe14d 50%, transparent 51%); animation: gtwinkle 1.2s infinite alternate; pointer-events: none; }
@keyframes gtwinkle { from { opacity: .2; } to { opacity: 1; } }
.pull .shtag { position: absolute; top: 4px; right: 4px; font-size: 10px; background: #ffd23f; color: #3a2a00; padding: 0 5px; border-radius: 4px; font-weight: 700; z-index: 1; }
.pull .pv { width: 230px; height: 230px; image-rendering: pixelated; }
.pulls.one .pull { padding: 14px 10px; }
.pulls.one .pull b { font-size: 24px; }
.pulls.one .pull small { font-size: 15px; }

/* --- evolución --- */
.evoov { position: fixed; inset: 0; z-index: 60; background: radial-gradient(#26337a, #050a1c 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px; }
.evoov.flash::after { content: ''; position: absolute; inset: 0; background: #fff; animation: flash .6s forwards; }
.evoov-rays { position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg, #ffffff10 0 8deg, transparent 8deg 20deg); animation: gspin 20s linear infinite; mask-image: radial-gradient(circle, #000 5%, transparent 55%); -webkit-mask-image: radial-gradient(circle, #000 5%, transparent 55%); pointer-events: none; }
#evo-cv { width: min(340px, 80vw); height: min(340px, 80vw); image-rendering: pixelated; position: relative; }
.evoov-txt { position: relative; font-size: clamp(18px, 4.4vw, 26px); text-align: center; text-shadow: 0 2px 0 #000; min-height: 34px; }
.evoov .btn { position: relative; animation: pin .4s backwards; }

/* --- ajustes --- */
.set { min-width: min(480px, 88vw); text-align: left; }
.set h2 { display: flex; align-items: center; justify-content: center; gap: 10px; }
.sset { background: #0b1638; border-radius: 10px; padding: 10px 14px 12px; margin-bottom: 10px; box-shadow: inset 0 0 0 2px var(--line); }
.sset h4 { margin: 0 0 6px; color: var(--yellow); font-size: 15px; letter-spacing: 1px; text-transform: uppercase; }
.setrow { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 8px 0; }
.setrow .sl { display: flex; flex-direction: column; }
.setrow .sl b { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.setrow .sl small { color: var(--dim); font-size: 12px; }
.slider { display: flex; align-items: center; gap: 10px; width: 52%; cursor: pointer; touch-action: none; padding: 8px 0; }
.slider .trk { position: relative; flex: 1; height: 12px; background: #050c24; border-radius: 6px; box-shadow: inset 0 0 0 2px #1d2a5a; }
.slider .trk i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 100%); background: linear-gradient(#ffe27a, #f0a020); border-radius: 6px; }
.slider .trk u { position: absolute; top: 50%; left: calc(var(--v) * 100%); width: 18px; height: 18px; transform: translate(-50%, -50%); background: #fff; border-radius: 4px; box-shadow: 0 0 0 3px #f0a020, 0 3px 0 #0008; }
.slider em { width: 38px; text-align: right; font-style: normal; font-size: 14px; color: var(--dim); }
.tog { position: relative; width: 54px; height: 28px; flex: none; border: 0; border-radius: 14px; background: #050c24; box-shadow: inset 0 0 0 2px #1d2a5a; transition: background .15s; }
.tog i { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 6px; background: #6a78b8; transition: all .15s; }
.tog.on { background: #1a5a34; box-shadow: inset 0 0 0 2px #5fe08a; }
.tog.on i { left: 30px; background: #7ff0a0; }

.dexgrid .sh { position: absolute; right: 2px; top: 1px; font-size: 11px; }
@media (max-width: 860px) { .tkgrid { grid-template-columns: repeat(2, 1fr); } .slider { width: 46%; } #btn-tk b { font-size: 16px; } }

.pull .new { top: 4px; left: 4px; transform: none; z-index: 1; }
@keyframes dnpop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.4); } 12% { opacity: 1; transform: translate(-50%, -60%) scale(1.25); } 26% { transform: translate(-50%, -70%) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -190%) scale(.95); } }
@keyframes dncrit { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.3) rotate(-8deg); } 10% { opacity: 1; transform: translate(-50%, -60%) scale(1.6) rotate(4deg); } 24% { transform: translate(-50%, -70%) scale(1.15) rotate(-2deg); } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -210%) scale(1); } }

/* ================= v4: objetos, sinergias, tutorial, Ko-fi ================= */
.teamhead { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.teamhead .seg { flex: 1; margin-bottom: 0; }
.teamhead .btn { white-space: nowrap; }
.rowbtns { display: flex; gap: 4px; }
.rowbtns .btn { flex: 1; }
.itemchip { width: 34px; height: 30px; flex: none; padding: 0; display: flex; align-items: center; justify-content: center; background: #0b1638; color: var(--dim); border: 0; border-radius: 6px; font: inherit; font-size: 18px; box-shadow: inset 0 0 0 2px var(--line); }
.itemchip.has { box-shadow: inset 0 0 0 2px var(--rc, var(--yellow)); background: color-mix(in srgb, var(--rc) 18%, #0b1638); }
.itemchip:hover { background: #14245a; }
.syn { display: flex; flex-direction: column; background: #0b1638; border-radius: 8px; padding: 5px 10px; margin-bottom: 4px; box-shadow: inset 0 0 0 2px #5fe08a88; }
.syn b { font-size: 14px; color: #7ff0a0; }
.syn small { font-size: 12px; color: var(--dim); }
.itemlist2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; align-content: start; }
.it { position: relative; display: flex; align-items: center; gap: 8px; text-align: left; background: #0b1638; border: 0; border-radius: 8px; padding: 6px 8px; color: var(--ink); font: inherit; box-shadow: inset 0 0 0 2px var(--rc, var(--line)); }
.it:hover { background: #14245a; }
.it span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.it b { font-size: 14px; color: var(--rc); }
.it small { font-size: 11px; color: var(--dim); }
.it em { position: absolute; top: 3px; right: 6px; font-size: 10px; font-style: normal; color: #7ff0a0; }
.curitem { margin-bottom: 8px; }
.curitem .it { width: 100%; }

.kofi { display: inline-flex; align-items: center; gap: 8px; background: #29abe0; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; padding: 8px 16px; border-radius: 8px; box-shadow: 0 3px 0 #0f5f86, inset 0 0 0 2px #7fd4f5; }
.kofi:hover { background: #3dbcf0; transform: translateY(-1px); }
.kofi:active { transform: translateY(2px); box-shadow: 0 1px 0 #0f5f86, inset 0 0 0 2px #7fd4f5; }
.kofi-box { text-align: center; }
.kofi-box .kofi { margin-top: 2px; }

.tut { position: fixed; inset: 0; z-index: 45; pointer-events: none; }
.tut .tb { position: fixed; background: #02061acc; pointer-events: auto; }
.tut .th { position: fixed; border-radius: 10px; box-shadow: 0 0 0 3px var(--yellow), 0 0 22px #ffd23faa; pointer-events: none; animation: tpulse 1.2s ease-in-out infinite; }
@keyframes tpulse { 50% { box-shadow: 0 0 0 5px var(--yellow), 0 0 34px #ffd23f; } }
.tut .tc { position: fixed; pointer-events: auto; background: var(--panel); border-radius: 10px; padding: 10px 14px 12px; box-shadow: 0 0 0 3px var(--yellow), 0 8px 0 #050a1c; animation: bin .25s; }
.tut .tc .tp { color: var(--dim); font-size: 12px; }
.tut .tc p { margin: 4px 0 6px; font-size: 16px; line-height: 1.3; }
.tut .tc .tw { display: block; min-height: 0; color: var(--yellow); font-size: 14px; font-style: normal; margin-bottom: 4px; }
.tut .tc .tbtn { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.tut .tc .tbtn .btn.primary { margin-left: auto; }

body { font-variant-ligatures: none; font-feature-settings: 'liga' 0, 'clig' 0; }

/* ================= v5: pantalla de inicio ================= */
#scr-title { background: #070d2b; overflow: hidden; }
#title-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; image-rendering: pixelated; }
.title-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; }
#scr-title .title-wrap { margin: 0 auto; min-height: 100%; width: min(980px, 100%); padding: 28px 18px 30px; gap: 14px; justify-content: center; }
.logo-wrap { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; animation: tdrop .7s cubic-bezier(.3, 1.4, .5, 1) backwards; }
.logo-ball { display: inline-flex; animation: tball 3s ease-in-out infinite; filter: drop-shadow(0 4px 0 #0008); }
.logo-ball img { width: 64px; height: 64px; }
@keyframes tball { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-6px); } }
#scr-title .logo { font-size: clamp(46px, 11vw, 96px); position: relative; padding: 0 4px; text-shadow: 0 4px 0 #1a2a6a, 0 8px 0 #050a1c, 0 0 40px #4a6aff88; }
@keyframes lshine { 30%, 100% { transform: translateX(130%); } }
@keyframes tdrop { from { opacity: 0; transform: translateY(-40px) scale(.9); } }
@keyframes tfade { from { opacity: 0; transform: translateY(14px); } }
#scr-title .tag { font-size: clamp(16px, 2.6vw, 22px); color: #c9d4ff; text-shadow: 0 2px 0 #000a; animation: tfade .6s .15s backwards; text-align: center; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.badges span { display: inline-flex; align-items: center; gap: 6px; background: #0a1430cc; padding: 4px 12px 4px 8px; border-radius: 20px; font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 2px var(--line); animation: tfade .5s backwards; backdrop-filter: blur(2px); }
.cta { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: tfade .6s .3s backwards; width: 100%; }
#btn-start { min-width: 230px; font-size: 26px; padding: 14px 40px; animation: tpulse2 2s ease-in-out infinite; }
@keyframes tpulse2 { 50% { box-shadow: 0 3px 0 #8a5000, inset 0 0 0 2px #ffd060, 0 0 24px #ffb02e88; } }
.link { color: #9fb0ff; font-size: 14px; }
.cont { display: flex; align-items: center; gap: 14px; background: #0a1430e0; border-radius: 12px; padding: 10px 16px; box-shadow: inset 0 0 0 2px var(--line), 0 6px 0 #050a1c88; max-width: 100%; }
.ct-team { display: flex; }
.ct-team img { width: 44px; height: 44px; border-radius: 8px; background: #050c24; margin-left: -10px; box-shadow: 0 0 0 2px #0a1430; }
.ct-team img:first-child { margin-left: 0; }
.ct-info { display: flex; flex-direction: column; text-align: left; }
.ct-info b { color: var(--yellow); font-size: 16px; }
.ct-info span { font-size: 17px; }
.ct-info small { color: var(--dim); font-size: 12px; }
.t-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; width: 100%; }
.t-panel { background: #0a1430d8; border-radius: 12px; padding: 10px 14px 12px; box-shadow: inset 0 0 0 2px var(--line), 0 6px 0 #050a1c88; animation: tfade .6s .45s backwards; backdrop-filter: blur(2px); }
.t-panel h3 { margin: 0 0 8px; font-size: 16px; color: var(--yellow); }
.t-panel .hint { margin: 8px 0 0; text-align: center; }
.t-feat { display: flex; gap: 8px; justify-content: center; }
.tf { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: #0b1638; border-radius: 10px; padding: 8px 4px; box-shadow: inset 0 0 0 2px var(--rc); }
.tf.big { box-shadow: inset 0 0 0 2px var(--rc), 0 0 18px color-mix(in srgb, var(--rc) 50%, transparent); }
.tf img { width: 72px; height: 72px; border-radius: 8px; background: #050c24; animation: hop 1.6s ease-in-out infinite; }
.tf.big img { width: 88px; height: 88px; }
.tf b { font-size: 15px; } .tf small { color: var(--rc); font-size: 12px; }
.t-reg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rg { position: relative; display: flex; flex-direction: column; background: #0b1638; border-radius: 8px; padding: 6px 8px 6px 14px; box-shadow: inset 0 0 0 2px #1d2a5a; overflow: hidden; }
.rg i { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); }
.rg b { font-size: 14px; } .rg small { font-size: 11px; color: var(--dim); }
.rg.lock { opacity: .6; } .rg.lock i { background: #3a4870; }
.t-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.tcard { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: #0a1430d8; border-radius: 12px; padding: 12px 10px; box-shadow: inset 0 0 0 2px var(--line), 0 6px 0 #050a1c88; animation: tfade .6s backwards; }
.tcard b { font-size: 16px; color: var(--yellow); }
.tcard small { font-size: 12px; color: #b9c4f0; line-height: 1.3; }
.t-news { width: 100%; }
.t-news ul { text-align: left; margin: 0; padding-left: 18px; font-size: 14px; color: #c9d4ff; line-height: 1.5; }
#scr-title .fine { max-width: 700px; text-shadow: 0 1px 0 #000; color: #8f9cd8; }
@media (max-width: 760px) {
  .t-grid { grid-template-columns: 1fr; }
  .t-cards { grid-template-columns: 1fr 1fr; }
  .t-reg { grid-template-columns: repeat(3, 1fr); }
  .logo-ball img { width: 44px; height: 44px; }
  .cont { flex-direction: column; text-align: center; } .ct-info { text-align: center; }
}

/* ---- v7: huevos, naturalezas, IVs y tipos ---- */
.foe-types { display: flex; gap: 3px; justify-content: center; margin: 2px 0 3px; }
.foe-types .types { gap: 3px; }
.effchip { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 3px; margin-left: 2px; }
.effchip:empty { display: none; }
.effchip.eup { background: #1d6b3a; color: #aaffc8; }
.effchip.edn { background: #5a2430; color: #ffb4c0; }
.card .info small.natline { color: #b8c4e8; }
.natline em, .genehead em { font-style: normal; font-size: 11px; font-weight: 700; }
.natline em.nu, .genehead em.nu { color: #7ff0a0; }
.natline em.nd, .genehead em.nd { color: #ff8c9a; }
.card .info small.natline { display: block; white-space: normal; line-height: 1.5; }
.natline .gr { vertical-align: middle; margin-left: 2px; }
.teamhead { gap: 8px; }
.rowbtns { display: flex; gap: 4px; }
.foehint { font-size: 12px; color: var(--dim); margin: 2px 2px 8px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.foehint .type { margin: 0; }
.maprow small.rt { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; font-size: 11px; color: var(--dim); margin-top: 2px; }
/* incubadora */
.incubator { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.eggrow { display: flex; align-items: center; gap: 8px; background: #0b1638; border-radius: 8px; padding: 6px; box-shadow: inset 0 0 0 2px var(--ec, var(--line)); }
.eggrow.empty, .eggrow.locked { opacity: .75; box-shadow: inset 0 0 0 2px var(--line); }
.eggrow .eico { flex: none; display: flex; width: 44px; justify-content: center; }
.eggrow .info { flex: 1; min-width: 0; }
.eggrow .info b { display: block; font-size: 15px; }
.eggrow .info small { display: block; font-size: 12px; color: var(--dim); }
.eggrow.ready { animation: eggPulse 1s ease-in-out infinite; }
.eggrow.ready .eico { animation: eggWob .5s ease-in-out infinite; }
@keyframes eggPulse { 50% { box-shadow: inset 0 0 0 2px var(--ec), 0 0 14px var(--ec); } }
@keyframes eggWob { 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
.bar.egg { height: 13px; margin-top: 4px; background: #0a1030; }
.bar.egg i { background: linear-gradient(90deg, #7fd07a, #ffe27a); transition: width .3s; }
.bar.egg span { top: -1px; right: 5px; font-size: 11px; }
.eggshop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0 2px; }
.eggshop .buy { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; }
.eggshop .buy small { display: flex; align-items: center; gap: 2px; font-size: 12px; }
.eggshop .buy:disabled { filter: grayscale(.8); opacity: .5; }
/* ficha: genes */
.genes { background: #0b1638; border-radius: 8px; padding: 8px; margin: 8px 0; text-align: left; }
.genehead { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin: 4px 0; }
.genehead b { font-size: 14px; }
.row.tight { margin: 4px 0 8px; justify-content: flex-start; }
.ivrow { display: grid; grid-template-columns: 74px 1fr 26px auto; gap: 6px; align-items: center; font-size: 13px; margin: 3px 0; }
.ivbar { height: 8px; background: #050c24; border-radius: 4px; overflow: hidden; }
.ivbar i { display: block; height: 100%; background: linear-gradient(90deg, #4fb4ff, #ff8ad8); }
.ivrow .btn.small { padding: 2px 6px; font-size: 12px; }
.ivrow .max { color: #ffd23f; font-weight: 700; }
.dustnum { display: flex; align-items: center; gap: 4px; color: #d9b8ff; }
.pull .dup.nat { color: #cfd8ff; }
.gr { display: inline-block; padding: 0 6px; border-radius: 4px; color: #14182e; font-weight: 700; font-size: 12px; line-height: 1.5; }
.pull .dup .gr { font-size: 13px; }

/* ---- v8: eventos semanales y Torre ---- */
.chal-bar { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 8px; background: #2a0f1ee6; border-radius: 8px; padding: 3px 4px 3px 10px; font-size: 13px; box-shadow: inset 0 0 0 2px #ff6a7a; white-space: nowrap; max-width: 96%; }
.chal-bar.hidden { display: none; }
.chal-bar span { overflow: hidden; text-overflow: ellipsis; }
.evcard { background: linear-gradient(160deg, #0f1c44, #0b1638); border-radius: 10px; padding: 8px; margin: 6px 0 10px; box-shadow: inset 0 0 0 2px var(--ec, var(--line)); }
.evhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.evhead b { font-size: 18px; color: var(--ec); }
.evhead small { color: var(--dim); font-size: 12px; margin-left: auto; }
.evtag { font-size: 10px; letter-spacing: 1px; background: var(--ec); color: #10152a; padding: 0 5px; border-radius: 3px; font-weight: 700; }
.evrow { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.evrow img { width: 56px; height: 56px; border-radius: 8px; background: #050c24; image-rendering: pixelated; }
.evfx { margin: 4px 0 6px; padding-left: 16px; font-size: 13px; color: #cfd8ff; }
.evfx li { margin: 2px 0; }
.tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 6px 0; }
.tierbtn { background: #0a1230; border: 0; border-radius: 8px; padding: 6px; text-align: left; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; font-family: inherit; display: flex; flex-direction: column; gap: 1px; }
.tierbtn:disabled { opacity: .5; cursor: default; }
.tierbtn.done { box-shadow: inset 0 0 0 2px #3ca15f; }
.tierbtn b { font-size: 14px; display: flex; justify-content: space-between; }
.tierbtn small { font-size: 11px; color: var(--dim); }
.rdy { font-size: 12px; font-weight: 700; color: #ffb4c0; }
.rdy.ok { color: #7ff0a0; }
.rdy.mid { color: #ffd23f; }
.etask { display: flex; align-items: center; gap: 8px; background: #0a1230; border-radius: 8px; padding: 6px; margin-bottom: 4px; }
.etask .qi { flex: 1; min-width: 0; }
.etask .qi b { font-size: 13px; display: block; }
.etask .qi small { font-size: 11px; color: var(--dim); }
.tower { background: linear-gradient(160deg, #1a1030, #0b1638); border-radius: 10px; padding: 8px; box-shadow: inset 0 0 0 2px #8a6ad0; }
.tower .big { font-size: 34px; color: var(--yellow); text-align: center; line-height: 1; margin: 2px 0; }
.floorline { font-size: 13px; margin: 5px 0; color: #cfd8ff; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.floorline .type { margin: 0; }
.rulebox { background: #2a1830; border-radius: 6px; padding: 4px 8px; font-size: 12px; color: #ffd9a8; margin: 4px 0; }
@media (max-width: 860px) { .tabs button { font-size: 10px; } }

/* ---- v9: equipos guardados ---- */
.preset { background: #0b1638; border-radius: 8px; padding: 8px; margin-bottom: 6px; text-align: left; box-shadow: inset 0 0 0 2px var(--line); }
.pr-head { display: flex; align-items: center; gap: 8px; }
.pr-name { flex: 1; min-width: 0; background: #050c24; border: 2px solid var(--line); border-radius: 6px; color: var(--ink); font: inherit; font-size: 15px; padding: 3px 8px; }
.pr-n { font-size: 12px; color: var(--dim); }
.pr-mons { display: flex; gap: 4px; margin: 6px 0 2px; min-height: 40px; align-items: center; flex-wrap: wrap; }
.pr-mons img { width: 40px; height: 40px; border-radius: 6px; background: #050c24; image-rendering: pixelated; }
.teamhead { flex-wrap: wrap; }
.teamhead .seg { flex: 1 1 150px; }
.teamhead .rowbtns { flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap; }

/* ---- v10: guardería ---- */
.nursery { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0; }
.nursery .heart { color: #ff5f8a; font-size: 24px; }
.nsl { flex: 1; min-width: 0; background: #0a1230; border: 0; border-radius: 8px; padding: 8px 4px; color: var(--ink); font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; box-shadow: inset 0 0 0 2px var(--line); }
.nsl.has { box-shadow: inset 0 0 0 2px #ff9ec4; }
.nsl img { width: 52px; height: 52px; border-radius: 8px; background: #050c24; image-rendering: pixelated; }
.nsl b { font-size: 14px; }
.nsl small { font-size: 11px; color: var(--dim); }
.nsl .plus { font-size: 30px; color: var(--dim); line-height: 52px; }
.nfx { background: #0b1638; border-radius: 8px; padding: 8px; margin: 4px 0 6px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; font-size: 13px; }
.nfx .buy { align-self: center; min-width: 120px; display: flex; flex-direction: column; align-items: center; }
.nfx .seg button { font-size: 11px; padding: 4px 4px; }
.ivrow .arrow { text-align: center; color: var(--dim); }
.genes.cmp .ivrow { grid-template-columns: 90px 1fr 24px 1fr; }

/* ---- v11: idioma ---- */
.langsw { position: absolute; top: 0; right: 0; display: flex; gap: 4px; z-index: 3; }
.langsw button { background: #0a1430d8; color: var(--dim); border: 0; border-radius: 6px; padding: 4px 9px; font: 700 12px var(--f); box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; }
.langsw button.on { color: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow); }
#scr-title .title-wrap { position: relative; }

/* ---- v12: megaevoluciones ---- */
.megatag { display: inline-block; font-size: 10px; letter-spacing: 1px; font-weight: 700; background: linear-gradient(90deg, #ff8ad8, #ffd23f); color: #20102a; border-radius: 3px; padding: 0 4px; margin-right: 4px; vertical-align: middle; }
.genes.mega { box-shadow: inset 0 0 0 2px #ff8ad855; }
.megarow { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 8px; margin: 4px 0; background: #0a1230; }
.megarow.on { box-shadow: inset 0 0 0 2px #ff8ad8; }
.megarow img { width: 44px; height: 44px; border-radius: 6px; background: #050c24; image-rendering: pixelated; }
.megarow .info { flex: 1; min-width: 0; }
.megarow .info b { display: block; font-size: 14px; }
.megarow .info small { display: block; font-size: 11px; color: var(--dim); }

/* ---- v13: estadísticas ---- */
.statbody { max-height: 62vh; overflow: auto; padding-right: 4px; text-align: left; }
.statbody h3 { margin: 10px 0 6px; }
.charts { display: grid; grid-template-columns: 1fr; gap: 8px; }
.charts.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.chart { position: relative; background: #0b1638; border-radius: 8px; padding: 8px; }
.chart.wide { grid-column: 1 / -1; }
.chart h4 { margin: 0 0 4px; font-size: 13px; color: var(--ink); }
.chart h4 small { color: var(--dim); font-weight: 400; font-size: 11px; }
.chart svg { width: 100%; height: auto; display: block; touch-action: none; }
.cline { fill: none; stroke: #4fb4ff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cdot { fill: #4fb4ff; stroke: #0b1638; stroke-width: 2; }
.cgrid { stroke: #ffffff18; stroke-width: 1; }
.ccross { stroke: #ffffff66; stroke-width: 1; stroke-dasharray: 3 3; }
.chov { fill: #fff; stroke: #4fb4ff; stroke-width: 2; }
.clab { fill: #dfe8ff; font: 700 11px var(--f); }
.cax { fill: #9aa8d6; font: 10px var(--f); }
.ctip { position: absolute; top: 24px; background: #050c24; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.ctip.hidden { display: none; }
.brow { display: grid; grid-template-columns: 92px 1fr auto; gap: 6px; align-items: center; font-size: 12px; margin: 3px 0; }
.brow .bl { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .bt { height: 8px; background: #050c24; border-radius: 4px; overflow: hidden; }
.brow .bt i { display: block; height: 100%; border-radius: 4px; }
.tcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); column-gap: 14px; }
.statgrid.wide { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tblwrap { max-height: 46vh; overflow: auto; }
.stbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.stbl th, .stbl td { text-align: right; padding: 3px 6px; border-bottom: 1px solid #ffffff12; }
.stbl th:first-child, .stbl td:first-child { text-align: left; }
.stbl th { color: var(--dim); position: sticky; top: 0; background: #0b1638; }

/* ---- v14: accesibilidad ---- */
.tab-body, .modal-box, .toast, .banner { zoom: var(--tz, 1); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn:focus-visible, button:focus-visible { border-radius: 6px; }
/* reducir movimiento: sin animaciones ni transiciones (los números de daño se quedan visibles el tiempo normal) */
html.a-rm *, html.a-rm *::before, html.a-rm *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
html.a-rm .dn { animation: none !important; opacity: 1 !important; transform: translate(-50%, -50%) !important; }
html.a-rm .gx-ball, html.a-rm .gx-rays, html.a-rm .tball, html.a-rm .eggrow.ready, html.a-rm .eggrow.ready .eico { animation: none !important; }
/* sin destellos */
html.a-nf .gacha-fx .flash, html.a-nf .evoov.flash::after { display: none !important; }
html.a-nf .gx-rays, html.a-nf .evoov-rays { opacity: .25 !important; animation: none !important; }
/* alto contraste */
html.a-hc { --dim: #d8dfff; --line: #8fa6ff; --ink: #ffffff; --bg: #050a1c; --panel: #0d1840; }
html.a-hc .card, html.a-hc .quest, html.a-hc .eggrow, html.a-hc .chart, html.a-hc .syn, html.a-hc .tkbox { box-shadow: inset 0 0 0 2px #b9c8ff !important; }
html.a-hc .btn:disabled, html.a-hc button:disabled { opacity: .72; }
html.a-hc .hint, html.a-hc small { color: #dfe6ff !important; }
html.a-hc :focus-visible { outline-width: 4px; }
/* daltonismo: pares rojo/verde → azul/naranja (el sentido sigue indicado con ▲ ▼ y con texto) */
html.a-cb { --green: #56b4e9; --red: #e69f00; }
html.a-cb .effchip.eup { background: #0b4a75; color: #cfe9ff; }
html.a-cb .effchip.edn { background: #7a4a00; color: #ffe2a8; }
html.a-cb .natline em.nu, html.a-cb .genehead em.nu { color: #7fd0ff; }
html.a-cb .natline em.nd, html.a-cb .genehead em.nd { color: #ffbf5a; }
html.a-cb .bar.hp i { background: #56b4e9; }
html.a-cb .tierbtn.done, html.a-cb .rdy.ok { color: #7fd0ff; }
html.a-cb .rdy { color: #ffbf5a; }
.seg.a11y button { font-size: 12px; padding: 5px 6px; }
.setrow.col { flex-direction: column; align-items: stretch; gap: 4px; }
.setrow.col .seg { width: 100%; }

/* ---------- v15: rival, tácticas, sala de música, ficha de la Pokédex ---------- */
.rivalcard { background: linear-gradient(160deg, #2a1230, #0b1638); border-radius: 10px; padding: 8px; margin: 6px 0 10px; box-shadow: inset 0 0 0 2px #ff8040aa; }
.rivalcard:not(.open) { opacity: .75; box-shadow: inset 0 0 0 2px var(--line); }
.rvhead { display: flex; align-items: center; gap: 10px; }
.rvhead img, .rvav { width: 56px; height: 56px; image-rendering: pixelated; background: #0b1638; border-radius: 8px; box-shadow: inset 0 0 0 2px #ff8040; }
.rvhead b { display: block; font-size: 16px; }
.rvhead small { color: var(--dim); font-size: 12px; }
.rvteam { display: flex; gap: 6px; margin: 8px 0 4px; }
.rvm { flex: 1; min-width: 0; background: #0a1230; border-radius: 8px; padding: 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rvm img { width: 48px; height: 48px; image-rendering: pixelated; }
.rvm small { font-size: 11px; color: var(--dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rvm .types { flex-wrap: wrap; justify-content: center; }
.rvtalk { display: flex; gap: 12px; align-items: center; margin: 4px 0 10px; }
.rvtalk .rvav { width: 84px; height: 84px; flex: none; }
.rvsay b { color: #ff9a60; font-size: 15px; }
.rvsay p { margin: 4px 0 0; font-size: 16px; line-height: 1.35; }
.tactic { background: #0b1638; border-radius: 8px; padding: 6px; margin: 0 0 8px; box-shadow: inset 0 0 0 2px var(--line); }
.tactic .seg { flex-wrap: wrap; margin-bottom: 4px; }
.tactic .seg button { flex: 1 1 30%; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 13px; padding: 5px 4px; }
.tactic small { display: block; font-size: 12px; color: var(--dim); }
.fuselist { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #0b1638; border-radius: 8px; padding: 6px; margin: 0 0 8px; box-shadow: inset 0 0 0 2px #c47bff88; }
.fuselist > small { flex-basis: 100%; color: var(--dim); font-size: 12px; }
.trklist { display: flex; flex-direction: column; gap: 4px; max-height: 52vh; overflow-y: auto; margin-bottom: 8px; }
.trk-row { display: flex; align-items: center; gap: 6px; background: #0a1230; border-radius: 8px; padding: 6px 8px; }
.trk-row .tn { flex: 1; min-width: 0; font-size: 14px; }
.trk-row small { color: var(--dim); font-size: 12px; text-align: right; }
.trk-row.lock { opacity: .7; }
.cue { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: #000b; color: #fff; font-size: 14px; padding: 4px 12px; border-radius: 14px; pointer-events: none; z-index: 6; box-shadow: 0 0 0 2px #ffffff55; }
/* Pokédex */
.dexsum { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 5px; margin: 4px 0 8px; }
.dexsum div { background: #0b1638; border-radius: 8px; padding: 5px 4px; text-align: center; box-shadow: inset 0 0 0 2px var(--line); }
.dexsum b { display: block; font-size: 17px; color: var(--yellow); }
.dexsum small { font-size: 11px; color: var(--dim); }
.regbars { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; margin-bottom: 8px; }
.regbar { display: grid; grid-template-columns: 56px 1fr auto; gap: 5px; align-items: center; background: #0b1638; border: 0; border-radius: 6px; padding: 4px 6px; font-size: 11px; box-shadow: inset 0 0 0 2px var(--line); text-align: left; }
.regbar.on { box-shadow: inset 0 0 0 2px var(--yellow); }
.regbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); }
.regbar .bt { height: 6px; background: #050c24; border-radius: 3px; overflow: hidden; }
.regbar .bt i { display: block; height: 100%; background: #5fe08a; }
.regbar em { font-style: normal; color: #fff; }
.dexfilters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.dexfilters .search { flex: 1 1 100%; }
.dexfilters .dd { flex: 1 1 auto; }
.dxm h2 { margin: 2px 0; }
.dxm h4 { margin: 12px 0 4px; font-size: 14px; color: var(--yellow); }
.dxhead { display: flex; gap: 12px; align-items: center; }
.dxpor { width: 96px; height: 96px; image-rendering: pixelated; background: #0b1638; border-radius: 10px; box-shadow: inset 0 0 0 2px var(--line); flex: none; }
.dxpor.sil { filter: brightness(0) opacity(.55); }
.dxhead small { display: block; color: var(--dim); font-size: 12px; }
.rartag { display: inline-block; font-size: 13px; font-weight: 700; margin-right: 6px; }
.dxstats .brow { grid-template-columns: 76px 1fr 30px; }
.dxstats em { font-style: normal; font-size: 12px; text-align: right; }
.dxmatch { display: flex; flex-direction: column; gap: 4px; }
.dxmatch > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.dxmatch b { width: 62px; font-size: 12px; color: var(--dim); }
.dxevo { overflow-x: auto; padding-bottom: 4px; }
.evt { display: flex; align-items: center; gap: 4px; }
.evk { display: flex; flex-direction: column; gap: 4px; }
.eva { display: flex; flex-direction: column; align-items: center; color: var(--dim); font-size: 16px; }
.eva small { font-size: 10px; }
.evn { background: #0b1638; border: 0; border-radius: 8px; padding: 3px 4px; display: flex; flex-direction: column; align-items: center; min-width: 64px; box-shadow: inset 0 0 0 2px var(--line); }
.evn img { width: 44px; height: 44px; image-rendering: pixelated; }
.evn small { font-size: 10px; color: var(--dim); max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evn.unk img, .evn.unk .q { opacity: .45; }
.evn .q { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #2a3f8a; font-size: 22px; }
.evn.mega { box-shadow: inset 0 0 0 2px #ff8ad8; }
.evn.mega.unk img { filter: brightness(0); }
.dxforms { display: flex; flex-wrap: wrap; gap: 5px; }
.dxmoves { display: flex; flex-wrap: wrap; gap: 5px; }
.dxmoves .mv { display: inline-flex; align-items: center; gap: 4px; background: #0a1230; border-radius: 6px; padding: 3px 7px; font-size: 12px; opacity: .6; }
.dxmoves .mv.on { opacity: 1; box-shadow: inset 0 0 0 2px #5fe08a88; }
.dxmoves .mv i { width: 9px; height: 9px; border-radius: 50%; }
.dxmoves .mv small { color: var(--dim); font-size: 10px; }
.dxwhere { font-size: 13px; line-height: 1.5; margin: 2px 0 4px; }
.dxown { background: #0b1638; border-radius: 8px; padding: 6px 8px; box-shadow: inset 0 0 0 2px var(--line); font-size: 14px; }
.dxm, .rvsay, .trk-row .tn { text-align: left; }
.dxm .row { justify-content: center; }
.dexfilters .dd { flex: 1 1 40%; width: auto; margin: 0; }
.dexsum { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
.dexsum small { display: block; line-height: 1.15; }
/* Ascensión */
.asc { background: linear-gradient(160deg, #241a4a, #0b1638); border-radius: 10px; padding: 8px; margin: 0 0 10px; box-shadow: inset 0 0 0 2px #c47bffaa; text-align: center; }
.ascnums { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 5px; margin-bottom: 6px; }
.ascnums div { background: #0b1638; border-radius: 8px; padding: 5px 3px; box-shadow: inset 0 0 0 2px var(--line); }
.ascnums b { display: block; font-size: 16px; color: #d8a8ff; }
.ascnums small { font-size: 11px; color: var(--dim); }
.rivalcard.master { background: linear-gradient(160deg, #3a1a10, #0b1638); box-shadow: inset 0 0 0 2px #ffd23faa; }
/* v17: consejos, perfil, favoritos */
.advlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.adv { display: flex; align-items: center; gap: 10px; background: #0b1638; border-radius: 8px; padding: 7px 9px; box-shadow: inset 0 0 0 2px var(--line); text-align: left; }
.adv p { flex: 1; margin: 0; font-size: 14px; line-height: 1.3; }
.profhead { display: flex; gap: 12px; align-items: center; }
.profhead > div { flex: 1; min-width: 0; }
.profhead small { display: block; margin-top: 4px; color: var(--yellow); font-size: 13px; }
.avgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; max-height: 26vh; overflow-y: auto; }
.avgrid button { background: #0b1638; border: 0; border-radius: 6px; padding: 2px; box-shadow: inset 0 0 0 2px var(--line); }
.avgrid button.on { box-shadow: inset 0 0 0 3px var(--yellow); }
.avgrid img { width: 44px; height: 44px; image-rendering: pixelated; display: block; margin: 0 auto; }
.titlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; max-height: 30vh; overflow-y: auto; }
.ttl { background: #0b1638; border: 0; border-radius: 6px; padding: 5px 7px; text-align: left; box-shadow: inset 0 0 0 2px var(--line); }
.ttl.on { box-shadow: inset 0 0 0 3px var(--yellow); }
.ttl:disabled { opacity: .55; }
.ttl b { display: block; font-size: 13px; }
.ttl small { display: block; font-size: 10px; color: var(--dim); }
.dexgrid .fv { position: absolute; left: 3px; bottom: 14px; font-size: 11px; color: var(--yellow); text-shadow: 0 1px 0 #000; }
.favbtn { background: none; border: 0; font-size: 24px; color: #4a5688; padding: 0 4px; vertical-align: middle; }
.favbtn.on { color: var(--yellow); }

/* v18: marcos de retrato y fondos */
:root[data-frame="gold"] :is(.card .por, .dxpor, .rvav, .ct-team img, .profhead .dxpor), .frprev[data-fr="gold"] img { border-radius: 6px; box-shadow: 0 0 0 2px #ffd23f, 0 0 0 4px #7a4a00, 0 0 12px #ffd23f99; }
:root[data-frame="leaf"] :is(.card .por, .dxpor, .rvav, .ct-team img, .profhead .dxpor), .frprev[data-fr="leaf"] img { border-radius: 6px; box-shadow: 0 0 0 2px #5fe08a, 0 0 0 4px #1d5a30, 0 0 8px #5fe08a88; }
:root[data-frame="electric"] :is(.card .por, .dxpor, .rvav, .ct-team img, .profhead .dxpor), .frprev[data-fr="electric"] img { border-radius: 6px; box-shadow: 0 0 0 2px #ffe14d, 0 0 0 4px #4a3a00, 0 0 12px #ffe14dcc; }
:root[data-frame="rainbow"] :is(.card .por, .dxpor, .rvav, .ct-team img, .profhead .dxpor), .frprev[data-fr="rainbow"] img { border-radius: 6px; box-shadow: 0 0 0 2px #ff5a5a, 0 0 0 4px #ffd23f, 0 0 0 6px #5fe08a, 0 0 0 8px #4aa8ff; }
:root[data-frame="ice"] :is(.card .por, .dxpor, .rvav, .ct-team img, .profhead .dxpor), .frprev[data-fr="ice"] img { border-radius: 6px; box-shadow: 0 0 0 2px #bff2ff, 0 0 0 4px #2a6aa8, 0 0 14px #8fe3ffcc; }
:root[data-frame="flame"] :is(.card .por, .dxpor, .rvav, .ct-team img, .profhead .dxpor), .frprev[data-fr="flame"] img { border-radius: 6px; box-shadow: 0 0 0 2px #ffb22e, 0 0 0 4px #b3200a, 0 0 14px #ff6a1fcc; }
:root[data-frame="starry"] :is(.card .por, .dxpor, .rvav, .ct-team img, .profhead .dxpor), .frprev[data-fr="starry"] img { border-radius: 6px; box-shadow: 0 0 0 2px #e0c8ff, 0 0 0 4px #5a3aa8, 0 0 14px #c47bffcc; }
:root[data-frame="crown"] :is(.card .por, .dxpor, .rvav, .ct-team img, .profhead .dxpor), .frprev[data-fr="crown"] img { border-radius: 6px; box-shadow: 0 0 0 2px #ffd23f, 0 0 0 4px #8a2ae0, 0 0 0 6px #ffd23f, 0 0 16px #ffd23fcc; }
.frgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px 8px; padding: 6px 4px 4px; }
.frprev { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.frprev img { width: 44px; height: 44px; image-rendering: pixelated; background: #0b1638; border-radius: 6px; }
.frprev small { font-size: 10px; color: var(--dim); }
.frprev.on small { color: var(--yellow); font-weight: 700; }
.frprev.on img { outline: 2px solid var(--yellow); outline-offset: 6px; }
.frprev:disabled { opacity: .6; }
.bggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px; max-height: 24vh; overflow-y: auto; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; box-shadow: 0 0 0 1px #fff6; }
.tipbox { text-align: center; }
.tipbox p { font-size: 15px; line-height: 1.4; }
.tipico { display: block; margin-bottom: 4px; }
.welc { max-height: 66vh; overflow-y: auto; text-align: left; }
.welc h2 { text-align: center; }
.wsec { background: #0b1638; border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; box-shadow: inset 0 0 0 2px var(--line); }
.wsec > b { display: block; color: var(--yellow); font-size: 14px; margin-bottom: 4px; }
.wsec p { margin: 4px 0; }
.wsec small { color: var(--dim); }
.wlist { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.wchips { display: flex; flex-wrap: wrap; gap: 5px; }
.wchips span { background: #142356; border-radius: 12px; padding: 3px 9px; font-size: 13px; }
.wchips b { color: #7ff0a0; }
.weggs { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 2px; }
.wegg { display: grid; grid-template-columns: 24px 1fr 38px; gap: 6px; align-items: center; }
.wegg .bt { position: relative; height: 8px; background: #050c24; border-radius: 4px; overflow: hidden; }
.wegg .bt i { position: absolute; top: 0; bottom: 0; left: 0; background: #4aa8ff; }
.wegg .bt i.gain { background: #7ff0a0; }
.wegg em { font-style: normal; font-size: 12px; text-align: right; }
/* v19: cuenta, nube y rankings */
.t-auth { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 8px 0 2px; }
.t-auth small { color: var(--dim); font-size: 12px; max-width: 320px; text-align: center; }
.gbtn { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: #1f1f1f; border: 0; border-radius: 6px; padding: 9px 16px; font-size: 15px; font-weight: 700; box-shadow: 0 3px 0 #9aa3b8; }
.gbtn:hover { background: #f1f4ff; }
.gbtn:disabled { opacity: .6; }
.authuser { display: flex; flex-direction: column; align-items: center; }
.authuser b { font-size: 16px; color: var(--yellow); }
.linkbtn { background: none; border: 0; color: var(--yellow); text-decoration: underline; font-size: 13px; padding: 2px; }
.nickrow { display: flex; gap: 6px; align-items: center; }
.nickmsg { display: block; font-style: normal; font-size: 12px; margin-top: 3px; }
.nickmsg.ok { color: #7ff0a0; }
.nickmsg.bad { color: #ff9a9a; }
.cfgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 8px; }
.cfcol { background: #0b1638; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 3px; text-align: left; font-size: 13px; box-shadow: inset 0 0 0 2px var(--line); }
.cfcol.rec { box-shadow: inset 0 0 0 2px #7ff0a0; }
.cfcol > b { color: var(--yellow); font-size: 14px; }
.cfcol em { font-style: normal; font-size: 11px; color: #7ff0a0; }
.cfcol span b { color: #fff; }
.cfcol small { color: var(--dim); font-size: 11px; }
.rktabs { margin-bottom: 6px; }
.rk-body { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow-y: auto; }
.rkrow { display: grid; grid-template-columns: 40px 40px 1fr auto auto; gap: 8px; align-items: center; background: #0a1230; border-radius: 8px; padding: 4px 8px; text-align: left; }
.rkrow.me { box-shadow: inset 0 0 0 2px var(--yellow); background: #1a2350; }
.rkn { font-size: 13px; color: var(--dim); }
.rkrow:nth-child(-n+3) .rkn { color: var(--yellow); font-weight: 700; }
.rkrow img { width: 36px; height: 36px; image-rendering: pixelated; background: #0b1638; border-radius: 6px; }
.rki { min-width: 0; }
.rki b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rki small { display: block; font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rkv { text-align: right; font-size: 15px; color: #fff; }
.rkv small { display: block; font-size: 10px; color: var(--dim); }
.rkflag { background: none; border: 0; color: #5a68a8; font-size: 15px; padding: 2px 4px; }
.rkflag:hover { color: #ff9a9a; }
.rk-me { margin-top: 6px; font-size: 14px; }
.rk-me small { color: var(--dim); }

/* v20: botón de apoyo más visible */
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.35); } 30% { transform: scale(1); } 45% { transform: scale(1.2); } }
@keyframes shine { 0% { transform: translateX(-120%) skewX(-20deg); } 35%, 100% { transform: translateX(260%) skewX(-20deg); } }
.supportbtn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 12px 3px 8px; border-radius: 20px; background: linear-gradient(180deg, #4cc7f7, #1f93c9); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; box-shadow: 0 2px 0 #0f5f86, inset 0 0 0 2px #9be5ff; }
.supportbtn:hover { background: linear-gradient(180deg, #62d2fb, #2aa3dc); }
.supportbtn::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: linear-gradient(90deg, transparent, #ffffff88, transparent); animation: shine 4.5s ease-in-out infinite; }
.supportbtn::after { content: '♥'; position: absolute; top: -2px; right: 3px; color: #ff5a7a; font-size: 12px; text-shadow: 0 1px 0 #7a0f2a; animation: beat 1.8s ease-in-out infinite; }
.supportbtn span { white-space: nowrap; }
.kofi.hero { position: relative; overflow: hidden; margin-top: 8px; font-size: 18px; padding: 10px 22px; border-radius: 28px; background: linear-gradient(180deg, #4cc7f7, #1f93c9); box-shadow: 0 4px 0 #0f5f86, inset 0 0 0 2px #9be5ff, 0 0 18px #29abe055; }
.kofi.hero::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 25%; background: linear-gradient(90deg, transparent, #ffffff88, transparent); animation: shine 4.5s ease-in-out infinite; }
.kofi.hero .kheart { font-style: normal; color: #ff5a7a; font-size: 20px; text-shadow: 0 1px 0 #7a0f2a; animation: beat 1.8s ease-in-out infinite; }
.t-auth + .kofi.hero { align-self: center; }
@media (max-width: 860px) { .supportbtn { padding: 3px 7px 3px 5px; } .supportbtn span { display: none; } }
html.a-rm .supportbtn::before, html.a-rm .supportbtn::after, html.a-rm .kofi.hero::before, html.a-rm .kofi.hero .kheart { animation: none !important; }
.autherr { color: #ff9a9a !important; max-width: 340px; }

/* v21: aviso de partida abierta en otra pestaña */
#stalebar { position: fixed; left: 0; right: 0; top: 0; z-index: 400; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 12px; background: #5a1d1d; color: #fff; border-bottom: 2px solid #ff8a8a; font-size: 14px; text-align: center; }
.upv { color: var(--dim); font-size: 12px; }
.upv b { color: #fff; }

/* ---- v21: correcciones de la auditoría de interfaz ---- */
/* texto grande: el zoom también multiplica los límites del modal, así que se compensan */
.modal-box { max-height: calc(94vh / var(--tz, 1)); max-width: calc(min(860px, 96vw) / var(--tz, 1)); }
/* las tarjetas no cortan el nombre: pasa a otra línea */
.card .info b { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
/* panel de etapa en una sola línea (antes se partía en dos y tapaba el nombre del enemigo) */
.a-top { width: max-content; max-width: calc(100% - 8px); }
.st-mid span { white-space: nowrap; }
/* el aviso no bloquea los botones de la ventana que hay debajo */
.toast { pointer-events: none; }
/* resumen de la tirada x10: se puede desplazar hasta arriba aunque no quepa */
.gacha-fx { justify-content: flex-start; }
.gacha-fx > :first-child { margin-top: auto; }
.gacha-fx > :last-child { margin-bottom: auto; }
/* cabecera en móvil: monedas, gemas y tickets nunca se encogen por debajo de su contenido */
.cur { flex: 0 0 auto; }
.cur b { white-space: nowrap; }
@media (max-width: 860px) {
  .top { gap: 4px; padding: 5px 6px; }
  .cur { padding: 2px 7px 2px 3px; gap: 3px; }
  .cur b { font-size: 14px; }
  .logo.tiny { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
  .st-arrow, #btn-advice, #btn-settings, #btn-map { min-width: 36px; min-height: 36px; }
  .btn.small { min-height: 34px; }
}
@media (max-width: 520px) { .logo.tiny { display: none; } .top { justify-content: flex-end; flex-wrap: wrap; } }
.slider:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
@media (max-width: 860px) { .enemy-box { top: 23%; } }
@media (min-width: 1500px) { .layout { grid-template-columns: 1fr clamp(440px, 27vw, 640px); } .tab-body { font-size: 1.08em; } }
