/* ============ Battle-Roulette — estilos ============ */
:root {
  --bg: #0b0910;
  --bg2: #120e1c;
  --panel: #17111f;
  --panel2: #1e162b;
  --line: #2c2140;
  --text: #f1ecf9;
  --muted: #a99cc4;
  --violet: #7c3aed;
  --magenta: #d946ef;
  --gold: #f5c518;
  --red: #ef4444;
  --green: #22c55e;
  --grad: linear-gradient(135deg, #7c3aed, #d946ef);
  --display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* botón verde «listo» de la elección de instrumentales */
.pick-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn.ready { background: linear-gradient(180deg, #22c55e, #15803d); border-color: #16a34a; color: #fff; }
.btn.ready:hover { filter: brightness(1.1); }

/* el texto pequeño de la cuenta atrás se desvanece al segundo */
#intro-small { transition: opacity .3s ease; }
#intro-small.fade-out { opacity: 0; }

/* ficha de perfil de un amigo */
.fp-head { display: flex; align-items: center; gap: 14px; }
.fp-head .avatar { width: 64px; height: 64px; font-size: 34px; flex: none; }

/* botón de confirmación de presencia en la sala de espera */
#btn-presence {
  align-self: center; margin-bottom: 6px;
  background: linear-gradient(180deg, #22c55e, #15803d); border-color: #16a34a; color: #fff;
  font-size: 18px; padding: 10px 26px; animation: pulse 1.4s infinite;
}
/* la sala de jueces por encima de cualquier panel/modal */
#overlay-judge { z-index: 60; }
#overlay-spectator { z-index: 60; }
#overlay-reserve { z-index: 60; }
/* la sala de elección del torneo, por encima de todo (modales incluidos) */
#overlay-pick { z-index: 70; }
/* tarjeta del juez durante los cruces: por encima de paneles y salas */
#overlay-judge-verdict { z-index: 80; }
.jv-titulo {
  font-family: var(--display); font-size: 58px; line-height: 1.05; color: var(--gold);
  text-shadow: 0 0 30px rgba(245, 197, 24, .55);
}
#overlay-spectator h2, #overlay-reserve h2 { font-size: 40px; }
#spec-info, #reserve-info { font-size: 19px; font-weight: 700; color: var(--text); }
#overlay-spectator .hint:last-of-type, #overlay-reserve .hint:last-of-type { font-size: 18px; color: var(--text); }
/* contador en segundos, grande, sobre el título */
.judge-count {
  font-family: var(--display); font-size: 96px; line-height: 1; color: var(--gold);
  text-shadow: 0 0 30px rgba(245,197,24,.6);
}
/* texto del torneo más grande en la sala de jueces */
#judge-info { font-size: 19px; font-weight: 700; color: var(--text); }
#overlay-judge .hint:last-of-type { font-size: 20px; font-weight: 700; color: var(--text); }

/* contador de espera del torneo: chip dentro de la sala, encima de la presencia */
.twait-banner {
  background: var(--panel2); border: 1px solid var(--gold); color: var(--gold);
  padding: 10px 22px; border-radius: 999px; font-weight: 800; font-size: 17px;
  animation: twaitPulse 2s ease-in-out infinite;
}
@keyframes twaitPulse { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }

/* resultado: trofeo brillando y mojón con moscas */
.result-emoji.shine { animation: trophyShine 1.6s ease-in-out infinite; }
/* campeón del torneo: título en grande y fuegos artificiales */
#result-title.campeon {
  font-size: 64px; color: var(--gold);
  text-shadow: 0 0 34px rgba(245, 197, 24, .65);
}
.fuegos { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.chispa { position: absolute; width: 8px; height: 8px; border-radius: 50%; }
@keyframes trophyShine {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(245,197,24,.55)) brightness(1); transform: scale(1); }
  50% { filter: drop-shadow(0 0 26px rgba(245,197,24,.95)) brightness(1.25); transform: scale(1.08); }
}
#result-flies { position: relative; width: 0; height: 0; margin: -34px auto 0; }
#result-flies .fly {
  position: absolute; left: 0; top: 0; font-size: 22px; z-index: 2;
  animation: flyOrbit 3s linear infinite;
}
@keyframes flyOrbit {
  from { transform: rotate(var(--a)) translateX(58px) rotate(calc(var(--a) * -1)); }
  50%  { transform: rotate(calc(var(--a) + 180deg)) translateX(78px) rotate(calc(var(--a) * -1 - 180deg)) translateY(-8px); }
  to   { transform: rotate(calc(var(--a) + 360deg)) translateX(58px) rotate(calc(var(--a) * -1 - 360deg)); }
}

/* contador de prueba del editor de punto de inicio */
#modal-instr-start .modal-card { width: min(640px, 94vw); }
.is-countdown { text-align: center; padding: 6px 0 2px; }
.is-countdown span { display: block; color: var(--muted); font-size: 14px; }
.is-countdown b { display: block; font-family: var(--display); font-size: 44px; line-height: 1.1; color: var(--gold); }

/* banda verde de la intro sobre el deslizador del punto de inicio */
.is-slider { position: relative; }
.is-slider input[type="range"] {
  width: 100%; padding: 0; background: transparent; border: none; box-shadow: none;
}
#is-intro-band {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 16px; z-index: 2; pointer-events: auto; cursor: grab;
  background: rgba(34, 197, 94, .45); border: 1px solid #22c55e; border-radius: 8px;
  color: #dcfce7; font-size: 10px; line-height: 14px; text-align: center;
  overflow: hidden; white-space: nowrap; user-select: none; touch-action: none;
}
#is-intro-band:active { cursor: grabbing; background: rgba(34, 197, 94, .65); }
html, body { height: 100%; }
/* la página sigue pudiéndose desplazar con la rueda, pero sin barra lateral */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; width: 0; }
body {
  margin: 0; background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124,58,237,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(217,70,239,.12), transparent 60%),
    var(--bg);
  color: var(--text); font-family: var(--body); font-size: 15px;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; }
h1, h2, h3 { margin: 0; }
.hidden { display: none !important; }

.logo {
  font-family: var(--display); font-size: 56px; letter-spacing: 2px; margin: 0;
  color: var(--text); text-shadow: 0 4px 24px rgba(124,58,237,.6);
}
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo.small { font-size: 34px; }
.tagline { color: var(--muted); margin: 6px 0 18px; }

/* ---------- botones ---------- */
.btn {
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  padding: 9px 14px; border-radius: 10px; cursor: pointer; font-weight: 600;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: #271c3a; box-shadow: 0 0 0 1px var(--violet) inset; }
.btn:active { transform: scale(.97); }
.btn.primary {
  background: var(--grad); border: none; color: #fff;
  box-shadow: 0 6px 22px rgba(168,63,231,.45);
}
.btn.primary:hover { box-shadow: 0 8px 28px rgba(168,63,231,.65); }
.btn.danger { background: linear-gradient(135deg, #ef4444, #b91c1c); border: none; color: #fff; }
.btn.ghost { background: transparent; }
.btn.big { font-size: 18px; padding: 13px 22px; border-radius: 14px; }
.btn.small { padding: 5px 9px; font-size: 13px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn.pulse { animation: pulse 2.2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(168,63,231,.45); }
  50% { box-shadow: 0 6px 34px rgba(217,70,239,.85); }
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- pantallas ---------- */
.screen { min-height: 100vh; }
#screen-auth {
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  width: min(430px, 96vw); background: rgba(23,17,31,.9); border: 1px solid var(--line);
  border-radius: 20px; padding: 34px 30px 26px; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.auth-card .logo { font-size: 46px; }
.tabs { display: flex; gap: 6px; background: var(--bg2); padding: 5px; border-radius: 12px; margin-bottom: 18px; }
.tab {
  flex: 1; padding: 9px; border: none; border-radius: 9px; background: transparent;
  color: var(--muted); font-weight: 700; cursor: pointer;
}
.tab.active { background: var(--grad); color: #fff; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.auth-card label, .modal-card label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 13px; font-weight: 600; }
input, textarea {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; outline: none;
}
input:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124,58,237,.25); }
.form-error { color: var(--red); font-weight: 600; margin: 12px 0 0; }
.auth-note { color: var(--muted); font-size: 12.5px; margin: 18px 0 0; }

/* ---------- home ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; border-bottom: 1px solid var(--line);
  background: rgba(11,9,16,.7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
/* botones de la barra: igual altura que el chip de perfil (38 px de avatar) */
.topbar-right .btn { min-height: 52px; display: inline-flex; align-items: center; }
.user-chip {
  display: flex; align-items: center; gap: 10px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; cursor: pointer; color: var(--text);
}
.user-chip:hover { border-color: var(--violet); }
.chip-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.chip-text span:first-child { font-weight: 700; }
/* etiqueta free/premium dentro del chip de usuario */
.user-chip { position: relative; }
.chip-plan {
  margin-left: 10px; align-self: center; font-size: 11px; font-weight: 800; letter-spacing: .5px;
  padding: 3px 10px; border-radius: 999px; text-transform: uppercase;
}
.chip-plan.free { background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }
.chip-plan.premium { background: linear-gradient(135deg, #f5c518, #d97706); color: #1a1300; border: none; box-shadow: 0 0 12px rgba(245,197,24,.4); }
.mini { font-size: 12px; color: var(--muted); }
.hint { margin: 6px 0 0; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 20px; flex: none;
  border: 2px solid rgba(255,255,255,.15);
}
.home-grid {
  display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px; padding: 22px; max-width: 1700px; margin: 0 auto;
  align-items: start; /* cada tarjeta mantiene su altura: ninguna estira a las demás */
}
/* los cuatro recuadros en una sola fila arriba del todo:
   torneo · buscar batalla · cámara y micro · instrumentales(+amigos debajo) */
#card-tournament { grid-column: 1; grid-row: 1; }
#card-search { grid-column: 2; grid-row: 1; min-height: 497px; }
#card-media { grid-column: 3; grid-row: 1; }
/* columna derecha: instrumentales con amigos pegados justo debajo */
.col-stack { grid-column: 4; grid-row: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* amigos compactos: scroll solo vertical para ver la lista */
#card-friends { max-height: 620px; overflow-y: auto; overflow-x: hidden; }
.tour-summary { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
/* botones dorados por día en el resumen del torneo semanal */
.dia-item { display: block; }
.dia-btn { display: flex; width: 100%; justify-content: center; align-items: center; padding: 11px 14px; font-size: 15px; border-radius: 12px; }
.dia-btn b { font-family: var(--display); font-size: 17px; letter-spacing: 1px; }
.dia-grupo { list-style: none; margin: 6px 0 2px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tour-summary .t-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; background: var(--bg2); border-radius: 10px; }
.tour-summary .t-row.me { outline: 1px solid var(--gold); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.card-title { font-family: var(--display); font-size: 26px; letter-spacing: 1px; }
.card-sub { color: var(--muted); margin: 6px 0 14px; font-size: 13.5px; }

.mode-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.mode-card {
  display: flex; gap: 12px; align-items: center; text-align: left; color: var(--text);
  background: var(--bg2); border: 2px solid var(--line); border-radius: 14px;
  padding: 12px 14px; cursor: pointer; transition: border-color .15s;
}
.mode-card small { color: var(--muted); }
.mode-card.active { border-color: var(--magenta); box-shadow: 0 0 18px rgba(217,70,239,.25); }
.mode-emoji { font-size: 26px; }
.mode-list.vertical { margin: 12px 0; }
.practice-row { display: flex; gap: 10px; margin-top: 20px; }
/* mismo grosor que «Buscar rival al azar» */
.practice-row .btn { flex: 1; padding: 15px 6px; font-size: 13.5px; justify-content: center; }
/* «Buscar rival al azar» ocupa todo el ancho: centrado sobre los dos de práctica */
#btn-find { display: block; width: 100%; margin: 0 auto; }.btn.tournament {
  width: 100%; margin-top: 10px; padding: 12px;
  background: linear-gradient(135deg, #f5c518, #f59e0b);
  color: #231a00; font-weight: 800; letter-spacing: .5px; border: none;
  box-shadow: 0 6px 20px rgba(245,197,24,.35);
}
.btn.tournament:hover { box-shadow: 0 8px 28px rgba(245,197,24,.55); }

/* torneo semanal */
.t-block { margin-bottom: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.t-block h3 { font-family: var(--display); font-size: 20px; letter-spacing: 1px; margin-bottom: 6px; }
.t-count { font-weight: 800; color: var(--gold); margin: 0 0 6px; }
.t-avatars { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ok-text { color: var(--green); font-weight: 700; }
.t-champ { display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--gold); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; }
.t-round-name { font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-size: 12px; color: var(--magenta); margin: 8px 0 4px; }
.t-match { margin: 0 0 4px; line-height: 1.35; }
.t-match.live .mini { color: var(--gold); font-weight: 800; }
.t-ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.t-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px;
}
.t-row.me { border-color: var(--gold); box-shadow: 0 0 14px rgba(245,197,24,.25); }
.t-pos { width: 30px; text-align: center; font-weight: 800; font-size: 15px; color: var(--muted); flex: none; }
.t-row .nm { flex: 1; min-width: 0; }
.t-score { font-weight: 800; font-size: 13px; color: var(--gold); flex: none; }

/* cámara */
.preview-box {
  position: relative; aspect-ratio: 4/3; background: #000; border-radius: 14px;
  overflow: hidden; border: 1px solid var(--line); margin-bottom: 10px;
}
.preview-box video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.ph-avatar {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 64px; background: radial-gradient(circle at 50% 40%, #2a1f3d, #120e1c);
}
.preview-box video + .ph-avatar, .video-card video + .ph-avatar { }
.preview-box .ph-avatar, .video-card .ph-avatar { pointer-events: none; }
.media-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.toggle input { accent-color: var(--magenta); width: 16px; height: 16px; }
#level-meter { background: var(--bg2); border-radius: 6px; border: 1px solid var(--line); }

/* instrumentales */
.instr-list {
  list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px;
  max-height: 330px; overflow-y: auto; padding-right: 4px; /* scroll propio: la tarjeta no crece */
}
.instr-list::-webkit-scrollbar { width: 8px; }
.instr-list::-webkit-scrollbar-thumb { background: var(--violet); border-radius: 8px; }
.instr-list::-webkit-scrollbar-track { background: var(--bg2); border-radius: 8px; }
.instr-item {
  display: flex; align-items: center; gap: 10px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px;
}
.instr-item .meta { flex: 1; min-width: 0; line-height: 1.25; }
.instr-item .meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.instr-item .badge {
  font-size: 10.5px; font-weight: 800; letter-spacing: .5px; color: #1a1300;
  background: var(--gold); border-radius: 6px; padding: 2px 7px; margin-left: 6px;
}
.instr-item button { flex: none; }
.upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* amigos */
.friend-search { display: flex; gap: 8px; margin-bottom: 8px; }
.friend-search input { flex: 1; }
.fr-section { margin-top: 14px; }
.fr-section h3 {
  font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.friend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 112px; overflow-y: auto; padding-right: 4px; }
/* contador n/50 a la derecha de «Tus amigos» */
.fr-count { float: right; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
#fr-results { max-height: 260px; overflow-y: auto; padding-right: 4px; }
.friend-list::-webkit-scrollbar, #fr-results::-webkit-scrollbar, .instr-list::-webkit-scrollbar { width: 8px; }
.friend-list::-webkit-scrollbar-thumb, #fr-results::-webkit-scrollbar-thumb { background: var(--violet); border-radius: 8px; }
.friend-list::-webkit-scrollbar-track, #fr-results::-webkit-scrollbar-track { background: var(--bg2); border-radius: 8px; }
.friend-item {
  display: flex; align-items: center; gap: 10px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
}
/* nombre y estadísticas a la DERECHA del círculo del avatar, en horizontal */
.friend-item .nm {
  flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px;
}
.friend-item .nm b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-item .nm .mini { white-space: nowrap; }
/* los botones van en una SEGUNDA línea, debajo del nombre y con aire */
.friend-item { flex-wrap: wrap; }
.friend-item .fr-acciones {
  flex: 1 1 100%; display: flex; gap: 6px; margin-top: 4px; padding-left: 34px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #555; flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.sr-row { display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px; margin-bottom: 6px; }
.sr-row .nm { flex: 1; }

/* ---------- buscando ---------- */
#screen-search { display: flex; align-items: center; justify-content: center; }
.search-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.disc {
  width: 120px; height: 120px; border-radius: 50%; margin-bottom: 10px;
  background:
    radial-gradient(circle at center, var(--magenta) 0 14%, transparent 15%),
    repeating-radial-gradient(circle at center, #17111f 0 6px, #241a35 6px 12px);
  border: 3px solid var(--line);
  animation: spin 2.6s linear infinite;
  box-shadow: 0 0 40px rgba(217,70,239,.35);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- batalla ---------- */
#screen-battle { display: flex; flex-direction: column; height: 100vh; padding: 12px 16px; gap: 12px; }
.battle-topbar { display: flex; align-items: center; gap: 10px; }
.chip {
  background: var(--panel2); border: 1px solid var(--line); padding: 6px 12px;
  border-radius: 999px; font-weight: 700; font-size: 13.5px;
}
.chip.theme {
  border-color: var(--gold); color: var(--gold);
  font-size: 18px; padding: 8px 18px;
}
/* el recuadro del tema flota arriba, en el centro, entre los dos rivales */
.battle-stage { position: relative; }
#battle-theme {
  position: absolute; top: -52px; left: 50%; transform: translateX(-50%);
  z-index: 5; margin: 0; background: rgba(23, 17, 31, .85);
  font-size: 21px; padding: 9px 22px;
}
.spacer { flex: 1; }

.battle-stage {
  flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px;
  align-items: stretch; min-height: 0;
}
/* práctica: una sola cámara centrada (para practicar en el mismo dispositivo);
 * se conserva el marcador VS con el contador de turnos de la batalla de práctica */
.modo-practica .battle-stage { grid-template-columns: 1fr; }
.modo-practica #panel-right { display: none; }
.modo-practica .video-card { width: 100%; max-width: 720px; margin: 0 auto; }
.modo-practica #vs-badge {
  position: absolute; left: 50%; top: 80%;
  transform: translate(-50%, -50%); z-index: 6;
}
/* práctica: el contador de 60 s más grande y más abajo, sobre la cámara */
.modo-practica #vs-count { font-size: 120px; }
/* práctica: la temática también un poco más grande y dentro de la cámara */
.modo-practica #battle-theme { font-size: 26px; padding: 12px 28px; top: 6%; }
.video-card {
  position: relative; background: #000; border-radius: 18px; overflow: hidden;
  border: 3px solid var(--line); min-height: 200px;
  transition: border-color .2s, box-shadow .2s;
}
.video-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card video.local-mirror { transform: scaleX(-1); }
.video-card.live {
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(245,197,24,.5), 0 0 90px rgba(245,197,24,.2);
}
.video-card .ph-avatar { font-size: 84px; }
.nameplate {
  position: absolute; left: 10px; bottom: 10px; right: auto; display: flex; align-items: center; gap: 8px;
  background: rgba(10,7,16,.78); border: 1px solid var(--line); border-radius: 12px;
  padding: 5px 12px 5px 6px; font-weight: 800; backdrop-filter: blur(6px);
}
.nameplate .avatar { width: 30px; height: 30px; font-size: 16px; }
.live-tag {
  position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 3px 9px; border-radius: 999px;
  animation: pulse 1.4s infinite;
}
#vs-badge {
  align-self: center; font-family: var(--display); font-size: 54px; color: var(--gold);
  text-shadow: 0 0 24px rgba(245,197,24,.7); padding: 0 4px;
}
/* contador central entre pantallas: grande y en blanco */
#vs-count {
  font-family: var(--display); font-size: 84px; line-height: 1; color: #ffffff;
  text-shadow: 0 0 18px rgba(255,255,255,.45);
}
.battle-hud { text-align: center; }
/* el contador numérico junto a la barra se retiró: solo queda el central (#vs-count) */
#count-num { display: none; }
#turn-banner { font-family: var(--display); font-size: 30px; letter-spacing: 1px; min-height: 34px; }
#turn-banner.mine { color: var(--gold); text-shadow: 0 0 18px rgba(245,197,24,.55); }
#turn-banner.rival { color: var(--muted); }
.count-wrap { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 4px; }
#count-num { font-family: var(--display); font-size: 40px; min-width: 74px; }
.count-bar {
  width: min(420px, 50vw); height: 12px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
}
#count-fill { display: block; height: 100%; width: 100%; background: var(--grad); border-radius: 999px; transition: width .12s linear; }

.beat-bar {
  display: flex; align-items: center; gap: 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px;
}
.beat-icon { font-size: 22px; color: var(--magenta); }
.beat-info { flex: 1; line-height: 1.2; }
.beat-info strong { display: block; }
#beat-vol { width: 130px; accent-color: var(--magenta); }

/* elección de instrumentales antes de la moneda */
#pick-count, #mirror-count {
  font-family: var(--display); font-size: clamp(80px, 15vw, 150px); line-height: 1;
  color: var(--gold); text-shadow: 0 0 30px rgba(245,197,24,.7), 0 4px 40px rgba(0,0,0,.85);
}
#mirror-count { color: var(--magenta); text-shadow: 0 0 30px rgba(217,70,239,.7), 0 4px 40px rgba(0,0,0,.85); }
.pick-slots { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.pick-slot {
  background: var(--bg2); border: 2px solid var(--line); border-radius: 12px;
  padding: 8px 16px; min-width: 220px; display: flex; flex-direction: column; gap: 2px;
}
.pick-slot.filled { border-color: var(--green); }
.pick-slot b { font-size: 14px; }
#pick-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 30vh; overflow-y: auto; padding: 4px; width: min(560px, 94vw);
  background: rgba(10,7,16,.5); border: 1px solid var(--line); border-radius: 12px;
}
.pick-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px;
}
.pick-row.picked1, .pick-row.picked2 { border-color: var(--green); }
.pick-row .pn { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-row .mini { flex: none; }

/* ---------- overlays ---------- */
.intro-count {
  position: fixed; inset: 0; z-index: 35; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#intro-small {
  font-weight: 800; font-size: clamp(18px, 3vw, 30px); letter-spacing: 1px; color: #fff;
  background: rgba(10,7,16,.6); padding: 4px 20px; border-radius: 999px;
  text-shadow: 0 2px 12px rgba(0,0,0,.9);
  margin-bottom: 4px;
}
#intro-big {
  font-family: var(--display); font-size: clamp(90px, 18vw, 190px); line-height: 1.05;
  color: var(--gold);
  text-shadow: 0 0 34px rgba(245,197,24,.75), 0 4px 44px rgba(0,0,0,.85);
}
#intro-big.go { color: var(--green); text-shadow: 0 0 42px rgba(34,197,94,.9), 0 4px 44px rgba(0,0,0,.85); }
#intro-big.pop { animation: introPop .32s cubic-bezier(.2,1.5,.4,1); }
@keyframes introPop { from { transform: scale(2.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.overlay {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; text-align: center;
  background: rgba(7,5,12,.86); backdrop-filter: blur(6px); padding: 20px;
}
.spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--magenta);
  animation: spin 0.9s linear infinite;
}
#overlay-waiting p { color: var(--muted); font-weight: 600; }

/* moneda */
.coin-title { font-family: var(--display); font-size: 42px; letter-spacing: 3px; margin: 0; color: var(--gold); text-shadow: 0 0 24px rgba(245,197,24,.5); }
.coin-legend { margin: -4px 0 6px; letter-spacing: .4px; }
.coin-area { position: relative; width: 320px; height: 260px; display: flex; align-items: flex-end; justify-content: center; }
.coin-floor {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: 220px; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, transparent, #4a3a6b, transparent);
}
.coin-shadow {
  position: absolute; bottom: 10px; left: 50%; margin-left: -75px;
  width: 150px; height: 22px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.75), transparent 70%);
}
.coin-wrap { perspective: 900px; position: absolute; bottom: 14px; }
.coin {
  width: 150px; height: 150px; position: relative; transform-style: preserve-3d;
  will-change: transform;
}
.coin-face {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  font-family: var(--display); letter-spacing: 2px;
  border: 5px solid rgba(0,0,0,.25);
  box-shadow: inset 0 0 24px rgba(0,0,0,.35), 0 0 30px rgba(245,197,24,.35);
}
.coin-face.cara {
  background: radial-gradient(circle at 35% 30%, #ffe98a, #f5c518 55%, #b8860b);
  color: #4a3a00; font-size: 26px;
}
.coin-face.cruz {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 35% 30%, #eef2f7, #b9c4d4 55%, #7c8aa0);
  color: #2c3440; font-size: 26px;
}
.coin-symbol { font-size: 44px; line-height: 1; font-family: initial; }
.coin-result {
  font-family: var(--display); font-size: 64px; letter-spacing: 6px; min-height: 70px;
  opacity: 0; transform: scale(.4); margin: 0;
}
.coin-result.show { animation: pop .45s cubic-bezier(.2,1.6,.4,1) forwards; }
.coin-result.cara { color: var(--gold); text-shadow: 0 0 30px rgba(245,197,24,.8); }
.coin-result.cruz { color: #c9d4e4; text-shadow: 0 0 30px rgba(201,212,228,.8); }
@keyframes pop { to { opacity: 1; transform: scale(1); } }
.coin-sub { font-weight: 700; font-size: 18px; margin: 0; color: var(--text); }

/* votación */
.vote-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* resultado */
.result-emoji { font-size: 84px; }
#result-sub { color: var(--muted); max-width: 460px; }
.result-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* ---------- modales ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(7,5,12,.7); backdrop-filter: blur(4px); padding: 18px;
}
/* botón «sistema de puntos» alineado con el título, un poco más a la derecha */
#btn-sistema-puntos {
  vertical-align: middle; margin-left: 18px; margin-bottom: 4px;
}
/* el recuadro de puntos: mismo tamaño y aspecto que el de campeonato anual */
#modal-puntos .modal-card, #modal-gallinero .modal-card { width: min(820px, 96vw); min-height: 786px; justify-content: center; }
#modal-puntos h2 { margin-top: 0; }
#modal-puntos .puntos-lista { margin-top: 24px; }
#modal-puntos .mini:last-of-type { margin-top: 10px; }
#modal-puntos > .modal-card > p.mini { font-size: 16.5px; line-height: 1.45; }
#modal-puntos .modal-row, #modal-gallinero .modal-row { margin-top: 26px; }
/* reglas del gallinero: lista con las mismas tarjetas que los puntos */
#modal-gallinero .puntos-lista { margin-top: 24px; }
#modal-gallinero .puntos-lista li b { color: var(--gold); }
#modal-gallinero > .modal-card > p.mini { font-size: 16.5px; }
/* otros países: rejilla de botones de países */
/* otros países: mismo tamaño que reglas del gallinero y rejilla de países con banderas */
#modal-otros-paises .modal-card { width: min(820px, 96vw); min-height: 786px; justify-content: center; }
#modal-otros-paises .modal-row { margin-top: 30px; }
.paises-lista {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 20px 0; width: 100%;
}
.pais-btn { justify-content: flex-start; padding: 12px 18px; font-size: 17px; }
.pais-btn .bandera { width: 40px; height: auto; margin-right: 12px; border-radius: 3px; flex: none; }
.puntos-lista { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 12px; }
.puntos-lista li {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; text-align: left; font-size: 17px;
}
.puntos-lista li b { color: var(--gold); }
.modal-card {
  width: min(460px, 96vw); max-height: 92vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-row { display: flex; gap: 10px; margin-top: 6px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button {
  font-size: 22px; padding: 6px 0; background: var(--bg2); border: 2px solid var(--line);
  border-radius: 10px; cursor: pointer;
}
.emoji-grid button.sel { border-color: var(--magenta); background: #2b1f3f; }
.color-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.color-grid button {
  width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer;
}
.color-grid button.sel { border-color: #fff; }
/* modal de perfil más grande */
#modal-profile .modal-card { width: min(680px, 94vw); padding: 28px; gap: 16px; }
/* botón cuenta junto a «Mi perfil» y su panel de datos */
#btn-pf-cuenta { font-size: 24px; padding: 2px 14px; font-family: var(--display); letter-spacing: 1px; margin-right: 12px; }
/* «Mi perfil» centrado en el recuadro y etiqueta free/premium junto al botón cuenta */
#modal-profile h2 { display: flex; align-items: center; position: relative; }
.pf-titulo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.pf-plan-tag {
  font-size: 13px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px;
}
.pf-plan-tag.free { background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }
.pf-plan-tag.premium { background: linear-gradient(135deg, #f5c518, #d97706); color: #1a1300; border: none; box-shadow: 0 0 12px rgba(245,197,24,.4); }
/* recuadro grande de cuenta */
#modal-cuenta .cuenta-card { width: min(1100px, 97vw); max-height: 92vh; overflow-y: auto; padding: 30px; gap: 18px; scrollbar-width: none; }
#modal-cuenta .cuenta-card::-webkit-scrollbar { display: none; }
.cuenta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cuenta-sec { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.cuenta-sec h3 { font-family: var(--display); font-size: 22px; letter-spacing: 1px; margin: 0 0 4px; }
.c-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.c-line span { color: var(--muted); font-size: 13.5px; font-weight: 600; flex: none; }
.c-line input[type="text"], .c-line input[type="email"], .c-line input[type="password"], .c-line select { width: 220px; padding: 7px 10px; }
.toggle-line input { width: 20px; height: 20px; accent-color: var(--magenta); cursor: pointer; }
.c-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.c-stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.c-stats b { display: block; font-family: var(--display); font-size: 20px; color: var(--gold); }
.cuenta-sec .btn { align-self: flex-start; }
.cu-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 110px; overflow-y: auto; }
.planes { display: flex; gap: 10px; }
.plan-card { flex: 1; display: flex; flex-direction: column; gap: 4px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.plan-card:hover { border-color: var(--violet); }
.plan-card.active { border-color: var(--gold); box-shadow: 0 0 14px rgba(245,197,24,.25); }
.plan-card strong { font-size: 16px; }
.plan-card small { color: var(--muted); }
/* tema claro */
body.tema-claro { --bg: #f3f0fa; --bg2: #e9e4f5; --panel: #ffffff; --panel2: #f0ecf9; --line: #cfc3e6; --text: #241a38; --muted: #6b5f85; }
/* botón hazte premium y recuadro de planes */
.premium-btn { background: linear-gradient(135deg, #f5c518, #d97706); border: none; color: #1a1300; font-weight: 800; }
.premium-btn:hover { box-shadow: 0 0 22px rgba(245,197,24,.55); }
/* recuadro de contacto con el icono de Instagram */
.contacto-card { width: min(560px, 94vw); gap: 18px; }
.contacto-fila { display: flex; align-items: center; justify-content: center; gap: 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 24px 20px; }
.contacto-fila p { margin: 0; font-size: 18px; font-weight: 600; }
.contacto-ig {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 14px; color: #fff;
  background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
  transition: transform .15s ease, box-shadow .15s ease;
}
.contacto-ig:hover { transform: scale(1.08); box-shadow: 0 0 22px rgba(220, 39, 67, .6); }
/* botón centrado dentro de su sección de cuenta */
.c-centrado { align-self: center; margin: 0 auto; }
/* ojo 👁 ver/ocultar en los campos de contraseña */
.pass-campo { position: relative; flex: 1; display: flex; min-width: 0; }
.pass-campo > input { width: 100%; padding-right: 38px; }
.pass-campo input::-ms-reveal, .pass-campo input::-ms-clear { display: none; }
.pass-ojo {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 17px; padding: 2px; line-height: 1;
}
/* recuadro de usuarios conectados (más pequeño que el botón Contacto) */
.conectados-box {
  display: inline-flex; align-items: center; gap: 6px; align-self: center;
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg2); color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.conectados-box b { color: var(--green); }
.dot-online { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); flex: none; }
/* cajas separadas: correo actual y cambio de correo */
.email-caja { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
/* simuladores apagados: se ocultan todos los botones de prueba (solo kingston los ve) */
/* la cámara y su botón de simuladores van en pila: el botón queda justo debajo del recuadro */
.media-stack { display: flex; flex-direction: column; gap: 10px; min-width: 0; grid-column: 3; grid-row: 1; }
/* pie de la página principal: política de privacidad */
#footer-home { display: flex; justify-content: center; gap: 28px; padding: 120px 0 60px; }
.link-privacidad { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; text-decoration: underline; }
.link-privacidad:hover { color: var(--text); }
/* recuadro de la política de privacidad */
#modal-privacidad .privacidad-card { width: min(860px, 96vw); max-height: 90vh; overflow-y: auto; padding: 30px; gap: 14px; scrollbar-width: none; }
#modal-privacidad .privacidad-card::-webkit-scrollbar { display: none; }
#modal-privacidad h2 { font-family: var(--display); font-size: 32px; letter-spacing: 1px; }
.privacidad-texto { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.privacidad-texto h4 { margin: 10px 0 0; color: var(--gold); font-size: 16px; letter-spacing: .5px; }
.privacidad-texto p, .privacidad-texto li { font-size: 14.5px; line-height: 1.55; color: var(--text); }
.privacidad-texto ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
/* en pantallas pequeñas la pila de cámara fluye como el resto */
@media (max-width: 1100px) { .media-stack { grid-column: 1; grid-row: 2; } }
@media (max-width: 760px) { .media-stack { grid-column: auto; grid-row: auto; } }
.media-stack > .card { flex: none; }
#btn-sim-toggle { width: 100%; }
body.sims-off #btn-bot-hora, body.sims-off #btn-bot-rival, body.sims-off #btn-bot-cancel,
body.sims-off #btn-bot-judge, body.sims-off #btn-bot-spectator, body.sims-off #btn-bot-reserve,
body.sims-off #bot-options, body.sims-off .bot-row,
body.sims-off #btn-amigo-test, body.sims-off #btn-amigo-mudo,
body.sims-off #btn-test-rival, body.sims-off #btn-test-4min, body.sims-off #btn-test-next,
body.sims-off #btn-pick-test, body.sims-off #btn-judge-test, body.sims-off #btn-reserve-test,
body.sims-off #btn-spec-test, body.sims-off #btn-hueco-reserva, body.sims-off #btn-hueco-participa {
  display: none !important;
}
/* recuadro de apóyanos */
.apoyanos-card { width: min(760px, 95vw); gap: 18px; }
.apoyanos-texto { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text); }
.apoyanos-gracias { margin: 0; font-size: 19px; font-weight: 700; color: var(--gold); text-align: center; }
#modal-premium .premium-card { width: min(1150px, 97vw); max-height: 92vh; overflow-y: auto; padding: 34px; gap: 20px; scrollbar-width: none; }
#modal-premium .premium-card::-webkit-scrollbar { display: none; }
.premium-planes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plan-big {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 20px; cursor: pointer; text-align: left;
}
.plan-big:hover { border-color: var(--violet); }
.plan-big.active { border-color: var(--gold); box-shadow: 0 0 22px rgba(245,197,24,.3); }
.plan-big strong { font-family: var(--display); font-size: 28px; letter-spacing: 1px; }
.plan-big .precio { font-family: var(--display); font-size: 52px; color: var(--gold); line-height: 1; }
.plan-big small { color: var(--muted); font-weight: 600; }
.plan-big ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--text); font-size: 14px; }
.plan-big.destacado { border-color: var(--gold); background: linear-gradient(180deg, #201a10, #17111f); }
.plan-big .etiqueta { position: absolute; top: -12px; right: 14px; background: var(--gold); color: #1a1300; font-size: 12px; font-weight: 800; padding: 3px 12px; border-radius: 999px; }
.pf-cuenta { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.pf-cuenta .cuenta-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pf-cuenta .cuenta-row b { font-family: var(--display); font-size: 18px; color: #fff; }
.pf-cuenta .modal-row { margin-top: 4px; }
#modal-profile .emoji-grid button { font-size: 26px; width: 46px; height: 46px; }
#modal-profile .pf-photo { width: 96px; height: 96px; font-size: 46px; }
.pf-stats { margin: 0 auto; display: flex; gap: 22px; align-self: center; }
.pf-stat { text-align: center; }
.pf-stat .mini { display: block; color: var(--muted); }
.pf-stat b { display: block; font-family: var(--display); font-size: 18px; color: #ffffff; }
/* círculo de foto de perfil del editor */
.pf-photo-row { display: flex; align-items: center; gap: 16px; }
.pf-photo {
  width: 74px; height: 74px; border-radius: 50%; border: 2px dashed var(--line);
  font-size: 36px; cursor: pointer; flex: none; background-size: cover; background-position: center;
}
.pf-photo:hover { border-color: var(--violet); }
.pf-photo-actions { display: flex; flex-direction: column; gap: 6px; }

/* panel del torneo semanal más grande */
#modal-tournament .modal-card { width: min(1240px, 98vw); padding: 30px; gap: 16px; }
/* bots de prueba dentro del panel del torneo */
.bot-row { display: flex; gap: 10px; }
.bot-options { display: flex; flex-wrap: wrap; gap: 8px; }
/* panel del campeonato anual más grande */
#modal-campeonato .modal-card { width: min(820px, 96vw); padding: 30px; gap: 18px; }
#modal-campeonato .cp-slot .avatar { width: 38px; height: 38px; font-size: 20px; }
/* panel del ranking de puntos más ancho */
#modal-ranking .modal-card { width: min(720px, 96vw); padding: 28px; gap: 14px; }
#modal-ranking .t-row { display: flex; align-items: center; gap: 12px; }
#modal-ranking .t-score { margin-left: auto; white-space: nowrap; }
/* ranking: scroll sin barra visible (se sigue subiendo y bajando con la rueda) */
#modal-ranking .modal-card { scrollbar-width: none; }
#modal-ranking .modal-card::-webkit-scrollbar { display: none; }
/* puntuación del usuario junto a V · D */
#modal-ranking .rk-pts {
  font-size: 14px; font-weight: 700; color: var(--gold);
  margin-left: auto; margin-right: 14px; white-space: nowrap;
}
#modal-ranking .t-score { margin-left: 0; }

/* campeonato anual: 16 huecos */
.cp-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.cp-slot {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  background: var(--bg2); border: 1px dashed var(--line); border-radius: 10px;
}
/* dentro de "ver torneos": separa la etiqueta Torneo A/B/C del horario */
#t-body .cp-slot .t-pos { min-width: 96px; text-align: left; }
#t-body .cp-slot .nm { margin-left: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#t-body .cp-slot .btn { margin-left: 6px; }
.cp-counts { white-space: nowrap; color: var(--muted); margin-left: 4px; }
.cp-slot.filled { border-style: solid; border-color: var(--gold); }
.cp-slot.me { outline: 2px solid var(--gold); }
.cp-slot .avatar { width: 30px; height: 30px; font-size: 16px; flex: none; }
.cp-slot .avatar.cp-empty { background: transparent; border: 1px dashed var(--line); }
.cp-slot .nm b { font-size: 13.5px; }
/* ranking de puntos dentro del editor de perfil */
.pf-ranking {
  text-align: center;
  padding: 4px 8px;
}
.pf-ranking span { display: block; color: var(--gold); font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.pf-ranking b { font-family: var(--display); font-size: 20px; color: #ffffff; }
.inv-timer { height: 6px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.inv-timer i { display: block; height: 100%; width: 100%; background: var(--grad); transition: width 1s linear; }
/* contador grande del recuadro «Esperando respuesta de: …» */
.iw-contador { text-align: center; font-size: 18px; margin: 18px 0 10px; }
.iw-contador b { font-family: var(--display); font-size: 56px; color: var(--gold); }

/* toasts */
#toasts {
  position: fixed; right: 16px; bottom: 16px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px; max-width: 320px;
}
.toast {
  background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--violet);
  border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 13.5px;
  box-shadow: 0 12px 30px rgba(0,0,0,.5); animation: toastIn .25s ease;
}
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .home-grid { grid-template-columns: repeat(2, minmax(300px, 1fr)); }
  #card-tournament { grid-column: 1; grid-row: 1; }
  #card-search { grid-column: 2; grid-row: 1; }
  .media-stack { grid-column: 1; grid-row: 2; }
  .col-stack { grid-column: 2; grid-row: 2; }
}
@media (max-width: 760px) {
  .battle-stage { grid-template-columns: 1fr; }
  #vs-badge { padding: 0; font-size: 30px; }
  #vs-count { font-size: 56px; }
  #screen-battle { height: auto; min-height: 100vh; }
  .video-card { min-height: 34vh; }
  .home-grid { grid-template-columns: 1fr; }
  #card-tournament, #card-search, .media-stack, .col-stack { grid-column: auto; grid-row: auto; }
  #card-friends { max-height: none; }
}
