/* Torneo Escolar LIDESPO · Desarrollado por D-TEK Services
   Sistema de diseño compartido: público, gestor y mesa técnica. Siempre en modo claro. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-800-normal.woff2") format("woff2"); }

:root {
  color-scheme: light only;
  --navy-950: #0A0A0D;
  --navy-900: #111116;
  --navy-800: #1A1A20;
  --navy-700: #25252D;
  --navy-600: #3A3A44;
  --teal: #2F6FB8;
  --teal-700: #1D4F8C;
  --teal-50: #E7EFF8;
  --gold: #D9A441;
  --gold-700: #8A6417;
  --gold-50: #FBF2DF;
  --sky: #36A3E2;
  --bone: #F6F3EC;
  --bone-2: #EFEAE0;
  --paper: #FFFFFF;
  --ink: #0E1A2C;
  --ink-2: #2A3648;
  --muted: #5A6577;
  --line: #E2DCCF;
  --line-2: #D3CCBD;
  --red: #B42318;
  --red-50: #FDECEA;
  --green: #12804A;
  --green-50: #E5F4EC;
  --amber: #A15C07;
  --amber-50: #FEF3E2;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 2px rgba(15, 15, 20, .06), 0 1px 1px rgba(15, 15, 20, .04);
  --shadow-2: 0 6px 24px rgba(15, 15, 20, .10), 0 2px 6px rgba(15, 15, 20, .06);
  --shadow-3: 0 24px 60px rgba(8, 8, 11, .28);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", "Inter", sans-serif;
  --gutter: 16px;
  --maxw: 1240px;
  --header-h: 68px;
  --ticker-h: 64px;
}
@media (min-width: 720px) { :root { --gutter: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bone); }
html, body { color-scheme: light only; }
body {
  margin: 0; min-height: 100vh; background: var(--bone); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.02; margin: 0; color: var(--navy-900); }
h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 800; }
h2 { font-size: clamp(30px, 4.2vw, 46px); }
h3 { font-size: 24px; }
h4 { font-size: 19px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1; }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 26px; height: 26px; }

/* ------------------------------------------------------------------ botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius); border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: .01em; text-decoration: none !important;
  background: var(--paper); color: var(--navy-900); border-color: var(--line-2);
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; user-select: none; white-space: nowrap;
}
.btn:hover { border-color: var(--navy-700); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.btn-primary:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn-accent { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }
.btn-accent:hover { background: #173F70; border-color: #173F70; }
.btn-gold { background: var(--gold); color: var(--navy-950); border-color: var(--gold); }
.btn-gold:hover { background: #e2a913; border-color: #e2a913; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #8f1c13; border-color: #8f1c13; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--navy-800); }
.btn-ghost:hover { background: rgba(15, 15, 20, .06); border-color: transparent; }
.btn-light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn-light:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 48px; padding: 0; }
.btn-icon.btn-sm { width: 40px; }

/* ------------------------------------------------------------------ formularios */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--red); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--line-2); background: var(--paper); color: var(--ink); font-size: 16px;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--teal-700); box-shadow: 0 0 0 3px rgba(47, 111, 184, .18); }
.input.is-invalid, .select.is-invalid { border-color: var(--red); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230A1B35' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 500; }
.check input { width: 22px; height: 22px; accent-color: var(--teal-700); }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .form-grid .span-2 { grid-column: span 2; } }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 42px; }
.seg { display: inline-flex; background: var(--bone-2); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--paper); color: var(--navy-900); box-shadow: var(--shadow-1); }

/* ------------------------------------------------------------------ tarjetas, chips, insignias */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.card-pad { padding: 18px; }
@media (min-width: 720px) { .card-pad { padding: 24px; } }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h3, .card-head h4 { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--bone-2); color: var(--ink-2); white-space: nowrap; }
.chip.teal { background: var(--teal-50); color: var(--teal-700); }
.chip.gold { background: var(--gold-50); color: var(--gold-700); }
.chip.red { background: var(--red-50); color: var(--red); }
.chip.green { background: var(--green-50); color: var(--green); }
.chip.amber { background: var(--amber-50); color: var(--amber); }
.chip.navy { background: var(--navy-900); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 1.6s infinite; display: inline-block; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.badge-live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: .06em; color: var(--green); }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.empty .ico { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--line-2); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--teal-50); color: var(--ink); border: 1px solid #c7e3e5; }
.notice.warn { background: var(--amber-50); border-color: #f5d7a6; }
.notice.err { background: var(--red-50); border-color: #f4c1bb; }
.notice.ok { background: var(--green-50); border-color: #b9e0c9; }
.notice .ico { margin-top: 2px; }

/* logos de equipos */
.tlogo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: var(--paper); flex: none; }
.tlogo.sm { width: 24px; height: 24px; border-radius: 6px; }
.tlogo.lg { width: 56px; height: 56px; border-radius: 12px; }
.tlogo.xl { width: 88px; height: 88px; border-radius: 16px; }
.tlogo.ph { display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; color: #fff; background: var(--navy-700); font-size: 13px; }
.team-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-cell .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ tablas → tarjetas en celular */
.table-wrap { width: 100%; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 12px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl tbody tr:hover { background: #fbfaf6; }
.tbl tr.is-clickable { cursor: pointer; }
.tbl .strong { font-weight: 700; }
@media (max-width: 719px) {
  table.tbl.stack-sm thead { display: none; }
  table.tbl.stack-sm, .tbl.stack-sm tbody, .tbl.stack-sm tr, .tbl.stack-sm td { display: block; width: 100%; }
  .tbl.stack-sm tr { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px; padding: 8px 12px; }
  .tbl.stack-sm td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl.stack-sm td::before { content: attr(data-l); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; }
  .tbl.stack-sm td.main { display: block; text-align: left; padding: 6px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .tbl.stack-sm td.main::before { display: none; }
  .tbl.stack-sm td.act { justify-content: flex-end; }
  .tbl.stack-sm td.act::before { display: none; }
}

/* ------------------------------------------------------------------ pantalla de carga */
.loader {
  position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(1200px 700px at 50% 30%, var(--navy-700) 0%, var(--navy-900) 55%, var(--navy-950) 100%);
  color: #fff; transition: opacity .45s ease, visibility .45s; gap: 26px; padding: 24px;
}
.loader.out { opacity: 0; visibility: hidden; pointer-events: none; }
.loader .ld-logo { width: min(210px, 52vw); aspect-ratio: 1; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .45)); animation: ld-float 2.4s ease-in-out infinite; }
@keyframes ld-float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.015); } }
.loader .ld-bar { width: min(220px, 60vw); height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.loader .ld-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, var(--teal), var(--gold)); animation: ld-run 1.15s ease-in-out infinite; }
@keyframes ld-run { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
.loader .ld-by { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.dtek-mark { display: inline-flex; align-items: center; gap: 8px; }
.dtek-mark img { height: 34px; width: auto; }
.dtek-word { font-family: var(--display); font-weight: 800; letter-spacing: .08em; font-size: 15px; color: #fff; }
.dtek-word b { color: #C8102E; }

/* ------------------------------------------------------------------ toasts y diálogos */
.toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9000; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--navy-900); color: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-3); display: flex; gap: 10px; align-items: center; font-size: 15px; animation: tin .25s ease; }
.toast.err { background: var(--red); }
.toast.ok { background: #0f5f3a; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal-back { position: fixed; inset: 0; z-index: 8000; background: rgba(8, 8, 11, .55); display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fin .2s ease; }
@media (min-width: 720px) { .modal-back { align-items: center; padding: 24px; } }
@keyframes fin { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--paper); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: mup .22s ease; }
.modal.wide { max-width: 980px; }
@media (min-width: 720px) { .modal { border-radius: 18px; } }
@keyframes mup { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 1; }
.modal-head h3 { flex: 1; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex-wrap: wrap; position: sticky; bottom: 0; background: var(--paper); }
.modal-foot .btn { flex: 1 1 auto; }
@media (min-width: 720px) { .modal-foot .btn { flex: 0 0 auto; } }

/* ------------------------------------------------------------------ estado de sincronización */
.sync { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--green-50); color: var(--green); white-space: nowrap; }
.sync.off { background: var(--amber-50); color: var(--amber); }
.sync.err { background: var(--red-50); color: var(--red); }

/* ------------------------------------------------------------------ selector de idioma */
.lang { display: inline-flex; border: 1.5px solid currentColor; border-radius: 999px; overflow: hidden; flex: none; }
.lang button { border: 0; background: transparent; min-height: 36px; min-width: 44px; font-weight: 700; font-size: 12.5px; letter-spacing: .06em; color: inherit; }
.lang button.on { background: var(--gold); color: var(--navy-950); }

/* ------------------------------------------------------------------ login a pantalla completa */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--bone); }
@media (min-width: 960px) { .login { grid-template-columns: minmax(380px, 44%) 1fr; } }
.login-side { position: relative; background: radial-gradient(900px 600px at 30% 20%, var(--navy-700), var(--navy-900) 60%, var(--navy-950)); color: #fff; padding: 28px var(--gutter) 34px; display: flex; flex-direction: column; gap: 22px; overflow: hidden; }
.login-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 2px solid rgba(47, 111, 184, .35); pointer-events: none; }
.login-side .ls-logo { width: 120px; }
@media (min-width: 960px) { .login-side { padding: 48px; justify-content: center; } .login-side .ls-logo { width: 220px; } }
.login-side h1 { color: #fff; font-size: clamp(34px, 4.6vw, 58px); }
.login-side .kicker { color: var(--gold); }
.login-side p { color: rgba(255, 255, 255, .78); max-width: 460px; }
.login-main { display: flex; align-items: center; justify-content: center; padding: 28px var(--gutter) 40px; }
.login-box { width: 100%; max-width: 520px; }
.login-box h2 { margin-bottom: 6px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; min-height: 76px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--paper); text-align: left; }
.demo-btn:hover { border-color: var(--teal-700); background: var(--teal-50); }
.demo-btn b { font-family: var(--display); text-transform: uppercase; font-size: 18px; letter-spacing: .02em; color: var(--navy-900); display: flex; align-items: center; gap: 8px; }
.demo-btn span { font-size: 12.5px; color: var(--muted); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

.kicker { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-700); }
.pill-num { font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: .1em; color: var(--muted); }
@media (max-width: 719px) { .hide-sm { display: none !important; } }
@media (min-width: 720px) { .hide-lg { display: none !important; } }
@media (max-width: 959px) { .login-side .ls-logo { width: 96px; } .login-side { gap: 14px; } }
/* registro de jugadas (compartido) */
.side-h { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; background: var(--navy-700); margin-right: 6px; vertical-align: middle; flex: none; }
.side-h.A { background: var(--teal-700); }
.pbp { display: flex; flex-direction: column; }
.pbp-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.pbp-item .when { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.25; }
.pbp-item .sc { font-family: var(--display); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.pbp-item.void { opacity: .5; text-decoration: line-through; }
.pbp-item.corr { color: var(--amber); font-style: italic; }
.score-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.score-head .tm { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.score-head .tm b { font-family: var(--display); text-transform: uppercase; font-size: 20px; line-height: 1.05; }
.score-head .big { font-family: var(--display); font-weight: 800; font-size: clamp(44px, 9vw, 76px); line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.box-tbl td, .box-tbl th { padding: 8px 10px; }
/* llave (bracket): la única parte que se desliza de lado, dentro de su caja */
.br-hint { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
@media (min-width: 1100px) { .br-hint { display: none; } }
.br-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; scrollbar-width: thin; }
.bracket { display: flex; gap: 0; width: 100%; min-width: 1080px; align-items: stretch; }
.br-col { display: flex; flex-direction: column; flex: 1 1 0; min-width: 250px; }
.br-col.champ { flex: 0 0 210px; min-width: 210px; }
.br-h { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--teal-700); padding: 0 18px 10px; }
.br-games { display: flex; flex-direction: column; flex: 1; }
.br-pair { flex: 1; display: flex; flex-direction: column; position: relative; }
.br-slot { flex: 1; display: flex; align-items: center; position: relative; padding: 8px 18px; }
.br-col.has-in .br-slot::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; border-top: 2px solid var(--line-2); }
.br-slot.out::after { content: ""; position: absolute; right: 0; top: 50%; width: 18px; border-top: 2px solid var(--line-2); }
.br-pair:not(.single)::after { content: ""; position: absolute; right: 0; top: 25%; bottom: 25%; border-right: 2px solid var(--line-2); }
.br-m { display: block; width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-1); color: inherit; text-decoration: none !important; overflow: hidden; }
.br-m:hover { border-color: var(--teal-700); }
.br-m.live { border-color: #22C55E; box-shadow: 0 0 0 2px rgba(34, 197, 94, .18); }
.br-meta { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--bone); border-bottom: 1px solid var(--line); }
.br-row { display: grid; grid-template-columns: 24px 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 10px; font-size: 14px; min-height: 44px; }
.br-row .tlogo.sm { width: 28px; height: 28px; font-size: 10px; }
.br-row + .br-row { border-top: 1px solid var(--line); }
.br-row .br-seed { font-size: 11px; font-weight: 800; color: var(--muted); text-align: center; }
.br-row .br-name { display: flex; flex-direction: column; min-width: 0; font-weight: 600; line-height: 1.2; }
.br-row .br-name .nm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.br-row .br-sc { font-family: var(--display); font-weight: 800; font-size: 19px; min-width: 24px; text-align: right; font-variant-numeric: tabular-nums; }
.br-row.win .br-name, .br-row.win .br-sc { color: var(--navy-900); font-weight: 800; }
.br-row.lose { opacity: .55; }
.br-row.proj { opacity: .75; }
.br-proj { display: block; margin-top: 1px; font-style: normal; font-size: 10px; font-weight: 700; color: var(--teal-700); text-transform: uppercase; letter-spacing: .04em; }
.br-champ { width: 100%; min-height: 150px; border-radius: 16px; border: 2px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 14px; color: var(--muted); }
.br-champ.on { border: 0; background: linear-gradient(160deg, var(--navy-800), var(--navy-950)); color: var(--gold); box-shadow: var(--shadow-2); }
.br-champ.on b { color: #fff; font-family: var(--display); text-transform: uppercase; font-size: 22px; line-height: 1.05; }
.br-extra { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.br-extra > div { width: 290px; }
.tbl.stand td, .tbl.stand th { padding: 10px 8px; }
.tbl.stand tr.qual td:first-child { box-shadow: inset 3px 0 0 var(--teal); color: var(--teal-700); }

/* ===================================================================== v2 */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bone-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--green-50); color: var(--green); }
.pill.warn { background: var(--amber-50); color: var(--amber); }
.pill.err { background: var(--red-50); color: var(--red); }
.hint.is-good { color: var(--green); font-weight: 600; }
.hint.is-bad { color: var(--red); font-weight: 600; }
.ico.xs { width: 13px; height: 13px; }

/* aviso a pantalla completa en la entrada */
.lg-notice { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lg-notice h2 { margin: 4px 0 0; }
.lg-notice p { color: var(--ink-2); font-size: 16px; line-height: 1.55; max-width: 460px; margin: 0 0 8px; }
.lg-notice-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--green); }
.lg-notice-ic.warn { background: var(--amber-50); color: var(--amber); }
.lg-notice-ic .ico { width: 30px; height: 30px; }

/* campana */
.bell { position: relative; }
.bell-btn { position: relative; }
.bell-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.bell-pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 24px)); max-height: min(520px, 70vh); display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 48px rgba(15, 15, 20, .22); z-index: 60; overflow: hidden; }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.bell-head b { font-family: var(--display); font-size: 18px; letter-spacing: .02em; }
.bell-list { overflow: auto; }
.bell-it { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--bone-2); text-decoration: none; color: inherit; }
.bell-it:hover { background: var(--bone); }
.bell-it b { display: block; font-size: 14px; }
.bell-it span span, .bell-it .grow > span { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.4; overflow-wrap: anywhere; }
.bell-it em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.bell-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: transparent; }
.bell-it.new .bell-dot { background: var(--teal); }
.bell-it.new.tone-warn .bell-dot { background: var(--amber); }
.bell-it.new.tone-err .bell-dot { background: var(--red); }
.bell-it.new.tone-ok .bell-dot { background: var(--green); }
.bell-it:not(.new) { opacity: .72; }
.bell-empty { padding: 28px 16px; text-align: center; color: var(--muted); }
@media (max-width: 520px) { .bell-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }

/* panel de firma */
.sp-modal { max-width: 640px; }
.sp-intro { margin-bottom: 10px; }
.sp-list { margin: 6px 0 0; padding-left: 22px; columns: 2; column-gap: 24px; font-size: 13px; max-height: 160px; overflow: auto; }
.sp-wrap { position: relative; border: 1.5px dashed var(--line-2); border-radius: 12px; background: #fff; height: 210px; touch-action: none; }
.sp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 2; }
.sp-base { position: absolute; left: 18px; right: 18px; bottom: 58px; border-bottom: 1.5px solid var(--navy-700); z-index: 1; }
.sp-base span { position: absolute; left: 0; bottom: 2px; font-size: 20px; font-weight: 700; color: var(--navy-700); }
.sp-name { position: absolute; left: 18px; right: 18px; bottom: 12px; z-index: 1; font-size: 13px; display: flex; flex-direction: column; color: var(--ink-2); }
.sp-name span { font-size: 12px; color: var(--muted); }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 15px; }
.radio-card:has(input:checked) { border-color: var(--navy-700); background: var(--bone); }
.radio-card input { width: 20px; height: 20px; margin-top: 1px; flex: none; }
.btn-danger-text { color: var(--red); }
/* v2: nada se desborda a 360 px */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl.stand td:nth-child(2) { max-width: 0; width: 100%; }
.tbl.stand td:nth-child(2) .team-cell { min-width: 0; }
@media (max-width: 420px) { .tbl.stand td, .tbl.stand th { padding: 9px 5px; font-size: 13.5px; } }
.cards-grid > * { min-width: 0; }
.chip.wrap { white-space: normal; }
.list-item .main { min-width: 0; }
.team-cell > .grow { min-width: 0; overflow: hidden; } .team-cell > .grow > .nm { display: block; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 48px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--navy-900); background: var(--bone); }
