/* Estilo general: pixel art oscuro morado, contornos gruesos, sombras con color (no negro puro). */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
html, body { margin: 0; height: 100%; background: #0a0618; overflow: hidden; font-family: "Trebuchet MS", "Segoe UI", sans-serif; color: #f0eaff; touch-action: none; }
#stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#app { position: relative; width: 360px; height: 640px; flex: none; transform-origin: center center; overflow: hidden; background: #140c28; }
#game { position: absolute; left: 0; top: 0; width: 360px; height: 640px; image-rendering: pixelated; }
#ui { position: absolute; inset: 0; }
#ui.battle { pointer-events: none; }
canvas { image-rendering: pixelated; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: #170e30; }
.scroll { flex: 1; overflow-y: auto; padding: 8px 10px 12px; touch-action: pan-y; }
.muted { color: #a898d0; }
.small { font-size: 11px; }
.center { text-align: center; }
.good { color: #6aff8a; font-weight: bold; }
.grow { flex: 1; }
h3, h4 { margin: 6px 0; }
p { margin: 6px 0; font-size: 13px; line-height: 1.35; }

/* ---------- Botones ---------- */
.btn { font: inherit; font-weight: bold; color: #fff; border: 3px solid #1d1530; border-radius: 4px; padding: 8px 12px; background: #6a4ab0; box-shadow: inset 0 -4px 0 rgba(30,10,60,0.45), 0 3px 0 #0e0820; cursor: pointer; text-shadow: 1px 1px 0 #1d1530; font-size: 13px; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(30,10,60,0.45), 0 1px 0 #0e0820; }
.btn[disabled] { filter: grayscale(0.8) brightness(0.7); }
.btn.gold { background: linear-gradient(#f2c84a, #d8962a); color: #2a1408; text-shadow: none; }
.btn.green { background: linear-gradient(#5ad06a, #2e9a44); }
.btn.red { background: linear-gradient(#e85a4a, #a82a2a); }
.btn.gray { background: linear-gradient(#6a628a, #4a4266); }
.btn.purple { background: linear-gradient(#a26ae8, #6a3ab0); }
.btn.small { padding: 5px 8px; font-size: 12px; }
.btn.big { padding: 12px 18px; font-size: 15px; width: 100%; }
.btn.icon { padding: 4px 9px; font-size: 14px; }
.btn.google { background: #ffffff; color: #333; text-shadow: none; width: 100%; padding: 12px; font-size: 15px; }
.g-logo { display: inline-block; width: 22px; height: 22px; line-height: 22px; border-radius: 50%; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); color: #fff; font-weight: bold; text-align: center; }

/* ---------- Carga y login ---------- */
.loading, .login { align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #3a2470, #140c28 70%); padding: 24px; }
.logo { text-align: center; line-height: 1; margin-bottom: 18px; }
.logo-top, .logo-bottom { font-weight: 900; letter-spacing: 2px; text-shadow: 3px 3px 0 #1d1530, -2px -2px 0 #1d1530, 2px -2px 0 #1d1530, -2px 2px 0 #1d1530; }
.logo-top { font-size: 40px; color: #7ab8ff; }
.logo-bottom { font-size: 46px; color: #ffd23a; }
.load-hero { margin: 10px 0 20px; filter: drop-shadow(0 6px 0 rgba(60,20,120,0.6)); }
.load-bar { width: 240px; height: 18px; border: 3px solid #1d1530; background: #2a1a50; }
.load-fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, #ffd23a 0 10px, #f2a82a 10px 20px); transition: width .1s; }
.load-phrase { margin-top: 14px; font-size: 13px; color: #d0c8ff; min-height: 18px; }
.version { position: absolute; bottom: 10px; font-size: 11px; color: #7a6aa8; }
.login-army { display: flex; gap: 6px; margin: 8px 0 26px; }
.login-buttons { width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* ---------- Inicio ---------- */
.home { background: radial-gradient(ellipse at 50% 55%, #4a2a8a 0%, #24124a 45%, #120a26 80%); }
.home.bg-w2 { background: radial-gradient(ellipse at 50% 55%, #2a6a3a 0%, #143a22 45%, #0a1a10 80%); }
.home.bg-w3 { background: radial-gradient(ellipse at 50% 55%, #4a3ab0 0%, #22186a 45%, #0e0a30 80%); }
.home.bg-w4 { background: radial-gradient(ellipse at 50% 55%, #b07a3a 0%, #6a3a1a 45%, #2a160a 80%); }
.home.bg-w5 { background: radial-gradient(ellipse at 50% 55%, #8a3a5a 0%, #4a1a3a 45%, #1e0a18 80%); }
.home.bg-w6 { background: radial-gradient(ellipse at 50% 55%, #a83a1a 0%, #4a1208 45%, #1a0604 80%); }
.home-top { display: flex; justify-content: space-between; padding: 8px; gap: 6px; }
.acc { display: flex; gap: 6px; align-items: center; background: rgba(20,10,40,0.7); border: 2px solid #4a3a80; padding: 3px 8px 3px 3px; height: 46px; }
.acc-pic { width: 40px; height: 40px; background: #2a1a5a; border: 2px solid #8a7ad0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.acc-pic canvas { width: 40px; }
.acc-name { font-weight: bold; font-size: 13px; }
.acc-lv { font-size: 11px; color: #c0b0ff; }
.top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.energy-box .energy, .energy { display: flex; align-items: center; gap: 4px; background: rgba(20,10,40,0.8); border: 2px solid #4a3a80; padding: 2px 8px; font-weight: bold; font-size: 13px; }
.bolt { color: #5aff5a; text-shadow: 1px 1px 0 #1d1530; }
.enext { font-size: 10px; color: #a898d0; }
.btn.video { font-size: 10px; padding: 2px 6px; background: linear-gradient(#5ad06a, #2e9a44); }
.currencies { display: flex; gap: 4px; font-size: 11px; font-weight: bold; }
.cur { background: rgba(20,10,40,0.8); border: 2px solid #4a3a80; padding: 1px 5px; white-space: nowrap; }
.stage-banner { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 4px auto 0; background: rgba(20,10,40,0.6); border: 2px solid #6a4ab0; padding: 4px 14px; }
.stage-num { font-size: 22px; font-weight: 900; background: #3a5ad0; border: 2px solid #1d1530; padding: 0 9px; }
.stage-world { font-weight: bold; font-size: 15px; }
.stage-sub { font-size: 11px; color: #c0b0ff; }
.side { position: absolute; top: 140px; display: flex; flex-direction: column; gap: 8px; }
.side.left { left: 6px; } .side.right { right: 6px; }
.side-btn { display: flex; flex-direction: column; align-items: center; width: 70px; padding: 4px 2px; font-size: 10px; background: rgba(40,20,80,0.85); border-color: #1d1530; }
.sb-ico { font-size: 22px; line-height: 26px; }
.pedestal { position: absolute; left: 50%; top: 200px; transform: translateX(-50%); width: 200px; height: 220px; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.pedestal::after { content: ''; position: absolute; bottom: 0; left: 10px; right: 10px; height: 38px; border-radius: 50%; background: radial-gradient(#5a4aa0, #2a1a5a 70%); border: 3px solid #1d1530; z-index: 0; }
.pedestal-glow { position: absolute; bottom: 14px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(rgba(140,100,255,0.35), transparent 70%); }
.avatar-big { position: relative; z-index: 1; margin-bottom: 18px; filter: drop-shadow(0 4px 0 rgba(30,10,60,0.7)); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.hero-name-plate { position: absolute; top: 428px; left: 50%; transform: translateX(-50%); background: #2a1a5a; border: 2px solid #8a7ad0; padding: 2px 14px; font-weight: bold; font-size: 13px; }
.start-btn { position: absolute; left: 50%; bottom: 82px; transform: translateX(-50%) skewX(-12deg); width: 210px; height: 70px; border: 4px solid #e8b030; outline: 3px solid #1d1530; background: linear-gradient(#4a3080, #2a1850); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 5px 0 #0e0820; }
.start-btn > * { transform: skewX(12deg); }
.start-btn:active { transform: translateX(-50%) skewX(-12deg) translateY(3px); }
.start-label { font-size: 26px; font-weight: 900; letter-spacing: 2px; text-shadow: 2px 2px 0 #1d1530; }
.start-cost { font-size: 16px; font-weight: bold; color: #7aff7a; text-shadow: 1px 1px 0 #1d1530; }

/* ---------- Barra inferior ---------- */
.bottombar { display: flex; height: 64px; background: #1e1440; border-top: 3px solid #4a3a80; flex: none; position: relative; z-index: 2; }
.home .bottombar { position: absolute; bottom: 0; left: 0; right: 0; }
.tab { flex: 1; background: #2a1e54; border: none; border-right: 2px solid #1d1530; color: #d0c8ff; display: flex; flex-direction: column; align-items: center; justify-content: center; font: inherit; cursor: pointer; }
.tab-icon { font-size: 24px; }
.tab-label { font-size: 10px; display: none; font-weight: bold; }
.tab.active { background: linear-gradient(#6a3ab0, #3a2070); margin-top: -10px; border: 3px solid #1d1530; }
.tab.active .tab-label { display: block; color: #fff; }

/* ---------- Menús ---------- */
.menu { background: linear-gradient(#1e1240, #120a26); }
.header { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #241650; border-bottom: 3px solid #4a3a80; flex: none; }
.header-title { flex: 1; font-weight: 900; font-size: 15px; text-shadow: 1px 1px 0 #1d1530; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.world-card { position: relative; display: flex; align-items: center; gap: 8px; border: 3px solid #1d1530; margin-bottom: 10px; padding: 10px; min-height: 84px; cursor: pointer; box-shadow: 0 4px 0 #0e0820; }
.world-card.current { outline: 3px solid #ffd23a; }
.world-card.locked { filter: grayscale(0.85) brightness(0.55); }
.wc-num { font-size: 26px; font-weight: 900; background: rgba(20,10,40,0.7); border: 2px solid #1d1530; padding: 2px 10px; }
.wc-info { flex: 1; text-shadow: 1px 1px 0 #1d1530; }
.wc-name { font-weight: 900; font-size: 15px; }
.wc-era { font-size: 11px; }
.wc-lock { font-size: 12px; margin-top: 4px; }
.wc-prog { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: bold; margin-top: 4px; }
.wc-bar { flex: 1; height: 8px; background: rgba(20,10,40,0.7); border: 2px solid #1d1530; }
.wc-bar div { height: 100%; background: #ffd23a; }
.wc-hero canvas { display: block; }
.wc-hero.dim { opacity: 0.6; }
.stage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stage-cell { position: relative; background: #2a1e54; border: 3px solid #4a3a80; height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 3px 0 #0e0820; }
.stage-cell.done { background: #2a5a3a; border-color: #5ad06a; }
.stage-cell.cur { background: #5a3ab0; border-color: #ffd23a; animation: pulse 1.2s infinite; }
.stage-cell.locked { filter: brightness(0.5); }
.stage-cell.special { border-style: double; border-width: 5px; }
@keyframes pulse { 50% { box-shadow: 0 0 12px #ffd23a; } }
.sc-num { font-size: 20px; font-weight: 900; }
.sc-hero { position: absolute; top: 2px; right: 4px; font-size: 13px; }
.sc-state { font-size: 12px; }
.sc-cost { position: absolute; bottom: 1px; left: 3px; font-size: 9px; color: #aaffaa; }
.hero-card { display: flex; gap: 8px; background: #2a1e54; border: 3px solid #4a3a80; margin-bottom: 8px; padding: 6px; cursor: pointer; box-shadow: 0 3px 0 #0e0820; }
.hero-card.locked { filter: grayscale(1) brightness(0.55); }
.hero-card.chosen { border-color: #ffd23a; }
.hc-sprite { background: radial-gradient(#4a3a90, #1e1440); border: 2px solid #1d1530; display: flex; align-items: center; }
.hc-info { flex: 1; font-size: 12px; }
.hc-name { font-weight: 900; font-size: 14px; }
.hc-skills { color: #c0b0ff; font-size: 11px; margin: 2px 0; }
.hc-stats { display: flex; gap: 6px; flex-wrap: wrap; font-weight: bold; }
.hc-stats .rec { color: #ffd23a; text-decoration: underline; }
.hc-state { font-size: 11px; color: #9a8ac8; margin-top: 2px; }
.boss-info, .recommend { background: #3a1a2a; border: 2px solid #a83a4a; padding: 6px; margin-bottom: 8px; font-size: 12px; font-weight: bold; }
.recommend { background: #3a3010; border-color: #d8a82a; color: #ffe08a; }

/* ---------- Batalla ---------- */
.battle-ui { position: absolute; inset: 0; pointer-events: none; }
.battle-ui button, .battle-ui .cards-wrap { pointer-events: auto; }
.btn.pause { position: absolute; top: 8px; right: 8px; }
.final-btn { position: absolute; right: 12px; bottom: 120px; width: 110px; height: 110px; border-radius: 50%; border: 4px solid #1d1530; background: radial-gradient(#ffe86a, #e0622b); color: #2a0a00; font-weight: 900; font-size: 15px; box-shadow: 0 0 24px #ffb03a, 0 5px 0 #0e0820; animation: finalpulse .6s infinite alternate; cursor: pointer; }
.final-btn.hidden { display: none; }
@keyframes finalpulse { to { transform: scale(1.08); box-shadow: 0 0 40px #ffd03a, 0 5px 0 #0e0820; } }
.card-layer { position: absolute; inset: 0; pointer-events: none; }
.cards-wrap { position: absolute; inset: 0; background: rgba(10,4,24,0.78); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 10px; }
.cards-title { font-size: 18px; font-weight: 900; color: #ffd23a; text-shadow: 2px 2px 0 #1d1530; text-align: center; }
.cards { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.up-card { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto auto; column-gap: 8px; text-align: left; background: linear-gradient(#2e2060, #1e1440); border: 4px solid #fff; color: #fff; padding: 8px; font: inherit; cursor: pointer; box-shadow: 0 4px 0 #0e0820; }
.up-card:active { transform: translateY(2px); }
.uc-icon { grid-row: span 3; font-size: 28px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.25); border: 2px solid #1d1530; }
.uc-name { font-weight: 900; font-size: 15px; text-shadow: 1px 1px 0 #1d1530; }
.uc-desc { font-size: 13px; }
.uc-rar { font-size: 11px; font-weight: bold; }
.up-card.r-divino, .item-card.r-divino { animation: divine 1.2s infinite alternate; }
@keyframes divine { from { box-shadow: 0 0 6px #ffd700, 0 4px 0 #0e0820; } to { box-shadow: 0 0 22px #fff4c2, 0 4px 0 #0e0820; } }

/* ---------- Modales ---------- */
.overlay { position: absolute; inset: 0; background: rgba(8,4,20,0.75); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 14px; }
.modal { width: 100%; max-height: 92%; overflow-y: auto; background: linear-gradient(#2e1e62, #1e1440); border: 4px solid #1d1530; outline: 2px solid #8a6ad8; box-shadow: 0 6px 0 #0e0820; padding: 12px; }
.modal-title { font-weight: 900; font-size: 17px; color: #ffd23a; text-shadow: 2px 2px 0 #1d1530; margin-bottom: 6px; text-align: center; }
.modal-body { font-size: 13px; }
.modal-buttons { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.modal.ad .modal-body { text-align: center; }
.ad-count { font-size: 42px; font-weight: 900; color: #ffd23a; }
.result { text-align: center; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.res-title { font-size: 30px; font-weight: 900; text-shadow: 3px 3px 0 #1d1530; }
.res-title.win { color: #ffd23a; } .res-title.lose { color: #ff5a5a; }
.res-rewards { background: rgba(0,0,0,0.25); border: 2px solid #4a3a80; padding: 6px; margin-top: 4px; font-weight: bold; }
.defeat-stat { font-size: 26px; font-weight: 900; color: #ff6a4a; text-shadow: 2px 2px 0 #1d1530; margin: 6px 0; }
.toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); background: #2a1a5a; border: 3px solid #1d1530; outline: 2px solid #ffd23a; padding: 6px 14px; font-weight: bold; font-size: 13px; z-index: 99; transition: opacity .4s; max-width: 320px; text-align: center; }
.toast.out { opacity: 0; }
.avatar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.avatar-opt { text-align: center; background: #2a1e54; border: 2px solid #4a3a80; padding: 4px; cursor: pointer; font-size: 11px; }

/* ---------- Árbol ---------- */
.tree-row { display: flex; align-items: center; gap: 8px; background: #2a1e54; border: 3px solid #4a3a80; padding: 8px; margin-bottom: 8px; }
.tree-row.highlight { border-color: #ffd23a; animation: pulse 1s infinite; }
.tr-icon { font-size: 26px; width: 40px; text-align: center; }
.tr-info { flex: 1; }
.tr-name { font-weight: 900; }
.tr-desc, .tr-bonus { font-size: 11px; color: #c0b0ff; }
.stat-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; background: rgba(20,10,40,0.7); border: 2px solid #4a3a80; padding: 5px; margin: 6px 0; font-weight: bold; font-size: 12px; }
.stat-row .power { color: #ffd23a; }

/* ---------- Equipo ---------- */
.hero-tabs { display: flex; gap: 4px; margin-bottom: 6px; overflow-x: auto; }
.hero-tab { background: #2a1e54; border: 2px solid #4a3a80; padding: 2px; cursor: pointer; }
.hero-tab.active { border-color: #ffd23a; background: #4a3090; }
.equip-top { display: flex; justify-content: space-between; align-items: flex-start; background: radial-gradient(ellipse at 50% 60%, #3a2a7a, #1a1038); border: 3px solid #1d1530; padding: 6px; }
.slots-col { display: flex; flex-direction: column; gap: 6px; }
.slot { text-align: center; cursor: pointer; }
.slot-name { font-size: 9px; color: #c0b0ff; margin-top: 4px; }
.equip-center { display: flex; flex-direction: column; align-items: center; position: relative; }
.pedestal.small { position: relative; left: auto; top: auto; transform: none; width: 130px; height: 140px; }
.pedestal.small .pedestal-glow { width: 110px; height: 110px; }
.avatar-mid { position: relative; z-index: 1; margin-bottom: 14px; }
.equip-center .hero-name-plate { position: static; transform: none; margin: 2px 0 4px; font-size: 12px; }
.item-card { position: relative; width: 58px; height: 58px; background: linear-gradient(#3a3060, #241a44); border: 3px solid #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 8px rgba(255,255,255,0.15), 0 3px 0 #0e0820; cursor: pointer; }
.item-card.empty { border: 3px dashed #5a4a90; background: #1e1440; }
.item-card.selected { outline: 3px solid #ffd23a; }
.item-icon { font-size: 26px; filter: drop-shadow(1px 2px 0 #1d1530); }
.item-icon.dim { opacity: 0.35; }
.lv { position: absolute; top: -2px; left: 2px; font-size: 10px; font-weight: 900; text-shadow: 1px 1px 0 #1d1530, -1px -1px 0 #1d1530; }
.eq-mark { position: absolute; bottom: 0; right: 2px; font-size: 10px; font-weight: 900; color: #5aff5a; text-shadow: 1px 1px 0 #1d1530; }
.item-card.r-poco_comun { box-shadow: 0 0 8px rgba(76,175,80,0.6), 0 3px 0 #0e0820; }
.item-card.r-raro { box-shadow: 0 0 8px rgba(33,150,243,0.7), 0 3px 0 #0e0820; }
.item-card.r-muy_raro { box-shadow: 0 0 10px rgba(176,76,200,0.8), 0 3px 0 #0e0820; }
.item-card.r-legendario { box-shadow: 0 0 10px rgba(224,98,43,0.8), 0 3px 0 #0e0820; }
.item-card.r-mitico { box-shadow: 0 0 12px rgba(192,40,63,0.9), 0 3px 0 #0e0820; }
.tabs { display: flex; gap: 4px; margin: 6px 0; }
.tabbtn { flex: 1; font: inherit; font-weight: bold; color: #d0c8ff; background: #241a48; border: 3px solid #1d1530; padding: 6px; cursor: pointer; }
.tabbtn.active { background: linear-gradient(#8a4ae0, #5a2aa0); color: #fff; }
.item-grid { display: grid; grid-template-columns: repeat(5, 58px); gap: 8px; justify-content: center; padding: 4px; }
.item-detail { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.cost { font-size: 12px; background: rgba(0,0,0,0.25); border: 2px solid #4a3a80; padding: 5px; }
.rar-tag { font-weight: 900; text-shadow: 1px 1px 0 #1d1530; }
.mat-list { display: flex; flex-direction: column; gap: 4px; }
.mat-row { display: flex; justify-content: space-between; background: #2a1e54; border: 2px solid #4a3a80; padding: 6px 8px; font-size: 13px; }
.forge-box { background: #2a1e54; border: 3px solid #4a3a80; padding: 8px; margin-bottom: 8px; }
.forge-box.divine { border-color: #ffd700; background: linear-gradient(#3a2a40, #2a1e54); }
.forge-box .btn { width: 100%; }
.fuse-row { display: flex; align-items: center; gap: 4px; margin: 6px 0; flex-wrap: wrap; }
.fuse-row .item-card { width: 44px; height: 44px; }
.fuse-row .item-icon { font-size: 20px; }
.arrow { font-size: 18px; }

/* ---------- Cofres y tienda ---------- */
.chest-card { display: flex; align-items: center; gap: 8px; background: #2a1e54; border: 3px solid #4a3a80; padding: 8px; margin-bottom: 8px; }
.chest-icon { font-size: 34px; }
.chest-info { flex: 1; }
.chest-name { font-weight: 900; }
.sim-banner { background: #3a3010; border: 2px solid #d8a82a; color: #ffe08a; font-size: 11px; font-weight: bold; padding: 5px; margin-bottom: 8px; text-align: center; }
.shop-section { margin-bottom: 12px; }
.shop-section h4 { color: #ffd23a; text-shadow: 1px 1px 0 #1d1530; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shop-item { position: relative; background: #2a1e54; border: 3px solid #4a3a80; padding: 6px 4px; text-align: center; }
.shop-item.first { border-color: #ffd23a; }
.badge { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: #e0622b; border: 2px solid #1d1530; font-size: 9px; font-weight: 900; padding: 0 4px; white-space: nowrap; }
.si-icon { font-size: 24px; }
.si-name { font-weight: 900; margin-bottom: 4px; }
.shop-list { display: flex; flex-direction: column; gap: 6px; }
.shop-row { display: flex; align-items: center; gap: 6px; justify-content: space-between; background: #2a1e54; border: 2px solid #4a3a80; padding: 6px 8px; font-size: 13px; }
.shop-row.hero canvas { flex: none; }
.settings { display: flex; flex-direction: column; gap: 8px; }
.toggle, .set-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: #2a1e54; border: 2px solid #4a3a80; padding: 10px; font-weight: bold; }
.toggle input { width: 22px; height: 22px; accent-color: #ffd23a; order: 2; }

/* ---------- Música e idioma ---------- */
.track-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #2a1e54; border: 2px solid #4a3a80; padding: 6px 8px; font-size: 13px; }
.track-row.chosen { border-color: #ffd23a; }
.track-use { display: flex; gap: 4px; width: 100%; }
.use-chip { flex: 1; font: inherit; font-size: 11px; font-weight: bold; color: #c0b0ff; background: #1e1440; border: 2px solid #4a3a80; padding: 3px; cursor: pointer; }
.use-chip.on { background: linear-gradient(#f2c84a, #d8962a); color: #2a1408; border-color: #1d1530; }
.lang-select { font: inherit; font-weight: bold; background: #1e1440; color: #fff; border: 2px solid #8a7ad0; padding: 4px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.use-chip.random { flex: none; padding: 4px 10px; }

/* ---------- Mapa del mundo ---------- */
.map-scroll { padding: 0; }
.map-wrap { position: relative; width: 360px; }
.map-canvas { display: block; image-rendering: pixelated; }
.map-node { position: absolute; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; border: 3px solid #1d1530; background: radial-gradient(#8a7ad0, #4a3a90); color: #fff; font: inherit; font-weight: 900; font-size: 15px; text-shadow: 1px 1px 0 #1d1530; box-shadow: 0 4px 0 #0e0820; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.map-node.done { background: radial-gradient(#ffe68a, #d8962a); color: #2a1408; text-shadow: none; }
.map-node.cur { background: radial-gradient(#7ab8ff, #2a5ad0); outline: 3px solid #ffd23a; animation: nodepulse 1s infinite alternate; }
.map-node.locked { background: radial-gradient(#6a628a, #3a3456); filter: brightness(0.8); }
.map-node.special { width: 50px; height: 50px; font-size: 20px; border-width: 4px; }
.map-node.final { width: 60px; height: 60px; font-size: 26px; }
.mn-star { position: absolute; top: -10px; right: -6px; font-size: 14px; color: #ffd23a; text-shadow: 1px 1px 0 #1d1530; }
.mn-lock { position: absolute; bottom: -8px; right: -6px; font-size: 12px; }
.map-avatar { position: absolute; transform: translate(-50%, -100%); pointer-events: none; animation: bob 1.2s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(20,10,40,0.6)); }
@keyframes nodepulse { to { box-shadow: 0 0 16px #ffd23a, 0 4px 0 #0e0820; } }

/* ---------- Batalla de jefe (vista lateral) ---------- */
.hb-hand { position: absolute; left: 8px; right: 8px; bottom: 14px; display: flex; gap: 6px; pointer-events: auto; }
.hb-card { flex: 1; height: 98px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; color: #fff; border: 3px solid #1d1530; outline: 2px solid #8a7ad0; background: linear-gradient(#3a2a70, #1e1440); box-shadow: 0 4px 0 #0e0820; cursor: pointer; padding: 4px; }
.hb-card:active { transform: translateY(3px); }
.hb-card.a-golpe { background: linear-gradient(#a83a2a, #5a1a14); }
.hb-card.a-tecnica { background: linear-gradient(#2a6ac8, #14306a); }
.hb-card.a-guardia { background: linear-gradient(#3a8a4a, #1a4a24); }
.hb-card.a-concentracion { background: linear-gradient(#8a3ab0, #3a1a5a); }
.hb-card.a-suprema { background: linear-gradient(#f2c84a, #c8702a); color: #2a1408; outline-color: #fff4c2; animation: divine 0.8s infinite alternate; }
.hb-ico { font-size: 24px; line-height: 26px; }
.hb-name { font-weight: 900; font-size: 13px; text-shadow: 1px 1px 0 #1d1530; text-align: center; }
.hb-card.a-suprema .hb-name { text-shadow: none; }
.hb-desc { font-size: 9px; opacity: 0.9; text-align: center; line-height: 1.15; }
.hb-auto { position: absolute; top: 58px; right: 8px; font: inherit; font-weight: 900; font-size: 12px; color: #d0c8ff; background: #241a48; border: 3px solid #1d1530; padding: 4px 8px; pointer-events: auto; cursor: pointer; }
.hb-auto.on { background: linear-gradient(#f2c84a, #d8962a); color: #2a1408; }
.final-btn.hb { bottom: 128px; right: 10px; width: 92px; height: 92px; font-size: 13px; }
.up-card.bless { border-color: #ffd23a; }

/* ---------- Comentarios ---------- */
.fb-kinds { display: flex; gap: 4px; margin-bottom: 8px; }
.fb-text { width: 100%; height: 120px; resize: none; font: inherit; font-size: 14px; color: #fff; background: #140c28; border: 2px solid #8a7ad0; padding: 8px; user-select: text; -webkit-user-select: text; touch-action: auto; }

/* ---------- Tutorial ---------- */
.tut-layer { position: absolute; inset: 0; pointer-events: none; }
.tut-overlay { position: absolute; inset: 0; pointer-events: auto; z-index: 40; }
.tut-hole { position: absolute; border-radius: 50%; box-shadow: 0 0 0 2000px rgba(8,4,20,0.68); border: 3px solid #ffd23a; animation: tutpulse 0.9s infinite alternate; }
.tut-hole.rect { border-radius: 8px; }
@keyframes tutpulse { to { border-color: #fff4c2; box-shadow: 0 0 0 2000px rgba(8,4,20,0.68), 0 0 18px #ffd23a; } }
.tut-arrow { position: absolute; font-size: 32px; animation: tutbob 0.6s infinite alternate; filter: drop-shadow(0 2px 0 #1d1530); }
@keyframes tutbob { to { transform: translateY(8px); } }
.tut-arrow.up { animation-name: tutbobup; }
@keyframes tutbobup { to { transform: translateY(-8px); } }
.tut-bubble { position: absolute; left: 14px; right: 14px; background: linear-gradient(#2e1e62, #1e1440); border: 3px solid #1d1530; outline: 2px solid #ffd23a; padding: 10px 12px; box-shadow: 0 5px 0 #0e0820; }
.tut-step { font-size: 10px; font-weight: 900; color: #ffd23a; letter-spacing: 1px; }
.tut-text { font-size: 14px; font-weight: bold; line-height: 1.35; margin: 4px 0 8px; }
.tut-buttons { display: flex; justify-content: space-between; align-items: center; }
.tut-skip { font: inherit; font-size: 11px; color: #a898d0; background: none; border: none; text-decoration: underline; cursor: pointer; }
.tut-badge { position: absolute; top: 52px; right: 6px; background: #ffd23a; color: #2a1408; font-weight: 900; font-size: 11px; padding: 2px 10px; border: 2px solid #1d1530; letter-spacing: 2px; }
.tut-cards { color: #fff4c2; font-weight: bold; font-size: 13px; text-align: center; background: rgba(255,210,58,0.15); border: 2px solid #ffd23a; padding: 6px; }
