/* ─── DESIGN TOKENS (heredados de la landing Porra de la Liga) ───── */
:root {
  --green-deep:   #001A0B;
  --green-jungle: #003D1A;
  --green-mid:    #006B2E;
  --green-vivid:  #00C853;
  --green-neon:   #39FF14;

  --coral:        #FF5733;
  --orange:       #FF8C00;
  --gold:         #F7C948;
  --gold-light:   #FFE680;

  --cyan:         #00D4FF;
  --teal:         #00A896;

  --white:        #FFFFFF;
  --off-white:    #F0FFF4;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Inter', sans-serif;

  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 48px;

  --shadow-green: 0 0 32px rgba(0,200,83,.35);
  --shadow-gold:  0 0 32px rgba(247,201,72,.3);

  --bg: var(--green-deep);
  --bg-card: rgba(0,200,83,.06);
  --bg-card-strong: rgba(0,200,83,.1);
  --border: rgba(0,200,83,.18);
  --text: #FFFFFF;
  --text-dim: rgba(255,255,255,.6);
  --text-dimmer: rgba(255,255,255,.4);
}

[data-theme="light"] {
  --bg: #F0FFF4;
  --bg-card: #FFFFFF;
  --bg-card-strong: #FFFFFF;
  --border: rgba(0,107,46,.18);
  --text: #001A0B;
  --text-dim: rgba(0,26,11,.65);
  --text-dimmer: rgba(0,26,11,.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 0; height: 0; }

/* min-height con fallback en cascada: vh (compatibilidad amplia) -> svh (viewport
   "pequeño", con la barra del navegador siempre visible) -> dvh (viewport dinámico,
   se recalcula al vuelo si el navegador muestra/oculta su barra). Con solo svh, en
   páginas con poco contenido (ej. "En directo" sin partidos) algunos navegadores
   móviles calculan mal dónde fijar la barra inferior (position:fixed) y queda
   despegada del borde real de la pantalla, con un hueco debajo.
*/
#app { min-height: 100vh; min-height: 100svh; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: 74px; }

.container { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 18px; }

/* ─── TOP BAR ───────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  background: rgba(0,26,11,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .topbar { background: rgba(240,255,244,.92); }
.topbar-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 22px; letter-spacing: 1.2px;
  background: linear-gradient(90deg, var(--green-vivid), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  min-width: 0; overflow: hidden;
}
.topbar-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* En pantallas estrechas con el modo admin activo (5 botones en la barra),
   se prioriza que quepan los botones: se oculta el texto del título y se
   deja solo el escudo, en vez de truncarlo feo a 1-2 letras. */
@media (max-width: 400px) {
  .topbar-title span { display: none; }
}
.brand-mark { height: 24px; width: auto; display: block; flex-shrink: 0; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn.pulse { animation: pulseDot 1.6s ease-in-out infinite; }
@keyframes pulseDot { 0%,100%{box-shadow:0 0 0 0 rgba(0,200,83,.5)} 50%{box-shadow:0 0 0 6px rgba(0,200,83,0)} }
.admin-pill {
  font-size: 10.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: var(--green-deep);
}
.mode-btn {
  font-size: 12px; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
  padding: 8px 12px; border-radius: var(--r-xl); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text);
}
.mode-btn.on {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: var(--green-deep); border-color: transparent;
}
.validate-banner {
  background: rgba(247,201,72,.14); border-bottom: 1px solid rgba(247,201,72,.4);
  color: var(--gold); font-size: 12.5px; font-weight: 600; line-height: 1.4;
  padding: 10px 18px; text-align: center;
}

/* ─── BOTTOM NAV ────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-around;
  background: rgba(0,26,11,.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  /* Fuerza su propia capa de composición: evita el "salto" de Safari en iOS
     al mostrar/ocultar la barra de direcciones con elementos position:fixed. */
  transform: translateZ(0);
  will-change: transform;
}
[data-theme="light"] .bottom-nav { background: rgba(240,255,244,.95); }
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--text-dimmer); font-size: 10.5px; font-weight: 700;
  padding: 4px 2px; position: relative;
}
.nav-btn .ic { font-size: 19px; }
.nav-btn.active { color: var(--green-vivid); }
.nav-btn .dot {
  position: absolute; top: 0; right: calc(50% - 16px);
  width: 8px; height: 8px; border-radius: 50%; background: var(--coral);
  border: 1.5px solid var(--green-deep);
}

/* ─── AUTH SCREEN ───────────────────────────────────────── */
.auth-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 32px 0 60px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .ball { font-size: 48px; }
.auth-logo h1 {
  font-family: var(--font-display); font-size: clamp(38px, 11vw, 52px); letter-spacing: 1.5px; line-height: .95;
  background: linear-gradient(90deg, var(--green-vivid), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-top: 6px;
}
.auth-logo p { color: var(--text-dim); font-size: 13.5px; margin-top: 6px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.tab {
  padding: 15px; font-size: 14px; font-weight: 700; text-align: center;
  color: var(--text-dimmer); background: transparent; border: none;
}
.tab.active { color: var(--green-vivid); background: rgba(0,200,83,.08); border-bottom: 2px solid var(--green-vivid); }
.panel { padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.panel.hidden { display: none; }

.field {
  display: flex; align-items: center; gap: 10px;
  background: rgba(127,127,127,.08);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.field input, .field select {
  background: none; border: none; outline: none; width: 100%;
  color: var(--text); font-size: 15px; font-weight: 500;
}
.field input::placeholder { color: var(--text-dimmer); }
.field-row { display: flex; gap: 10px; }
.field-hint { font-size: 11px; color: var(--text-dimmer); padding-left: 2px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--r-md); font-weight: 800; cursor: pointer;
  padding: 14px 20px; font-size: 15px; transition: transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--green-vivid), var(--teal)); color: var(--green-deep); box-shadow: var(--shadow-green); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--orange)); color: var(--green-deep); box-shadow: var(--shadow-gold); }
.btn-ghost { background: rgba(127,127,127,.1); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: rgba(255,87,51,.15); color: var(--coral); border: 1px solid rgba(255,87,51,.35); }
.btn-sm { padding: 8px 14px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }

.error-box {
  background: rgba(255,87,51,.12); border: 1px solid rgba(255,87,51,.35); color: #FFB3A1;
  border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px;
}
.success-box {
  background: rgba(0,200,83,.12); border: 1px solid rgba(0,200,83,.35); color: var(--green-vivid);
  border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; margin-bottom: 10px;
}

/* ─── VIEW HEADER ───────────────────────────────────────── */
.view { padding: 16px 0 24px; }
.view-title {
  font-family: var(--font-display); font-size: 30px; letter-spacing: 1px; margin-bottom: 4px;
}
.view-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }

/* ─── JORNADA PICKER ────────────────────────────────────── */
.jornada-strip {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 12px;
  scrollbar-width: none;
}
.jornada-pill {
  flex-shrink: 0; padding: 8px 16px; border-radius: var(--r-xl);
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text-dim); white-space: nowrap;
}
.jornada-pill.active { background: linear-gradient(135deg, var(--green-vivid), var(--teal)); color: var(--green-deep); border-color: transparent; }
.jornada-pill .n { font-family: var(--font-display); font-size: 15px; margin-right: 4px; }

/* ─── MATCH CARD ────────────────────────────────────────── */
.match-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 14px; margin-bottom: 8px;
}
.match-card.locked { opacity: .78; }
.match-card.live { border-color: var(--coral); box-shadow: 0 0 0 1px rgba(255,87,51,.3); }
.match-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--text-dimmer); margin-bottom: 6px;
}
.match-top .live-badge {
  color: var(--coral); font-weight: 800; display: flex; align-items: center; gap: 4px;
}
.live-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); animation: dotPulse 1.2s infinite; }
@keyframes dotPulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.lock-badge { display: flex; align-items: center; gap: 4px; }

.match-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.team img { width: 26px; height: 26px; object-fit: contain; }
.team .crest-fallback {
  width: 26px; height: 26px; border-radius: 50%; background: rgba(127,127,127,.2);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
}
.team .name { font-size: 11px; font-weight: 700; line-height: 1.2; }
.team.away { }
.score-mid { display: flex; align-items: center; gap: 6px; }
.score-real {
  font-family: var(--font-display); font-size: 20px; min-width: 20px; text-align: center;
}
.score-real.locked-pred { color: var(--text-dim); }
.score-sep { color: var(--text-dimmer); font-size: 12px; }

.pred-input {
  width: 38px; height: 38px; text-align: center; font-size: 16px; font-weight: 800;
  border-radius: var(--r-sm); border: 1px solid var(--border); background: rgba(127,127,127,.08); color: var(--text);
}
.pred-input:focus { outline: none; border-color: var(--green-vivid); }
.pred-input:disabled { opacity: .6; }
.pred-sep { font-size: 14px; color: var(--text-dimmer); font-weight: 800; }
.points-chip {
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: var(--r-xl);
  background: rgba(0,200,83,.15); color: var(--green-vivid);
}
.points-chip.zero { background: rgba(255,87,51,.12); color: var(--coral); }
.match-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; min-height: 16px; }
.save-ind { font-size: 10.5px; font-weight: 700; color: var(--text-dimmer); }
.save-ind.pending { color: var(--text-dim); }
.save-ind.ok { color: var(--green-vivid); }
.save-ind.err { color: var(--coral); }

.match-pro-row { display: flex; justify-content: flex-start; margin-top: 6px; }
.pro-btn {
  font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 3px 10px;
  border-radius: var(--r-sm); background: rgba(0,200,83,.15); color: var(--green-vivid);
  border: 1px solid rgba(0,200,83,.4);
}
.pro-btn:active { background: rgba(0,200,83,.25); }

/* ─── Modal "PRO" (racha, clasificación, goles, enfrentamientos) ────────── */
.pro-modal-title {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex-wrap: wrap; text-align: center;
}
.pro-modal-title .crest-img, .pro-modal-title .crest-fallback { width: 22px; height: 22px; }
.pro-modal-title .crest-fallback {
  border-radius: 50%; background: rgba(127,127,127,.2);
  display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800;
}
.pro-teams-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.pro-team-block {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px; text-align: center;
}
.pro-team-header { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 6px; }
.pro-team-header .crest-img, .pro-team-header .crest-fallback { width: 28px; height: 28px; }
.pro-team-header .crest-fallback {
  border-radius: 50%; background: rgba(127,127,127,.2);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
}
.pro-team-label { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.streak-row { display: flex; justify-content: center; gap: 4px; margin-bottom: 8px; }
.streak-dot {
  width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 10px; font-weight: 800; color: var(--white);
}
.streak-dot.win { background: var(--green-vivid); }
.streak-dot.draw { background: var(--text-dimmer); }
.streak-dot.loss { background: var(--coral); }
.pro-stat-row { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--text-dim); margin-top: 4px; text-align: left; }
.pro-stat-row b { color: var(--text); font-weight: 700; }
.pro-section-title { font-size: 13px; font-weight: 700; margin-top: 12px; margin-bottom: 6px; }
.pro-empty { font-size: 11.5px; color: var(--text-dimmer); }
.h2h-list { display: flex; flex-direction: column; gap: 6px; }
.h2h-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; padding: 6px 8px; background: var(--bg-card); border-radius: var(--r-sm);
}
.h2h-date { font-size: 10px; color: var(--text-dimmer); white-space: nowrap; }
.h2h-teams { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.h2h-teams .crest-img, .h2h-teams .crest-fallback { width: 16px; height: 16px; }
.h2h-teams .crest-fallback {
  border-radius: 50%; background: rgba(127,127,127,.2);
  display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 800;
}
.h2h-name { font-size: 11.5px; }

.jornada-save-bar {
  position: sticky; bottom: 74px; z-index: 10; margin-top: 6px;
  display: flex; justify-content: center;
}

/* ─── RANKING ───────────────────────────────────────────── */
.bote-card {
  background: linear-gradient(135deg, rgba(247,201,72,.12), rgba(0,200,83,.08));
  border: 1px solid rgba(247,201,72,.3); border-radius: var(--r-lg);
  padding: 20px; text-align: center; margin-bottom: 16px;
}
.bote-num {
  font-family: var(--font-display); font-size: 46px; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.bote-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.bote-card-split { display: flex; align-items: center; padding: 16px 8px; }
.bote-half { flex: 1; min-width: 0; }
.bote-card-split .bote-num { font-size: 30px; }
.bote-div { align-self: stretch; width: 1px; background: rgba(247,201,72,.35); margin: 2px 4px; }
.prize-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; text-align: left; }
.prize-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-dim); }
.prize-row b { color: var(--text); }

.rank-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.rank-row.me { background: rgba(247,201,72,.08); border-left: 3px solid var(--gold); border-radius: var(--r-sm); }
.rank-row.clickable { cursor: pointer; touch-action: manipulation; }
.rank-row.clickable:active { background: var(--bg-card-strong); }
.r-pos { width: 24px; text-align: center; font-family: var(--font-display); font-size: 18px; flex-shrink: 0; }
.r-pos.gold { color: var(--gold); } .r-pos.silver { color: #C0C0C0; } .r-pos.bronze { color: #CD7F32; }
.r-name { font-size: 13.5px; font-weight: 600; }
.r-pts { font-family: var(--font-display); font-size: 20px; color: var(--green-vivid); flex-shrink: 0; }
.chev { color: var(--text-dimmer); font-size: 18px; flex-shrink: 0; }
.prob-line { font-size: 10.5px; color: var(--green-vivid); margin-top: 2px; }
.prob-line.elim { color: var(--text-dimmer); }

.ranking-top { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.baremo-pill {
  font-size: 11.5px; font-weight: 700; padding: 8px 12px; border-radius: var(--r-xl);
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
}

.user-porra-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.user-porra-list .match-admin-row.hit { border-color: rgba(0,200,83,.4); }
.user-porra-list .match-admin-row.miss { opacity: .7; }

.evo-svg { width: 100%; height: auto; margin: 6px 0 10px; }
.evo-lbl { font-size: 9px; fill: var(--text-dimmer); }
.evo-pos { font-size: 11px; font-weight: 800; fill: var(--green-vivid); }

.result-card.hit { border-color: rgba(0,200,83,.4); }
.result-card.miss { opacity: .75; }
.match-card.clickable { cursor: pointer; touch-action: manipulation; }
.match-card.clickable:active { background: var(--bg-card-strong); }
.my-pred { font-size: 11.5px; color: var(--text-dim); }

.live-preds { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.pred-row-list {
  display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 2px; color: var(--text-dim);
}
.pred-row-list.me { color: var(--text); font-weight: 700; }
.tag-organizer {
  display: inline-block; font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-dimmer); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 7px; margin-left: 6px;
  vertical-align: middle;
}

/* ─── BAREMO ────────────────────────────────────────────── */
.baremo-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 10px;
}
.baremo-row .pts { font-family: var(--font-display); font-size: 26px; color: var(--green-vivid); }
.baremo-row .lbl { font-weight: 700; font-size: 14px; }
.baremo-row .desc { font-size: 12px; color: var(--text-dim); }

/* ─── CHAT ──────────────────────────────────────────────── */
.chat-wrap { display: flex; flex-direction: column; height: calc(100svh - 130px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 78%; padding: 9px 12px; border-radius: var(--r-md); background: var(--bg-card); border: 1px solid var(--border); align-self: flex-start; }
.msg.mine { align-self: flex-end; background: rgba(0,200,83,.14); border-color: rgba(0,200,83,.3); }
.msg .name { font-size: 11px; font-weight: 800; color: var(--green-vivid); margin-bottom: 2px; }
.msg .body { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.msg img { max-width: 100%; border-radius: var(--r-sm); margin-top: 4px; }
.msg .reply-quote { font-size: 11.5px; color: var(--text-dim); border-left: 2px solid var(--green-vivid); padding-left: 6px; margin-bottom: 4px; }
.msg .at { font-size: 9.5px; color: var(--text-dimmer); }
.msg .reactions { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.react-pill {
  font-size: 11px; background: rgba(127,127,127,.15); border: 1px solid transparent;
  border-radius: var(--r-xl); padding: 1px 6px; color: var(--text);
}
.react-pill.mine { background: rgba(0,200,83,.18); border-color: rgba(0,200,83,.4); }
.msg-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; }
.msg-tools { display: flex; gap: 2px; }
.msg-tool {
  font-size: 12px; line-height: 1; padding: 3px 5px; border-radius: var(--r-sm);
  background: transparent; border: none; color: var(--text-dimmer); opacity: .8;
}
.msg-tool:active { background: rgba(127,127,127,.15); }
.emoji-picker { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.emoji-pick {
  font-size: 26px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
}
.emoji-pick:active { background: rgba(127,127,127,.15); }
.reply-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border); border-bottom: none;
  border-radius: var(--r-md) var(--r-md) 0 0; padding: 6px 10px;
}
.reply-bar-text {
  font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; border-left: 2px solid var(--green-vivid); padding-left: 6px;
}
.reply-bar .icon-btn { width: 26px; height: 26px; font-size: 12px; flex-shrink: 0; }
.chat-input-bar { display: flex; gap: 8px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.chat-input-bar input { flex: 1; }
.chat-input-bar .icon-btn { flex-shrink: 0; }

/* ─── ADMIN ─────────────────────────────────────────────── */
.admin-section { margin-bottom: 22px; }
.admin-section h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.token-row, .user-row, .match-admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 6px;
  font-size: 12.5px;
}
.mono { font-family: monospace; font-size: 13px; letter-spacing: .5px; }
.tag-collector {
  font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: var(--r-xl);
  border: 1px solid var(--border); background: transparent; color: var(--text-dim); white-space: nowrap;
}
.tag-collector.pay-none { color: var(--text-dimmer); }
.tag-collector.pay-nieto { background: rgba(0,212,255,.15); border-color: rgba(0,212,255,.4); color: var(--cyan); }
.tag-collector.pay-colomo { background: rgba(247,201,72,.15); border-color: rgba(247,201,72,.4); color: var(--gold); }

/* ─── MISC ──────────────────────────────────────────────── */
.toast-wrap { position: fixed; top: 14px; left: 0; right: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: var(--green-deep); color: var(--white); border: 1px solid var(--green-vivid);
  padding: 10px 18px; border-radius: var(--r-xl); font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); font-size: 13.5px; }
.spinner { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--green-vivid); border-radius: 50%; animation: spin .7s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,10,4,.78); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box { width: 100%; max-width: 420px; background: var(--green-deep); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; max-height: 80vh; overflow-y: auto; }
[data-theme="light"] .modal-box { background: var(--off-white); }
.terms-list { padding-left: 18px; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.terms-list li { font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }
.terms-list li b { color: var(--text); }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-dim); margin: 14px 0; cursor: pointer; }
.check input { margin-top: 3px; flex-shrink: 0; }
.link { color: var(--text-dim); font-size: 12.5px; text-decoration: underline; }
.gif-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  max-height: 340px; overflow-y: auto; margin-top: 10px;
}
.gif-tile {
  padding: 0; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden;
  background: var(--bg-card); aspect-ratio: 1 / 1;
}
.gif-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (min-width: 600px) {
  .container { max-width: 600px; }
}

/* ═══════════════════════════════════════════════════════════
   LANDING (pantalla de acceso) — adaptado de la landing Porra de la Liga
   ═══════════════════════════════════════════════════════════ */
#campo { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#campo svg { width: 100%; height: 100%; opacity: .07; }
[data-theme="light"] #campo svg { opacity: .12; }

.landing-navbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px;
  background: rgba(0,26,11,.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .landing-navbar { background: rgba(255,255,255,.85); }
.landing-navbar-name {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 20px; letter-spacing: 1.5px;
  background: linear-gradient(90deg, var(--green-vivid), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.landing-navbar-cta {
  background: linear-gradient(135deg, var(--green-vivid), var(--teal)); color: var(--green-deep);
  font-weight: 800; font-size: 13px; padding: 9px 18px; border-radius: var(--r-xl); border: none;
}

.install-banner {
  position: relative; z-index: 3; margin: 14px 18px 0; padding: 16px 40px 16px 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg);
  max-width: 560px; margin-left: auto; margin-right: auto;
}
.install-banner h3 { font-size: 15px; margin-bottom: 6px; }
.install-banner p { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.install-banner .close {
  position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-dim); font-size: 18px; line-height: 1;
}
.install-banner #btn-install { margin-top: 10px; }

.hero { position: relative; padding: 48px 0 40px; overflow: hidden; z-index: 1; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 75% 55% at 15% -5%,  rgba(0,200,83,.5)   0%, transparent 58%),
    radial-gradient(ellipse 60% 45% at 95% 20%,  rgba(0,212,255,.3)  0%, transparent 52%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(247,201,72,.25) 0%, transparent 58%);
  animation: tropicalPulse 9s ease-in-out infinite alternate;
}
@keyframes tropicalPulse { 0% { filter: brightness(1) saturate(1); } 100% { filter: brightness(1.1) saturate(1.15); } }
.hero-ball {
  position: absolute; top: 30px; right: 24px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, rgba(255,255,255,.28), rgba(0,100,30,.4));
  border: 2px solid rgba(0,200,83,.35); box-shadow: 0 8px 40px rgba(0,200,83,.3);
  animation: ballFloat 5s ease-in-out infinite;
}
@keyframes ballFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(14px) rotate(12deg); } }
.hero-content { position: relative; z-index: 2; }
.hero-pot-banner {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px;
  background: linear-gradient(135deg, rgba(247,201,72,.14), rgba(0,200,83,.10));
  border: 1px solid rgba(247,201,72,.35); border-radius: var(--r-md);
  padding: 10px 14px; margin-bottom: 18px;
}
.hero-pot-amount { font-family: var(--font-display); font-size: 19px; letter-spacing: .5px; color: var(--gold-light); }
.hero-pot-sub { font-size: 11.5px; color: var(--text-dim); }
.hero-pot-cta { font-weight: 800; font-size: 12px; color: var(--green-neon); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,200,83,.12); border: 1px solid rgba(0,200,83,.4); border-radius: var(--r-xl);
  padding: 6px 14px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--green-vivid); margin-bottom: 18px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-neon); animation: dotPulse 1.4s ease-in-out infinite; }
@keyframes dotPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.75)} }
.hero-title {
  font-family: var(--font-display); font-size: clamp(46px, 15vw, 66px);
  line-height: .9; letter-spacing: 1px; margin-bottom: 16px;
}
.hero-title .t-green { background: linear-gradient(90deg, var(--green-vivid) 0%, var(--cyan) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-title .t-gold { background: linear-gradient(90deg, var(--gold) 0%, var(--coral) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 14.5px; font-weight: 500; line-height: 1.6; color: var(--text-dim); margin-bottom: 26px; max-width: 340px; }
.hero-sub strong { color: var(--text); font-weight: 700; }
.cta-group { display: flex; flex-direction: column; gap: 10px; }
.btn-lg {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 800; font-size: 15px; padding: 15px 28px; border-radius: var(--r-lg);
}

.strip {
  background: linear-gradient(90deg, var(--green-jungle), var(--green-mid), var(--teal), var(--green-mid), var(--green-jungle));
  background-size: 200% 100%; animation: stripSlide 6s ease-in-out infinite alternate;
  padding: 16px 0; position: relative; z-index: 1;
}
@keyframes stripSlide { 0%{background-position:0%} 100%{background-position:100%} }
.strip-inner { display: flex; justify-content: space-around; align-items: center; }
.strip-stat { text-align: center; }
.strip-num { font-family: var(--font-display); font-size: 28px; letter-spacing: 1px; color: #fff; line-height: 1; }
.strip-label { font-size: 9.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.75); margin-top: 3px; }
.strip-div { width: 1px; height: 32px; background: rgba(255,255,255,.22); }

.section-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--green-vivid); margin-bottom: 8px; }
.section-title { font-family: var(--font-display); font-size: clamp(30px, 9vw, 42px); line-height: .95; letter-spacing: 1px; margin-bottom: 8px; }
.section-desc { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-bottom: 24px; }
.landing-section { position: relative; z-index: 1; padding: 40px 0; }

.feat-grid { display: flex; flex-direction: column; gap: 12px; }
.feat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 18px 16px; display: flex; gap: 14px; align-items: flex-start;
}
.feat-icon { font-size: 26px; line-height: 1; }
.feat-body h3 { font-size: 15px; margin-bottom: 4px; }
.feat-body p { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 16px; }
.step-left { display: flex; flex-direction: column; align-items: center; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--green-vivid), var(--teal)); color: var(--green-deep);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.step-line { flex: 1; width: 2px; background: var(--border); min-height: 24px; }
.step:last-child .step-line { display: none; }
.step-body { padding-bottom: 24px; }
.step-body h3 { font-size: 15px; margin-bottom: 4px; }
.step-body p { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

.app-footer { text-align: center; padding: 28px 18px 24px; }
.app-footer-mark {
  width: 40px; height: 40px; border-radius: 50%; margin-bottom: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.app-footer p { font-size: 12px; color: var(--text-dimmer); line-height: 1.6; }
.landing-footer { position: relative; z-index: 1; padding: 32px 0 48px; }
