/* Torneos Perú - hoja de estilos
   Paleta: fondo casi negro, acento naranja fuego, verde para dinero. */
:root {
  --bg: #0F0F12;
  --bg-2: #121216;
  --surface: #18181D;
  --surface-2: #202027;
  --surface-3: #26262E;
  --border: #2A2A33;
  --border-2: #3A3A44;
  --text: #F5F5F7;
  --text-2: #C9C9D1;
  --muted: #A1A1AA;
  --accent: #FF6B1A;
  --accent-hover: #FF8A3D;
  --on-accent: #1A0A00;
  --gold: #FFB020;
  --money: #3DDC84;
  --danger: #FF6B61;
  --radius: 12px;
  --radius-lg: 16px;
  --font: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Oxanium, Manrope, system-ui, sans-serif;
  --maxw: 1320px;
  --bottomnav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-hover); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Tipografía ---------- */
.display, .display-sm, .h1, .h2, .h3, .num, .brand-name, .countdown, .cred-value, .wallet-balance, .step-n { font-family: var(--display); }
.display { font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 8px 0 12px; font-weight: 700; }
.display-sm { font-size: clamp(26px, 4vw, 34px); line-height: 1.1; margin: 8px 0 6px; font-weight: 700; }
.h1 { font-size: 28px; margin: 4px 0 16px; font-weight: 700; }
.h2 { font-size: 22px; margin: 0; font-weight: 700; }
.h3 { font-size: 18px; margin: 0 0 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.lead { font-size: 16px; color: var(--text-2); max-width: 620px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1 1 auto; min-width: 0; }
.num { font-weight: 700; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.nick { font-weight: 700; word-break: break-word; }
.text-accent { color: var(--accent); }
.text-money { color: var(--money); }
.text-danger { color: var(--danger); }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; color: var(--muted); }
.eyebrow-gold { color: var(--gold); }

/* ---------- Estructura ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(18, 18, 22, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid #23232B; }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-family: var(--display); font-weight: 700; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: 0.5px; white-space: nowrap; }
.brand-name b { color: var(--accent); }
.brand-lg .brand-mark { width: 44px; height: 44px; font-size: 19px; }
.brand-lg .brand-name { font-size: 24px; }
.topnav { display: none; gap: 4px; flex: 1; }
.topnav a { color: #B4B4BE; font-weight: 600; padding: 8px 14px; border-radius: 8px; display: flex; align-items: center; gap: 6px; }
.topnav a:hover { color: var(--text); background: var(--surface); }
.topnav a.is-active { color: var(--text); background: var(--surface-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance-pill { white-space: nowrap; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.balance-pill:hover { border-color: var(--border-2); color: var(--text); }
.balance-label { font-size: 12px; color: var(--muted); display: none; }
.balance-value { font-family: var(--display); font-weight: 700; color: var(--money); }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; border-radius: 999px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.5); z-index: 40; }
.usermenu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; flex-direction: column; }
.usermenu-head span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.usermenu-panel a, .usermenu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 8px; color: var(--text); background: none; border: 0; cursor: pointer; text-align: left; font-weight: 600; }
.usermenu-panel a:hover, .usermenu-panel button:hover { background: var(--surface-3); }
.usermenu-panel form { margin: 0; }

.adminnav { max-width: var(--maxw); margin: 12px auto 0; padding: 0 16px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; width: 100%; }
.adminnav a { white-space: nowrap; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px; border: 1px solid var(--border); }
.adminnav a.is-active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

.page { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 16px 16px calc(var(--bottomnav-h) + 32px); flex: 1; }
.narrow { max-width: 760px; margin: 0 auto; }
.footer { max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 0 16px calc(var(--bottomnav-h) + 24px); display: flex; gap: 16px; color: var(--muted); font-size: 13px; }

.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(18,18,22,.97); border-top: 1px solid #23232B; }
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
.bottomnav a .i { width: 22px; height: 22px; }
.bottomnav a.is-active { color: var(--accent-hover); }
/* Logo de WhatsApp como máscara: toma el color del texto */
.wa-icon { display: inline-block; width: 1.25em; height: 1.25em; flex-shrink: 0; vertical-align: -0.25em; background: currentColor;
  -webkit-mask: url("/assets/img/wa-mask.png") center / contain no-repeat; mask: url("/assets/img/wa-mask.png") center / contain no-repeat; }

/* Soporte: botón flotante con burbuja */
.fab-support { position: fixed; right: 16px; bottom: calc(var(--bottomnav-h) + 16px + env(safe-area-inset-bottom)); z-index: 29; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.fab-btn { pointer-events: auto; width: 56px; height: 56px; border-radius: 999px; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(0,0,0,.45); transition: transform .15s ease, box-shadow .15s ease; }
.fab-btn:hover, .fab-btn:focus-visible { color: #fff; transform: scale(1.06); box-shadow: 0 0 0 6px rgba(37,211,102,.18), 0 10px 26px rgba(0,0,0,.45); }
.fab-btn .wa-icon { width: 30px; height: 30px; }
.fab-bubble { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.45);
  opacity: 0; transform: translateX(8px); visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
.fab-dot { width: 8px; height: 8px; border-radius: 999px; background: #25D366; box-shadow: 0 0 0 3px rgba(37,211,102,.25); }
.fab-support:hover .fab-bubble, .fab-support:focus-within .fab-bubble, .fab-support.is-peek .fab-bubble { opacity: 1; transform: none; visibility: visible; transition: opacity .18s ease, transform .18s ease; }
.fab-support.is-pulse .fab-btn { animation: fab-pulse 1.6s ease-out 2; }
@keyframes fab-pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.45), 0 10px 26px rgba(0,0,0,.45); } 100% { box-shadow: 0 0 0 16px rgba(37,211,102,0), 0 10px 26px rgba(0,0,0,.45); } }
@media (max-width: 380px) { .fab-bubble { font-size: 13px; padding: 9px 12px; } }
@media (prefers-reduced-motion: reduce) { .fab-btn, .fab-bubble { transition: none; } .fab-support.is-pulse .fab-btn { animation: none; } }

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px; }
.card-glow { border-color: #5A3A12; }
.card-danger { border-color: #4A2323; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, opacity .15s; text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--surface-2); border-color: var(--border-2); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: #B42318; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #D92D20; color: #fff; }
.btn-google { background: #fff; color: #1F1F1F; min-height: 54px; font-size: 16px; }
.btn-google:hover { background: #F1F1F1; color: #1F1F1F; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-lg { min-height: 54px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-icon { min-height: 40px; width: 40px; padding: 0; }
.btn.is-loading { pointer-events: none; opacity: .7; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.badge .i { width: 13px; height: 13px; }
.badge-green { background: #12351F; color: #5BE59A; }
.badge-amber { background: #3A2A08; color: #FFC94D; }
.badge-orange { background: #3A1E0E; color: #FF9A5C; }
.badge-blue { background: #0E2A40; color: #7CC4FA; }
.badge-gray { background: #2A2A33; color: #C9C9D1; }
.badge-red { background: #3A1414; color: #FF8A80; }
.badge-gold { background: #2A1A0E; color: var(--gold); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

.avatar { width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center; font-weight: 800; font-size: 14px; object-fit: cover; border: 2px solid var(--accent); flex-shrink: 0; }
img.avatar { background: var(--surface-2); }
.avatar-sm { width: 34px; height: 34px; font-size: 12px; border-width: 0; }
.avatar-xl { width: 88px; height: 88px; font-size: 30px; border-width: 3px; }
.avatar-0 { background: #3B2A6B; color: #E4DBFF; }
.avatar-1 { background: #0E3440; color: #9BE7F5; }
.avatar-2 { background: #3A1E0E; color: #FFC49A; }
.avatar-3 { background: #12351F; color: #A7F0C4; }
.avatar-4 { background: #3A1430; color: #F9B8E4; }
.avatar-5 { background: #2A2A33; color: #E4E4EA; }

.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; font-weight: 600; }
.flash .i { margin-top: 2px; }
.flash-success { background: #10261A; border-color: #1F5A36; color: #A7F0C4; }
.flash-error { background: #2A1414; border-color: #5A2323; color: #FFC2BD; }
.flash-info { background: #0E2233; border-color: #1E4A6B; color: #B5DDFB; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; margin: 12px 0; line-height: 1.45; }
.notice .i { margin-top: 2px; }
.notice-red { background: #2A1414; border: 1px solid #5A2323; color: #FFC2BD; }
.notice-amber { background: #2A2208; border: 1px solid #5A4512; color: #FFE3A3; }
.notice-orange { background: #2A170A; border: 1px solid #5A3012; color: #FFC49A; }
.notice-blue { background: #0E2233; border: 1px solid #1E4A6B; color: #B5DDFB; }
.notice a { color: inherit; text-decoration: underline; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head .h3 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.backlink { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; margin-bottom: 8px; min-height: 36px; }

.segmented { display: inline-flex; padding: 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.segmented a, .segmented label span { padding: 8px 14px; border-radius: 8px; color: #B4B4BE; font-weight: 700; font-size: 14px; display: block; cursor: pointer; }
.segmented a.is-active { background: var(--accent); color: var(--on-accent); }
.segmented-radio { width: 100%; }
.segmented-radio label { flex: 1; text-align: center; }
.segmented-radio input { position: absolute; opacity: 0; }
.segmented-radio input:checked + span { background: var(--accent); color: var(--on-accent); }
.segmented-radio input:focus-visible + span { outline: 2px solid var(--gold); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.server-filter select { height: 44px; }

.bar { height: 7px; border-radius: 999px; background: var(--border); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.bar span.is-full { background: #6B6B75; }
.bar-lg { height: 9px; margin: 8px 0; }
.slots { display: flex; flex-direction: column; gap: 6px; }
.slots-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }

/* ---------- Inicio ---------- */
.home { display: grid; gap: 24px; }
.hero { border-radius: 20px; background: #1A1410; border: 1px solid #3A2414; padding: 24px 20px; margin-bottom: 24px; }
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tcard { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: border-color .15s, transform .15s; }
.tcard:hover { border-color: var(--border-2); }
.tcard.is-mine { border-color: #5A3A12; }
.tcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tcard-title { font-family: var(--display); font-size: 20px; margin: 0 0 2px; }
.tcard-title a { color: var(--text); }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.tcard-prices { display: flex; gap: 12px; padding-top: 12px; border-top: 1px solid var(--surface-3); margin-top: auto; }
.tcard-prices > div { flex: 1; display: flex; flex-direction: column; }
.tcard-prices strong { font-size: 18px; }
.how, .steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.how li, .steps li { display: flex; gap: 12px; align-items: flex-start; }
.how li div { display: flex; flex-direction: column; font-size: 14px; }
.step-n { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; background: #2A1A0E; color: var(--accent-hover); display: grid; place-items: center; font-weight: 700; }
.countdown-box { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; border-radius: var(--radius); background: var(--bg); margin: 12px 0; text-align: center; }
.countdown { font-size: 42px; font-weight: 700; color: var(--gold); letter-spacing: 2px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown-lg { background: #1F1A0C; border: 1px solid #5A4512; color: #FFE3A3; padding: 22px; margin-top: 0; }
.countdown-lg .countdown { font-size: 60px; }
.empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent-hover); }
.empty-icon .i { width: 28px; height: 28px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; }

/* ---------- Login ---------- */
body.bare main { max-width: 440px; margin: 0 auto; padding: 48px 20px 32px; min-height: 100vh; display: flex; flex-direction: column; }
.login { display: flex; flex-direction: column; gap: 20px; flex: 1; }
.login .steps { padding: 18px; }
.login .btn-google { margin-top: auto; }
.page .login { max-width: 440px; margin: 8px auto 0; }
.page .login .btn-google { margin-top: 4px; }

/* ---------- Detalle del torneo ---------- */
.detail-head { margin-bottom: 16px; }
.detail-grid { display: grid; gap: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat strong { font-size: 22px; overflow: hidden; text-overflow: ellipsis; }
.room { border-color: #5A4512; }
.cred { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--surface-3); }
.cred > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cred-value { font-size: 28px; letter-spacing: 2px; word-break: break-all; }
.cred-meta { display: flex; gap: 12px; padding: 14px 0 4px; }
.cred-meta > div { flex: 1; display: flex; flex-direction: column; }
.me-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 8px; }
.me-row > div { display: flex; flex-direction: column; min-width: 0; }
.me-row .nick { font-family: var(--display); font-size: 20px; }
.rules { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.rules li::marker { color: var(--accent-hover); }
.players, .ranking, .ledger, .history, .timeline { list-style: none; margin: 0; padding: 0; }
.players li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #23232B; }
.players li:last-child { border-bottom: 0; }
.players li.is-me .nick, .ranking li.is-me .nick { color: var(--gold); }
.ranking li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 8px; border: 1px solid transparent; }
.ranking .rank { font-family: var(--display); font-weight: 700; width: 34px; color: var(--muted); }
.ranking .top-1 { background: #2A220C; border-color: #6B5410; }
.ranking .top-1 .rank { color: var(--gold); }
.ranking .top-2 { background: #24262B; border-color: #4A4E57; }
.ranking .top-3 { background: #2A170A; border-color: #6B3A12; }
.ranking .top-3 .rank { color: #FF9A5C; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px; border-radius: var(--radius); background: #10261A; border: 1px solid #1F5A36; margin-bottom: 14px; text-align: center; }
.result-stats > div { display: flex; flex-direction: column; }
.result-stats strong { font-size: 22px; }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.hint { font-size: 12px; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font-size: 16px;
}
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,26,.2); }
input:disabled, input[readonly] { opacity: .65; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; letter-spacing: 1px; font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text-2); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.summary { padding: 14px; border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.summary > div { display: flex; justify-content: space-between; gap: 12px; }
.summary-total { padding-top: 8px; border-top: 1px solid var(--surface-3); }
.lookup-result:empty { display: none; }
.lookup-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); border: 1px solid; }
.lookup-card .lookup-icon { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0; }
.lookup-card > div { display: flex; flex-direction: column; min-width: 0; }
.lookup-card .nick { font-family: var(--display); font-size: 20px; }
.lookup-ok { background: #10261A; border-color: #1F5A36; color: #A7F0C4; }
.lookup-ok .lookup-icon { background: #1F5A36; color: #5BE59A; }
.lookup-ok .nick { color: var(--text); }
.lookup-warn { background: #2A2208; border-color: #5A4512; color: #FFE3A3; }
.lookup-warn .lookup-icon { background: #5A4512; color: #FFC94D; }
.lookup-error { background: #2A1414; border-color: #5A2323; color: #FFC2BD; }
.lookup-error .lookup-icon { background: #5A2323; color: #FF8A80; }
.lookup-loading { color: var(--muted); font-size: 14px; }
.searchbar { display: flex; gap: 8px; margin-bottom: 16px; }

/* ---------- Wallet y perfil ---------- */
.wallet-hero { display: flex; flex-direction: column; gap: 6px; }
.wallet-balance { font-size: 44px; color: var(--money); line-height: 1.1; }
.wallet-balance-sm { font-family: var(--display); font-size: 26px; display: block; }
.wallet-actions { display: flex; gap: 10px; margin: 10px 0 6px; flex-wrap: wrap; }
.wallet-hero p { margin: 4px 0 0; }
.ledger li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #23232B; }
.ledger li:last-child { border-bottom: 0; }
.ledger li .grow, .ledger li .right { display: flex; flex-direction: column; }
.ledger-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.ledger-icon.is-in { background: #12351F; color: #5BE59A; }
.ledger-icon.is-out { background: #3A1414; color: #FF8A80; }
.profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-head p { margin: 2px 0; }
.history-link { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #23232B; color: var(--text); }
.history-link:hover { color: var(--text); background: var(--surface-2); }
.history-link .grow { display: flex; flex-direction: column; }
.history li:last-child .history-link { border-bottom: 0; }

/* ---------- Admin ---------- */
.admin-grid, .form-layout { display: grid; gap: 16px; align-items: start; }
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid #23232B; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th.right, .table td.right { text-align: right; }
.table form { margin: 0; }
.stepper-input { display: inline-flex; align-items: center; gap: 4px; }
.stepper-input input { width: 64px !important; min-height: 40px !important; text-align: center; padding: 6px !important; font-family: var(--display); font-size: 18px !important; font-weight: 700; }
.kills-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding-top: 12px; border-top: 1px solid var(--border); }
.kills-footer > div { display: flex; flex-direction: column; }
.kills-footer strong { font-size: 22px; }
.kills-footer .btn { margin-left: auto; }
.kills-footer p { margin: 0; flex-basis: 100%; }
.stepper { list-style: none; padding: 0; margin: 0 0 16px; display: flex; gap: 6px; overflow-x: auto; }
.stepper li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.stepper li span { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; }
.stepper li.is-done { color: #A7F0C4; border-color: #1F5A36; }
.stepper li.is-done span { background: #1F5A36; }
.stepper li.is-current { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.stepper li.is-current span { background: rgba(0,0,0,.2); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; text-align: right; }
.timeline li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid #23232B; font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }
.kv { display: inline-block; margin-right: 10px; }
.economics .summary { margin-bottom: 12px; }

.home, .detail-grid, .admin-grid, .form-layout { grid-template-columns: minmax(0, 1fr); }

/* ---------- Escritorio ---------- */
@media (min-width: 720px) {
  .stat-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { padding: 36px 40px; }
  .card { padding: 22px; }
  .table-wrap { margin: 0 -22px; padding: 0 22px; }
  .balance-label { display: inline; }
}
@media (min-width: 960px) {
  :root { --bottomnav-h: 0px; }
  .bottomnav { display: none; }
  .topnav { display: flex; }
  .topbar-inner { height: 72px; padding: 0 32px; }
  .page { padding: 28px 32px 48px; }
  .adminnav { padding: 0 32px; }
  .footer { padding: 0 32px 32px; }
  .home { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .detail-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .admin-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .form-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .fab-support { bottom: 24px; right: 24px; }
  .stat-grid:not(.stat-grid-4) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
input[aria-invalid="true"] { border-color: var(--danger) !important; }
@media (max-width: 600px) {
  .table-kills th:nth-child(1), .table-kills td:nth-child(1),
  .table-kills th:nth-child(3), .table-kills td:nth-child(3) { display: none; }
  .table-kills td { padding: 8px 4px; }
  .stepper-input input { width: 52px !important; }
}
.brand { min-width: 0; }
.brand-name { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) {
  .topbar-inner { gap: 10px; padding: 0 12px; }
  .brand-name { font-size: 16px; }
  .brand-mark { width: 32px; height: 32px; font-size: 14px; }
  .balance-pill { padding: 6px 10px; }
}
@media (max-width: 350px) { .brand-name { display: none; } }
.table:not(.table-kills) { min-width: 620px; }
.table td .nick { white-space: nowrap; }
.btn-google { gap: 12px; font-weight: 700; }
.btn-google-sm { min-height: 42px; padding: 0 16px; font-size: 14px; border-radius: 8px; }
.btn-google-lg { min-height: 54px; font-size: 16px; }
.btn-google-sm svg { width: 18px; height: 18px; }
@media (max-width: 380px) { .btn-google-sm { padding: 0 12px; font-size: 13px; gap: 8px; } }
.join-card .btn-google { margin-top: 4px; }
.bottomnav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
@media (max-width: 420px) { .topbar .btn-google-sm .g-long { display: none; } }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark { padding: 0; overflow: hidden; }
/* Preguntas frecuentes */
.faq { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; }
.faq .h2 { margin-bottom: 6px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 52px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 15px; font-weight: 700; font-family: var(--font); }
.faq-item summary .i { transition: transform .15s; color: var(--muted); }
.faq-item[open] summary .i { transform: rotate(90deg); }
.faq-item p { margin: 0; padding: 0 16px 16px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
/* ---------- Recargas ---------- */
.paymethods { display: grid; gap: 10px; }
.paymethod { display: block; cursor: pointer; }
.paymethod input { position: absolute; opacity: 0; pointer-events: none; }
.paymethod-body { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius); border: 2px solid var(--border); background: var(--bg); transition: border-color .15s; }
.paymethod:hover .paymethod-body { border-color: var(--border-2); }
.paymethod input:checked + .paymethod-body { border-color: var(--accent); background: #1D130C; }
.paymethod input:focus-visible + .paymethod-body { outline: 2px solid var(--gold); outline-offset: 2px; }
.paymethod.is-disabled { cursor: not-allowed; opacity: .5; }
.paymethod-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; flex-shrink: 0; }
.paymethod-logo-text { display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 20px; background: var(--surface-3); color: var(--text); }
.pm-yape .paymethod-logo-text, .pm-yape-bg { background: #742284; color: #fff; }
.pm-binance .paymethod-logo-text, .pm-binance-bg { background: #F0B90B; color: #1E2026; }
.pm-paypal .paymethod-logo-text, .pm-paypal-bg { background: #0070BA; color: #fff; }
.pm-mercadopago .paymethod-logo-text, .pm-mercadopago-bg { background: #009EE3; color: #fff; }
.paymethod-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.paymethod-check { width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--border-2); display: grid; place-items: center; color: transparent; flex-shrink: 0; }
.paymethod input:checked + .paymethod-body .paymethod-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.money-input { display: flex; align-items: center; border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg); padding-left: 14px; }
.money-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,26,.2); }
.money-input span { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--muted); }
.money-input input { border: 0 !important; box-shadow: none !important; font-family: var(--display); font-size: 26px !important; font-weight: 700; min-height: 58px !important; background: transparent !important; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font-weight: 700; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
[data-quote] { margin-bottom: 12px; }
.topup-head { display: flex; align-items: center; gap: 14px; }
.topup-head .grow { display: flex; flex-direction: column; }
.topup-amount { font-size: 28px; }
.topup-timer { display: flex; align-items: center; gap: 6px; justify-content: center; margin: -4px 0 12px; }
.pay-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.pay-card .cred { width: 100%; text-align: left; }
.pay-instruction { margin: 0; color: var(--muted); font-weight: 600; }
.pay-amount { font-size: 40px; color: var(--gold); line-height: 1.1; }
.pay-qr { width: 260px; height: 260px; max-width: 100%; object-fit: contain; background: #fff; border-radius: 14px; padding: 10px; margin: 12px 0 6px; }
.pay-holder { margin: 4px 0; font-size: 16px; }
.pay-steps { text-align: left; margin: 12px 0 0; padding-left: 22px; color: var(--text-2); font-size: 14px; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.code-input { font-family: var(--display); font-size: 30px !important; letter-spacing: 12px; text-align: center; font-weight: 700; }
.btn-yape { background: #742284; color: #fff; }
.btn-yape:hover:not(:disabled) { background: #8A2E9E; color: #fff; }
.btn-binance { background: #F0B90B; color: #1E2026; }
.btn-binance:hover:not(:disabled) { background: #F8D12F; color: #1E2026; }
.btn-mp { background: #009EE3; color: #fff; }
.btn-mp:hover:not(:disabled) { background: #0AB0F5; color: #fff; }
.paypal-box { margin-top: 14px; min-height: 50px; }
.spinner { width: 44px; height: 44px; border-radius: 999px; border: 4px solid var(--surface-3); border-top-color: var(--accent); margin: 8px auto 12px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-icon-ok { background: #12351F; color: #5BE59A; margin: 0 auto 8px; }
.actions-center { justify-content: center; margin-top: 12px; }
.upload-row { display: flex; align-items: center; gap: 12px; }
.upload-preview { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 8px; flex-shrink: 0; }
.upload-row input[type=file] { min-height: 0 !important; padding: 8px !important; font-size: 14px !important; }
.filters-wrap { flex-wrap: wrap; margin-bottom: 12px; }
.payload summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 12px; }
.payload pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; background: var(--bg); padding: 12px; border-radius: 8px; max-height: 320px; overflow: auto; }
.admin-grid-2 { align-items: start; }
@media (min-width: 960px) { .admin-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.topup-amount { white-space: nowrap; }
.topup-head .badge { flex-shrink: 0; }
/* ---------- Ranking ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "pos player kills" "pos stats earned"; align-items: center; gap: 4px 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.rank-pos { grid-area: pos; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--muted); }
.rank-player { grid-area: player; display: flex; align-items: center; gap: 10px; min-width: 0; }
.rank-name { display: flex; flex-direction: column; min-width: 0; }
.rank-name .nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-kills { grid-area: kills; text-align: right; white-space: nowrap; }
.rank-kills strong { font-size: 18px; color: var(--money); }
.rank-earned { grid-area: earned; text-align: right; font-size: 14px; white-space: nowrap; }
.rank-meta { grid-area: stats; font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 0 4px; }
.rank-row.top-1 { background: #2A220C; border-color: #6B5410; }
.rank-row.top-1 .rank-pos { color: var(--gold); }
.rank-row.top-2 { background: #24262B; border-color: #4A4E57; }
.rank-row.top-2 .rank-pos { color: #D4D7DD; }
.rank-row.top-3 { background: #2A170A; border-color: #6B3A12; }
.rank-row.top-3 .rank-pos { color: #FF9A5C; }
.rank-row.is-me { outline: 2px solid var(--accent); outline-offset: -1px; }
.rank-head { display: none; }
.rank-mine { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.mini-rank { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mini-rank li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.mini-rank li .grow, .mini-rank li .right { display: flex; flex-direction: column; min-width: 0; }
.mini-rank li .nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-rank .rank-pos { font-size: 15px; width: 30px; flex-shrink: 0; }
.mini-rank .avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.mini-rank .top-1 .rank-pos { color: var(--gold); }
.mini-rank .top-2 .rank-pos { color: #D4D7DD; }
.mini-rank .top-3 .rank-pos { color: #FF9A5C; }
.rank-note { color: #FFE3A3; }
.rank-note:hover { color: #FFF; }
.ranking-page .segmented { flex-wrap: wrap; }
@media (min-width: 760px) {
  .rank-head, .rank-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 90px 110px 90px 90px; grid-template-areas: none; gap: 12px; }
  .rank-head { padding: 0 14px 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
  .rank-row > * { grid-area: auto; }
  .rank-meta { display: contents; }
  .rank-games, .rank-avg { text-align: right; font-size: 15px; color: var(--text); }
  .rank-kills .muted, .rank-games .muted, .rank-avg .muted { display: none; }
}

/* ===================== Resultados en vivo (fase 2.5) ===================== */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.results-head .h3 { margin: 0; }
.results-updated { margin: 0 0 12px; }
.results-card .result-stats { margin-top: 10px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; background: #3A1414; color: #FF8A80; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.live-dot { width: 8px; height: 8px; border-radius: 999px; background: #FF4D4F; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,77,79,.6); } 50% { opacity: .55; box-shadow: 0 0 0 6px rgba(255,77,79,0); } }
.results-list { position: relative; }
.results-list li { will-change: transform; }
.results-list li .nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.results-list li .text-money { white-space: nowrap; }
.results-list li .small { white-space: nowrap; }
.results-list li.is-new { animation: row-in .6s ease-out; }
@keyframes row-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.results-list li.is-up { box-shadow: inset 3px 0 0 var(--money); }
.results-list li.is-down { box-shadow: inset 3px 0 0 #FF8A80; }
.is-bump [data-kills-text], .is-bump [data-prize], strong.is-bump { animation: bump .9s ease-out; }
@keyframes bump { 0% { transform: scale(1); } 25% { transform: scale(1.18); color: var(--gold); } 100% { transform: scale(1); } }
.results-list [data-kills-text], .results-list [data-prize], .result-stats strong { display: inline-block; }
.results-empty { text-align: center; padding: 8px 0 4px; margin: 0; }
.results-note { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.results-note .i { width: 14px; height: 14px; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .results-list li.is-new, .is-bump [data-kills-text], .is-bump [data-prize], strong.is-bump { animation: none; }
}

/* ===================== Admin: API ===================== */
.h4 { font-size: 15px; margin: 18px 0 8px; font-weight: 700; }
.api-log { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.api-log li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.api-log li .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.api-log .badge { flex-shrink: 0; }
.api-payload summary { cursor: pointer; color: var(--muted); }
.api-payload pre, .api-doc pre.code { white-space: pre-wrap; word-break: break-all; }
pre.code { background: #0B0B0E; border: 1px solid var(--surface-3); border-radius: 10px; padding: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; margin: 6px 0 10px; overflow-x: auto; color: #D9D9E0; }
.api-payload pre { background: #0B0B0E; border-radius: 8px; padding: 8px; font-size: 12px; margin: 6px 0 0; max-height: 220px; overflow: auto; }
.code-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.code-line code { word-break: break-all; }
.api-doc code.mono { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: 12px; word-break: break-all; }
.api-doc .rules li { font-size: 14px; }
.api-key-value { word-break: break-all; font-size: 14px; }
.table-compact td, .table-compact th { padding: 8px 10px; font-size: 13px; }
tr.is-muted td { opacity: .55; }
.result-stats strong { white-space: nowrap; font-size: clamp(17px, 5.2vw, 22px); }
.results-list li { gap: 10px; padding: 10px 12px; }
.results-list .rank { width: 30px; flex-shrink: 0; }
.api-doc .table td, .api-doc .table th { white-space: normal; }

/* ===================== Retiros (fase 2.2) ===================== */
.pm-note { display: block; font-size: 12px; color: #9BE7B8; margin-top: 2px; }
.pm-note-card { color: #FFC94D; }
.wallet-withdrawable { color: var(--text-2); font-size: 14px; }
.bs-hint { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: #FFD27A; margin: 10px 0 0; text-align: left; }
.bs-hint .i { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.bs-hint-muted { color: var(--muted); }
.balance-split .bs-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.balance-split .bs-row > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.balance-split .bs-row strong { font-size: clamp(18px, 5.5vw, 24px); white-space: nowrap; }
.bs-rule { margin: 10px 0 0; }
.wallet-wd { margin-top: 12px; text-align: left; }
.wd-fields[hidden] { display: none; }
.wd-history li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--surface-3); }
.wd-history li:last-child { border-bottom: 0; }
.wd-history .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wd-proof-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin-top: 2px; }
.wd-proof-link .i { width: 16px; height: 16px; }
.wd-breakdown { width: 100%; text-align: left; margin-top: 12px; }
.logo-row { display: flex; align-items: center; gap: 10px; }
.logo-row input { min-width: 0; }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; }

/* ===================== Notificaciones (fase 2.3) ===================== */
.notif { position: relative; }
.notif summary { list-style: none; cursor: pointer; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); position: relative; }
.notif summary::-webkit-details-marker { display: none; }
.notif summary:hover, .notif[open] summary { color: var(--text); background: var(--surface-2); }
.notif summary .i { width: 21px; height: 21px; }
.notif-count { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.notif-count[hidden] { display: none; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(360px, calc(100vw - 24px)); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.55); z-index: 45; overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-head a { font-size: 13px; font-weight: 700; }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: min(420px, 65vh); overflow-y: auto; }
.notif-item a { display: flex; gap: 12px; padding: 12px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.notif-item:last-child a { border-bottom: 0; }
.notif-item a:hover { background: var(--surface-3); }
.notif-item.is-unread a { background: #1D160E; }
.notif-item.is-unread .notif-txt strong::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); margin-left: 7px; vertical-align: middle; }
.notif-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-3); color: var(--text-2); }
.notif-ic .i { width: 18px; height: 18px; }
.notif-room .notif-ic, .notif-reminder .notif-ic { background: #2A170A; color: #FF9A5C; }
.notif-prize .notif-ic, .notif-topup .notif-ic, .notif-wd_paid .notif-ic, .notif-unlock .notif-ic { background: #10261A; color: var(--money); }
.notif-cancelled .notif-ic, .notif-topup_fail .notif-ic, .notif-wd_reject .notif-ic { background: #2A1414; color: #FF8A80; }
.notif-admin .notif-ic { background: #0E2233; color: #7CC4FA; }
.notif-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-txt strong { font-size: 14px; }
.notif-txt span { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.notif-txt small { font-size: 12px; color: var(--muted); }
.notif-empty { padding: 20px 14px; margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.notif-list-page .notif-item a { border-radius: 10px; border-bottom: 0; margin-bottom: 4px; }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottomnav-h) + 16px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #1F1F26; border: 1px solid var(--accent); color: var(--text); box-shadow: 0 12px 30px rgba(0,0,0,.5); animation: toast-in .35s ease-out; transition: opacity .35s, transform .35s; }
.toast .i { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.toast span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-2); }
.toast strong { color: var(--text); font-size: 14px; }
.toast.is-out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
@media (max-width: 719px) {
  .notif-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .notif summary { width: 38px; height: 38px; }
}
/* Con sesión en celular (campanita + saldo + avatar): el nombre va en dos líneas */
@media (max-width: 440px) {
  .topbar.is-auth .brand-name { display: flex; flex-direction: column; font-size: 14px; line-height: 1.05; letter-spacing: .3px; }
  .topbar.is-auth .topbar-right { gap: 8px; }
  .topbar.is-auth .balance-pill { padding: 7px 11px; }
}
@media (max-width: 340px) { .topbar.is-auth .brand-name { display: none; } }

/* ===================== Páginas legales ===================== */
.footer { flex-wrap: wrap; justify-content: space-between; row-gap: 8px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.legal .legal-card p { margin: 0 0 10px; line-height: 1.6; }
.legal .legal-card p:last-child { margin-bottom: 0; }
.legal-sec { margin: 26px 0; }
.legal-sec .h3 { margin-bottom: 10px; }
.legal-sec p, .legal-sec li { line-height: 1.65; color: var(--text-2); font-size: 15px; }
.legal-sec p { margin: 0 0 10px; }
.legal-sec ul { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal-sec strong { color: var(--text); }

/* ===================== Reclamos ===================== */
.countdown-box.countdown-sm { padding: 10px 12px; margin: 8px 0 12px; }
.countdown-box.countdown-sm .countdown { font-size: 24px; }
.claim-box .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.claim-box .actions form { margin: 0; }
.claim-form { margin-top: 4px; }
.claim-form summary { list-style: none; cursor: pointer; }
.claim-form summary::-webkit-details-marker { display: none; }
.claim-form[open] summary { display: none; }
.claims-admin { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.claims-admin > li { padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.claims-admin > li.is-pending { border-color: #6B5410; }
.claim-head { display: flex; gap: 10px; align-items: flex-start; }
.claim-head .grow { display: flex; flex-direction: column; min-width: 0; }
.claim-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.claim-nums > div { display: flex; flex-direction: column; padding: 8px 10px; background: var(--bg); border-radius: 10px; }
.claim-nums strong { font-size: 20px; }
.claim-msg { margin: 0; color: var(--text-2); font-size: 14px; }
.claims-admin .btn { align-self: flex-start; }
.claim-actions { display: grid; gap: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.notif-review .notif-ic { background: #2A220C; color: var(--gold); }
.notif-claim_ok .notif-ic { background: #10261A; color: var(--money); }
.notif-claim_no .notif-ic { background: #2A1414; color: #FF8A80; }

/* ===================== Tarjeta de torneo (opción B) ===================== */
.tcard-b { padding: 0; overflow: hidden; gap: 0; }
.tcard-head { padding: 16px 18px 14px; background: linear-gradient(135deg, #3A1A08 0%, #1B1B21 70%); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.tcard-head .tcard-top { margin-bottom: 8px; }
.tcard-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.tcard-b.is-mine .tcard-head { background: linear-gradient(135deg, #4A2A08 0%, #1B1B21 70%); }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.info { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.info-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #2A170A; color: #FF9A5C; flex-shrink: 0; }
.info-ic .i { width: 17px; height: 17px; }
.info-txt { display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted); line-height: 1.25; min-width: 0; }
.info-txt strong { font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-grid-lg { margin-bottom: 12px; }
.info-grid-lg .info { padding: 14px; }
.info-grid-lg .info-ic { width: 40px; height: 40px; border-radius: 11px; }
.info-grid-lg .info-ic .i { width: 21px; height: 21px; }
.info-grid-lg .info-txt { font-size: 12.5px; }
.info-grid-lg .info-txt strong { font-size: 17px; font-family: var(--display); }
@media (max-width: 480px) {
  .info-grid-lg .info { padding: 11px; gap: 9px; }
  .info-grid-lg .info-ic { width: 34px; height: 34px; }
  .info-grid-lg .info-ic .i { width: 18px; height: 18px; }
  .info-grid-lg .info-txt strong { font-size: 15px; }
}
.mini-rank li .grow { flex: 1; }
.mini-rank li .right { flex-shrink: 0; white-space: nowrap; text-align: right; align-items: flex-end; }
/* Tarjeta: "Modo" ocupa solo lo necesario y "Servidor" el resto (nombres largos) */
.tcard-b .info-grid { grid-template-columns: auto minmax(0, 1fr); }
.tcard-b .info { padding: 9px; gap: 8px; }
.tcard-b .info-ic { width: 30px; height: 30px; }
.tcard-b .info-ic .i { width: 16px; height: 16px; }
.tcard-head .eyebrow { white-space: nowrap; }

/* ===================== Avatares ===================== */
.avatar-picker summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.avatar-picker summary::-webkit-details-marker { display: none; }
.avatar-picker summary .h3 { margin: 0; }
.avatar-picker summary::after { content: "Elegir"; align-self: flex-start; margin-top: 10px; padding: 8px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: 14px; }
.avatar-picker[open] summary::after { display: none; }
.avatar-picker[open] summary { margin-bottom: 14px; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.avatar-opt { position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.avatar-opt input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-opt img { width: 64px; height: 64px; border-radius: 999px; border: 3px solid transparent; transition: transform .12s, border-color .12s; object-fit: cover; background: var(--surface-2); }
.avatar-opt:hover img { transform: scale(1.06); }
.avatar-opt input:checked + img { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,26,.25); }
.avatar-opt input:focus-visible + img { outline: 2px solid var(--gold); outline-offset: 2px; }
.avatar-opt-google span { font-size: 11px; color: var(--muted); font-weight: 700; }

/* ===================== Yape: verificación manual ===================== */
.manual-verify { text-align: center; }
.manual-verify .form { text-align: left; margin-top: 12px; }
.manual-verify .actions { margin: 12px 0; }
.manual-reupload { text-align: left; margin-top: 8px; }
.manual-reupload summary { cursor: pointer; color: var(--muted); }
.manual-reupload .form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.topup-proof { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.topup-proof img { max-width: 100%; max-height: 520px; border-radius: 12px; border: 1px solid var(--border); object-fit: contain; background: #0B0B0E; }
.topup-head { flex-wrap: wrap; }
.topup-head .grow { min-width: 0; flex: 1; }
@media (max-width: 440px) { .topup-head .badge { order: 3; margin-left: 62px; } }
@media (max-width: 440px) { .topup-head .grow { flex-basis: calc(100% - 62px); } }

/* ---------- Comunidad de WhatsApp ---------- */
.community-btn { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-bottom: 16px; padding: 0 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: 15px; transition: border-color .15s ease, background .15s ease; }
.community-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-2); }
.community-btn .wa-icon { width: 22px; height: 22px; color: var(--text-2); }
.community-btn .i { color: var(--muted); }
.btn-community { margin-top: 8px; display: inline-flex; align-items: center; gap: 10px; }
.btn-community .wa-icon { width: 20px; height: 20px; }
.fab-support ~ .footer { padding-bottom: calc(var(--bottomnav-h) + 96px + env(safe-area-inset-bottom)); }
/* Contador whos.amung.us: funciona pero no se ve */
.wau-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; pointer-events: none; }

/* ---------- Admin: Estadísticas ---------- */
.st-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.st-head .h1 { margin-bottom: 2px; }
.st-head p { margin: 0; }
.st-month { display: flex; align-items: center; gap: 10px; }
.st-month select { min-height: 42px; }
.st-pending { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.st-pend { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); min-width: 0; }
.st-pend:hover { color: var(--text); border-color: var(--border-2); }
.st-pend > strong { font-family: var(--display); font-size: 28px; color: var(--text-2); min-width: 28px; }
.st-pend > span { display: flex; flex-direction: column; min-width: 0; }
.st-pend b { font-size: 14px; }
.st-pend.is-hot { border-color: #5A3A12; }
.st-pend.is-hot > strong { color: var(--gold); }
.st-sec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.st-sec-head .h3 { margin: 0; }
.st-sub { margin: 4px 0 12px; }
.st-sec-head .st-sub { margin-bottom: 0; }
.st-note { margin: 10px 0 0; color: var(--text-2); }
.st-profit-top { display: grid; gap: 20px; margin-bottom: 24px; }
.st-hero { display: flex; flex-direction: column; gap: 6px; }
.st-hero-num { font-family: var(--display); font-size: clamp(38px, 6vw, 56px); line-height: 1.05; }
.st-change { color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-delta { padding: 3px 8px; border-radius: 999px; background: #12351F; color: #5BE59A; font-weight: 800; }
.st-delta.is-down { background: #3A1616; color: #FF9A92; }
.st-kpis, .st-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-kpi { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-kpi > span { font-size: 12px; color: var(--muted); font-weight: 700; }
.st-kpi > strong { font-family: var(--display); font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-kpi small { font-family: var(--font); font-size: 13px; font-weight: 600; }
.st-tiles { margin-top: 14px; }
.st-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.st-chart-head .h3 { margin: 0; }
.st-chart { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 8px; row-gap: 8px; }
.st-yaxis { height: 260px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-yaxis span:first-child { transform: translateY(-7px); }
.st-yaxis span:last-child { transform: translateY(7px); }
.st-plot { position: relative; height: 260px; }
.st-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.st-grid i { height: 1px; background: #26262E; }
.st-grid i:last-child { background: var(--border-2); }
.st-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; padding: 0 4px; }
.st-col { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; border-radius: 6px; outline-offset: -2px; }
.st-col:hover { background: rgba(255,255,255,.03); }
.st-bar { display: block; width: 58%; min-height: 2px; background: #2B7A52; border-radius: 4px 4px 0 0; transition: background .15s; }
.st-col:hover .st-bar, .st-col:focus-visible .st-bar { background: #34A46A; }
.st-col.is-sel .st-bar { background: var(--money); }
.st-tip { position: absolute; bottom: calc(100% - 20px); left: 50%; transform: translate(-50%, -8px); z-index: 5; width: 210px; padding: 12px 14px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border-2); box-shadow: 0 10px 28px rgba(0,0,0,.5); font-size: 13px; color: var(--text-2); display: none; flex-direction: column; gap: 4px; pointer-events: none; }
.st-col.tip-left .st-tip { left: auto; right: 0; transform: translate(0, -8px); }
.st-col:nth-child(-n+2) .st-tip { left: 0; transform: translate(0, -8px); }
.st-tip b { color: var(--text); font-size: 14px; }
.st-tip > span { display: flex; justify-content: space-between; gap: 12px; }
.st-tip .st-tip-total { color: var(--text); font-weight: 800; border-top: 1px solid var(--border-2); padding-top: 6px; margin-top: 2px; }
.st-tip .st-tip-total .num { color: #5BE59A; }
.st-col:hover .st-tip, .st-col:focus-visible .st-tip { display: flex; }
.st-xaxis { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; padding: 0 4px; font-size: 12px; text-align: center; color: var(--muted); }
.st-xaxis .is-sel { color: var(--text); font-weight: 800; }
.st-hint { margin: 12px 0 0; }
.st-table td, .st-table th { white-space: nowrap; }
.st-table tr.is-sel td { background: rgba(18, 53, 31, .45); }
.st-table tr.st-total td { font-weight: 800; border-top: 2px solid var(--border-2); border-bottom: 0; }
.st-table a { color: var(--text); }
.st-table a:hover { color: var(--accent-hover); }
.st-scroll { max-height: 560px; overflow-y: auto; }
.st-pos { display: inline-block; min-width: 26px; color: var(--gold); font-weight: 800; }
.st-accounts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
.st-acc { padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.st-acc-head { display: flex; align-items: center; gap: 10px; }
.st-acc-head > div { display: flex; flex-direction: column; min-width: 0; }
.st-acc-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.st-acc-bal { display: block; font-family: var(--display); font-size: 26px; line-height: 1.15; }
.st-acc-pen { display: block; }
.st-acc-lines { margin: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; border-top: 1px solid #2E2E37; padding-top: 10px; }
.st-acc-lines > div { display: flex; justify-content: space-between; gap: 10px; color: var(--text-2); }
.st-acc-lines dt, .st-acc-lines dd { margin: 0; }
.st-acc-lines .st-acc-sub { color: var(--muted); font-size: 12px; padding-left: 14px; }
.st-split { padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.st-split-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.st-split-head strong { font-family: var(--display); font-size: 24px; }
.st-split-bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.st-split-bar .is-players, .st-split-legend i.is-players { background: #8A8A96; }
.st-split-bar .is-yours, .st-split-legend i.is-yours { background: var(--money); }
.st-split-legend { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.st-split-legend > span { display: flex; align-items: center; gap: 8px; }
.st-split-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.st-split .notice { margin: 0; }
.st-moves { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); scroll-margin-top: 80px; }
.st-moves .h4 { margin: 0 0 6px; }
.st-moves .form { margin-top: 10px; }
.st-mv { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.st-mv li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #23232B; }
.st-mv li .grow { display: flex; flex-direction: column; min-width: 0; }
.st-mv li form { margin: 0; }
.st-2col, .st-3col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
.st-hours { display: grid; gap: 2px; align-items: end; height: 190px; border-bottom: 1px solid var(--border-2); padding: 0 8px; }
.st-hcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.st-hcol > span:first-child { font-weight: 800; color: var(--text); }
.st-hbar { display: block; width: 56%; background: #8A4A25; border-radius: 4px 4px 0 0; max-height: calc(100% - 26px); }
.st-hbar.is-best { background: var(--accent-hover); }
.st-hlabels { display: grid; gap: 2px; padding: 6px 8px 0; text-align: center; }
.st-days-wrap { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 6px; }
.st-days-y { height: 160px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
.st-days-y span:first-child { transform: translateY(-7px); }
.st-days-y span:last-child { transform: translateY(7px); }
.st-days { height: 160px; display: grid; gap: 2px; align-items: end; border-bottom: 1px solid var(--border-2); background: linear-gradient(to bottom, #26262E 1px, transparent 1px) 0 0 / 100% 50%; }
.st-day { display: block; background: var(--accent-hover); border-radius: 3px 3px 0 0; min-height: 0; }
.st-days-x { display: flex; justify-content: space-between; padding: 6px 0 0 34px; }
.st-funnel { display: flex; flex-direction: column; gap: 14px; }
.st-fl-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.st-hbar-h { height: 12px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.st-hbar-h > span { display: block; height: 100%; border-radius: 4px; background: var(--accent-hover); }
.st-hbar-h.st-green > span { background: var(--money); }
.st-share { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.st-share .st-hbar-h { flex: 1; height: 10px; }
.st-share .small { width: 34px; text-align: right; }
.st-big { display: block; font-family: var(--display); font-size: 32px; margin-bottom: 10px; }
.st-rows { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.st-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.st-rows-sm { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--text-2); }
.st-rows-sm > span { display: flex; justify-content: space-between; gap: 10px; }
@media (min-width: 720px) {
  .st-pending { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-kpis, .st-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-accounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-moves { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 1100px) {
  .st-profit-top { grid-template-columns: 360px minmax(0, 1fr); align-items: start; }
  .st-accounts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-2col-wide { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .st-3col { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .st-2col > .card, .st-3col > .card { margin-bottom: 16px; }
}
@media (max-width: 719px) {
  .st-chart { grid-template-columns: 56px minmax(0, 1fr); }
  .st-yaxis { font-size: 10px; }
  .st-xaxis { font-size: 10px; }
  .st-tip { width: 180px; }
}
.st-3col .table { min-width: 0; }
.st-bar { position: relative; }
.st-bar .st-tip { bottom: calc(100% + 8px); transform: translateX(-50%); }
.st-col.tip-left .st-bar .st-tip { left: auto; right: -30%; transform: none; }
.st-col:nth-child(-n+2) .st-bar .st-tip { left: -30%; transform: none; }

/* ---------- Casilla en la sala ---------- */
.slot-box { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: #2A170A; border: 1px solid var(--accent); }
.slot-num { width: 84px; height: 84px; flex-shrink: 0; border-radius: 14px; background: var(--accent); color: var(--on-accent); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.slot-num span { font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.slot-num strong { font-family: var(--display); font-size: 44px; line-height: 1; }
.slot-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.slot-txt strong { font-size: 16px; }
.slot-txt span { font-size: 14px; color: #FFC49A; }
.slot-chip { display: inline-grid; place-items: center; min-width: 34px; height: 28px; padding: 0 6px; border-radius: 8px; background: #2A170A; border: 1px solid #5A3012; color: var(--accent-hover); font-family: var(--display); font-weight: 700; }

/* ---------- Avisos al admin ---------- */
.alerts-card { margin-top: 20px; }
.alerts-card form { margin: 12px 0; }
.alerts-table td strong, .alerts-table td > span.small { display: block; }

/* ---------- Horario del torneo y cuenta regresiva ---------- */
.starts-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; padding: 18px; margin-bottom: 16px; border-radius: var(--radius-lg); background: #1F1A0C; border: 1px solid #5A4512; }
.starts-label { font-size: 13px; font-weight: 700; color: #FFE3A3; }
.starts-count { font-size: 44px; letter-spacing: 1px; }
.starts-sub { color: #C9B78A; }
.sched-rows { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.sched-row { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--surface-3); }
.sched-row[hidden] { display: none; }
.sched-row dt { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .3px; text-transform: uppercase; }
.sched-row dd { margin: 0; font-weight: 700; }
.sched-sep { display: none; }
.sched-time { display: block; font-family: var(--display); font-size: 22px; line-height: 1.2; }
.sched-peru { color: var(--accent-hover); }
.sched-peru span { color: var(--text); font-size: 15px; }
.sched-zone { color: var(--muted); font-size: 15px; }
@media (min-width: 720px) {
  .sched-row dd { font-size: 15px; }
  .sched-sep { display: inline; }
  .sched-time { display: inline; font-family: var(--font); font-size: 15px; white-space: nowrap; }
  .sched-peru span, .sched-zone { font-size: 15px; }
}

/* ---------- Inscripción manual: pagos por hacer ---------- */
.mp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mp-item { padding: 12px 14px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--surface-3); display: flex; flex-direction: column; gap: 10px; }
.mp-item.is-pending { border-color: #5A4512; }
.mp-main { display: flex; gap: 12px; align-items: flex-start; }
.mp-main .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mp-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.mp-amount .num { font-size: 18px; }
.mp-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.mp-form select, .mp-form input { flex: 1 1 160px; min-width: 0; min-height: 40px; }
.mp-form [data-fund-usd] { display: flex; flex: 1 1 160px; }
.mp-form [data-fund-usd][hidden] { display: none; }
.mp-paid { margin: 0; }
@media (min-width: 720px) { .mp-form select { flex: 0 1 260px; } .mp-form [data-fund-usd] { flex: 0 1 200px; } }

/* ---------- Dúo y Escuadra ---------- */
.team-tag { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 10px; background: #3A1E0E; color: #FFC49A; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .5px; flex-shrink: 0; }
.team-tag-lg { min-width: 48px; height: 48px; font-size: 13px; border-radius: 12px; }
.team-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-3); flex-shrink: 0; }
.saved-team .team-logo { width: 48px; height: 48px; border-radius: 12px; }
.field-legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 2px; }
.team-pick { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.team-option { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; }
.team-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.team-option:has(input:checked) { border-color: var(--accent); background: #2A170A; }
.team-option-new { border-style: dashed; }
.team-option-txt { display: flex; flex-direction: column; min-width: 0; }
.team-player { gap: 6px; }
.player-result { font-size: 13px; color: var(--muted); min-height: 0; display: flex; align-items: center; gap: 6px; }
.player-result:empty { display: none; }
.player-result.is-ok { color: var(--money); font-weight: 700; }
.player-result.is-warn { color: #FFC94D; }
.player-result.is-error { color: var(--danger); }
.team-players li { flex-wrap: wrap; }
.team-player-txt { display: flex; flex-direction: column; min-width: 0; }
.team-swap { flex-shrink: 0; }
.team-swap > summary { list-style: none; }
.team-swap > summary::-webkit-details-marker { display: none; }
.team-swap[open] > summary { display: none; }
.team-mini-form { padding: 12px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--surface-3); gap: 10px; }
.team-add { margin-top: 12px; }
.btn.text-danger, .btn-ghost.text-danger { color: var(--danger); }
.results-teams li { flex-wrap: wrap; }
.team-kills { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 46px; }
.team-kill { display: inline-flex; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .25); font-size: 13px; color: var(--text-2); }
.team-kill strong { color: var(--text); }
.table-team-kills .team-row td { background: var(--surface-2); border-bottom-color: var(--border); }
.admin-teams { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.admin-team { padding: 12px 14px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--surface-3); display: flex; flex-direction: column; gap: 10px; }
.admin-team.is-off { opacity: .6; }
.admin-team-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-team-head .grow { display: flex; flex-direction: column; min-width: 160px; }
.admin-team-cap { margin-top: 2px; }
.admin-team-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-team-actions form { margin: 0; }
.admin-team-players { list-style: none; margin: 0; padding: 0 0 0 46px; display: flex; flex-direction: column; gap: 4px; }
.admin-team-players li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; padding: 4px 0; border-top: 1px solid #23232B; }
.admin-team-players form { margin: 0; }
.saved-teams { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.saved-team { padding: 12px; border-radius: var(--radius); background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.saved-team-head { display: flex; align-items: center; gap: 12px; }
.saved-team-txt { display: flex; flex-direction: column; min-width: 0; }
.saved-team-note { margin: 0; }
.saved-team-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.saved-team-actions form { margin: 0; }
.saved-team-edit { flex: 1 1 100%; }
.saved-team-edit > summary, .saved-team-new > summary { list-style: none; }
.saved-team-edit > summary::-webkit-details-marker, .saved-team-new > summary::-webkit-details-marker { display: none; }
.saved-team-edit[open] > summary, .saved-team-new[open] > summary { display: none; }
.saved-team-edit:not([open]) { flex: 0 0 auto; }
@media (max-width: 600px) {
  .team-kills, .admin-team-players { padding-left: 0; }
}
.admin-team-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.team-player-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.team-player-actions form { margin: 0; }
.team-player-actions:has(.team-swap[open]) { flex-basis: 100%; flex-direction: column; align-items: stretch; }
.team-player-actions:has(.team-swap[open]) > form { display: none; }
.results-teams li > .nick { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-initial { font-size: 16px; }
.input-row input::placeholder { letter-spacing: 0; font-weight: 500; }

/* ---------- Premio por top ---------- */
.tcard-kind { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tcard-kind .badge { white-space: nowrap; }
.top-prize-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.top-prize-grid .field { min-width: 0; }
.top-prize-grid input { min-width: 0; width: 100%; }
@media (max-width: 480px) {
  .top-prize-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.fieldset-title { font-size: 14px; }
.fieldset > .hint { margin-top: -6px; }
.top-prizes { margin: 0; }
.top-prizes .rank { min-width: 56px; }
.result-stats.result-stats-2 { grid-template-columns: repeat(2, 1fr); }
.table-places select { min-height: 40px; min-width: 120px; }
.table-places select[aria-invalid="true"] { border-color: var(--danger, #EF4444); }
.places-pay { margin: 8px 0 12px; }
.eco-extra { margin-top: 12px; }
.team-swap-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Ajustes en celular: los textos técnicos largos (config.php) no deben ensanchar la página. */
.muted .mono, p .mono, .hint .mono { overflow-wrap: anywhere; word-break: break-word; }
