:root {
  --bg: #0b1220; --panel: rgba(13, 21, 38, 0.82); --panel-hi: rgba(26, 38, 64, 0.9); --panel2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.1); --line-hi: rgba(255, 255, 255, 0.22);
  --fg: #eef3fb; --muted: #94a6c2; --yellow: #ffcb05; --yellow-d: #c99a00; --blue: #3b78d8; --red: #e8403a; --green: #4fd06a;
  --radius: 16px; --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--fg); font: 15px/1.45 var(--text); }
#view { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
::selection { background: rgba(255, 203, 5, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- Controles ---------- */
button { font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); border-radius: 11px; padding: 9px 15px; transition: background .15s, transform .12s, border-color .15s, box-shadow .15s; }
button:hover:not(:disabled) { border-color: var(--line-hi); background: linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,.06)); }
button:active:not(:disabled) { transform: translateY(1px) scale(.99); }
button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
button:disabled { opacity: .42; cursor: default; }
button.primary { background: linear-gradient(180deg, #ffe066, #ffbf00); color: #1a1405; border: 0; font-weight: 700; padding: 12px 22px; box-shadow: 0 4px 0 var(--yellow-d), 0 8px 24px rgba(255, 190, 0, .25); letter-spacing: .2px; }
button.primary:hover:not(:disabled) { background: linear-gradient(180deg, #ffe88a, #ffc928); box-shadow: 0 4px 0 var(--yellow-d), 0 10px 30px rgba(255, 190, 0, .4); }
button.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--yellow-d); transform: translateY(3px); }
button.danger { border-color: rgba(232, 64, 58, .45); color: #ffb0a8; }
input { font: inherit; width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .35); color: var(--fg); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 203, 5, .15); }
kbd { display: inline-block; min-width: 1.7em; padding: 1px 5px; border-radius: 6px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); border-bottom-width: 2px; font: 600 11px/1.4 var(--text); text-align: center; color: #e8eef8; }
.small { color: var(--muted); font-size: 13px; }
.warn { color: #ffb070; font-size: 13px; }
.coin { color: var(--yellow); font-weight: 700; margin-right: 2px; }
.type { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--tc); color: #111; font-size: 11px; font-weight: 700; text-shadow: 0 1px 0 rgba(255,255,255,.3); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.portrait { image-rendering: pixelated; display: block; }
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(14px) saturate(1.2); box-shadow: var(--shadow); }
.spinner { width: 38px; height: 38px; border-radius: 50%; margin: 0 auto 14px; background: linear-gradient(180deg, #e83030 46%, #222 46% 54%, #f4f4f4 54%); box-shadow: inset 0 0 0 3px #222; animation: spin .9s cubic-bezier(.6,.1,.4,.9) infinite; position: relative; }
.spinner::after { content: ''; position: absolute; inset: 13px; border-radius: 50%; background: #f4f4f4; box-shadow: 0 0 0 3px #222; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pantallas ---------- */
#screen { position: fixed; inset: 0; overflow: auto; padding: 18px; display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(30, 60, 120, .35), transparent 60%), linear-gradient(180deg, rgba(6,10,20,.6), rgba(6,10,20,.25) 40%, rgba(6,10,20,.7)); }
#screen > * { width: min(1560px, 100%); animation: enter .28s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.title-panel { margin: auto; width: min(460px, 100%) !important; text-align: center; display: flex; flex-direction: column; gap: 12px; padding: 30px 28px; }
.title-panel .emblem { width: 74px; height: 74px; margin: -66px auto 0; border-radius: 50%; background: linear-gradient(180deg, #ff4a3d 47%, #1d1d1d 47% 53%, #f6f6f6 53%); box-shadow: inset 0 0 0 5px #1d1d1d, 0 10px 30px rgba(0,0,0,.5); position: relative; animation: bob 3s ease-in-out infinite; }
.title-panel .emblem::after { content: ''; position: absolute; inset: 26px; border-radius: 50%; background: #f6f6f6; box-shadow: 0 0 0 5px #1d1d1d, 0 0 14px rgba(255,255,255,.8); }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-6deg); } }
.logo { font: 54px/0.95 var(--display); margin: 6px 0 0; color: var(--yellow); text-shadow: 0 4px 0 #2a5bb0, 0 8px 0 #183a78, 0 14px 26px rgba(0,0,0,.55); letter-spacing: 1px; }
.logo span { font-size: 66px; }
.tag { margin: 0 0 4px; color: var(--muted); }
.title-mons { display: flex; justify-content: center; gap: 4px; margin: -4px 0 4px; }
.topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.topbar h2 { margin: 0; font: 22px var(--display); color: var(--yellow); flex: 1; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.topbar .stats { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.topbar .stats .pill { padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.topbar .tools { display: flex; gap: 8px; }
.back { padding: 8px 12px; }
.badges { display: inline-flex; gap: 4px; }
.badge { width: 16px; height: 16px; border-radius: 50%; display: inline-block; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.16); }
.badge.got { background: radial-gradient(circle at 35% 35%, #fff, var(--tc) 45%, #222 130%); border-color: var(--tc); box-shadow: 0 0 10px var(--tc); }
.badge.big { width: 72px; height: 72px; animation: pop .5s; }
.elo { padding: 4px 11px; border-radius: 99px; background: linear-gradient(180deg, rgba(59,120,216,.45), rgba(59,120,216,.2)); border: 1px solid rgba(110,160,255,.5); font-size: 13px; }
.intro { color: var(--muted); margin: 0 0 12px; }

.menu { display: flex; flex-direction: column; gap: 14px; }
.menu-top { display: grid; grid-template-columns: 1fr 300px; gap: 14px; }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.menu-card { position: relative; overflow: hidden; text-align: left; padding: 22px; border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(14px); min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s, border-color .18s, box-shadow .18s; }
.menu-card b { font: 26px var(--display); position: relative; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.menu-card span { color: #c4d0e4; position: relative; max-width: 60%; }
.menu-card::before { content: ''; position: absolute; inset: 0; opacity: .55; background: radial-gradient(circle at 85% 30%, var(--c), transparent 62%); transition: opacity .2s; }
.menu-card .art { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); filter: drop-shadow(0 8px 10px rgba(0,0,0,.5)); transition: transform .25s; }
.menu-card:hover:not(:disabled) { transform: translateY(-3px); border-color: rgba(255,255,255,.35); box-shadow: 0 22px 60px rgba(0,0,0,.45); background: var(--panel); }
.menu-card:hover::before { opacity: .8; }
.menu-card:hover .art { transform: translateY(-54%) scale(1.06); }
.menu-card.story { --c: #ff5a3a; } .menu-card.ranked { --c: #ffcb05; } .menu-card.casual { --c: #3b78d8; } .menu-card.practice { --c: #4fd06a; }
.profile { display: flex; flex-direction: column; gap: 10px; }
.profile .who { display: flex; align-items: center; gap: 12px; }
.profile .who b { font: 20px var(--display); display: block; }
.profile .ava { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 50% 60%, rgba(255,255,255,.18), rgba(255,255,255,.03)); border: 2px solid var(--line-hi); display: grid; place-items: center; overflow: hidden; flex: none; }
.profile .rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.profile .stat { background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.profile .stat small { color: var(--muted); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.profile .stat b { font-size: 18px; }
.dexbar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 4px; }
.dexbar > div { height: 100%; background: linear-gradient(90deg, #ff5a3a, #ffcb05); }
.howto { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; backdrop-filter: blur(14px); }
.howto summary { cursor: pointer; font-weight: 700; }
.howto .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.howto h4 { margin: 12px 0 6px; color: var(--yellow); }
.howto ul { margin: 0; padding-left: 18px; color: #d8e2f0; font-size: 14px; }
.howto li { margin: 5px 0; }

/* Historia */
.story { display: flex; flex-direction: column; height: 100%; }
.story-body { display: grid; grid-template-columns: 1fr 350px; gap: 14px; flex: 1; min-height: 0; }
.map { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 460px; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: repeating-radial-gradient(circle at 20% 30%, rgba(255,255,255,.04) 0 2px, transparent 2px 22px), linear-gradient(160deg, #2e7ac4, #1b4c8a); }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .land path { fill: url(#landGrad); stroke: #f1e2a8; stroke-width: 0.8; }
.map .paths polyline { fill: none; stroke: #fbf0c8; stroke-width: 0.9; stroke-dasharray: 1.6 1.2; opacity: .9; }
.node { position: absolute; transform: translate(-50%, -50%); width: 32px; height: 32px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: #f6f0dc; border: 3px solid #4a3c26; color: #222; font-weight: 700; font-size: 12px; z-index: 1; box-shadow: 0 3px 8px rgba(0,0,0,.35); transition: transform .15s; }
.node:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.12); background: #f6f0dc; }
.node.gym { width: 40px; height: 40px; background: radial-gradient(circle at 35% 30%, #fff, var(--tc) 55%); border-color: #1e1e1e; color: #111; }
.node.gym:hover:not(:disabled) { background: radial-gradient(circle at 35% 30%, #fff, var(--tc) 55%); }
.node.route, .node.route:hover:not(:disabled) { background: radial-gradient(circle at 50% 40%, #c8f0a0, #6cbc4a); }
.node.route .portrait { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); pointer-events: none; }
.node.locked { filter: grayscale(1) brightness(.65); }
.node.done::after { content: '✓'; position: absolute; right: -7px; top: -7px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; font-size: 11px; display: grid; place-items: center; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.node.next { animation: pulse 1.3s infinite; }
.node.sel { outline: 3px solid #fff; outline-offset: 3px; }
.node label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; margin-top: 4px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; pointer-events: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(255, 203, 5, .35); } }
.node-info { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; overflow: auto; backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.node-info h3 { margin: 0 0 6px; font: 21px var(--display); }
.node-info h4 { margin: 18px 0 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }
.node-info button.primary { width: 100%; margin-top: 8px; }
.mini-team { display: flex; flex-wrap: wrap; gap: 8px; }
.mini { display: flex; flex-direction: column; align-items: center; background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(0,0,0,.2)); border: 1px solid var(--line); border-radius: 12px; padding: 4px 8px 6px; text-align: center; font-size: 12px; min-width: 70px; position: relative; }
.mini.caught::after { content: ''; position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(180deg, #e83030 46%, #222 46% 54%, #f4f4f4 54%); box-shadow: 0 0 0 1px #222; }
.mini.rare { background: linear-gradient(160deg, rgba(255,203,5,.25), rgba(160,80,255,.25)); border-color: rgba(255,203,5,.6); animation: glow 2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 16px rgba(255,203,5,.45); } }

.starter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.starter-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px; background: var(--panel); border-radius: var(--radius); backdrop-filter: blur(14px); box-shadow: var(--shadow); transition: transform .18s, border-color .18s; }
.starter-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, var(--tc), transparent 60%); opacity: .3; transition: opacity .2s; }
.starter-card > * { position: relative; }
.starter-card b { font: 22px var(--display); }
.starter-card small { color: var(--muted); text-align: center; }
.starter-card:hover:not(:disabled) { transform: translateY(-4px); border-color: var(--tc); background: var(--panel); }
.starter-card:hover::before { opacity: .55; }
.gen-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gen-tabs button.sel { border-color: var(--yellow); background: linear-gradient(180deg, rgba(255,203,5,.3), rgba(255,203,5,.1)); }

.scroll { overflow: auto; }
.teamview, .shop, .draft { display: flex; flex-direction: column; height: 100%; }
.mon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 10px; padding-bottom: 20px; }
.mon-card { display: grid; grid-template-columns: 72px 1fr; gap: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; backdrop-filter: blur(14px); transition: border-color .15s; }
.mon-card.in { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow), 0 0 22px rgba(255,203,5,.12); }
.mon-card .portrait { background: radial-gradient(circle at 50% 65%, rgba(255,255,255,.12), transparent 70%); border-radius: 12px; }
.mon-card .types { margin: 3px 0; }
.mon-card .moves { color: var(--muted); font-size: 12px; }
.xp { height: 6px; background: rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; margin: 4px 0; }
.xp > div { height: 100%; background: linear-gradient(90deg, #3aa0ff, #7ae0ff); transition: width .8s ease-out; }
.mon-card .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mon-card .acts button { padding: 6px 10px; font-size: 13px; }
.mon-card .acts button.on { background: linear-gradient(180deg, rgba(255,203,5,.3), rgba(255,203,5,.1)); border-color: var(--yellow); }
.mon-card .acts .evo { border-color: rgba(160,120,255,.6); }
.evohint { color: var(--muted); font-size: 12px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; padding-bottom: 20px; }
.shop-item { display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; backdrop-filter: blur(14px); transition: border-color .15s; }
.shop-item:hover { border-color: var(--line-hi); }
.shop-item.locked { opacity: .5; }
.shop-item .si { display: flex; flex-direction: column; gap: 2px; }
.shop-item .si small { color: var(--muted); }
.shop-item .price { font-weight: 700; }
.shop-item .acts { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end; }
.item-icon { width: 52px; height: 52px; border-radius: 50%; display: block; margin: 6px; position: relative; box-shadow: 0 6px 14px rgba(0,0,0,.35); }
.item-icon.pokeball, .item-icon.superball, .item-icon.ultraball { background: linear-gradient(180deg, var(--ic, #e83030) 46%, #222 46% 54%, #f4f4f4 54%); box-shadow: inset 0 0 0 3px #222, 0 6px 14px rgba(0,0,0,.35); }
.item-icon.pokeball::after, .item-icon.superball::after, .item-icon.ultraball::after { content: ''; position: absolute; inset: 19px; border-radius: 50%; background: #f4f4f4; box-shadow: 0 0 0 3px #222; }
.item-icon.superball { --ic: #2f6fe0; } .item-icon.ultraball { --ic: #383838; }
.item-icon.caramelo { border-radius: 30%; background: radial-gradient(circle at 35% 30%, #fff, #8ad 40%, #2a5fb0); }
.item-icon.agua, .item-icon.trueno, .item-icon.fuego, .item-icon.hoja, .item-icon.lunar, .item-icon.sol, .item-icon.hielo, .item-icon.noche, .item-icon.alba, .item-icon.dia { border-radius: 40% 60% 50% 50%; }
.item-icon.agua { background: radial-gradient(circle at 35% 30%, #fff, #4a90ff 50%, #1a4aa0); }
.item-icon.trueno { background: radial-gradient(circle at 35% 30%, #fff, #ffd23a 50%, #a07800); }
.item-icon.fuego { background: radial-gradient(circle at 35% 30%, #fff, #ff7a30 50%, #a02a00); }
.item-icon.hoja { background: radial-gradient(circle at 35% 30%, #fff, #5cd04a 50%, #1a6a10); }
.item-icon.lunar { background: radial-gradient(circle at 35% 30%, #fff, #8a8aa8 50%, #303048); }
.item-icon.sol { background: radial-gradient(circle at 35% 30%, #fff, #ff9a2a 50%, #b04000); }
.item-icon.hielo { background: radial-gradient(circle at 35% 30%, #fff, #a8f0ff 50%, #3a90b0); }
.item-icon.noche { background: radial-gradient(circle at 35% 30%, #aaa, #3a3050 50%, #10101a); }
.item-icon.alba { background: radial-gradient(circle at 35% 30%, #fff, #8ad0ff 50%, #5050c0); }
.item-icon.dia { background: radial-gradient(circle at 35% 30%, #fff, #f0f0ff 50%, #9090c0); }

.online-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.league { font: 22px var(--display); color: var(--yellow); }
.big-elo { font: 60px/1 var(--display); margin: 6px 0; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.online-body .panel h3 { margin-top: 0; }
.board ol { padding-left: 24px; margin: 0; }
.board li { display: grid; grid-template-columns: 1fr auto; padding: 7px 0; border-bottom: 1px solid var(--line); }
.board li:first-child b { color: var(--yellow); }
.board li small { grid-column: 1 / -1; color: var(--muted); }
.center-panel { margin: auto; width: min(440px, 100%) !important; text-align: center; }

.draft-head { text-align: center; margin-bottom: 10px; }
.draft-head h2 { margin: 0; font: 28px var(--display); color: var(--yellow); }
.draft-head p { margin: 4px 0; color: var(--muted); }
.dtimer { font: 30px var(--display); }
.pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; padding: 4px 2px 14px; }
.pool-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; background: var(--panel); backdrop-filter: blur(14px); border-radius: 14px; transition: transform .15s, border-color .15s; }
.pool-card:hover:not(:disabled) { transform: translateY(-2px); background: var(--panel-hi); }
.pool-card b { font-size: 13px; }
.pool-card.sel { border-color: var(--yellow); background: linear-gradient(180deg, rgba(255,203,5,.22), rgba(255,203,5,.06)); box-shadow: 0 0 0 2px var(--yellow), 0 0 22px rgba(255,203,5,.25); }
.pool-card.banned { opacity: .32; text-decoration: line-through; filter: grayscale(1); }
.draft > button.primary { align-self: center; min-width: 280px; margin-top: 4px; }
.diff { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.diff button.sel { border-color: var(--yellow); background: linear-gradient(180deg, rgba(255,203,5,.3), rgba(255,203,5,.1)); }

.results { margin: auto; width: min(580px, 100%) !important; text-align: center; overflow: hidden; }
.results h1 { font: 48px var(--display); margin: 0 0 10px; animation: pop .4s; position: relative; }
.results h1.win { color: var(--yellow); text-shadow: 0 4px 0 #2a5bb0, 0 10px 30px rgba(255,200,0,.35); }
.results h1.lose { color: #ff8a80; text-shadow: 0 4px 0 #5a1a1a; }
.results > * { position: relative; }
.caught { display: flex; flex-direction: column; align-items: center; }
.badge-won { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.reward { font-size: 22px; margin: 8px 0; font-weight: 700; }
.xp-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; text-align: left; }
.xp-row { display: flex; gap: 10px; align-items: center; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; padding: 4px 10px; }
.xp-row > div { flex: 1; }
.xp-row .evo { color: #c8a8ff; font-weight: 700; }
.xp-row .lvup { color: var(--yellow); font-weight: 700; }
.results .acts { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.results .confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -14px; width: 8px; height: 13px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(760px) rotate(720deg); opacity: .2; } }

#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { background: var(--panel-hi); border: 1px solid var(--line-hi); border-radius: 12px; padding: 10px 16px; animation: fadein .2s; box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.toast.bad { border-color: rgba(232,64,58,.7); }
.toast.announce { border-color: rgba(255,203,5,.8); max-width: min(560px, 90vw); }
@keyframes fadein { from { opacity: 0; transform: translateY(-6px); } }
#conn { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(8,14,26,.75); font-weight: 700; backdrop-filter: blur(4px); }

/* ---------- Combate ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#hud > * { position: absolute; }
body:not(.in-battle) #hud { display: none; }
.timer { top: 12px; left: 50%; transform: translateX(-50%); font: 26px var(--display); padding: 4px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.35); backdrop-filter: blur(10px); }
.timer.sudden { color: #ff8a80; border-color: #ff5040; animation: pulse 1s infinite; }
.team { top: 12px; display: flex; flex-direction: column; gap: 5px; width: 236px; }
.team.mine { left: 12px; } .team.foe { right: 12px; }
.team .tname { font-weight: 700; font-size: 12px; color: var(--muted); padding: 0 4px; text-shadow: 0 1px 2px #000; }
.team.foe .tname { text-align: right; }
.tm { display: flex; align-items: center; gap: 6px; background: linear-gradient(90deg, rgba(13,21,38,.9), rgba(13,21,38,.75)); border: 1px solid var(--line); border-radius: 12px; padding: 3px 8px 4px 3px; position: relative; backdrop-filter: blur(10px); transition: opacity .2s; }
.tm .portrait { background: radial-gradient(circle at 50% 65%, rgba(255,255,255,.14), transparent 70%); border-radius: 10px; }
.tm.active { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow), 0 0 16px rgba(255,203,5,.2); }
.tm.fainted { filter: grayscale(1); opacity: .45; }
.tm.cool kbd { opacity: .3; }
.tinfo { flex: 1; font-size: 13px; }
.tinfo small { color: var(--muted); }
.tinfo kbd { position: absolute; right: 6px; top: 4px; }
.hp { height: 8px; border-radius: 5px; background: rgba(0,0,0,.55); overflow: hidden; margin-top: 3px; box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.hp > div { height: 100%; background: linear-gradient(180deg, #8dffa0, #2fb84c); transition: width .2s; }
.hp > div.mid { background: linear-gradient(180deg, #ffe878, #dca800); }
.hp > div.low { background: linear-gradient(180deg, #ff9a8a, #d8322a); }
.bottom { bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 7px; }
.energy { position: relative; width: 440px; height: 15px; border-radius: 9px; background: rgba(0,0,0,.6); border: 1px solid var(--line); overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.energy .fill { height: 100%; background: linear-gradient(90deg, #2f8fff, #7ae8ff); box-shadow: 0 0 12px rgba(122,232,255,.6); transition: width .1s; }
.energy::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0,0,0,.45) calc(10% - 1px) 10%); }
.energy span { position: absolute; inset: 0; z-index: 1; text-align: center; font-size: 11px; font-weight: 700; line-height: 15px; text-shadow: 0 1px 2px #000; }
.moves { display: flex; gap: 7px; }
.mv { position: relative; width: 116px; padding: 7px 9px 8px; border-radius: 12px; background: linear-gradient(180deg, rgba(26,38,64,.95), rgba(13,21,38,.92)); border: 1px solid var(--line); overflow: hidden; font-size: 13px; box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 3px 0 var(--tc); }
.mv::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 0%, var(--tc), transparent 65%); opacity: .25; }
.mv > * { position: relative; }
.mv b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.mv small { color: var(--muted); font-size: 11px; }
.mv .cd { position: absolute; inset: 0; background: conic-gradient(rgba(0,0,0,.68) calc(var(--p, 0) * 360deg), transparent 0); }
.mv .cdt { position: absolute; inset: 0; display: grid; place-items: center; font: 22px var(--display); text-shadow: 0 2px 4px #000; }
.mv.noenergy { opacity: .45; }
.mv.protect.on { box-shadow: 0 0 18px #70ffb0, inset 0 3px 0 var(--tc); }
.balls { right: 12px; bottom: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgba(0,0,0,.35); min-width: 220px; }
.balls .bt { color: var(--muted); font-size: 12px; }
.balls .ball { display: flex; align-items: center; gap: 7px; padding: 3px 7px; border-radius: 9px; }
.balls .ball.sel { background: linear-gradient(90deg, rgba(255,203,5,.25), rgba(255,203,5,.05)); outline: 1px solid var(--yellow); }
.balls .ball.none { opacity: .35; }
.balls .ball small { color: #fff; margin-left: auto; font-weight: 700; }
.balls i { width: 15px; height: 15px; border-radius: 50%; background: linear-gradient(180deg, #e83030 45%, #222 45% 55%, #f4f4f4 55%); box-shadow: 0 0 0 1px #222; }
.balls i.superball { background: linear-gradient(180deg, #2f6fe0 45%, #222 45% 55%, #f4f4f4 55%); }
.balls i.ultraball { background: linear-gradient(180deg, #333 45%, #ffd23a 45% 55%, #f4f4f4 55%); }
.help-hint { left: 12px; bottom: 14px; font-size: 12px; color: rgba(255,255,255,.72); text-shadow: 0 1px 3px #000; max-width: 300px; }
.plate { left: 0; top: 0; text-align: center; min-width: 110px; will-change: transform; }
.plate .pn { font-weight: 700; font-size: 13px; text-shadow: 0 1px 3px #000, 0 0 2px #000; white-space: nowrap; }
.plate.mine .pn { color: var(--yellow); }
.plate .pn small { color: #cfd8e8; }
.plate .hp { width: 104px; margin: 2px auto 0; height: 7px; border: 1px solid rgba(0,0,0,.7); }
.plate .sts { display: flex; gap: 2px; justify-content: center; margin-top: 2px; }
.st { font: normal 700 9px/1 var(--text); padding: 2px 4px; border-radius: 4px; color: #fff; background: #555; box-shadow: 0 1px 2px rgba(0,0,0,.5); }
.st.burn { background: #e05020; } .st.poison { background: #9040c0; } .st.wet { background: #3a7ae0; } .st.stun { background: #d0a000; color: #111; }
.st.slow { background: #6a7a40; } .st.seed { background: #3a9a30; } .st.haste { background: #3aa0c0; } .st.power { background: #c03030; } .st.hidden { background: #2a5a2a; }
.floats { inset: 0; }
.float { position: absolute; transform: translate(-50%, -50%); font: 24px var(--display); color: #fff; text-shadow: 0 2px 0 #000, 0 0 8px rgba(0,0,0,.9); animation: rise 1.1s ease-out forwards; text-align: center; white-space: nowrap; }
.float small { display: block; font: 700 12px var(--text); }
.float.big { font-size: 32px; }
.float.eff { color: #ffe040; } .float.weak { color: #b8c4d8; } .float.dot { font-size: 15px; color: #ffb0a0; }
.float.heal { color: #7dff9a; } .float.info { font: 700 15px var(--text); color: #fff; }
.float.shake { font-size: 28px; color: #fff; }
@keyframes rise { 0% { opacity: 0; margin-top: 10px; transform: translate(-50%, -50%) scale(.6); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 25% { transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; margin-top: -64px; } }
.banners { top: 25%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.banner { font: 28px var(--display); color: #fff; text-shadow: 0 3px 0 #000, 0 0 14px rgba(0,0,0,.8); animation: pop .3s; white-space: nowrap; }
.banner.big { font-size: 78px; color: var(--yellow); text-shadow: 0 5px 0 #2a5bb0, 0 0 30px rgba(0,0,0,.6); }
.banner.big2 { font-size: 46px; }
.banner.good { color: #8affa0; } .banner.bad { color: #ff9a8a; } .banner.info { font: 700 18px var(--text); }
.banner.rare { color: #ffd84a; font-size: 32px; text-shadow: 0 3px 0 #000, 0 0 22px rgba(255,200,40,.9); }
@keyframes pop { from { transform: scale(1.4); opacity: 0; } }

@media (max-width: 960px) {
  .story-body, .online-body, .menu-top { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: 1fr; }
  .team { width: 172px; }
  .tinfo small { display: none; }
  .mv { width: 86px; font-size: 11px; }
  .energy { width: 300px; }
  .help-hint { display: none; }
  .logo { font-size: 40px; } .logo span { font-size: 48px; }
}

/* Movimientos y tope de nivel */
.cap { color: #ffb070; font-weight: 700; }
.movechips { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 2px; }
.mchip { font-size: 11px; padding: 2px 7px; border-radius: 7px; background: rgba(0,0,0,.3); border: 1px solid var(--tc); color: #eef3fb; }
.newmoves { color: #c8a8ff; font-weight: 700; display: block; }
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(4,8,16,.6); backdrop-filter: blur(4px); animation: fadein .15s; padding: 16px; }
.modal-box { width: min(620px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; gap: 6px; }
.modal-box h3 { margin: 0; font: 22px var(--display); }
.modal-box .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.move-list { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.move-row { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 2px 10px; align-items: center; text-align: left; padding: 8px 10px; border-left: 4px solid var(--tc); }
.move-row small { grid-column: 2 / -1; color: var(--muted); font-size: 12px; }
.move-row em { font-style: normal; color: var(--muted); font-size: 12px; }
.move-row .slot { grid-row: span 2; font: 12px var(--display); color: var(--yellow); text-align: center; }
.move-row.sel { background: linear-gradient(90deg, rgba(255,203,5,.2), rgba(255,203,5,.04)); border-color: var(--yellow); border-left-color: var(--tc); }

/* Shiny, ficha y vitaminas */
.shiny-star { font-style: normal; color: #ffd84a; text-shadow: 0 0 8px rgba(255,216,74,.9); font-weight: 700; }
.portrait.shiny { filter: drop-shadow(0 0 6px rgba(255,220,90,.75)); }
.mon-card.is-shiny { border-color: rgba(255,216,74,.55); background: linear-gradient(160deg, rgba(255,216,74,.12), var(--panel-flat)); }
.ficha { width: min(640px, 100%); }
.ficha-head { display: flex; gap: 14px; align-items: center; }
.ficha-head h3 { margin: 0 0 4px; }
.stat-rows { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.stat-row { display: grid; grid-template-columns: 76px 1fr 84px 120px auto; gap: 8px; align-items: center; font-size: 13px; }
.stat-row .sl { color: var(--muted); }
.stat-row .sbar { height: 9px; border-radius: 5px; background: rgba(255,255,255,.1); overflow: hidden; }
.stat-row .sbar > div { height: 100%; background: linear-gradient(90deg, #3aa0ff, #7ae0ff); }
.stat-row .vdots { font-size: 10px; letter-spacing: 1px; color: #c8a8ff; white-space: nowrap; }
.stat-row button { padding: 4px 8px; font-size: 12px; }
.stat-row button.dim { opacity: .5; }
.base-stats { margin: 8px 0 4px; }
.base-stats small { color: var(--muted); }
.base-stats .bs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 4px; }
.base-stats .bs div { display: flex; flex-direction: column; align-items: center; gap: 2px; height: 86px; justify-content: flex-end; font-size: 11px; }
.base-stats .bs i { display: block; width: 100%; max-width: 34px; background: linear-gradient(180deg, #ffcb05, #e8403a); border-radius: 4px 4px 0 0; min-height: 3px; }
.base-stats .bs b { font-size: 12px; }
.base-stats .bs span { color: var(--muted); }
.item-icon.maspsps { border-radius: 30%; background: radial-gradient(circle at 35% 30%, #fff, #ffd040 45%, #c08000); }
.item-icon.proteina { border-radius: 30%; background: radial-gradient(circle at 35% 30%, #fff, #ff8060 45%, #a02020); }
.item-icon.hierro { border-radius: 30%; background: radial-gradient(circle at 35% 30%, #fff, #b8c0d8 45%, #404860); }
.item-icon.carburante { border-radius: 30%; background: radial-gradient(circle at 35% 30%, #fff, #7ae0ff 45%, #2060a0); }

/* Cursor personalizado: Poké Ball; en los botones se pone dorada. En combate manda la retícula 3D. */
html, body, #screen, button, input { cursor: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2228%22 height=%2228%22 viewBox=%220 0 28 28%22%3E%3Cpath d=%22M2 2 L2 20 L7 15 L11 24 L15 22 L11 13 L18 13 Z%22 fill=%22#ffffff%22 stroke=%22#1a1a1a%22 stroke-width=%222%22 stroke-linejoin=%22round%22/%3E%3Ccircle cx=%2220%22 cy=%2220%22 r=%226.5%22 fill=%22#f4f4f4%22 stroke=%22#1a1a1a%22 stroke-width=%221.6%22/%3E%3Cpath d=%22M13.5 20 A6.5 6.5 0 0 1 26.5 20 Z%22 fill=%22#e83030%22/%3E%3Crect x=%2213.5%22 y=%2219.2%22 width=%2213%22 height=%221.6%22 fill=%22#1a1a1a%22/%3E%3Ccircle cx=%2220%22 cy=%2220%22 r=%221.8%22 fill=%22#f4f4f4%22 stroke=%22#1a1a1a%22 stroke-width=%221.2%22/%3E%3C/svg%3E") 2 2, auto; }
button:not(:disabled):hover, .menu-card:hover, .node:hover, .pool-card:hover, .starter-card:hover, .howto summary:hover, .move-row:hover { cursor: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2228%22 height=%2228%22 viewBox=%220 0 28 28%22%3E%3Cpath d=%22M2 2 L2 20 L7 15 L11 24 L15 22 L11 13 L18 13 Z%22 fill=%22#fff4b0%22 stroke=%22#1a1a1a%22 stroke-width=%222%22 stroke-linejoin=%22round%22/%3E%3Ccircle cx=%2220%22 cy=%2220%22 r=%226.5%22 fill=%22#f4f4f4%22 stroke=%22#1a1a1a%22 stroke-width=%221.6%22/%3E%3Cpath d=%22M13.5 20 A6.5 6.5 0 0 1 26.5 20 Z%22 fill=%22#ffcb05%22/%3E%3Crect x=%2213.5%22 y=%2219.2%22 width=%2213%22 height=%221.6%22 fill=%22#1a1a1a%22/%3E%3Ccircle cx=%2220%22 cy=%2220%22 r=%221.8%22 fill=%22#f4f4f4%22 stroke=%22#1a1a1a%22 stroke-width=%221.2%22/%3E%3C/svg%3E") 2 2, auto; }
button:disabled { cursor: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2228%22 height=%2228%22 viewBox=%220 0 28 28%22%3E%3Cpath d=%22M2 2 L2 20 L7 15 L11 24 L15 22 L11 13 L18 13 Z%22 fill=%22#ffffff%22 stroke=%22#1a1a1a%22 stroke-width=%222%22 stroke-linejoin=%22round%22/%3E%3Ccircle cx=%2220%22 cy=%2220%22 r=%226.5%22 fill=%22#f4f4f4%22 stroke=%22#1a1a1a%22 stroke-width=%221.6%22/%3E%3Cpath d=%22M13.5 20 A6.5 6.5 0 0 1 26.5 20 Z%22 fill=%22#e83030%22/%3E%3Crect x=%2213.5%22 y=%2219.2%22 width=%2213%22 height=%221.6%22 fill=%22#1a1a1a%22/%3E%3Ccircle cx=%2220%22 cy=%2220%22 r=%221.8%22 fill=%22#f4f4f4%22 stroke=%22#1a1a1a%22 stroke-width=%221.2%22/%3E%3C/svg%3E") 2 2, auto; }
body.in-battle, body.in-battle #view, body.in-battle #hud { cursor: none; }

.stat-row .vdots { font-size: 11px; letter-spacing: 0; color: var(--muted); }
.stat-row .vdots b { color: #e8eef8; }
.stat-row .vdots b.iv-top { color: #ffd84a; }
.evgain { color: #7ae0ff; }

.topbar .nav { display: flex; gap: 8px; }
.menu-card.mons { --c: #c070e0; }

.region-tabs button.sel { border-color: var(--yellow); background: linear-gradient(180deg, rgba(255,203,5,.3), rgba(255,203,5,.1)); }
.region-tabs small { color: var(--muted); }
.map.region-johto { background: repeating-radial-gradient(circle at 70% 60%, rgba(255,255,255,.04) 0 2px, transparent 2px 22px), linear-gradient(160deg, #2f6fb0, #1a4580); }
.node.route { width: 24px; height: 24px; }
.node.route label { display: none; }
.node.route:hover label, .node.route.sel label { display: block; z-index: 3; }
.node.route .portrait { bottom: 2px; }
.reward-items { color: #c8a8ff; font-weight: 700; }

/* Mapa aproximado de la región */
.map .land .road-edge { fill: none; stroke: #8a6a3a; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 9px; opacity: .55; }
.map .land .road { fill: none; stroke: #f0dca0; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 5px; }
.map .land .searoute { fill: none; stroke: #bfe6ff; stroke-dasharray: 2 1.6; vector-effect: non-scaling-stroke; stroke-width: 3px; opacity: .8; }
.map .land .mount { fill: #8a7a62; stroke: #5e5040; stroke-width: .3; }
.map .land .snow { fill: #f4f4f4; }
.map .land .forest { fill: #2f6e2a; stroke: #1f4f1c; stroke-width: .3; }
.map .land .lake { fill: #3d86e0; stroke: #bfe6ff; stroke-width: .3; }
.city { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; z-index: 0; }
.city i { width: 22px; height: 16px; border-radius: 4px; background: linear-gradient(180deg, #ff8a70, #d8483a); border: 2px solid #5a1e18; box-shadow: 0 2px 4px rgba(0,0,0,.4), inset 0 -4px 0 rgba(0,0,0,.18); }
.city span { margin-top: 18px; position: absolute; top: 4px; font-size: 10px; font-weight: 700; color: #fff8dc; text-shadow: 0 1px 2px #000, 0 0 3px #000; white-space: nowrap; }
.node.gym { z-index: 2; }

.city span { margin-top: 0; top: -17px; }

/* Barra propia de región (Historia, Mis Pokémon) */
.subbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: -6px 0 14px; padding: 8px 12px; background: rgba(13,21,38,.62); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(12px); }
.subbar .region-tabs { display: flex; gap: 6px; }
.subbar .region-tabs button { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 14px; line-height: 1.15; min-width: 120px; }
.subbar .region-tabs button b { font: 15px var(--display); }
.subbar .region-tabs button small { color: var(--muted); font-size: 11px; }
.subbar .badges { display: inline-flex; gap: 5px; padding-left: 14px; border-left: 1px solid var(--line); }
.subbar .badge { width: 20px; height: 20px; }
.subbar .next-goal { margin-left: auto; font-size: 13px; color: #d8e2f0; }

.map[class*="region-"] { background-size: 100% 100%; background-position: center; }
.city span { top: -26px; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(20,14,6,.55); }
.node label small { display: block; font-size: 10px; font-weight: 600; color: #fff2c8; }

/* ---------- Cuenta, perfil, recompensas y novedades ---------- */
.ndot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px rgba(0,0,0,.4), 0 0 10px var(--red); vertical-align: middle; margin-left: 4px; }
button.link { background: none; border: 0; padding: 4px 6px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
button.link:hover:not(:disabled) { background: none; color: var(--fg); }
button.icon { padding: 4px 9px; font-size: 14px; }
.title-chip { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #1a1405; background: linear-gradient(180deg, #ffe680, #f0b400); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.pill { padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.3); border: 1px solid var(--line); font-size: 13px; }

/* Portada */
.auth { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 13px; background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.auth-tabs button { border: 0; background: none; padding: 8px 6px; font-size: 14px; border-radius: 9px; }
.auth-tabs button.sel { background: linear-gradient(180deg, rgba(255,203,5,.32), rgba(255,203,5,.12)); color: var(--yellow); font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.auth-msg { margin: 0; min-height: 0; font-size: 13px; }
.auth-msg.bad { color: #ff8a80; }
.auth .link { align-self: center; }
.title-panel.compact .title-mons, .title-panel.compact .tag { display: none; }
.footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.menu > .footer { margin-top: -4px; }

/* Avatares con marco */
.ava { --s: 84px; --ring: rgba(255,255,255,.22); width: calc(var(--s) + 8px); height: calc(var(--s) + 8px); border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 60%, rgba(255,255,255,.18), rgba(255,255,255,.03)); border: 3px solid var(--ring); }
.profile .ava { width: 92px; height: 92px; }
.frame-bronce { --ring: #c27c46; } .frame-plata { --ring: #cfd8e3; } .frame-oro { --ring: #ffcb05; }
.frame-platino { --ring: #7fe6d4; } .frame-diamante { --ring: #7ab8ff; }
.ava.frame-oro, .ava.frame-platino { box-shadow: 0 0 14px var(--ring); }
.ava.frame-diamante { box-shadow: 0 0 18px var(--ring), inset 0 0 12px rgba(122,184,255,.35); }
.ava.frame-maestro { border-color: transparent; background: radial-gradient(circle at 50% 60%, #2a2046, #120d22) padding-box, conic-gradient(from var(--a, 0deg), #ffcb05, #ff5ad1, #7a5cff, #46d0ff, #ffcb05) border-box; box-shadow: 0 0 20px rgba(200,120,255,.55); animation: master 4s linear infinite; }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes master { to { --a: 360deg; } }
.sw { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--ring); background: rgba(0,0,0,.3); vertical-align: middle; flex: none; }
.sw.frame-none { --ring: rgba(255,255,255,.2); }
.sw.frame-maestro { border: 0; background: radial-gradient(circle closest-side, #120d22 66%, transparent 70%), conic-gradient(#ffcb05, #ff5ad1, #7a5cff, #46d0ff, #ffcb05); }

/* Barra superior */
.me-chip { display: flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 99px; font-weight: 500; }
.me-chip .ava { --s: 30px; border-width: 2px; }
.profile .who { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; border-radius: 14px; }
.profile .who:hover b { color: var(--yellow); }
.profile .who:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.profile .who .title-chip { display: block; width: fit-content; margin: 2px 0 4px; }
.guest-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border-color: rgba(255,176,112,.5); background: linear-gradient(180deg, rgba(255,140,60,.18), rgba(255,140,60,.06)); }
.guest-cta b { color: #ffc89a; } .guest-cta small { color: var(--muted); }
.menu-card em.ready { color: var(--yellow); font-style: normal; font-weight: 700; }

/* Perfil */
.profile-view { display: flex; flex-direction: column; height: 100%; }
.pv-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; flex: 1; min-height: 0; padding-bottom: 20px; }
.pv-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pv-col .panel h3 { margin: 0 0 10px; }
.pv-col .panel h4 { margin: 14px 0 6px; color: var(--yellow); font-size: 13px; text-transform: uppercase; letter-spacing: .6px; }
.trainer-card { display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, rgba(255,203,5,.12), transparent 55%), var(--panel); }
.trainer-card .ava { --s: 120px; border-width: 4px; }
.tc-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.name-row { display: flex; align-items: center; gap: 8px; }
.name-row h2 { margin: 0; font: 26px var(--display); overflow-wrap: anywhere; }
.name-row input { padding: 8px 12px; }
.tc-info p { margin: 0; }
.tc-info .title-chip { align-self: flex-start; }
.tc-league { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-grid .stat { background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.stat-grid .stat small { color: var(--muted); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.stat-grid .stat b { font-size: 18px; overflow-wrap: anywhere; }
.history .h-row { display: grid; grid-template-columns: 28px auto 1fr auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.history .h-row:last-child { border-bottom: 0; }
.history .res { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; }
.history .won .res { background: rgba(79,208,106,.25); color: var(--green); }
.history .lost .res { background: rgba(232,64,58,.22); color: #ff8a80; }
.h-team { display: flex; align-items: center; gap: 0; }
.h-team .vs { font-size: 11px; color: var(--muted); margin: 0 4px; }
.h-info { display: flex; flex-direction: column; min-width: 0; }
.h-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-info small { color: var(--muted); font-size: 12px; }
.history .delta { font-variant-numeric: tabular-nums; }
.history .won .delta { color: var(--green); } .history .lost .delta { color: #ff8a80; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 99px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip.sel { border-color: var(--yellow); background: linear-gradient(180deg, rgba(255,203,5,.3), rgba(255,203,5,.1)); }
.account { display: flex; flex-direction: column; gap: 10px; }
.account p { margin: 0; }
.account .pw summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }
.account .pw > * + * { margin-top: 8px; }
.account > .danger { align-self: flex-start; }
.ava-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; max-height: 60vh; overflow: auto; }
.ava-opt { padding: 6px; display: grid; place-items: center; min-height: 62px; }
.ava-opt.sel { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(255,203,5,.3); }

/* Clasificatoria: temporada y recompensas */
.online-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.season-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.season-head h3 { margin: 0; font: 22px var(--display); color: var(--yellow); }
.reward-track { position: relative; display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.track-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.track-bar div { height: 100%; background: linear-gradient(90deg, #c27c46, #cfd8e3, #ffcb05, #7fe6d4, #7ab8ff, #ff5ad1); border-radius: inherit; }
.lr { display: grid; grid-template-columns: auto 92px 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.22); opacity: .6; }
.lr .sw { grid-row: 1 / 3; width: 26px; height: 26px; }
.lr > b { font-size: 15px; }
.lr > small { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 12px; }
.lr .loot { grid-column: 3; grid-row: 1 / 3; display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; }
.lr .loot > span:not(.title-chip) { padding: 1px 8px; border-radius: 99px; background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.lr .state, .lr button { grid-column: 4; grid-row: 1 / 3; font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; }
.lr button { padding: 8px 14px; color: #1a1405; }
.lr.reached { opacity: 1; }
.lr.claimed .state { color: var(--green); }
.lr.ready { border-color: rgba(255,203,5,.7); background: linear-gradient(90deg, rgba(255,203,5,.16), rgba(0,0,0,.2)); animation: glow 2s ease-in-out infinite; }
.season-end { margin: 0; }
.board ol { list-style: none; padding: 0; }
.board li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; }
.board li small { grid-column: auto; }
.board li .pos { font: 15px var(--display); color: var(--muted); text-align: center; }
.board li.top1 .pos { color: #ffcb05; } .board li.top2 .pos { color: #cfd8e3; } .board li.top3 .pos { color: #c27c46; }
.board li .who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.board li .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li:first-child b { color: inherit; }
.board li .pts { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.board li .pts small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.board li small.title-chip { color: #1a1405; font-size: 11px; }
.board li.me { background: rgba(255,203,5,.1); border-radius: 8px; }
.my-rank { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(255,203,5,.1); border: 1px solid rgba(255,203,5,.35); }
.promoted { display: flex; align-items: center; justify-content: center; gap: 10px; animation: pop .5s; }
.promoted .sw { width: 34px; height: 34px; border-width: 5px; }
.promoted p { margin: 0; }

/* Novedades y avisos */
.notes-list { overflow: auto; display: flex; flex-direction: column; gap: 16px; padding-right: 4px; }
.notes-list section { border-left: 3px solid var(--line); padding-left: 14px; }
.notes-list section.current { border-color: var(--yellow); }
.notes-list .nv { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.notes-list .nv b { font: 18px var(--display); color: var(--yellow); }
.notes-list .nv small { color: var(--muted); }
.notes-list .nv em { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: rgba(255,203,5,.2); color: var(--yellow); }
.notes-list ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #d8e2f0; }
.ntag { display: inline-block; flex: none; white-space: nowrap; min-width: 62px; text-align: center; margin-right: 8px; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.ntag.nuevo { background: rgba(79,208,106,.22); color: var(--green); }
.ntag.cambio { background: rgba(59,120,216,.3); color: #9cc0ff; }
.ntag.arreglo { background: rgba(255,176,112,.2); color: #ffc89a; }
.legal .scroll { overflow: auto; font-size: 14px; color: #d8e2f0; }
.legal h4 { color: var(--yellow); margin: 12px 0 4px; }
#update-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-radius: 14px; background: var(--panel-hi); border: 1px solid rgba(255,203,5,.6); box-shadow: var(--shadow); backdrop-filter: blur(14px); animation: fadein .2s; }
#update-bar button { padding: 8px 16px; }
.nojs.banned h2 { font: 22px var(--display); color: var(--yellow); margin: 0 0 12px; }
.nojs { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; text-align: center; background: var(--bg); color: var(--fg); font: 16px/1.5 var(--text); }

@media (max-width: 960px) {
  .pv-body { grid-template-columns: 1fr; }
  .lr { grid-template-columns: auto 1fr auto; }
  .lr .loot { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
  .lr > small { grid-column: 2; }
  .lr .state, .lr button { grid-column: 3; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .me-chip span { display: none; }
  .me-chip { padding: 3px; }
}

/* ---------- Torre Batalla ---------- */
.menu-card.tower { --c: #a070ff; } .menu-card.ladder { --c: #30c8d8; }
.tower-body { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: start; }
.tower-main { display: flex; flex-direction: column; gap: 10px; }
.tower-main h3, .tower-side h3 { margin: 0; }
.tower-main h4 { margin: 6px 0 0; }
.tower-main > button.primary { align-self: center; min-width: 260px; }
.tower-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tslot { display: flex; align-items: center; gap: 8px; min-height: 72px; padding: 6px 10px; border-radius: 14px; border: 2px dashed var(--line-hi); color: var(--muted); }
.tslot.full { border-style: solid; border-color: var(--yellow); background: rgba(255,203,5,.08); color: var(--fg); cursor: pointer; }
.tower-pools { max-height: calc(100vh - 380px); min-height: 220px; overflow: auto; }
.tower-pools .pool { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.tower-pools .pool-card small { font-size: 11px; text-align: center; }
.tower-head { display: flex; gap: 18px; align-items: center; }
.tower-head .streak { display: flex; flex-direction: column; align-items: center; min-width: 110px; padding: 8px 14px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.tower-head .streak b { font: 54px/1 var(--display); color: var(--yellow); text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.tower-head .block b { font: 20px var(--display); }
.tower-head .block small { color: var(--muted); }
.tdots { display: flex; gap: 6px; margin: 8px 0 4px; }
.tdots i { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.18); }
.tdots i.won { background: var(--green); border-color: #2a9a45; }
.tdots i.now { border-color: var(--yellow); box-shadow: 0 0 10px rgba(255,203,5,.6); }
.tdots i.brain { border-radius: 4px; transform: rotate(45deg) scale(.9); border-color: #c8a8ff; }
.next-foe { padding: 10px 14px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.next-foe.brain { border-color: #c8a8ff; background: linear-gradient(180deg, rgba(160,112,255,.22), rgba(0,0,0,.25)); }
.next-foe h4 { margin: 0 0 4px; }
.brain-tag { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #a070ff; color: #fff; vertical-align: middle; }
.tower-team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tcard { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.tcard .slot { position: absolute; top: 6px; left: 8px; font: 14px var(--display); color: var(--yellow); }
.tcard .acts { margin-left: auto; display: flex; flex-direction: column; gap: 4px; }
.tcard .acts button { padding: 2px 9px; }
.tower-acts { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }
.tower-acts .primary { min-width: 220px; }
.tower-side { display: flex; flex-direction: column; gap: 14px; }
.symbols { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.symbol { display: inline-block; width: 26px; height: 26px; transform: rotate(45deg); border-radius: 5px; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.16); }
.symbol.got.plata { background: radial-gradient(circle at 35% 35%, #fff, #b8c4d8 50%, #4a5468); border-color: #dfe6f2; box-shadow: 0 0 10px rgba(220,230,255,.6); }
.symbol.got.oro { background: radial-gradient(circle at 35% 35%, #fff, #ffcb05 50%, #8a6a00); border-color: #ffe066; box-shadow: 0 0 12px rgba(255,203,5,.7); }
.symbol.mini { width: 14px; height: 14px; margin: 0 3px; }
.symbol.big { width: 64px; height: 64px; margin: 10px; animation: pop .5s; }
.tower-res { font-size: 20px; } .tower-res.lose { color: #ffb0a8; }
.board li.clickable { cursor: pointer; } .board li.clickable:hover b { text-decoration: underline; }
.board li.me b { color: var(--yellow); }
.board > button { margin-top: 10px; width: 100%; }

/* ---------- Ladder ---------- */
.ladder-bar input { width: 240px; margin-left: auto; padding: 9px 13px; }
.ladder-table { display: flex; flex-direction: column; gap: 10px; }
.ladder-table .scroll { max-height: calc(100vh - 290px); overflow: auto; }
.ladder-info { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); }
.ladder-info .pill { padding: 4px 10px; border-radius: 99px; background: rgba(255,203,5,.12); border: 1px solid rgba(255,203,5,.4); color: var(--fg); }
.ladder-rows { width: 100%; border-collapse: collapse; }
.ladder-rows th { position: sticky; top: 0; background: #121c30; text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 8px 10px; }
.ladder-rows td { padding: 8px 10px; border-top: 1px solid var(--line); }
.ladder-rows tbody tr { cursor: pointer; transition: background .12s; }
.ladder-rows tbody tr:hover { background: rgba(255,255,255,.05); }
.ladder-rows tr.me { background: rgba(255,203,5,.1); }
.ladder-rows tr.gap td { text-align: center; color: var(--muted); cursor: default; }
.ladder-rows .rank { font: 16px var(--display); width: 56px; }
.ladder-rows .rank.r1 { color: #ffcb05; } .ladder-rows .rank.r2 { color: #dfe6f2; } .ladder-rows .rank.r3 { color: #e0965a; }
.ladder-rows .who { font-weight: 700; }
.ladder-rows .tdex { display: inline-block; vertical-align: middle; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: #556178; vertical-align: middle; }
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.you { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--yellow); color: #1a1405; vertical-align: middle; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.user-card .user-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.user-card h4 { margin: 8px 0 0; }

@media (max-width: 960px) {
  .tower-body { grid-template-columns: 1fr; }
  .tower-slots, .tower-team { grid-template-columns: 1fr; }
  .tower-pools { max-height: none; }
  .ladder-bar input { width: 100%; margin-left: 0; }
  .ladder-rows th:nth-child(n+5), .ladder-rows td:nth-child(n+5) { display: none; }
}
.user-card .stat { background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.user-card .stat small { color: var(--muted); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.user-card .stat b { font-size: 18px; }
/* Mapa vectorial: lienzo 16:10 centrado que encaja sin deformarse; el mar del SVG rellena el resto */
.map { container-type: size; background: #3b8ad6; aspect-ratio: 16 / 10; min-height: 0; max-height: 100%; align-self: start; }
.map-stage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90cqw, 144cqh); height: min(88cqh, 56.25cqw); }
.map .mapart { overflow: visible; z-index: 0; }
.next-foe .mini { background: radial-gradient(circle at 50% 60%, rgba(200,215,240,.55), rgba(120,140,180,.18) 70%); }

/* Regiones que llegarán más adelante */
.subbar .region-tabs { flex-wrap: wrap; }
.subbar .region-tabs button.soon { min-width: 0; padding: 6px 10px; opacity: .5; border-style: dashed; background: rgba(0,0,0,.2); }
.subbar .region-tabs button.soon:hover { opacity: .75; background: rgba(0,0,0,.2); }
.subbar .region-tabs button.soon b { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.subbar .region-tabs button.soon svg { width: 12px; height: 12px; flex: none; }

/* Arena de gimnasio: nombre y mecánica en el combate y en la ficha del líder */
.arena-tag { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); max-width: min(560px, 80vw); text-align: center; padding: 6px 12px; border-radius: 10px; background: rgba(10,14,24,.62); border: 1px solid rgba(255,255,255,.12); pointer-events: auto; transition: opacity .4s; }
.arena-tag b { display: block; font: 14px var(--display); color: var(--yellow); }
.arena-tag span { display: block; font-size: 12px; color: #dfe6f2; margin-top: 2px; }
.arena-tag.mini { padding: 3px 10px; opacity: .75; }
.arena-tag.mini span { display: none; }
.arena-info { margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-size: 13px; color: #d8e2f0; }
.arena-info b { color: var(--yellow); }

/* ---------- Pantallas más anchas y por secciones ---------- */
.menu-top { grid-template-columns: 1fr 320px; align-items: start; }
.menu-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.menu-sec .sec-head { display: flex; align-items: baseline; gap: 12px; margin: 0 4px 8px; }
.menu-sec .sec-head h3 { margin: 0; font: 15px var(--display); letter-spacing: .6px; color: var(--yellow); text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.menu-sec .sec-head small { color: #c4d0e4; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.menu-sec .menu-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.menu-card.wide { grid-column: span 2; }
.menu-top > .profile { position: sticky; top: 0; }
.sec-title { margin: 6px 2px 10px; font: 15px var(--display); letter-spacing: .6px; color: var(--yellow); text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.team-sections, .shop-sections { overflow: auto; padding-bottom: 20px; }
.team-sections .mon-grid + .sec-title, .shop-sections .shop-grid + .sec-title { margin-top: 18px; }
.team-sections .mon-grid, .shop-sections .shop-grid { padding-bottom: 0; }
.shop-tabs { gap: 8px; }
.shop-tabs button { padding: 7px 14px; }
.shop-tabs button small { color: var(--muted); margin-left: 4px; }
.pv-body { grid-template-columns: repeat(3, 1fr); }

/* Barra superior: Ajustes y perfil */
.settings-btn { display: inline-flex; align-items: center; gap: 7px; position: relative; padding: 8px 13px; }
.settings-btn svg { width: 17px; height: 17px; }
.settings-btn .ndot { position: absolute; top: 4px; right: 4px; }

/* Selector de idioma (portada) */
.title-panel .lang-pick.corner { position: absolute; top: 14px; right: 14px; }

/* Ajustes */
.settings-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; overflow: auto; padding-bottom: 20px; }
.settings-body .panel { display: flex; flex-direction: column; gap: 10px; }
.settings-body .panel h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.settings-body .panel h3 .ico { width: 20px; height: 20px; }
.settings-body .panel > button { align-self: flex-start; }
.settings-body .panel p { margin: 0; }
.lang-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.lang-opt { display: flex; align-items: center; gap: 10px; padding: 10px 14px; text-align: left; }
.lang-opt > span { display: flex; flex-direction: column; gap: 2px; }
.lang-opt b { font-size: 15px; }
.lang-opt small { color: var(--muted); font-size: 11px; letter-spacing: .6px; }
.lang-opt.sel { border-color: var(--yellow); background: linear-gradient(180deg, rgba(255,203,5,.3), rgba(255,203,5,.1)); }
.settings-who { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; width: 100%; }
.settings-who > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.settings-who small { color: var(--muted); }
.news-peek { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.news-peek li { display: flex; gap: 8px; align-items: baseline; }

@media (max-width: 1280px) {
  .pv-body { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .menu-top { grid-template-columns: 1fr; }
  .menu-sec .sec-head { flex-wrap: wrap; gap: 2px 10px; }
  .menu-card.wide { grid-column: auto; }
  .menu-top > .profile { position: static; }
  .pv-body { grid-template-columns: 1fr; }
  .settings-body { grid-template-columns: 1fr; }
}
/* Icono de novedades (diario) en el menú */
.news-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; }
.news-btn svg { width: 19px; height: 19px; }
.news-btn .ndot { position: absolute; top: 3px; right: 3px; }

/* ---------- Barra superior adaptable ----------
   Píldoras con icono y texto. La barra mira su propio ancho (container query): si no cabe todo,
   las opciones se quedan solo con el icono, luego el perfil solo con el avatar y en móvil las
   opciones pasan a una segunda fila a lo ancho. */
.topbar { container-type: inline-size; justify-content: space-between; gap: 8px 14px; padding: 8px 10px 8px 12px; border-radius: 22px; }
.tb-left { display: flex; align-items: center; gap: 12px; flex: 1 1 240px; min-width: 0; }
.tb-left h2 { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-right { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; }
.tb-nav, .tb-me { display: flex; align-items: center; gap: 6px; }
.tb-nav:not(:empty) { padding-right: 8px; border-right: 1px solid var(--line); }
.tb-nav:empty { display: none; }
.tb-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px 0 12px; border-radius: 99px; font-weight: 600; white-space: nowrap; position: relative; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04)); }
.tb-btn:hover:not(:disabled) { border-color: rgba(255,203,5,.6); }
.tb-btn svg { width: 19px; height: 19px; flex: none; }
.tb-btn.icon { width: 40px; padding: 0; justify-content: center; }
.tb-btn .ndot { position: absolute; top: 3px; right: 3px; }
.tb-left .back { flex: none; }
.topbar .pill.coins { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 99px; font-weight: 700; background: rgba(0,0,0,.3); border: 1px solid var(--line); white-space: nowrap; }
.topbar .me-chip { height: 40px; flex: none; }
.topbar .me-chip span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@container (max-width: 1180px) {
  .tb-nav .tb-btn span, .tb-me .settings-btn span { display: none; }
  .tb-nav .tb-btn, .tb-me .settings-btn { width: 40px; padding: 0; justify-content: center; }
}
@container (max-width: 860px) {
  .topbar .me-chip span { display: none; }
  .topbar .me-chip { padding: 3px; position: relative; }
  .topbar .me-chip .ndot { position: absolute; top: 1px; right: 1px; margin: 0; }
  .tb-left .back span { display: none; }
  .tb-left .back { width: 40px; padding: 0; justify-content: center; }
  .tb-left h2 { font-size: 19px; }
}
@container (max-width: 620px) {
  .tb-right { flex: 1 1 100%; justify-content: space-between; gap: 6px; }
  .tb-nav, .tb-me { gap: 4px; }
  .tb-nav:not(:empty) { padding-right: 6px; }
  .tb-btn, .tb-nav .tb-btn, .tb-me .settings-btn, .tb-btn.icon, .tb-left .back { width: 36px; height: 36px; }
  .topbar .me-chip { height: 36px; }
  .topbar .me-chip .ava { --s: 28px; }
  .topbar .pill.coins { height: 36px; padding: 0 10px; font-size: 13px; }
  .tb-left h2 { font-size: 17px; }
}

/* Banderas y selector de idioma */
.flag { display: inline-block; flex: none; width: 24px; height: 16px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.3); line-height: 0; }
.flag svg { width: 100%; height: 100%; display: block; }
.lang-opt .flag { width: 30px; height: 20px; }
.lang-pick { position: relative; }
.lang-cur { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 10px; border-radius: 99px; font-weight: 700; }
.lang-cur .chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; }
.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 200px; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 14px; background: var(--panel-hi); border: 1px solid var(--line-hi); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.lang-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.lang-item span { flex: 1; }
.lang-item small { color: var(--muted); font-size: 11px; letter-spacing: .6px; }
.lang-item.sel { background: rgba(255,203,5,.18); }

/* Pokédex */
.dexview { display: flex; flex-direction: column; height: 100%; gap: 10px; }
.dex-head { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.dex-count { font-size: 15px; } .dex-count b { font: 22px var(--display); color: var(--yellow); }
.dex-count .dexbar { height: 8px; margin-top: 6px; }
.dex-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dex-filters input { flex: 1 1 220px; min-width: 0; }
.dex-filters select { flex: 0 1 180px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; padding: 7px 12px; background: transparent; }
.seg button.sel { background: rgba(255,203,5,.18); color: var(--yellow); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 10px; font-size: 13px; border-radius: 99px; }
.chip small { color: var(--muted); margin-left: 3px; }
.chip.sel { border-color: var(--yellow); color: var(--yellow); background: rgba(255,203,5,.12); }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); grid-auto-rows: max-content; gap: 8px; overflow: auto; min-height: 0; flex: 1; padding-bottom: 12px; }
.dex-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 7px; border-radius: 12px; opacity: .62; }
.dex-card.got { opacity: 1; background: linear-gradient(180deg, rgba(255,203,5,.10), rgba(255,255,255,.03)); }
.dex-card:hover { opacity: 1; }
.dex-card .no { align-self: flex-start; font-size: 11px; color: var(--muted); }
.dex-card .pic { width: 64px; height: 64px; }
.dex-card b { font-size: 13px; text-align: center; line-height: 1.15; }
.dex-card .tys { display: flex; gap: 4px; } .dex-card .tys i { width: 22px; height: 6px; border-radius: 3px; background: var(--tc); }
.dex-card .ok { position: absolute; top: 6px; right: 8px; font-style: normal; color: var(--green); font-weight: 700; }
.dex-empty:empty { display: none; }
.dex-sheet-top { display: flex; gap: 14px; align-items: center; }
.dex-sheet-top h3 { margin: 2px 0 6px; } .dex-sheet-top .type { margin-right: 4px; }
.dex-sheet-top .ok { color: var(--green); font-weight: 700; margin: 8px 0 0; }
.dex-where h4 { margin: 10px 0 4px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }
.dex-where ul { margin: 0; padding-left: 18px; max-height: 180px; overflow: auto; }
.dex-where li { margin: 3px 0; } .dex-where li small { color: var(--muted); }
.dex-where .today { font-style: normal; color: var(--yellow); font-weight: 700; }
button.stat.dexlink { display: block; width: 100%; text-align: left; padding: 8px 10px; }

/* Rotación diaria de las rutas y guía del modo historia */
.story-tools { display: flex; align-items: center; gap: 10px; }
.rotation { font-size: 13px; color: #d8e2f0; }
.rotation b { font: 14px var(--display); color: var(--yellow); letter-spacing: .5px; }
.rotation.short { margin: -2px 0 8px; font-size: 12px; color: var(--muted); }
.story-guide { width: min(720px, 100%); }
.story-guide .guide-body { overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.story-guide section h4 { margin: 10px 0 4px; color: var(--yellow); font: 14px var(--display); }
.story-guide ul { margin: 0; padding-left: 18px; color: #d8e2f0; font-size: 14px; }
.story-guide li { margin: 4px 0; line-height: 1.35; }
@media (max-width: 760px) { .story-guide .guide-body { grid-template-columns: 1fr; } }
.dex-grid { background: rgba(13,21,38,.86); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.dex-card { background: rgba(255,255,255,.04); }

.rotation.instore { margin: -4px 0 10px; }
.shop-item .acts .ok { color: var(--green); font-weight: 700; }
b.perfect { color: var(--yellow); }


/* Botón de apoyo (Ko-fi) en la barra superior */
.tb-btn.support { color: #ff6b8a; text-decoration: none; border-color: rgba(255,107,138,.35); }
.tb-btn.support span { color: var(--fg); }
.tb-btn.support:hover { border-color: rgba(255,107,138,.8); background: rgba(255,107,138,.12); }
.tb-btn.support svg { animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 0%, 70%, 100% { transform: scale(1); } 78% { transform: scale(1.18); } 86% { transform: scale(1); } 92% { transform: scale(1.12); } }
@container (max-width: 1180px) { .tb-me .support span { display: none; } .tb-me .support { width: 40px; padding: 0; justify-content: center; } }

/* ===================================================================================
   Tema PokéArenas: paneles redondeados, cabeceras y botones de rayas (estilo PokéBonk),
   tipografía redondeada e iconos pixel art / sprites de objetos.
   =================================================================================== */
:root {
  --display: 'M PLUS Rounded 1c', 'Nunito', system-ui, sans-serif;
  --text: 'Nunito', system-ui, sans-serif;
  --panel: linear-gradient(180deg, rgba(33, 41, 78, .93), rgba(20, 26, 52, .93));
  --panel-flat: rgba(24, 31, 61, .93);
  --line: rgba(190, 205, 255, .14); --line-hi: rgba(210, 222, 255, .3);
  /* Color de acción propio de PokéArenas: dorado (antes coral de rayas) */
  --coral: #ffd23f; --coral-2: #ffb21a; --coral-d: #b97a00;
  --stripes: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 52%);
  --radius: 22px;
}
html, body { font: 600 15px/1.45 var(--text); }
h1, h2, h3, h4 { font-family: var(--display); }

/* Paneles */
.panel, .topbar, .subbar, .node-info, .howto, .menu-card, .shop-item, .mon-card, .dex-grid, .dex-head {
  background: var(--panel); border-color: var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 14px 40px rgba(0,0,0,.35);
}
.panel { border-radius: var(--radius); }

/* Botones */
button { border-radius: 14px; font-weight: 700; }
button.primary {
  background: var(--stripes), linear-gradient(180deg, #ffe066, var(--coral) 55%, var(--coral-2));
  color: #2a1c00; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); font: 800 17px var(--display); letter-spacing: .3px;
  border-radius: 18px; padding: 13px 24px; box-shadow: 0 5px 0 var(--coral-d), 0 10px 26px rgba(255, 190, 40, .28);
}
button.primary:hover:not(:disabled) { background: var(--stripes), linear-gradient(180deg, #ffe88a, #ffd84a 55%, #ffbe2e); box-shadow: 0 5px 0 var(--coral-d), 0 12px 30px rgba(255, 190, 40, .42); }
button.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--coral-d); transform: translateY(4px); }
input, select { border-radius: 14px; }

/* Ventanas: cabecera de rayas coral */
.modal-box { padding-top: 0; overflow: hidden; }
.modal-box > h3:first-child {
  margin: 0 -22px 10px; padding: 15px 22px; color: #ffd76a; font: 800 21px var(--display);
  background: linear-gradient(90deg, #2a3a7a, #1d2a5c); border-bottom: 2px solid rgba(255, 210, 63, .55); text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}
.modal-box.dex-sheet { padding-top: 22px; }

/* Barra superior */
.topbar { border-radius: 26px; }
.topbar h2 { font: 800 24px var(--display); color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.tb-btn { height: 44px; padding: 0 16px 0 10px; font-weight: 800; background: rgba(255,255,255,.06); border-color: var(--line); }
.tb-btn:hover:not(:disabled) { background: rgba(255,255,255,.12); border-color: rgba(255, 200, 120, .55); }
.tb-btn img.item-img, .tb-btn img.pix { flex: none; image-rendering: pixelated; }
.tb-btn.icon { width: 44px; }
.topbar .pill.coins { height: 44px; gap: 6px; font-weight: 800; }
.coin { display: inline-flex; align-items: center; vertical-align: -3px; margin-right: 3px; }
.coin img { image-rendering: pixelated; }
img.item-img, img.pix { image-rendering: pixelated; }
@container (max-width: 1180px) { .tb-nav .tb-btn, .tb-me .settings-btn, .tb-me .support { width: 44px; padding: 0; justify-content: center; } }

/* Menú: tarjetas con icono, título, subtítulo y llamada a la acción */
.menu-sec .sec-head h3 { font: 800 16px var(--display); letter-spacing: .4px; color: #ffd76a; }
.menu-card { border-radius: 24px; padding: 20px 22px 18px; min-height: 148px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.menu-card b { display: flex; align-items: center; gap: 10px; font: 800 26px var(--display); color: #fff; }
.menu-card b .card-ico { width: 40px; height: 40px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.menu-card span { font-weight: 600; color: #d6def0; }
.menu-card .go { position: relative; align-self: flex-start; margin-top: 8px; padding: 4px 14px; border-radius: 99px; font: 800 13px var(--display); font-style: normal; color: #2a1c00;
  background: var(--stripes), linear-gradient(90deg, var(--coral), var(--coral-2)); box-shadow: 0 3px 0 var(--coral-d); opacity: .9; transition: opacity .15s, transform .15s; }
.menu-card:hover .go { opacity: 1; transform: translateX(3px); }

/* Perfil del menú */
.profile .who b { font: 800 21px var(--display); }
.profile .stat { border-radius: 14px; background: rgba(0,0,0,.22); }
.profile .stat b { font: 800 19px var(--display); }

/* Subbarra de región y rótulos */
.subbar { border-radius: 22px; }
.subbar .region-tabs button b { font: 800 15px var(--display); }
.node-info { border-radius: 24px; }
.node-info h3 { font: 800 22px var(--display); }

/* Tienda */
.shop-item { border-radius: 20px; padding: 12px 14px; }
.shop-item .item-pic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.16), rgba(255,255,255,.03)); }
.shop-item .item-pic img { width: 48px; height: 48px; }
.shop-item .price { display: inline-flex; align-items: center; font: 800 16px var(--display); color: #ffd76a; }
.sec-title { font: 800 17px var(--display); color: #ffd76a; }
.reward-items .ri { display: inline-flex; align-items: center; gap: 4px; margin: 2px 8px 2px 0; font-weight: 800; }

/* Movimientos: emblema del tipo y su forma */
.mv { width: 128px; padding-left: 46px; min-height: 56px; }
.mv .mv-ico { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); }
.mv b { font: 800 14px var(--display); }
.mv kbd { position: absolute; top: -9px; right: 6px; }
.mchip { display: inline-flex; align-items: center; gap: 4px; }
.move-row .slot { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.move-row .slot i { font-style: normal; }

/* Resultados y portada */
.results h1, .banner, .banner.big { font-family: var(--display); font-weight: 800; }
.logo { font: 900 58px/0.95 var(--display); color: #fff; text-shadow: 0 4px 0 #4a3a9a, 0 8px 0 #2a2060, 0 14px 26px rgba(0,0,0,.45); }
.logo span { font-size: 70px; color: #ffcb2d; }

/* Ajustes del tema */
.menu-card { padding-right: 22px; justify-content: flex-start; }
.menu-card b { position: relative; z-index: 1; white-space: nowrap; }
.menu-card span { max-width: calc(100% - 104px); z-index: 1; }
.menu-card .go { z-index: 1; }
.menu-card .art { top: auto; bottom: 6px; right: 8px; width: 112px; height: 112px; transform: none; }
.menu-card:hover .art { transform: scale(1.06); }
.menu-card.wide .art { top: 50%; bottom: auto; width: 140px; height: 140px; transform: translateY(-50%); }
.menu-card.wide:hover .art { transform: translateY(-50%) scale(1.06); }
.menu-card.wide span { max-width: calc(100% - 170px); }
.mv { width: 142px; padding: 18px 8px 7px 46px; }
.mv kbd { top: 3px; right: 6px; font-size: 10px; padding: 0 4px; }
.mv b { margin-top: 0; }
button.with-ico { display: inline-flex; align-items: center; gap: 6px; padding-left: 8px; }
button.with-ico img { image-rendering: pixelated; }
button.buy { color: #2a1c00; border: 0; background: var(--stripes), linear-gradient(180deg, #ffe066, var(--coral-2)); box-shadow: 0 3px 0 var(--coral-d); padding: 7px 16px; }
button.buy:hover:not(:disabled) { background: var(--stripes), linear-gradient(180deg, #ffe88a, #ffc22e); }
button.buy:disabled { background: rgba(255,255,255,.08); box-shadow: none; color: var(--muted); }

/* Enlaces dentro de las ventanas (aviso legal, Ko-fi…): legibles sobre el fondo oscuro */
.modal-box a { color: #8cc4ff; }
.modal-box a:hover { color: #b8dbff; }

/* Medallas (imágenes oficiales de PokeAPI) */
.badge-img { image-rendering: auto; filter: brightness(0) invert(1) opacity(.16); transition: filter .2s, transform .2s; }
.badge-img.got { filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); }
.badge-slot { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.badge-slot.got { background: radial-gradient(circle, rgba(255,230,140,.22), rgba(0,0,0,.2)); }
.badge-slot.got:hover .badge-img { transform: scale(1.2) rotate(-8deg); }
.subbar .badges { gap: 5px; }
.badge-shine { position: relative; display: grid; place-items: center; width: 140px; height: 140px; }
.badge-shine::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(255,214,90,.0), rgba(255,214,90,.55), rgba(255,214,90,0) 25%, rgba(255,214,90,.55) 50%, rgba(255,214,90,0) 75%, rgba(255,214,90,.55)); animation: spin 6s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
.badge-shine img.big { position: relative; width: 96px; height: 96px; animation: badgeIn .7s cubic-bezier(.2,1.6,.4,1); filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes badgeIn { 0% { transform: scale(0) rotate(-180deg); } 100% { transform: scale(1) rotate(0); } }
.badge-case h3 { margin-top: 0; }
.case-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.case-row:first-of-type { border-top: 0; }
.case-region { display: flex; flex-direction: column; min-width: 78px; font: 800 17px var(--display); }
.case-region small { color: var(--muted); font: 700 12px var(--text); }
.case-slots { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; flex: 1; padding: 10px; border-radius: 16px; background: linear-gradient(180deg, #2a1d3a, #1b1329); box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 0 2px #4a3560; }
.case-slot { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.07), rgba(0,0,0,.35)); }
.case-slot.got { background: radial-gradient(circle at 50% 40%, rgba(255,226,140,.28), rgba(0,0,0,.25)); }
.case-slot img { width: 78%; height: auto; }
.case-slot.got:hover img { transform: scale(1.15) rotate(-8deg); }

/* Mochila */
.bagview { display: flex; flex-direction: column; height: 100%; }
.bag-body { display: grid; grid-template-columns: 320px 1fr; gap: 14px; flex: 1; min-height: 0; }
.bag-list { overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.bag-pocket { margin: 10px 4px 2px; color: #ffd76a; font: 800 14px var(--display); letter-spacing: .3px; }
.bag-pocket:first-child { margin-top: 0; }
.bag-item { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; text-align: left; padding: 6px 12px 6px 6px; border-radius: 14px; }
.bag-item img { image-rendering: pixelated; }
.bag-item .qty { font: 800 15px var(--display); color: #ffd76a; }
.bag-item.sel { border-color: var(--yellow); background: linear-gradient(90deg, rgba(255,210,63,.22), rgba(255,210,63,.04)); }
.bag-detail { overflow: auto; }
.bag-head { display: flex; gap: 16px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bag-head img { width: 64px; height: 64px; image-rendering: pixelated; padding: 6px; border-radius: 18px; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.16), rgba(255,255,255,.03)); }
.bag-head h3 { margin: 0 0 4px; font: 800 24px var(--display); }
.bag-head p { margin: 0; } .bag-head .qty { margin-top: 4px; font-weight: 800; color: #ffd76a; }
.bag-hint { margin-top: 14px; color: #d8e2f0; }
.bag-mons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.bag-region { grid-column: 1 / -1; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .6px; margin-top: 4px; }
.bag-mon { display: flex; align-items: center; gap: 10px; text-align: left; padding: 6px 10px 6px 6px; border-radius: 14px; }
.bag-mon span { display: flex; flex-direction: column; } .bag-mon small { color: #9be8b0; font-weight: 700; }
.bag-mon.no small { color: var(--muted); }
.bag-mon:not(:disabled):hover { border-color: var(--yellow); }
@media (max-width: 860px) { .bag-body { grid-template-columns: 1fr; } }

/* Botón de apoyo: al pasar el ratón, lo que cuesta mantener el juego */
/* Tarjetas al pasar el ratón por la barra superior (la del botón de apoyo, con los costes) */
.tip-wrap { position: relative; display: inline-flex; }
.tb-tip { position: absolute; top: calc(100% + 10px); left: 50%; z-index: 40; width: 260px; padding: 11px 13px; border-radius: 14px; background: #17213a; border: 1px solid var(--line-hi); box-shadow: var(--shadow); color: var(--fg); font-size: 13px; line-height: 1.4; text-align: left; white-space: normal; font-weight: 400; opacity: 0; transform: translate(-50%, -4px); pointer-events: none; transition: opacity .15s, transform .15s; }
.tip-wrap:hover .tb-tip, .tip-wrap:focus-within .tb-tip { opacity: 1; transform: translate(-50%, 0); }
.tb-tip > b { display: block; font-size: 14px; }
.tb-tip p { margin: 6px 0 0; color: var(--muted); }
.tb-tip .tip-sub { display: block; margin-top: 2px; color: #ffd76a; font-weight: 700; }
.tb-tip .tip-warn { color: #ffb070; }
.tb-tip .tip-good { color: #8ff0a8; font-weight: 700; }
.tb-tip .tip-bar { height: 6px; margin-top: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.tb-tip .tip-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd76a, #ffcb05); }
/* Los de la derecha (dinero, perfil, novedades, ajustes, apoyo) se alinean a la derecha para no salirse */
.tb-me .tb-tip { left: auto; right: 0; transform: translateY(-4px); }
.tb-me .tip-wrap:hover .tb-tip, .tb-me .tip-wrap:focus-within .tb-tip { transform: none; }
.tb-left .tb-tip { left: 0; transform: translateY(-4px); }
.tb-left .tip-wrap:hover .tb-tip, .tb-left .tip-wrap:focus-within .tb-tip { transform: none; }
.support-tip { width: 280px; border-color: rgba(255,107,138,.45); }
.support-tip ul { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.support-tip li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; border-radius: 8px; background: rgba(0,0,0,.25); }
.support-tip li b { color: #ff9db1; }
.support-tip p { margin: 0; color: var(--muted); }

/* Pie del menú principal: aviso legal, créditos y versión */
.menu-legal { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 760px; margin: 4px auto 18px; text-align: center; color: #fff; font-size: 13px; line-height: 1.45; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.menu-legal p { margin: 0; }
.menu-legal .link { color: #fff; text-decoration: underline; }
.menu-legal small { color: #fff; opacity: .85; }
/* La barra va por encima del contenido para que la tarjeta de apoyo no quede debajo de las tarjetas del menú */
.topbar { position: relative; z-index: 30; }
/* En pantallas estrechas, la tarjeta ocupa el ancho de la barra (la barra es su bloque contenedor) */
@container (max-width: 620px) {
  .tb-tip, .tb-me .tb-tip, .tb-left .tb-tip { position: fixed; top: calc(100% + 8px); left: 0; right: 0; width: auto; transform: none; }
  .tip-wrap:hover .tb-tip, .tb-me .tip-wrap:hover .tb-tip { transform: none; }
}

/* Logros e insignias */
.ach-ico { position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #6a5034, #3a2a18); box-shadow: inset 0 0 0 3px #c27c46, inset 0 -4px 0 rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.4); }
.ach-ico.silver { background: radial-gradient(circle at 50% 35%, #5a6478, #2c3344); box-shadow: inset 0 0 0 3px #cfd8e3, inset 0 -4px 0 rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.4); }
.ach-ico.gold { background: radial-gradient(circle at 50% 35%, #7a5a10, #3e2c06); box-shadow: inset 0 0 0 3px #ffcb05, inset 0 -4px 0 rgba(0,0,0,.25), 0 0 14px rgba(255,203,5,.45); }
.ach-ico img { image-rendering: pixelated; position: relative; }
.ach-ico:not(.got) { filter: grayscale(1) brightness(.55); }
.ach-tier { position: absolute; right: -4px; bottom: -4px; font-style: normal; }
.ach-tier img { image-rendering: pixelated; }
.achievements .ach-head { display: flex; align-items: baseline; justify-content: space-between; }
.ach-count { font: 800 18px var(--display); color: #ffd76a; }
.ach-grid { display: grid; gap: 8px; max-height: 420px; overflow: auto; padding-right: 4px; }
.ach-card { position: relative; display: flex; gap: 12px; align-items: center; padding: 10px 44px 10px 10px; border-radius: 16px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.ach-card.got { background: linear-gradient(90deg, rgba(255,210,63,.12), rgba(0,0,0,.18)); border-color: rgba(255,210,63,.35); }
.ach-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ach-body b { font: 800 15px var(--display); } .ach-body small { color: #c4d0e4; }
.ach-body .ach-prize { color: #ffd76a; display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.ach-done { font-style: normal; font-weight: 800; color: #8ff0a8; font-size: 12px; }
.ach-bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 3px; } .ach-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb21a, #ffe066); }
.ach-num { font-size: 11px; }
.ach-pin { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 50%; filter: grayscale(1) opacity(.5); }
.ach-pin.on, .ach-pin:hover { filter: none; border-color: var(--yellow); }
.ach-pin img { image-rendering: pixelated; }
.showcase { display: flex; gap: 8px; margin-top: 8px; }
.ach-pop { position: fixed; top: 84px; left: 50%; z-index: 60; display: flex; align-items: center; gap: 14px; padding: 12px 22px 12px 12px; border-radius: 20px; transform: translateX(-50%);
  background: linear-gradient(180deg, #2a3a7a, #1b2550); border: 2px solid #c27c46; box-shadow: 0 14px 40px rgba(0,0,0,.5); animation: achIn .5s cubic-bezier(.2,1.5,.4,1); transition: opacity .5s, transform .5s; }
.ach-pop.silver { border-color: #cfd8e3; } .ach-pop.gold { border-color: #ffcb05; box-shadow: 0 0 30px rgba(255,203,5,.4), 0 14px 40px rgba(0,0,0,.5); }
.ach-pop small { display: block; color: #ffd76a; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; font-size: 11px; }
.ach-pop b { display: block; font: 800 20px var(--display); } .ach-pop span { color: #c4d0e4; font-size: 13px; }
.ach-pop.out { opacity: 0; transform: translate(-50%, -20px); }
@keyframes achIn { 0% { transform: translate(-50%, -30px) scale(.8); opacity: 0; } 100% { transform: translate(-50%, 0) scale(1); opacity: 1; } }
/* Marcos de logros */
.frame-pokedex { --ring: #ff5a5a; } .frame-torre { --ring: #b47cff; }
.ava.frame-pokedex { box-shadow: 0 0 14px var(--ring); } .ava.frame-torre { box-shadow: 0 0 16px var(--ring); }
.frame-shiny { --ring: #fff3a0; } .ava.frame-shiny { box-shadow: 0 0 16px #fff3a0, 0 0 30px rgba(160,230,255,.6); animation: shinyRing 2.4s ease-in-out infinite; }
@keyframes shinyRing { 50% { box-shadow: 0 0 22px #a0e6ff, 0 0 40px rgba(255,243,160,.7); } }
.frame-campeon { --ring: #ffcb05; } .ava.frame-campeon { border-color: transparent; background: radial-gradient(circle at 50% 60%, #3a2a10, #1a1206) padding-box, conic-gradient(#ffcb05, #fff3a0, #ff9a1a, #ffcb05) border-box; box-shadow: 0 0 20px rgba(255,203,5,.55); }
.sw.frame-campeon { border: 0; background: radial-gradient(circle closest-side, #1a1206 66%, transparent 70%), conic-gradient(#ffcb05, #fff3a0, #ff9a1a, #ffcb05); }
.sw.frame-shiny { border: 0; background: radial-gradient(circle closest-side, #1a1d2a 66%, transparent 70%), conic-gradient(#fff3a0, #a0e6ff, #ffb0e8, #fff3a0); }

/* Mis Pokémon: buscador y filtros de la caja */
.mon-filters { margin: -4px 0 12px; }
.mon-card[hidden] { display: none; }
.mon-card .acts button.look.on { border-color: rgba(255,203,5,.7); color: var(--yellow); }
.type-ico { flex: none; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.mchip .type-ico { border-radius: 4px; }

/* Avatar: buscador y opciones shiny */
.avatar-pick input[type=search] { width: 100%; margin: 4px 0 10px; }
.ava-opt { position: relative; }
.ava-opt[hidden] { display: none; }
.ava-opt.is-shiny { background: linear-gradient(160deg, rgba(255,203,5,.14), transparent 70%); }
.ava-opt .shiny-star { position: absolute; top: 3px; right: 5px; font-size: 12px; font-style: normal; }
