/* ===== Gambito · estilos ===== */
:root {
  --bg: #120e24;
  --bg2: #1b1535;
  --panel: #231b45;
  --panel2: #2d2358;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4efff;
  --muted: #a99fcb;
  --gold: #ffcf5a;
  --gold2: #ff9f1c;
  --accent: #8b6cff;
  --good: #5ee6a0;
  --bad: #ff6b81;
  --radius: 14px;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --font-title: Georgia, 'Palatino Linotype', 'Times New Roman', serif;
  --font-piece: 'Segoe UI Symbol', 'Noto Sans Symbols 2', 'Noto Sans Symbols', 'DejaVu Sans', 'Apple Symbols', sans-serif;
  --board: min(calc(100vw - 32px), calc(100svh - 330px), 620px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; opacity: 0.55; }
h1, h2, h3 { font-family: var(--font-title); margin: 0; }
small { color: var(--muted); }
.muted { color: var(--muted); }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(139, 108, 255, 0.28), transparent 60%),
    radial-gradient(700px 500px at 100% 10%, rgba(255, 159, 28, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg), #0c0919);
}

/* ===== Barra superior ===== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: rgba(18, 14, 36, 0.8); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-title); font-size: 1.25rem; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.brand span { background: linear-gradient(90deg, var(--gold), var(--gold2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips { display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 0.9rem;
}
.chip b { font-variant-numeric: tabular-nums; }
.chip.level { gap: 8px; }
.chip.level b { color: var(--gold); }
.xpbar { width: 48px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #c8b6ff); transition: width 0.5s; }
.chip.coins b { color: var(--gold); }
.chip.big { font-size: 1.05rem; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); }

main { max-width: 1180px; margin: 0 auto; padding: 16px; }
.screen-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.screen-head h2 { font-size: 1.5rem; flex: 1; }
.back { color: var(--muted); padding: 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.back:hover { color: var(--text); }

/* ===== Botones ===== */
.btn {
  padding: 10px 16px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line);
  font-weight: 600; transition: transform 0.12s, background 0.2s, box-shadow 0.2s;
}
.btn:not(:disabled):hover { transform: translateY(-1px); background: #3a2d70; }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #a48bff, #7556f0); border-color: transparent; box-shadow: 0 6px 18px rgba(117, 86, 240, 0.4); }
.btn.primary:not(:disabled):hover { background: linear-gradient(180deg, #b39fff, #8466ff); }
.btn.danger { color: #ffb3bf; }
.btn.buy { background: linear-gradient(180deg, #ffd873, #ff9f1c); color: #3a2400; border-color: transparent; }
.btn.buy.cant { filter: grayscale(0.7); opacity: 0.75; }
.btn small { color: inherit; opacity: 0.7; margin-left: 4px; }
.link-btn { color: var(--muted); text-decoration: underline; font-size: 0.85rem; }

/* ===== Inicio ===== */
.hero { text-align: center; padding: 40px 0 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.25em; font-size: 0.75rem; color: var(--muted); margin: 0 0 8px; }
.hero h1 {
  font-size: clamp(3rem, 12vw, 6rem); line-height: 1; letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff3c4, var(--gold) 45%, var(--gold2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(255, 159, 28, 0.35));
}
.tagline { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin: 14px 0 0; }
.menu { display: grid; gap: 12px; max-width: 520px; margin: 8px auto 0; }
.big-btn {
  display: flex; align-items: center; gap: 16px; text-align: left; padding: 16px 20px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line); transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}
.big-btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.25); }
.big-btn.primary { background: linear-gradient(135deg, #5b3fd6, #8b6cff); border-color: transparent; box-shadow: 0 10px 30px rgba(117, 86, 240, 0.35); }
.big-btn .ico { font-size: 1.9rem; }
.big-btn b { display: block; font-size: 1.15rem; }
.big-btn small { display: block; margin-top: 2px; color: inherit; opacity: 0.75; }
.big-btn.center { justify-content: center; margin: 18px auto 0; min-width: 200px; font-weight: 700; font-size: 1.1rem; }
.home-foot { display: flex; justify-content: space-between; gap: 12px; max-width: 520px; margin: 28px auto 0; color: var(--muted); font-size: 0.85rem; }

/* ===== Avatares y paneles ===== */
.avatar {
  --c: #8b6cff;
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-piece); font-size: 28px; line-height: 1; color: #1a1030;
  background: radial-gradient(circle at 30% 28%, color-mix(in srgb, var(--c) 55%, white), var(--c));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 6px 14px rgba(0, 0, 0, 0.4);
}
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 640px; margin: 0 auto; }
.panel h3 { margin: 14px 0 10px; font-size: 1.05rem; color: var(--muted); }
.panel h3:first-child { margin-top: 0; }

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { padding: 9px 16px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); }
.seg button.on { background: var(--accent); border-color: transparent; font-weight: 700; }

.level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.level-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 14px;
  background: var(--bg2); border: 2px solid transparent;
}
.level-card.on { border-color: var(--gold); background: #2b2150; }

/* ===== Campaña ===== */
.map { list-style: none; margin: 0 auto; padding: 0; max-width: 640px; position: relative; display: grid; gap: 14px; }
.map::before { content: ''; position: absolute; left: 41px; top: 20px; bottom: 20px; width: 3px; background: repeating-linear-gradient(180deg, var(--line) 0 8px, transparent 8px 14px); }
.node {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line);
}
.node .info { flex: 1; min-width: 0; }
.node .info b { display: block; font-size: 1.05rem; }
.node .meta { text-align: right; display: grid; gap: 2px; font-size: 0.9rem; }
.node.current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 10px 28px rgba(255, 207, 90, 0.18); cursor: pointer; }
.node.current .go { color: var(--gold); font-weight: 700; }
.node.cleared { cursor: pointer; opacity: 0.9; }
.node.cleared .meta { color: var(--good); }
.node.locked { opacity: 0.5; }
.node.locked .avatar { filter: grayscale(1); }
.node[data-node]:hover { transform: translateX(3px); }
.node { transition: transform 0.15s; }

/* ===== Partida ===== */
.game-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.side { width: min(100%, var(--board)); display: flex; flex-direction: column; gap: 8px; }
.board-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.player-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; position: relative; }
.player-card .avatar { width: 42px; height: 42px; font-size: 24px; }
.player-card .who { display: grid; }
.player-card .who b { font-size: 1rem; }
.thinking { margin-left: auto; display: flex; gap: 4px; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: dot 1s infinite; }
.thinking i:nth-child(2) { animation-delay: 0.15s; }
.thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

.captured { min-height: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 0; padding: 0 4px; }
.captured em { font-style: normal; font-size: 0.8rem; color: var(--good); margin-left: 8px; font-weight: 700; }
.game-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.game-actions .btn { flex: 1; padding: 10px 8px; font-size: 0.9rem; white-space: nowrap; }
.moves {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-content: flex-start; padding: 10px 12px; max-height: 120px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; font-size: 0.85rem; font-variant-numeric: tabular-nums;
}
.moves .mv i { color: var(--muted); font-style: normal; margin-right: 3px; }

.board-frame {
  position: relative; width: var(--board); height: var(--board); border-radius: 10px;
  box-shadow: 0 0 0 6px #3b2a63, 0 0 0 8px rgba(255, 255, 255, 0.12), 0 24px 60px rgba(0, 0, 0, 0.55);
}
.board {
  width: 100%; height: 100%; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr);
  border-radius: 10px; overflow: hidden; user-select: none; touch-action: manipulation;
}
.board.locked .sq { cursor: default; }
.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.particle { position: absolute; border-radius: 50%; pointer-events: none; will-change: transform, opacity; }
.particle.rect { border-radius: 1px; }
.particle.diamond { border-radius: 1px; rotate: 45deg; }
.board-frame.shake { animation: shake 0.35s; }
@keyframes shake { 0%, 100% { transform: translate(0); } 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(3px, -1px); } }

.sq { position: relative; display: grid; place-items: center; cursor: pointer; --light: #f0d9b5; --dark: #b58863; }
.sq.light { background: var(--light); }
.sq.dark { background: var(--dark); }
.coord { position: absolute; font-size: calc(var(--board) / 40); font-weight: 700; opacity: 0.7; pointer-events: none; z-index: 1; }
.coord.f { right: 4%; bottom: 2%; }
.coord.r { left: 5%; top: 3%; }
.sq.light .coord { color: var(--dark); }
.sq.dark .coord { color: var(--light); }

.sq::before { content: ''; position: absolute; inset: 0; pointer-events: none; }
.sq.last::before { background: rgba(255, 221, 0, 0.35); }
.sq.selected::before { background: rgba(80, 200, 255, 0.5); box-shadow: inset 0 0 0 3px rgba(80, 200, 255, 0.9); }
.sq.check::before { background: radial-gradient(circle, rgba(255, 40, 60, 0.95), rgba(255, 40, 60, 0) 72%); animation: pulse 0.9s infinite; }
.sq.hint::before { background: rgba(94, 230, 160, 0.45); box-shadow: inset 0 0 0 3px #5ee6a0; animation: pulse 1s infinite; }
.sq.target::after { content: ''; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: rgba(20, 30, 50, 0.38); pointer-events: none; }
.sq.target-cap::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: calc(var(--board) / 80) solid rgba(255, 70, 90, 0.7); pointer-events: none; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* Piezas */
.piece {
  position: relative; z-index: 2; pointer-events: none; font-family: var(--font-piece); line-height: 1;
  font-size: calc(var(--board) / 8 * 0.8);
  transition: filter 0.2s;
}
/* El contorno se dibuja con text-shadow (no come el relleno como -webkit-text-stroke). */
.piece { --o: max(1px, calc(var(--board) / 420)); --ol: #1c1c28; }
.piece.w, .piece.b {
  text-shadow:
    calc(var(--o) * -1) 0 0 var(--ol), var(--o) 0 0 var(--ol), 0 calc(var(--o) * -1) 0 var(--ol), 0 var(--o) 0 var(--ol),
    calc(var(--o) * -1) calc(var(--o) * -1) 0 var(--ol), var(--o) var(--o) 0 var(--ol),
    calc(var(--o) * -1) var(--o) 0 var(--ol), var(--o) calc(var(--o) * -1) 0 var(--ol);
}
.piece.w { color: #fff; --ol: #1c1c28; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.45)); }
.piece.b { color: #26263f; --ol: #d4cbee; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.55)); }
.sq.selected .piece { transform: translateY(-3px) scale(1.08); }
.piece.mini { font-size: 20px; margin-right: -4px; --o: 0.8px; filter: none; }

.banner {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 10; pointer-events: none;
  font-family: var(--font-title); font-weight: 800; letter-spacing: 0.05em; font-size: calc(var(--board) / 9);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7); animation: bannerPop 0.5s cubic-bezier(.2, 1.5, .4, 1);
}
.banner.check { color: #ff8a9a; }
.banner.mate { color: var(--gold); font-size: calc(var(--board) / 7); background: radial-gradient(circle, rgba(0, 0, 0, 0.55), transparent 70%); }
.banner.gold { color: var(--gold); }
@keyframes bannerPop { from { transform: scale(0.3) rotate(-6deg); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.quip {
  width: var(--board); min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; font-size: 0.95rem;
}
.quip.pop { animation: quipIn 0.3s ease-out; }
.quip b { color: var(--gold); margin-right: 4px; }
.q-ico { font-family: var(--font-piece); font-size: 26px; line-height: 1; color: var(--gold); }
@keyframes quipIn { from { transform: translateY(8px); opacity: 0; } }

@media (min-width: 1000px) {
  :root { --board: min(calc(100vw - 620px), calc(100svh - 120px), 680px); }
  .game-wrap { flex-direction: row; align-items: flex-start; justify-content: center; gap: 28px; }
  .side { width: 250px; }
  .side-left { padding-top: 0; }
  .side-right { height: var(--board); justify-content: flex-end; }
  .side-right .moves { flex: 1; max-height: none; }
  .side-right .captured { order: -1; }
  .side-left .captured { order: 0; }
}

/* ===== Skins de piezas ===== */
/* Los sets con degradado usan background-clip:text, así que anulan el text-shadow de contorno. */
.set-gold .piece, .set-neon .piece, .set-ice .piece, .set-dragon .piece { text-shadow: none; }
.set-gold .piece.w { color: transparent; background: linear-gradient(180deg, #fff6c8, #f2b705 70%, #b57800); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0.7px #5a3b00; }
.set-gold .piece.b { color: transparent; background: linear-gradient(180deg, #6d58b0, #120c28 80%); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0.7px #c4adff; filter: drop-shadow(0 0 4px rgba(150, 110, 255, 0.6)); }
.set-neon .piece.w { color: rgba(0, 245, 255, 0.28); -webkit-text-stroke: 1.1px #00f5ff; filter: drop-shadow(0 0 5px #00f5ff); }
.set-neon .piece.b { color: rgba(255, 43, 214, 0.28); -webkit-text-stroke: 1.1px #ff2bd6; filter: drop-shadow(0 0 5px #ff2bd6); }
.set-candy .piece.w { color: #ffb6d9; --ol: #c2256f; filter: drop-shadow(0 3px 0 #a31d63); }
.set-candy .piece.b { color: #8de8c5; --ol: #17795a; filter: drop-shadow(0 3px 0 #136346); }
.set-ice .piece.w { color: transparent; background: linear-gradient(180deg, #f4fdff, #8fdcff 70%, #4aa8e0); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0.7px #1f6f9c; filter: drop-shadow(0 0 5px rgba(120, 210, 255, 0.8)); }
.set-ice .piece.b { color: transparent; background: linear-gradient(180deg, #ffd27a, #ff6a1a 60%, #a31500); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0.7px #5a0d00; filter: drop-shadow(0 0 6px rgba(255, 100, 20, 0.85)); }
.set-dragon .piece.w { color: transparent; background: linear-gradient(180deg, #b6ffd2, #19b45b 65%, #0b6a33); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0.8px #ffd86b; filter: drop-shadow(0 0 6px rgba(60, 255, 140, 0.55)); animation: glowG 3s infinite; }
.set-dragon .piece.b { color: transparent; background: linear-gradient(180deg, #ff7a7a, #9b0d1b 65%, #2a0006); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0.8px #ffd86b; filter: drop-shadow(0 0 6px rgba(255, 60, 60, 0.6)); animation: glowR 3s infinite; }
@keyframes glowG { 50% { filter: drop-shadow(0 0 11px rgba(60, 255, 140, 0.95)); } }
@keyframes glowR { 50% { filter: drop-shadow(0 0 11px rgba(255, 70, 70, 0.95)); } }

/* ===== Skins de tablero ===== */
.board-wood .sq { --light: #f0d9b5; --dark: #b58863; }
.board-forest .sq { --light: #e9f1d3; --dark: #6b9150; }
.board-night .sq { --light: #4b4a8c; --dark: #1d1a46; }
.board-night .sq.light { background: radial-gradient(circle at 25% 30%, #fff 0 1px, transparent 2px), radial-gradient(circle at 70% 70%, #cfd8ff 0 1px, transparent 2px), var(--light); }
.board-night .sq.dark { background: radial-gradient(circle at 60% 25%, #fff 0 1px, transparent 2px), var(--dark); }
.board-sakura .sq { --light: #ffe9f0; --dark: #e88fb0; }
.board-neon .sq { --light: #11122b; --dark: #0a0a1c; }
.board-neon .sq { box-shadow: inset 0 0 0 1px rgba(0, 245, 255, 0.35); }
.board-neon .sq.dark { box-shadow: inset 0 0 0 1px rgba(255, 43, 214, 0.35); }
.board-neon .coord { color: #00f5ff !important; }
.board-lava .sq { --light: #5a2f22; --dark: #1d0e0b; }
.board-lava .sq.dark { box-shadow: inset 0 0 14px rgba(255, 90, 31, 0.35); }
.board-lava .sq.light { box-shadow: inset 0 0 12px rgba(255, 150, 40, 0.22); }
.board-lava .coord { color: #ffb36b !important; }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(8, 5, 20, 0.72); backdrop-filter: blur(6px); animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card {
  width: min(100%, 460px); max-height: 92svh; overflow-y: auto; padding: 24px; border-radius: 20px; text-align: center;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: cardIn 0.28s cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes cardIn { from { transform: translateY(14px) scale(0.94); opacity: 0; } }
.modal-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.modal-card p { color: var(--muted); line-height: 1.55; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.modal-actions .btn { min-width: 120px; }

.dialogue .speaker { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 14px; }
.dialogue .speaker b { font-family: var(--font-title); font-size: 1.2rem; }
.dialogue p { color: var(--text); font-size: 1.05rem; font-style: italic; margin: 0; }

.promo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.promo-btn { display: grid; place-items: center; padding: 10px 4px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); transition: transform 0.12s; }
.promo-btn:hover { transform: translateY(-3px); border-color: var(--gold); }
.promo-btn .piece { font-size: 46px; }

.result h2 { font-size: 2.2rem; margin: 0 0 8px; }
.result.win h2 { background: linear-gradient(180deg, #fff3c4, var(--gold), var(--gold2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result.loss h2 { color: #ff9aa8; }
.result.draw h2 { color: #b9c4ff; }
.result blockquote { margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: rgba(255, 255, 255, 0.05); border-radius: 8px; text-align: left; font-style: italic; color: var(--muted); }
.rewards { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.rewards li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); opacity: 0; animation: rowIn 0.4s forwards; animation-delay: calc(var(--i) * 0.22s + 0.2s); }
.rewards li b { color: var(--gold); }
.rewards li.total { background: rgba(255, 207, 90, 0.15); font-weight: 700; }
@keyframes rowIn { from { transform: translateX(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.levelup { color: var(--good) !important; font-weight: 700; margin: 12px 0 0; }
.days { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days li { display: grid; gap: 2px; padding: 8px 2px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); font-size: 0.78rem; }
.days li.today { background: rgba(255, 207, 90, 0.22); outline: 2px solid var(--gold); }
.days li.past { opacity: 0.45; }

/* ===== Tienda ===== */
.shop-tabs { margin-bottom: 16px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.shop-card {
  --r: #888; display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--r) 45%, transparent); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: transform 0.15s;
}
.shop-card:hover { transform: translateY(-3px); }
.shop-card.equipped { border-color: var(--good); box-shadow: 0 0 0 1px var(--good); }
.shop-info { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.rarity { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--r); font-weight: 700; }
.pv { border-radius: 10px; overflow: hidden; }
.pv-set { display: grid; grid-template-columns: repeat(2, 1fr); height: 130px; }
.pv-set .piece { font-size: 52px; }
.pv-board { display: grid; grid-template-columns: repeat(3, 1fr); height: 130px; }
.pv-board .piece { font-size: 34px; }
.pv-fx { position: relative; height: 130px; display: grid; place-items: center; cursor: pointer; background: radial-gradient(circle, #3a2d70, #1b1535); overflow: visible; }
.pv-fx .try { color: var(--muted); font-size: 0.9rem; }
.pv-fx .fx-layer { position: absolute; inset: 0; }
.pv-set .sq, .pv-board .sq { cursor: default; }
.pv .sq::before { display: none; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 999px; background: #0d0a1f; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.92rem; animation: toastIn 0.25s;
}
@keyframes toastIn { from { transform: translate(-50%, 12px); opacity: 0; } }

@media (max-width: 600px) {
  .chip.streak { display: none; }
  main { padding: 12px; }
  .modal-card { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =====================================================================
   v2 · Escena 3D, ambiente y pulido general
   ===================================================================== */
:root { --gold3: #fff1b8; --accent2: #b7a2ff; --glass: rgba(35, 27, 69, 0.62); }
main { max-width: 1400px; }

/* ---- Fondo vivo ---- */
.bg-glow::before, .bg-glow::after {
  content: ''; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(80px); opacity: 0.55;
  animation: aurora 26s ease-in-out infinite alternate;
}
.bg-glow::before { left: -25vmax; top: -30vmax; background: radial-gradient(circle, rgba(139, 108, 255, 0.55), transparent 65%); }
.bg-glow::after { right: -30vmax; bottom: -35vmax; background: radial-gradient(circle, rgba(255, 140, 40, 0.38), transparent 65%); animation-duration: 32s; animation-direction: alternate-reverse; }
@keyframes aurora { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient span { position: absolute; bottom: -90px; color: #fff; font-family: var(--font-piece); animation: floatUp linear infinite; }
@keyframes floatUp { to { transform: translateY(-115vh) rotate(300deg); } }
.celebrate { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }

/* ---- Barra superior ---- */
.topbar { background: linear-gradient(180deg, rgba(20, 14, 42, 0.92), rgba(20, 14, 42, 0.6)); }
.brand-ico { font-style: normal; color: var(--gold); text-shadow: 0 0 14px rgba(255, 207, 90, 0.7); font-family: var(--font-piece); font-size: 1.4rem; }
.chip { background: var(--glass); backdrop-filter: blur(8px); }
.chip.level em { font-style: normal; font-size: 0.65rem; letter-spacing: 0.12em; color: var(--muted); }
.coin {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #ffc93c 55%, #c98400);
  box-shadow: inset 0 0 0 2px rgba(120, 70, 0, 0.35), 0 0 8px rgba(255, 190, 40, 0.6);
}
.chip.coins.bump { animation: bump 0.5s; }
@keyframes bump { 30% { transform: scale(1.18); box-shadow: 0 0 22px rgba(255, 200, 60, 0.8); } }

/* ---- Botones con brillo ---- */
.btn, .big-btn { position: relative; overflow: hidden; }
.btn::after, .big-btn::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform 0.6s;
}
.btn:not(:disabled):hover::after, .big-btn:hover::after { transform: translateX(120%); }
.btn { box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }
.btn:not(:disabled):active { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }

/* ---- Inicio ---- */
.home-grid { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: center; min-height: calc(100svh - 110px); }
.home-copy { text-align: center; position: relative; z-index: 2; }
.home-copy h1 {
  font-size: clamp(3.4rem, 13vw, 7rem); line-height: 0.95; letter-spacing: 0.04em; margin: 0;
  background: linear-gradient(100deg, #ffe9a0 0%, var(--gold) 30%, var(--gold2) 50%, var(--gold3) 60%, var(--gold) 80%, #ffe9a0 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 28px rgba(255, 159, 28, 0.4)); animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: -220% 0; } }
.home-copy .menu { margin: 22px auto 0; }
.home-copy .home-foot { margin: 22px auto 0; }
.hero-stage {
  position: relative; order: -1; height: min(92vw, 52svh); margin: 0 -12px; pointer-events: none;
  background: radial-gradient(ellipse 60% 45% at 50% 62%, rgba(139, 108, 255, 0.22), transparent 70%);
}
.stage-canvas { display: block; touch-action: manipulation; }
.hero-stage .stage-canvas { width: 100%; height: 100%; }
.big-btn { background: linear-gradient(135deg, rgba(45, 35, 88, 0.85), rgba(30, 23, 62, 0.85)); backdrop-filter: blur(8px); }
.big-btn .ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 255, 255, 0.08); font-size: 1.5rem; }
.big-btn .arrow { margin-left: auto; font-style: normal; opacity: 0.4; transition: transform 0.2s, opacity 0.2s; font-size: 0.9rem; }
.big-btn:hover .arrow { transform: translateX(5px); opacity: 1; }
.big-btn.primary { background: linear-gradient(135deg, #5b3fd6, #9a7dff 60%, #c1a9ff); animation: glowPulse 3.2s ease-in-out infinite; }
.big-btn.primary .ico { background: rgba(255, 255, 255, 0.2); }
@keyframes glowPulse { 50% { box-shadow: 0 10px 44px rgba(150, 120, 255, 0.65); } }
@media (min-width: 960px) {
  .home-grid { grid-template-columns: minmax(380px, 0.9fr) 1.2fr; gap: 12px; }
  .home-copy { text-align: left; }
  .home-copy .menu, .home-copy .home-foot { margin-left: 0; }
  .hero-stage { order: 0; height: min(74svh, 680px); margin: 0 -24px 0 0; }
}

/* ---- Partida 3D ---- */
.board-col.is3d { width: 100%; }
.board-col:not(.is3d) .stage3d, .board-col:not(.is3d) .view-btn { display: none; }
.board-col.is3d .board { display: none; }
.stage3d { position: absolute; inset: 0; border-radius: inherit; }
.stage3d .stage-canvas { width: 100%; height: 100%; }
.board-col.is3d .board-frame {
  width: 100%; max-width: 940px; height: min(calc(100vw - 24px), 66svh); border-radius: 24px; box-shadow: none; background: none;
}
.board-col.is3d .banner { font-size: clamp(30px, 6.4vw, 72px); }
.board-col.is3d .quip { width: 100%; max-width: 940px; }
.game-wrap:has(.is3d) .side { width: 100%; max-width: 940px; }
.view-btn {
  position: absolute; top: 10px; right: 10px; z-index: 12; padding: 8px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px); transition: transform 0.15s, background 0.2s;
}
.view-btn:hover { transform: translateY(-1px); background: rgba(70, 55, 130, 0.8); }
.player-card { background: var(--glass); backdrop-filter: blur(8px); transition: box-shadow 0.3s, border-color 0.3s; }
.player-card.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 26px rgba(255, 207, 90, 0.3); animation: turnPulse 2s ease-in-out infinite; }
@keyframes turnPulse { 50% { box-shadow: 0 0 0 1px var(--gold), 0 0 40px rgba(255, 207, 90, 0.5); } }
.player-card.opp.active { border-color: #ff8a9a; box-shadow: 0 0 0 1px #ff8a9a, 0 0 26px rgba(255, 90, 120, 0.28); }
@media (min-width: 1000px) {
  .game-wrap:has(.is3d) { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; align-items: start; gap: 20px; }
  .game-wrap:has(.is3d) .side { width: auto; max-width: none; height: auto; }
  .game-wrap:has(.is3d) .side-right .moves { max-height: 240px; flex: none; }
  .board-col.is3d .board-frame { height: min(80svh, 720px); }
}

/* ---- Tienda: miniaturas 3D ---- */
.pv-img { display: block; width: 100%; height: auto; aspect-ratio: 44 / 30; object-fit: cover; background: radial-gradient(ellipse at 50% 60%, #3a2d70, #17112e); border-radius: 12px; }
.shop-card { background: linear-gradient(180deg, rgba(45, 35, 88, 0.85), rgba(31, 24, 64, 0.85)); }
.shop-card:hover { box-shadow: 0 14px 34px color-mix(in srgb, var(--r) 35%, transparent); }

/* ---- Modal / resultados ---- */
.modal-card { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05); }
.result-card.modal-card { background: linear-gradient(180deg, #34286a, #231b45); }
.result.win h2 { font-size: 2.6rem; filter: drop-shadow(0 4px 20px rgba(255, 190, 40, 0.5)); }

.hero-stage { -webkit-mask-image: radial-gradient(ellipse 78% 74% at 50% 52%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 78% 74% at 50% 52%, #000 55%, transparent 100%); }

/* ---- Globos de diálogo que salen de las piezas ---- */
.bubble {
  position: absolute; z-index: 11; pointer-events: none; width: max-content; max-width: min(260px, 62%);
  padding: 9px 13px 10px; border-radius: 16px; color: #1c1530; font-size: 0.9rem; line-height: 1.3;
  background: linear-gradient(180deg, #ffffff, #efe9ff); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.5);
  transform: translate(-50%, calc(-100% - 14px)); animation: bubblePop 0.35s cubic-bezier(.2, 1.6, .4, 1);
}
.bubble::after {
  content: ''; position: absolute; left: calc(50% + var(--tail, 0px)); bottom: -9px; width: 18px; height: 18px; border-radius: 3px;
  background: #efe9ff; transform: translateX(-50%) rotate(45deg); box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.18);
}
.bubble .who { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8a5a00; margin-bottom: 2px; }
.bubble .who i { font-style: normal; font-family: var(--font-piece); font-size: 1.05rem; line-height: 1; }
.bubble.opp .who { color: #b3243f; }
.bubble.opp { background: linear-gradient(180deg, #fff4f6, #ffe3e9); }
.bubble.opp::after { background: #ffe3e9; }
@keyframes bubblePop { from { transform: translate(-50%, calc(-100% - 4px)) scale(0.4); opacity: 0; } }

/* =====================================================================
   Mapa interactivo de la campaña
   ===================================================================== */
.campaign-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 980px) { .campaign-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.map-card {
  border-radius: 22px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 5px #3b2a63, 0 24px 60px rgba(0, 0, 0, 0.5); background: #1e4a47;
}
.map-host { width: 100%; line-height: 0; }
.map-svg { width: 100%; height: auto; display: block; user-select: none; }

.map-svg .river-edge { fill: none; stroke: #1f6e9c; stroke-width: 58; stroke-linecap: round; opacity: 0.55; }
.map-svg .river { fill: none; stroke: #49b0e6; stroke-width: 44; stroke-linecap: round; }
.map-svg .river-flow { fill: none; stroke: #bfe9ff; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 18 34; opacity: 0.7; animation: flow 2.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -52; } }
.map-svg .deco, .map-svg .landmark, .map-svg .mount { font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; text-anchor: middle; pointer-events: none; }
.map-svg .deco { opacity: 0.95; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.3)); }
.map-svg .landmark { filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.45)); }
.map-svg .mount { opacity: 0.85; }
.map-svg .cloud { fill: #fff; opacity: 0.12; animation: cloud linear infinite; }
@keyframes cloud { to { transform: translateX(1500px); } }

.map-svg .road-edge { fill: none; stroke: #6b4a22; stroke-width: 24; stroke-linecap: round; }
.map-svg .road { fill: none; stroke: #d8b676; stroke-width: 16; stroke-linecap: round; }
.map-svg .road-glow { fill: none; stroke: transparent; stroke-width: 8; stroke-linecap: round; }
.map-svg .road-trail { fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; }
.map-svg .seg.far { opacity: 0.5; }
.map-svg .seg.done .road-glow { stroke: #ffd24a; filter: drop-shadow(0 0 6px rgba(255, 210, 74, 0.9)); }
.map-svg .seg.next .road-trail { stroke: #fff; stroke-dasharray: 2 14; animation: ants 1.1s linear infinite; }
.map-svg .seg.gate-seg.far .road, .map-svg .seg.gate-seg.next .road { opacity: 0.6; }
@keyframes ants { to { stroke-dashoffset: -32; } }
.map-svg .bridge { fill: #a77742; stroke: #5b3a17; stroke-width: 3; }
.map-svg .plank { stroke: #6a461c; stroke-width: 2; }
.map-svg .rail { fill: #6a461c; }

/* Nodos */
.map-svg .mnode { cursor: pointer; outline: none; }
.map-svg .mnode .node-body, .map-svg .mnode .sel-ring { transform-box: fill-box; transform-origin: center; }
.map-svg .mnode .node-body { transition: transform 0.2s; }
.map-svg .mnode:hover .node-body, .map-svg .mnode:focus-visible .node-body { transform: scale(1.1); }
.map-svg .halo { fill: none; stroke: transparent; stroke-width: 0; }
.map-svg .mnode.current .halo { fill: rgba(255, 215, 90, 0.28); animation: halo 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 50% { transform: scale(1.22); fill: rgba(255, 215, 90, 0.12); } }
.map-svg .ring { fill: #1b1535; stroke: #7a70a8; stroke-width: 5; }
.map-svg .mnode.cleared .ring { stroke: #ffcf5a; }
.map-svg .mnode.current .ring { stroke: #fff; filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)); }
.map-svg .disc { fill: var(--c, #8b6cff); }
.map-svg .mnode.locked .disc { fill: #4a4568; }
.map-svg .shine { fill: rgba(255, 255, 255, 0.28); }
.map-svg .mnode.locked .shine { fill: rgba(255, 255, 255, 0.08); }
.map-svg .glyph { font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', 'DejaVu Sans', sans-serif; font-size: 40px; fill: #1a1030; }
.map-svg .mnode.locked .glyph { fill: #8d86ab; }
.map-svg .num-bg { fill: #1b1535; stroke: rgba(255, 255, 255, 0.5); stroke-width: 2; }
.map-svg .num { font: 700 13px var(--font); fill: #fff; }
.map-svg .chk-bg { fill: #2fbf71; stroke: #fff; stroke-width: 2; }
.map-svg .chk { font: 800 15px var(--font); fill: #fff; }
.map-svg .lock { font-size: 18px; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif; }
.map-svg .name { font: 700 17px var(--font); fill: #fff; paint-order: stroke; stroke: rgba(10, 6, 30, 0.85); stroke-width: 5px; stroke-linejoin: round; }
.map-svg .mnode.locked .name { fill: #cfc8ea; }
.map-svg .sub { font: 700 14px var(--font); fill: #ffe08a; paint-order: stroke; stroke: rgba(10, 6, 30, 0.85); stroke-width: 4px; stroke-linejoin: round; }
.map-svg .sel-ring { fill: none; stroke: #4cd6ff; stroke-width: 3; stroke-dasharray: 9 7; opacity: 0; }
.map-svg .mnode.selected .sel-ring { opacity: 1; animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-svg .fog-blob { pointer-events: none; }
.map-svg .gate-disc { fill: #1d3d2f; }
.map-svg .mnode.gate.open .ring { stroke: #7be0a4; }

/* Token del jugador */
.map-svg .token { pointer-events: none; }
.map-svg .token-body { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-7px); } }
.map-svg .tshadow { fill: rgba(0, 0, 0, 0.35); }
.map-svg .tdisc { fill: #ffd24a; stroke: #fff; stroke-width: 3; filter: drop-shadow(0 0 8px rgba(255, 210, 74, 0.9)); }
.map-svg .tglyph { font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', sans-serif; font-size: 26px; fill: #3a2400; }

/* Paneles laterales */
.map-side { display: grid; gap: 14px; }
.progress-card, .node-card {
  padding: 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px);
}
.progress-card .eyebrow { margin: 0 0 10px; }
.pips { display: flex; gap: 6px; margin-bottom: 12px; }
.pips i { flex: 1; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.12); }
.pips i.on { background: linear-gradient(90deg, #ffd24a, #ff9f1c); box-shadow: 0 0 10px rgba(255, 190, 40, 0.6); }
.pips i.now { background: rgba(255, 255, 255, 0.35); animation: pulse 1.4s infinite; }
.big-num { margin: 0 0 8px; font-size: 1rem; color: var(--muted); }
.big-num b { font-family: var(--font-title); font-size: 2.6rem; color: var(--gold); line-height: 1; }
.big-num small { margin-left: 4px; }
.mini-stats { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.mini-stats li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); font-size: 0.9rem; }
.mini-stats li span { color: var(--muted); }
.mini-stats .diff { color: #ff8a6a; letter-spacing: 2px; }
.mini-stats .diff em { font-style: normal; opacity: 0.25; }
.pstars span { color: #5b5380; font-size: 1.1rem; }
.pstars span.on { color: #ffd24a; }
.pstars em { font-style: normal; color: var(--muted); font-weight: 400; }
.next-line { margin: 8px 0 0; font-size: 0.9rem; }
.next-line b { color: var(--text); }
.nc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.nc-head b { font-family: var(--font-title); font-size: 1.2rem; display: block; }
.status-chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: rgba(255, 255, 255, 0.1); }
.status-chip.cleared { color: #7be0a4; background: rgba(47, 191, 113, 0.18); }
.status-chip.current { color: var(--gold); background: rgba(255, 207, 90, 0.18); }
.nc-quote { margin: 12px 0 6px; padding-left: 12px; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; line-height: 1.5; }
.node-card .btn { width: 100%; margin-top: 6px; }
.stars-earned { margin: 0 0 6px; font-size: 2.2rem; letter-spacing: 6px; }
.stars-earned span { color: #5b5380; }
.stars-earned span.on { color: #ffd24a; filter: drop-shadow(0 0 10px rgba(255, 210, 74, 0.7)); animation: starIn 0.6s both; }
.stars-earned span.on:nth-child(2) { animation-delay: 0.25s; }
.stars-earned span.on:nth-child(3) { animation-delay: 0.5s; }
@keyframes starIn { from { transform: scale(0) rotate(-60deg); opacity: 0; } }

/* =====================================================================
   Beta: online, desafío diario, misiones, temporada, perfil y compartir
   ===================================================================== */
.menu-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.big-btn.compact { flex-direction: column; justify-content: center; gap: 6px; padding: 14px 6px; text-align: center; position: relative; }
.big-btn.compact .ico { width: 38px; height: 38px; font-size: 1.25rem; border-radius: 12px; }
.big-btn.compact b { font-size: 0.85rem; }
.big-btn.hot { background: linear-gradient(135deg, #b8325a, #ff7a45); border-color: transparent; box-shadow: 0 10px 30px rgba(255, 110, 70, 0.3); }
.big-btn.hot .ico { background: rgba(255, 255, 255, 0.2); }
.dot-badge {
  position: absolute; top: 8px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: #ff3b5c; color: #fff; font-size: 0.78rem; font-weight: 800; box-shadow: 0 0 0 3px rgba(18, 14, 36, 0.8); animation: pulse 1.4s infinite;
}
.big-btn:not(.compact) .dot-badge { top: 50%; right: 52px; transform: translateY(-50%); }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.oss-line { margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); }
.oss-line a { color: var(--accent2); }
.profile-chip { gap: 8px; max-width: 170px; }
.profile-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
.profile-chip .lg { font-style: normal; font-family: var(--font-piece); font-size: 1.1rem; }
@media (max-width: 760px) { .profile-chip b { display: none; } .menu-row { grid-template-columns: repeat(2, 1fr); } }

/* Online */
.online-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 980px) { .online-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
.online-main { display: grid; gap: 16px; }
.online-main .panel { margin: 0; max-width: none; }
.profile-strip { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.profile-strip .who { flex: 1; display: grid; min-width: 0; }
.profile-strip .who b { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tc-chip { padding: 12px 6px; border-radius: 14px; background: var(--bg2); border: 2px solid transparent; display: grid; gap: 2px; text-align: center; }
.tc-chip b { font-size: 1.15rem; }
.tc-chip.on { border-color: var(--gold); background: #2b2150; }
.queue-box { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 207, 90, 0.1); border: 1px solid rgba(255, 207, 90, 0.4); }
.queue-box > div { flex: 1; display: grid; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.15); border-top-color: var(--gold); animation: spin 0.9s linear infinite; flex: none; }
.friend-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.friend-row label { display: grid; gap: 4px; font-size: 0.8rem; color: var(--muted); }
select, input[type='text'], input:not([type]), input[readonly] {
  font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0;
}
input:focus-visible, select:focus-visible, .btn:focus-visible, .big-btn:focus-visible, .tc-chip:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.join-form { display: flex; gap: 10px; margin-top: 12px; }
.join-form input { flex: 1; }
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); font-size: 0.92rem; }
.lb li.me { background: rgba(255, 207, 90, 0.16); outline: 1px solid rgba(255, 207, 90, 0.5); }
.lb li.empty { color: var(--muted); justify-content: center; }
.lb .rk { width: 22px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb .lg { font-family: var(--font-piece); font-size: 1.2rem; }
.lb b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb em { font-style: normal; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.league-legend { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--font-piece); font-size: 1.4rem; opacity: 0.85; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }
.offline-card { text-align: center; max-width: 520px; }
.offline-card .btn { margin-top: 10px; }

/* Partida: reloj, banner, emotes, espera */
.mode-banner {
  width: 100%; max-width: 940px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); font-size: 0.9rem; backdrop-filter: blur(8px);
}
.mode-banner .dots { display: flex; gap: 5px; }
.mode-banner .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.mode-banner .dots i.on { background: var(--good); }
.mode-banner .dots i.now { background: var(--gold); animation: pulse 1.2s infinite; }
.clock {
  margin-left: auto; padding: 6px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.35); font-variant-numeric: tabular-nums;
  font-weight: 800; font-size: 1.25rem; letter-spacing: 0.03em; min-width: 76px; text-align: center; transition: background 0.2s, color 0.2s;
}
.clock.running { background: #fff; color: #1b1535; }
.clock.low { background: #ff3b5c; color: #fff; animation: pulse 0.8s infinite; }
.thinking + .clock { margin-left: 8px; }
.emote-bar { width: 100%; max-width: 940px; display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.emote-bar button { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 0.82rem; white-space: nowrap; }
.emote-bar button:hover { background: rgba(120, 100, 220, 0.5); }
.wait-overlay { position: absolute; inset: 0; z-index: 14; display: grid; place-items: center; padding: 16px; background: rgba(10, 6, 28, 0.72); backdrop-filter: blur(6px); border-radius: inherit; }
.wait-card { width: min(100%, 420px); padding: 22px; border-radius: 20px; text-align: center; background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid rgba(255, 255, 255, 0.14); display: grid; gap: 10px; justify-items: center; }
.wait-card h3 { margin: 0; }
.wait-card p { margin: 0; }
.wait-card input { width: 100%; text-align: center; font-size: 0.85rem; }
.code-line { font-size: 1.1rem; }
.code-line b { letter-spacing: 0.25em; color: var(--gold); font-size: 1.4rem; }
.draw-prompt { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 13; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 10px 16px; border-radius: 16px; background: #1b1535; border: 1px solid var(--gold); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.rating-line { font-size: 1.3rem; font-weight: 800; margin: 4px 0 8px; }
.rating-line.up { color: var(--good); }
.rating-line.down { color: var(--bad); }

/* Desafío diario */
.daily-card { max-width: none; margin: 0; display: grid; gap: 4px; align-content: start; }
.daily-title { font-size: 2.6rem; color: var(--gold); margin: 0 0 6px; }
.daily-done { padding: 12px 14px; border-radius: 12px; background: rgba(47, 191, 113, 0.16); color: #bff5d6; margin: 6px 0; }
.daily-card .big-btn.center { margin-top: 12px; }

/* Misiones */
.missions-wrap { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
.mission-block { max-width: none; margin: 0; }
.mission-block h3 small { color: var(--muted); font-weight: 400; margin-left: 8px; }
.missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mission { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); }
.mission.ready { background: rgba(255, 207, 90, 0.14); outline: 1px solid rgba(255, 207, 90, 0.5); }
.mission.claimed { opacity: 0.5; }
.m-main { flex: 1; display: grid; gap: 6px; min-width: 0; }
.m-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.m-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width 0.4s; }

/* Temporada */
.season-hero { display: grid; gap: 16px; padding: 18px; border-radius: 20px; background: linear-gradient(135deg, rgba(91, 63, 214, 0.5), rgba(184, 50, 90, 0.4)); border: 1px solid var(--line); margin-bottom: 14px; }
@media (min-width: 760px) { .season-hero { grid-template-columns: 1fr 1.2fr; align-items: center; } }
.season-hero .big-num { margin: 0; }
.season-meta { display: grid; gap: 8px; }
.xpline { height: 12px; border-radius: 6px; background: rgba(0, 0, 0, 0.35); overflow: hidden; }
.xpline i { display: block; height: 100%; background: linear-gradient(90deg, #ffd24a, #ff9f1c); box-shadow: 0 0 12px rgba(255, 190, 40, 0.7); transition: width 0.5s; }
.track-label { margin: 14px 0 8px; font-weight: 700; }
.soon { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 0.7rem; }
.pass-track { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.pass-card {
  flex: none; width: 112px; padding: 12px 8px; border-radius: 16px; display: grid; gap: 4px; justify-items: center; text-align: center; scroll-snap-align: start;
  background: var(--panel); border: 2px solid var(--line);
}
.pass-card.big { width: 132px; border-color: rgba(255, 207, 90, 0.5); background: linear-gradient(180deg, #34286a, #231b45); }
.pass-card .ico { font-size: 1.8rem; }
.pass-card b { font-size: 0.85rem; }
.pass-card em { font-style: normal; font-size: 0.75rem; color: var(--muted); }
.pass-card.open { border-color: var(--gold); box-shadow: 0 0 22px rgba(255, 207, 90, 0.4); animation: pulse 1.6s infinite; cursor: pointer; }
.pass-card.open em { color: var(--gold); font-weight: 700; }
.pass-card.done { opacity: 0.55; }
.pass-card.done em { color: var(--good); }
.pass-card.locked { opacity: 0.6; }
.pass-track.premium { overflow: visible; }
.premium-lock { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px dashed var(--line); color: var(--muted); line-height: 1.5; }
.fine { font-size: 0.8rem; }

/* Perfil y compartir */
.profile-card { text-align: left; }
.pf-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pf-head b { font-family: var(--font-title); font-size: 1.3rem; display: block; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; text-align: center; }
.pf-stats span { padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); font-size: 0.8rem; color: var(--muted); display: grid; }
.pf-stats b { color: var(--text); font-size: 1.3rem; }
.pf-field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 0.85rem; color: var(--muted); }
.pf-row { display: flex; gap: 8px; }
.pf-row input, .pf-row code { flex: 1; min-width: 0; }
.pf-row code { padding: 10px 12px; border-radius: 12px; background: var(--bg2); color: var(--gold); letter-spacing: 0.12em; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; }
.pf-sync { font-size: 0.82rem; }
.share-options { display: grid; gap: 10px; margin-top: 14px; }

/* Ajustes finales */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.28) transparent; }
.home-copy h1 { font-size: clamp(3.2rem, 11vw, 5.6rem); white-space: nowrap; }
@media (min-width: 960px) and (max-width: 1250px) { .home-copy h1 { font-size: clamp(3.2rem, 6vw, 4.6rem); } }
.pass-card .ico + b { font-size: 0.8rem; }
@media (max-width: 480px) {
  .topbar { padding: 8px 10px; gap: 6px; }
  .chips { gap: 6px; }
  .chip { padding: 5px 9px; }
  .chip.level .xpbar, .chip.level em { display: none; }
  .brand span { display: none; }
  .icon-btn { width: 32px; height: 32px; }
}
