/* ===== Tema "juego" (v89): estilo caricatura, botones gorditos con relieve, colores por raza =====
   Se carga DESPUÉS de style.css y pisa la apariencia; el armado del inicio (escenario + panel) también vive acá.
   Para volver al estilo viejo alcanza con sacar el <link> de index.html. */
@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:wght@600;700;800;900&display=swap');

:root {
  --font-ui: 'Nunito', system-ui, 'Segoe UI', sans-serif;
  --font-title: 'Lilita One', 'Nunito', system-ui, sans-serif;
  --r: 14px;            /* redondeo de paneles */
  --r-sm: 10px;
  --ink: #120a04;       /* contorno de caricatura */
  --glass: rgba(18, 11, 5, .72);
  --edge: rgba(255, 236, 200, .16);
  --glow: color-mix(in srgb, var(--accent) 45%, transparent);
  --gold: #ffd23f;
  /* escenario del inicio (cambia con la raza) */
  --sky1: #5fb4e8; --sky2: #cdeefc; --hill1: #4f9a4a; --hill2: #3a7a3a; --ground: #6b4423; --grass: #6cc04a;
  --bg: #1a110a; --panel: #2a1c11; --panel-2: #3a2817; --line: #5c4128;
  --accent: #ff8a2b; --accent-2: #ffb85c;
}
/* paletas por raza (las de abejas y escarabajos pisan las de style.css) */
body[data-race="hormigas"]    { --accent: #ff8a2b; --accent-2: #ffb85c; }
body[data-race="fuego"]       { --bg: #1c0b07; --panel: #2c130c; --panel-2: #3e1c12; --line: #6a2c1c; --accent: #ff4d2e; --accent-2: #ff8a5c;
                                --sky1: #f0823c; --sky2: #ffd59a; --hill1: #a8452a; --hill2: #7a2c1a; --ground: #4a1c10; --grass: #c9a03a; }
body[data-race="bala"]        { --bg: #15100a; --panel: #241b10; --panel-2: #33261a; --line: #5a4428; --accent: #e0a63a; --accent-2: #ffd27a;
                                --sky1: #4a9a7a; --sky2: #cfe8c0; --hill1: #2f6a3c; --hill2: #1e4a2a; --ground: #4a3420; --grass: #4f9a3a; }
body[data-race="abejas"]      { --accent: #f7b51c; --accent-2: #ffd85c;
                                --sky1: #6cc3f0; --sky2: #fff1c0; --hill1: #7ab84a; --hill2: #5a9a3a; --ground: #7a5a2a; --grass: #a8d84a; }
body[data-race="escarabajos"] { --accent: #35c49a; --accent-2: #7ce8c4;
                                --sky1: #3a7a8a; --sky2: #b8e0d8; --hill1: #2a5a4a; --hill2: #1c4036; --ground: #3a2a1a; --grass: #3a9a5a; }
body[data-race="chinches"]    { --bg: #0e160a; --panel: #172411; --panel-2: #213419; --line: #3a5a2a; --accent: #8ad83a; --accent-2: #c0f07a;
                                --sky1: #8ac8e0; --sky2: #e8f8d8; --hill1: #5aa83a; --hill2: #3a7a2a; --ground: #4a3a1a; --grass: #8ad83a; }
body[data-race="aranas"]      { --bg: #130e1a; --panel: #1f1729; --panel-2: #2b2039; --line: #4a3a60; --accent: #b77cff; --accent-2: #d8b4ff;
                                --sky1: #2a2a5a; --sky2: #8a7ab8; --hill1: #3a3a6a; --hill2: #26264a; --ground: #2a1f30; --grass: #5a7a4a; }

body {
  font-family: var(--font-ui); font-weight: 700; letter-spacing: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(900px 500px at 100% 110%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    var(--bg);
}
/* textura de tierra muy suave */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .07;
  background-image: radial-gradient(rgba(255,255,255,.7) 1px, transparent 1.5px), radial-gradient(rgba(0,0,0,.9) 1px, transparent 1.5px);
  background-size: 22px 22px, 31px 31px; background-position: 0 0, 11px 7px;
}
.screen { z-index: 1; }
h1, h2, h3, .logo, .modal-box h3, .race-card h2, .over-box h2, .brand, .mp-title {
  font-family: var(--font-title); font-weight: 400; letter-spacing: .02em;
}
h3 { text-shadow: 0 2px 0 rgba(0,0,0,.45); }
h4 { font-family: var(--font-ui); font-weight: 900; text-transform: uppercase; letter-spacing: .1em; font-size: .74em; color: var(--accent-2); }
h4 small, h3 small { text-transform: none; letter-spacing: 0; font-family: var(--font-ui); font-weight: 600; text-shadow: none; }
small { font-weight: 600; }

/* ---------- Logo ---------- */
.logo {
  display: flex; flex-direction: column; align-items: center; line-height: .86; text-transform: uppercase;
  font-size: clamp(2.8rem, 9vw, 5.6rem); color: var(--gold); letter-spacing: .02em;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 6px 0 #8a3a0a, 0 10px 0 var(--ink), 0 18px 30px rgba(0,0,0,.6);
  transform: rotate(-3deg); animation: logo-in .6s cubic-bezier(.2,1.6,.4,1) both;
}
.logo span:last-child { color: #ff6a2b; }
.logo small { font-size: .38em; color: #fff; padding: 4px 0; -webkit-text-stroke: 2px var(--ink); text-shadow: 0 3px 0 var(--ink); }
@keyframes logo-in { from { transform: rotate(-3deg) scale(.4); opacity: 0; } }
.subtitle { font-weight: 700; color: #e9d6b8; max-width: 460px; }
.loader { display: inline-block; width: 14px; height: 14px; border: 3px solid var(--accent-2); border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pantallas de ingreso y carga: cielo + colinas ---------- */
#screen-loading, #screen-login {
  background:
    radial-gradient(ellipse 140% 60% at 50% 115%, #3d2614 40%, transparent 41%),
    radial-gradient(ellipse 80% 40% at 10% 100%, #4f8a3a 40%, transparent 41%),
    radial-gradient(ellipse 80% 40% at 90% 100%, #3f7a32 40%, transparent 41%),
    linear-gradient(180deg, #2a5a8a 0%, #e89a5a 70%, #f0b070 100%);
}
.hero-bugs { display: flex; gap: 18px; font-size: 2.2rem; margin-bottom: 6px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.hero-bugs span { animation: hop 1.6s ease-in-out infinite; }
.hero-bugs span:nth-child(2) { animation-delay: .2s; } .hero-bugs span:nth-child(3) { animation-delay: .4s; } .hero-bugs span:nth-child(4) { animation-delay: .6s; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px) rotate(-6deg); } }
#screen-login .subtitle, #screen-loading .subtitle { text-shadow: 0 2px 0 rgba(0,0,0,.5); color: #fff6e6; }

/* ---------- Botones: gorditos, con relieve de abajo (estilo juego de celular) ---------- */
.btn {
  font-family: var(--font-ui); font-weight: 900; letter-spacing: .02em; font-size: .92em;
  border-radius: var(--r-sm); border: 2px solid var(--ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 80%, #fff 20%), var(--panel-2));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.18), 0 4px 0 var(--ink), 0 6px 10px rgba(0,0,0,.3);
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
  transition: transform .08s, filter .15s, box-shadow .08s;
  position: relative; top: 0;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); background: linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 70%, #fff 30%), var(--panel-2)); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.12), 0 1px 0 var(--ink); }
.btn.primary {
  color: #2a1404; text-shadow: 0 1px 0 rgba(255,255,255,.35);
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.5), inset 0 -3px 0 rgba(0,0,0,.18), 0 4px 0 var(--ink), 0 6px 14px var(--glow);
}
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 70%, #fff 30%), var(--accent)); }
.btn.danger { background: linear-gradient(180deg, #ff7a6a, #d8382f); color: #fff; }
.btn.big { font-family: var(--font-title); font-weight: 400; font-size: 1.25em; letter-spacing: .04em; padding: 12px 30px; border-radius: var(--r); }
.btn.sm { border-radius: 9px; }
.btn.xs { box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 2px 0 var(--ink); }
.btn:disabled { filter: grayscale(.6); }
.link-btn { font-weight: 800; }

/* ---------- Paneles y ventanas ---------- */
.panel, .modal-box, .login-box, .prep-panel, .over-box {
  border-radius: var(--r); border: 2px solid var(--ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 85%, #fff 6%), var(--panel));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--line) 70%, transparent), inset 0 2px 0 2px var(--edge), 0 6px 0 rgba(0,0,0,.35), 0 14px 30px rgba(0,0,0,.35);
}
/* la entrada se anima en el fondo (solo al abrir): la caja se vuelve a dibujar en cada clic de los armadores */
.modal { background: rgba(8, 4, 1, .7); backdrop-filter: blur(4px); animation: modal-in .16s ease-out; }
.modal-box { padding: 20px; }
@keyframes modal-in { from { opacity: 0; } }
.modal-box h3 { font-size: 1.45em; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px dashed color-mix(in srgb, var(--line) 80%, transparent); color: var(--accent-2); }
.login-box { padding: 22px; gap: 12px; background: linear-gradient(180deg, rgba(42,28,17,.94), rgba(26,17,10,.96)); }
.login-tabs { background: rgba(0,0,0,.35); border-radius: 12px; border: 2px solid var(--ink); }
.login-tabs button { font-weight: 900; border-radius: 9px; }
.login-tabs button.sel { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #2a1404; box-shadow: 0 2px 0 var(--ink); }

/* ---------- Campos ---------- */
input, select, #login-form input, .join-code input, .chat-form .chat-in, .chat-form .chat-to {
  font-family: var(--font-ui); font-weight: 700; border-radius: 10px;
  background: rgba(0,0,0,.4); border: 2px solid var(--ink); box-shadow: inset 0 3px 0 rgba(0,0,0,.35); color: var(--text);
}
input:focus, select:focus, #login-form input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 3px 0 rgba(0,0,0,.35), 0 0 0 3px var(--glow); }

/* ---------- Botones de elección (tipo, modo, estilo, opciones de la IA) ---------- */
.choice button, .mo-btn, .style-btn, .pick, .tier-tabs button {
  border-radius: 12px; border: 2px solid var(--ink); font-weight: 900;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 85%, #fff 8%), var(--panel));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.1), 0 3px 0 var(--ink);
  transition: transform .1s, filter .15s;
}
.choice button:hover:not(:disabled), .mo-btn:hover:not(:disabled) { filter: brightness(1.15); }
.choice button.sel, .mo-btn.sel, .tier-tabs button.sel {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 55%, var(--panel-2)), color-mix(in srgb, var(--accent) 30%, var(--panel)));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 3px 0 var(--ink), 0 0 0 2px var(--accent), 0 0 16px var(--glow);
  transform: translateY(-1px);
}
.choice button small, .mo-btn small { font-weight: 700; }

/* ---------- Cartas ---------- */
.card, .bcard, .mcard, .bgroup, .bugcard, .sh-item { border-radius: 12px; }
.card, .bcard, .mcard, .sh-item { border: 2px solid var(--ink); box-shadow: inset 0 0 0 2px rgba(255,255,255,.06), 0 4px 0 rgba(0,0,0,.45); }
.card:hover, .bcard:hover, .mcard:hover, .sh-item:hover { filter: brightness(1.08); transform: translateY(-3px); }
.card-name, .hc-name, .mc-name { font-family: var(--font-ui); font-weight: 900; }
.tier-badge { font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.sh-item { background: linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 85%, #fff 8%), var(--panel)); transition: transform .12s, filter .12s; }
.sh-free { background: var(--gold); color: #3a2400; box-shadow: 0 2px 0 var(--ink); }
kbd { font-family: var(--font-ui); font-weight: 900; border-radius: 6px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.4); }
.dchip { --tc: var(--accent); border-radius: 10px; border-color: var(--ink); background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 2px 0 var(--ink); padding: 2px 6px 2px 3px; }
.dchip .wart { width: 30px; height: 30px; }
.dchip i:not(.wart) { color: #2a1404; font-weight: 900; }

/* ---------- Monedero y barra de arriba ---------- */
.home-bar {
  background: linear-gradient(180deg, rgba(10,6,2,.85), rgba(10,6,2,.55)); backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 35%, transparent), 0 8px 20px rgba(0,0,0,.35);
}
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.wallet { min-width: 0; }
.brand-ico { display: grid; place-items: center; width: 40px; height: 40px; font-size: 1.4em; border-radius: 12px; border: 2px solid var(--ink);
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 3px 0 var(--ink); }
.brand-txt { font-size: 1.35em; text-transform: uppercase; color: var(--gold); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.brand-txt em { font-style: normal; font-size: .6em; color: #fff; }
.coin {
  font-weight: 900; border-radius: 999px; border: 2px solid var(--ink); padding: 3px 12px 3px 8px;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.5)); box-shadow: inset 0 2px 0 rgba(255,255,255,.1), 0 2px 0 var(--ink);
}
.wallet > .muted { font-size: .8em; max-width: 260px; line-height: 1.25; }
.coin b { color: var(--gold); font-family: var(--font-title); font-weight: 400; font-size: 1.12em; letter-spacing: .02em; }

/* =====================================================================
   Inicio: escenario con el escuadrón (izquierda) + panel de partida (derecha)
   ===================================================================== */
#screen-lobby { background: transparent; }
#screen-lobby .lobby { max-width: 1180px; padding: 16px 18px 40px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 18px; align-items: start; margin-top: 12px; }
.stage-col, .ctrl-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ctrl-col { position: sticky; top: 84px; } /* el botón de jugar queda siempre a la vista */

/* rotación semanal: cinta dorada */
.weekly {
  margin: 4px 0 0; border-radius: 12px; border: 2px solid var(--ink);
  background: linear-gradient(90deg, rgba(255,210,63,.22), rgba(255,210,63,.06) 60%, transparent);
  box-shadow: inset 0 0 0 2px rgba(255,210,63,.25), 0 3px 0 rgba(0,0,0,.35);
}
.weekly > b { font-family: var(--font-title); font-weight: 400; color: var(--gold); letter-spacing: .02em; }
.wk { background: rgba(0,0,0,.35); border: 1px solid rgba(255,210,63,.25); font-weight: 800; }

/* razas: medallas en fila */
.race-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 12px; }
@media (max-width: 860px) { .race-pick { grid-template-columns: repeat(4, 1fr); } }
.race-chip {
  border-radius: 14px; border: 2px solid var(--ink); padding: 8px 6px 7px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 85%, #fff 8%), var(--panel));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.1), 0 4px 0 var(--ink); transition: transform .12s, filter .12s;
}
.race-chip:hover { transform: translateY(-3px); filter: brightness(1.12); }
.race-chip .rc-emoji { font-size: 2em; filter: drop-shadow(0 3px 0 rgba(0,0,0,.4)); }
.race-chip b { font-weight: 900; }
.race-chip.sel {
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #2a1404;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 4px 0 var(--ink), 0 0 18px var(--glow); transform: translateY(-3px);
}
.race-chip.sel small { color: #4a2a0a; }
.race-chip.locked { filter: grayscale(.85) brightness(.75); opacity: 1; }

/* el escenario */
.stage {
  position: relative; overflow: hidden; border-radius: 18px; border: 3px solid var(--ink); min-height: 300px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.12), 0 6px 0 rgba(0,0,0,.45), 0 18px 34px rgba(0,0,0,.4);
  background: linear-gradient(180deg, var(--sky1), var(--sky2) 78%);
}
.stage-sky { position: absolute; inset: 0; pointer-events: none; }
.stage-sky i { position: absolute; display: block; }
.stage-sky .sun { width: 74px; height: 74px; right: 9%; top: 16%; border-radius: 50%; background: radial-gradient(circle, #fff8d0 30%, #ffd86a 60%, transparent 70%); filter: blur(.5px); }
body[data-race="aranas"] .stage-sky .sun { background: radial-gradient(circle, #f4f2ff 45%, #c8c0ff 62%, transparent 70%); } /* de noche: luna */
.stage-sky .cloud { height: 22px; border-radius: 22px; background: rgba(255,255,255,.75); animation: drift 40s linear infinite; }
.stage-sky .cloud::before { content: ''; position: absolute; left: 18%; top: -12px; width: 40%; height: 26px; border-radius: 50%; background: inherit; }
.stage-sky .c1 { width: 110px; top: 20%; left: -20%; }
.stage-sky .c2 { width: 80px; top: 34%; left: -20%; animation-duration: 58s; animation-delay: -30s; opacity: .7; }
@keyframes drift { to { transform: translateX(1100px); } }
.stage-sky .hill { bottom: 54px; border-radius: 50% 50% 0 0; }
.stage-sky .h1 { left: -10%; width: 70%; height: 130px; background: var(--hill2); }
.stage-sky .h2 { right: -12%; width: 75%; height: 100px; background: var(--hill1); }
.stage-ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 64px; z-index: 0;
  background:
    linear-gradient(180deg, var(--grass) 0 9px, color-mix(in srgb, var(--grass) 60%, var(--ground)) 9px 13px, transparent 13px),
    radial-gradient(circle at 20% 60%, rgba(0,0,0,.18) 3px, transparent 4px) 0 0 / 46px 30px,
    radial-gradient(circle at 70% 30%, rgba(255,255,255,.08) 2px, transparent 3px) 0 0 / 38px 24px,
    var(--ground);
  border-top: 3px solid var(--ink);
}
.stage-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.stage-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.stage-title .st-emoji { font-size: 2.2em; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
.stage-title b { display: block; font-family: var(--font-title); font-weight: 400; font-size: 1.6em; line-height: 1; color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.stage-title small { display: block; color: var(--ink); font-weight: 900; font-size: .8em; opacity: .75; }
.stage-count { font-weight: 900; color: #fff; background: rgba(0,0,0,.45); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; font-size: .85em; }

/* el escuadrón parado en el pasto */
.stage .lobby-squad { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-end; gap: clamp(6px, 2vw, 22px); flex-wrap: nowrap; padding: 0 12px 10px; }
.stage .sq {
  background: none; border: 0; clip-path: none; box-shadow: none; padding: 0; min-width: 0; flex: 0 1 140px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 1em;
}
.stage .sq-bug { display: block; width: 100%; max-width: 128px; animation: idle 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.6s); transform-origin: 50% 100%; }
.stage .sq .bug-svg { width: 100%; height: auto; aspect-ratio: 55 / 38; overflow: visible; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); }
.stage .sq:nth-child(even) .sq-bug { scale: -1 1; } /* se miran entre ellos */
@keyframes idle { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-4px) scaleY(1.03); } }
.stage .sq-plate {
  display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.1;
  background: rgba(10,6,2,.82); border: 2px solid var(--ink); border-radius: 10px; padding: 4px 10px 5px; min-width: 90px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.08), 0 3px 0 rgba(0,0,0,.4);
}
.stage .sq-plate b { font-size: .95em; color: #fff; }
.stage .sq-plate .ch-type { font-size: .7em; }
.stage .sq-plate small { font-size: .72em; color: #ff8a8a; font-weight: 900; }

/* arsenal */
.prep-panel { padding: 12px 14px; }
.prep-head h3 { font-size: 1.2em; }
.prep-head span { font-weight: 800; }
.arsenal .lobby-ammo { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.arsenal .basics { flex-basis: 100%; font-size: .8em; margin-top: 4px; }

/* panel de la partida */
.match-panel { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.mp-title { margin: 0 0 2px; font-size: 1.45em; color: var(--accent-2); }
.match-panel h4 { margin: 8px 0 2px; }
.choice.seg { gap: 6px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.choice.seg button { padding: 9px 8px; font-size: .95em; gap: 2px; align-items: center; text-align: center; }
.choice.seg button small { font-size: .72em; line-height: 1.2; }
.choice.seg.modes { grid-template-columns: repeat(4, 1fr); }
.choice.seg.modes button { padding: 10px 4px; }
.ia-opts { margin-top: 10px; border: 2px solid var(--ink); border-radius: 12px; background: rgba(0,0,0,.22); padding: 0 10px; }
.ia-opts summary { cursor: pointer; padding: 9px 2px; font-weight: 900; list-style: none; display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.ia-opts summary small { font-size: .78em; flex: 1 1 140px; }
.ia-opts summary::-webkit-details-marker { display: none; }
.ia-opts summary::after { content: '▾'; transition: transform .15s; }
.ia-opts[open] summary::after { transform: rotate(180deg); }
.ia-opts .match-opts { padding-bottom: 10px; }
.mo-opts { grid-template-columns: repeat(3, 1fr); }
.mo-btn { padding: 6px 8px; font-size: .88em; }
.match-panel .warn { margin: 4px 0 0; }
.match-panel .lobby-actions { margin-top: 4px; }

/* el botón de jugar */
.play-btn {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 14px 18px 12px;
  font-size: 2em !important; line-height: 1; text-transform: uppercase; color: #fff !important;
  -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink) !important;
  background: linear-gradient(180deg, #ffe07a, #ffb02e 45%, #ff7a1a) !important; border-width: 3px !important;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.6), inset 0 -5px 0 rgba(150,50,0,.35), 0 6px 0 var(--ink), 0 10px 26px rgba(255,140,40,.45) !important;
  animation: breathe 2.2s ease-in-out infinite;
}
.play-btn small { font-family: var(--font-ui); font-size: .38em; font-weight: 900; letter-spacing: .06em; -webkit-text-stroke: 0; text-shadow: 0 1px 0 rgba(0,0,0,.35); color: #4a1e00; margin-top: 4px; }
.play-btn:disabled { animation: none; }
.play-btn:active:not(:disabled) { box-shadow: inset 0 3px 0 rgba(255,255,255,.5), 0 2px 0 var(--ink) !important; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }

.online-panel { padding: 12px 16px 14px; }
.online-panel .mp-title { font-size: 1.15em; }

@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr; }
  .ctrl-col { position: static; }
}

/* ---------- Batalla: HUD ---------- */
.hud-turn, .hud-wind, .hud-mode, .hud-teams, #screen-battle .weapon-bar {
  background: var(--glass) !important; border: 2px solid var(--ink); backdrop-filter: blur(4px);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.1), 0 3px 0 rgba(0,0,0,.4);
}
.hud-turn { font-weight: 900; font-size: 1.05em; padding: 7px 18px; }
.timer { font-family: var(--font-title); font-weight: 400; letter-spacing: .03em; background: rgba(255,255,255,.12); border-radius: 8px; }
.hud-teams { border-radius: 12px; }
#screen-battle .weapon-bar { border-radius: 16px; border-top: 3px solid var(--accent); }
.wbtn { border-radius: 10px; border: 2px solid rgba(0,0,0,.6); box-shadow: inset 0 2px 0 rgba(255,255,255,.1), 0 2px 0 rgba(0,0,0,.5); }
.wbtn.sel { border-color: var(--accent-2); box-shadow: 0 0 0 2px var(--accent-2), 0 0 14px var(--glow); }
.hcard { border-radius: 10px; }
.over-box { border-color: var(--ink); padding: 26px 36px; }
.over-box h2 { font-size: 2.6em; text-transform: uppercase; color: var(--gold); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }
.pause-banner { font-family: var(--font-title); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; border-radius: 14px; border: 2px solid var(--ink); }
#toast .toast-item { font-weight: 900; border: 2px solid var(--ink); background: rgba(14,8,3,.94); box-shadow: 0 3px 0 rgba(0,0,0,.5), 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }

/* ---------- Celular ---------- */
@media (max-width: 700px) {
  .home-bar { backdrop-filter: none; } /* si no, la barra de abajo (position: fixed) queda atrapada adentro */
  .brand-txt { font-size: 1em; white-space: nowrap; }
  .wallet > .muted { font-size: .68em; max-width: none; }
  .home-actions { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; } /* sin hueco si no hay Ranking */
  .stage-head { padding: 10px; gap: 6px; }
  .stage-title { flex-basis: 100%; }
  .stage-title .st-emoji { font-size: 1.7em; }
  .stage-count { margin-right: auto; }
  .stage .sq-plate b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 76px; }
  .brand-ico { width: 32px; height: 32px; font-size: 1.1em; border-radius: 10px; }
  .home-actions { background: rgba(10,6,2,.94); border-top: 2px solid var(--ink); box-shadow: 0 -3px 0 color-mix(in srgb, var(--accent) 35%, transparent); }
  .home-actions .btn { border-radius: 12px; }
  #screen-lobby .lobby { padding: 10px 10px 170px; }
  .stage { min-height: 230px; }
  .stage-title b { font-size: 1.25em; }
  .stage .sq-plate { min-width: 0; padding: 3px 6px 4px; }
  .stage .sq-plate b { font-size: .8em; }
  .stage .sq-plate .ch-type { display: none; }
  .race-pick { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .race-chip { padding: 6px 2px; }
  .race-chip b { font-size: .72em; }
  #screen-lobby .lobby-actions { background: rgba(10,6,2,.94); border-top: 2px solid var(--ink); }
  .play-btn { font-size: 1.4em !important; padding: 10px 12px 8px; }
  .logo { -webkit-text-stroke: 2px var(--ink); }
}
