/* LISS · Estilos compartidos. Diseñado primero para celular (desde 360 px). */
:root {
  --navy: #0c1a2b; --navy-2: #13283f; --mint: #9fd9bd; --green: #1e6a4c; --green-d: #17533b;
  --orange: #b9622a; --orange-d: #9a501f; --gold: #b8975a;
  --bg: #f4f5f2; --card: #ffffff; --text: #101d2a; --muted: #5f6c78; --line: #e1e5e8; --soft: #f7f8f6;
  --ok: #1f7a4a; --warn: #b26a00; --bad: #c62828; --yellow: #f4c20d; --red: #d32f2f;
  --radius: 10px; --shadow: 0 1px 2px rgba(12,26,43,.04);
  --head: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --nav-h: 66px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1824; --card: #12263a; --text: #e8f0f6; --muted: #9db0c0; --line: #24405a; --soft: #0f2132;
  --ok: #4cc28a; --warn: #f0b04a; --bad: #ff6b6b; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--body); background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
h1, h2, h3 { font-family: var(--head); letter-spacing: .01em; line-height: 1.15; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.15rem; }
a { color: var(--green); }
:root[data-theme="dark"] a { color: var(--mint); }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lead { font-size: 1.05rem; }
.hidden, [hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Encabezado ---------- */
.app-header { position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); min-height: 60px; box-shadow: 0 2px 0 var(--orange); }
.app-header .brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; flex: 1; }
.app-header img { width: 34px; height: 54px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt strong { font-family: var(--head); font-size: 1.25rem; letter-spacing: .04em; line-height: 1.1; }
.brand-txt span { font-size: .78rem; color: var(--mint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-btn, .icon-btn.hdr { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  min-height: 44px; min-width: 44px; padding: 0 14px; font: 600 .95rem var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.offline-pill { display: none; background: var(--warn); color: #fff; font-size: .8rem; border-radius: 999px; padding: 4px 10px; }
body.offline .offline-pill { display: inline-block; }
.demo-banner { background: #fff4d6; color: #6b4800; text-align: center; font-size: .9rem; padding: 8px 12px; border-bottom: 1px solid #f0d68a; }

/* ---------- Contenido ---------- */
main { padding: 14px 14px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); max-width: 980px; margin: 0 auto; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.page-title h1 { margin: 0; }
.section { margin: 22px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.section h2 { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------- Botones ---------- */
.btn { min-height: 48px; padding: 0 18px; border-radius: 12px; border: 2px solid transparent; font: 600 1rem var(--body); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; background: var(--soft); color: var(--text);
  border-color: var(--line); touch-action: manipulation; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn.primary:hover { background: var(--green-d); }
.btn.accent { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.big { min-height: 60px; font-size: 1.1rem; border-radius: 16px; }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: .92rem; }
.icon-btn { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: inherit; font-size: 1.2rem; cursor: pointer; border-radius: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row > .btn { flex: 1 1 140px; }

/* ---------- Selector de categoría (segmentado) ---------- */
.seg { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 5px; margin-bottom: 12px; flex-wrap: wrap; }
.seg button { flex: 1 1 0; min-height: 44px; border: 0; background: transparent; border-radius: 10px; font: 600 .95rem var(--body); color: var(--muted); cursor: pointer; padding: 0 8px; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--mint); color: var(--navy); }

/* ---------- Partidos ---------- */
.match { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 10px; display: block; color: inherit; text-decoration: none; }
button.match, .match.tap { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.match-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.match-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.match-row .tname { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-row.win .tname, .match-row.win .score { font-weight: 800; }
.match-row .score { font: 700 1.6rem var(--head); min-width: 28px; text-align: right; }
.local-tag { font-size: .7rem; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 0 5px; }
.match-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; color: var(--muted); margin-top: 6px; }
.pens { font-weight: 600; color: var(--text); }
.crest { --c: #1d3b53; width: 34px; height: 34px; border-radius: 10px; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font: 700 .72rem var(--body); letter-spacing: .02em; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 700; background: var(--soft); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.live { background: #e7f8ef; color: #12693f; border-color: #a9e2c4; }
.chip.done { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.warn { background: #fff3e0; color: #8a4b00; border-color: #f3c27a; }
.chip.off { text-decoration: line-through; }
.chip.bad { background: #fdecec; color: #a11; border-color: #f2b5b5; }
.chip.ok { background: #e7f8ef; color: #12693f; border-color: #a9e2c4; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #1fae63; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.day-head { font: 700 1.05rem var(--head); text-transform: capitalize; margin: 18px 0 8px; color: var(--muted); letter-spacing: .03em; }

/* ---------- Tabla de posiciones (sin desplazamiento lateral) ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.table th, .table td { padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.table th { font-size: .8rem; color: var(--muted); font-weight: 700; background: var(--soft); }
.table td.team { text-align: left; font-weight: 600; }
.table .team-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.table .team-cell span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table tr.qual td:first-child { box-shadow: inset 4px 0 0 var(--green); }
.table td.pts { font-weight: 800; font-size: 1.05rem; }
.table .xtra { display: none; }
@media (min-width: 560px) { .table .xtra { display: table-cell; } }
.table tr.expand td { text-align: left; background: var(--soft); font-size: .92rem; }
.table tbody tr.row-btn { cursor: pointer; }
.forma { display: inline-flex; gap: 3px; }
.forma b { width: 20px; height: 20px; border-radius: 5px; font-size: .7rem; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.forma .G { background: var(--ok); } .forma .E { background: #7b8a96; } .forma .P { background: var(--bad); }
.legend { font-size: .85rem; color: var(--muted); margin-top: 8px; }

/* ---------- Listas tipo tarjeta ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 56px; }
button.item { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.item .sub { font-size: .88rem; color: var(--muted); }
.item .big-num { font: 800 1.6rem var(--head); min-width: 40px; text-align: right; }
.rank { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.rank.r1 { background: var(--orange); color: #fff; border-color: var(--orange); }
.num { min-width: 38px; height: 38px; border-radius: 10px; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 700 1.05rem var(--head); flex: none; }
.card-y, .card-r { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.card-y::before, .card-r::before { content: ''; width: 12px; height: 16px; border-radius: 2px; display: inline-block; }
.card-y::before { background: var(--yellow); border: 1px solid #c79b00; } .card-r::before { background: var(--red); border: 1px solid #911; }

/* ---------- Navegación inferior ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(0,0,0,.06); }
.bottom-nav a, .bottom-nav button { flex: 1; min-height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font: 600 .78rem var(--body); border: 0; background: transparent; cursor: pointer; }
.bottom-nav .ico { font-size: 1.35rem; line-height: 1; }
.bottom-nav [aria-current="page"] { color: var(--green); }
.bottom-nav [aria-current="page"] .ico { transform: scale(1.1); }
:root[data-theme="dark"] .bottom-nav [aria-current="page"] { color: var(--mint); }
@media (min-width: 980px) { .bottom-nav { max-width: 980px; margin: 0 auto; border-radius: 16px 16px 0 0; border: 1px solid var(--line); } }

/* ---------- Avisos ---------- */
.notice { border-left: 5px solid var(--orange); }
.notice h3 { margin-bottom: 4px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty span { font-size: 2rem; display: block; margin-bottom: 6px; }

/* ---------- Diálogos ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8,20,30,.55); display: flex; align-items: flex-end; justify-content: center; }
.dialog { background: var(--card); color: var(--text); width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column;
  border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25); animation: up .18s ease-out; }
.dialog.wide { max-width: 760px; }
@media (min-width: 720px) { .overlay { align-items: center; } .dialog { border-radius: 20px; } }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 1.3rem; }
.dialog-body { padding: 14px 16px; overflow-y: auto; }
.dialog-foot { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.dialog-foot .btn { flex: 1; }
.sheet-list { display: flex; flex-direction: column; gap: 8px; }
.sheet-item { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--soft); font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.sheet-item:active { background: var(--line); }
.sheet-item.disabled { opacity: .65; cursor: not-allowed; background: #fdecec; }
.sheet-item.yellow { border-left: 8px solid var(--yellow); } .sheet-item.red { border-left: 8px solid var(--red); }
.si-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.si-label { font-weight: 700; }
.si-sub { font-size: .86rem; color: var(--muted); }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 14px; }
@media (min-width: 640px) { .dialog.wide .form { grid-template-columns: 1fr 1fr; } .dialog.wide .form .full, .dialog.wide .form .lead, .dialog.wide .form .form-error { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
fieldset.field { border: 0; padding: 0; margin: 0; }
input, select, textarea { font: 16px var(--body); min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--text); width: 100%; }
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(43,138,87,.2); }
input.invalid, select.invalid { border-color: var(--bad); }
.req { color: var(--bad); }
.form-error { color: var(--bad); font-weight: 600; background: #fdecec; border-radius: 10px; padding: 10px 12px; margin: 0; }
.help-btn { width: 24px; height: 24px; min-height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--soft); color: var(--muted); font-weight: 800; cursor: pointer; padding: 0; }
.help-tip { display: block; width: 100%; font-weight: 400; font-size: .88rem; background: #eef7f1; color: #1d4d33; border-radius: 8px; padding: 8px 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check, .switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); cursor: pointer; font-weight: 600; }
.check input, .switch input { width: 22px; height: 22px; min-height: 0; accent-color: var(--green); }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
@media (min-width: 720px) { .filters { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Toasts ---------- */
#toasts { position: fixed; left: 12px; right: 12px; top: calc(68px + env(safe-area-inset-top)); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--navy); color: #fff; border-radius: 12px; padding: 12px 16px; display: flex; gap: 10px; max-width: 520px; width: 100%; box-shadow: 0 8px 30px rgba(0,0,0,.25); transition: opacity .3s; font-weight: 600; }
.toast.error { background: #8e1b1b; } .toast.ok { background: var(--green-d); } .toast.out { opacity: 0; }

/* ---------- Pantalla de entrada ---------- */
.login { max-width: 440px; margin: 24px auto; }
.login .logo { display: block; width: 92px; margin: 0 auto 12px; }
.center { text-align: center; }
.pin-input { font: 700 2rem var(--head); letter-spacing: .5em; text-align: center; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi b { display: block; font: 800 1.8rem var(--head); }
.kpi span { font-size: .85rem; color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 8px 0 8px 46px; min-height: 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 6px; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.kbd { display: inline-block; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; padding: 0 6px; font-weight: 700; background: var(--soft); }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); }
details.card > summary { cursor: pointer; font-weight: 700; min-height: 32px; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.card > summary::after { content: '▾'; color: var(--muted); }
details[open].card > summary::after { content: '▴'; }
.tag { font-size: .75rem; padding: 2px 8px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); }
.mt { margin-top: 12px; } .mb0 { margin-bottom: 0; }
@media print { .app-header, .bottom-nav, .sidebar, .no-print { display: none !important; } main { padding: 0; } }
.item .title, .item .sub { display: block; }
.dialog-foot { flex-wrap: wrap; }
.dialog-foot .btn { flex: 1 1 150px; }
.guide-img { display: block; max-width: 260px; width: 100%; margin: 8px auto 0; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* ---------- Estilo formal (íconos de línea, sin emojis) ---------- */
.ico-svg { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.btn .ico-svg { width: 18px; height: 18px; }
h1, h2 { text-transform: uppercase; letter-spacing: .02em; font-weight: 700; }
h3 { font-weight: 700; }
.app-header { box-shadow: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.app-header img { width: 30px; height: 46px; border-radius: 6px; }
.lang-btn, .icon-btn.hdr { background: transparent; border-color: rgba(255,255,255,.22); font-weight: 600; letter-spacing: .04em; }
.btn { border-radius: 8px; font-weight: 600; border-width: 1px; }
.btn.primary { background: var(--navy); border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-2); }
:root[data-theme="dark"] .btn.primary { background: var(--mint); color: var(--navy); border-color: var(--mint); }
.btn.accent { background: var(--green); border-color: var(--green); }
.btn.accent:hover { background: var(--green-d); }
.btn:hover { filter: none; }
.btn.ghost:hover, .btn:not(.primary):not(.accent):not(.danger):hover { background: var(--soft); border-color: #c9d1d7; }
.card, .match, .item, .kpi, .table, .seg { box-shadow: none; }
.seg { border-radius: 10px; padding: 4px; }
.seg button { border-radius: 7px; font-weight: 600; }
.chip { border-radius: 4px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; font-size: .7rem; }
.chip.live { background: #e8f3ee; color: var(--green-d); border-color: #c4e0d2; }
.chip.done { background: var(--navy); }
.notice { border-left: 3px solid var(--green); }
.kpi b { font-weight: 700; }
.num { border-radius: 6px; }
.rank.r1 { background: var(--navy); border-color: var(--navy); }
.toast { border-radius: 8px; font-weight: 500; }
.toast.ok { background: var(--green-d); }
.demo-banner { background: #f3efe4; color: #6a5a32; border-bottom: 1px solid #e6dcc3; font-size: .85rem; }
.empty span .ico-svg { width: 34px; height: 34px; color: #a9b4bd; }
.bottom-nav .ico .ico-svg { width: 22px; height: 22px; }
.bottom-nav [aria-current="page"] { color: var(--navy); }
.sheet-item .ico-svg { color: var(--muted); }
.dialog { border-radius: 14px 14px 0 0; }
@media (min-width: 720px) { .dialog { border-radius: 14px; } }
.sheet-item, input, select, textarea { border-radius: 8px; }
input, select, textarea { border-width: 1px; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(12,26,43,.12); }
.table th { text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; }
.day-head { text-transform: uppercase; font-size: .95rem; letter-spacing: .06em; }
.steps li::before { background: var(--navy); }
.help-tip { background: #eef3f1; color: #1d3f31; }
.crest.logo { background: transparent; padding: 0; overflow: visible; }
.crest.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.guide-pdfs { display: grid; gap: 8px; margin: 10px 0 16px; }
.guide-pdf { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); text-decoration: none; min-height: 56px; }
.guide-pdf:hover { border-color: var(--navy); }
.guide-pdf > .ico-svg:first-child { width: 26px; height: 26px; color: var(--green); }
.guide-pdf span { flex: 1; } .guide-pdf b { display: block; } .guide-pdf small { color: var(--muted); letter-spacing: .08em; }

/* ---------- Pantalla de carga ---------- */
#preloader { position: fixed; inset: 0; z-index: 500; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  transition: opacity .5s ease, visibility .5s ease; overflow: hidden; }
#preloader::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 0 52%, rgba(159,217,189,.07) 52% 60%, transparent 60% 63%, rgba(159,217,189,.05) 63% 70%, transparent 70%),
              radial-gradient(700px 420px at 80% 15%, rgba(30,106,76,.4), transparent 60%); }
#preloader > * { position: relative; }
.pl-crest { position: relative; width: 132px; height: 132px; display: flex; align-items: center; justify-content: center; }
.pl-crest img { width: 62px; height: 98px; object-fit: contain; background: #fff; border-radius: 10px; padding: 5px; animation: plPop .7s ease-out both; }
.pl-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.12); border-top-color: #9fd9bd; animation: plSpin 1s linear infinite; }
.pl-name { font: 800 2rem/1 'Barlow Condensed', 'Inter Display', Inter, sans-serif; letter-spacing: .3em; padding-left: .3em; }
.pl-sub { font: 600 .72rem Inter, system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #9fb0bf; text-align: center; padding: 0 24px; }
.pl-bar { width: 160px; height: 2px; background: rgba(255,255,255,.12); overflow: hidden; border-radius: 2px; }
.pl-bar i { display: block; width: 40%; height: 100%; background: #9fd9bd; animation: plBar 1.1s ease-in-out infinite; }
body.ready #preloader { opacity: 0; visibility: hidden; }
@keyframes plSpin { to { transform: rotate(360deg); } }
@keyframes plBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes plPop { from { transform: scale(.85); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pl-ring, .pl-bar i, .pl-crest img { animation: none; } }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: plSpin .8s linear infinite; }
.section a { white-space: nowrap; font-size: .9rem; }

/* ---------- Tablero de resultados ---------- */
.strip { position: relative; display: flex; align-items: center; gap: 10px; background: var(--navy); padding: 14px 16px; color: #fff; }
.st-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1; padding: 2px; scroll-padding-left: 2px; }
.st-track::-webkit-scrollbar { display: none; }
.st-card { flex: 0 0 214px; scroll-snap-align: start; background: #13283f; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 10px 12px; color: #fff; text-align: left;
  font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, background .15s; }
.st-card:hover { border-color: rgba(159,217,189,.55); background: #17304a; }
.st-top { display: flex; justify-content: space-between; align-items: center; font-size: .74rem; color: #a8b6c3; margin-bottom: 2px; }
.st-cat { font-weight: 700; letter-spacing: .08em; color: #9fd9bd; }
.st-live { color: #9fd9bd; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.st-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; animation: pulse 1.2s infinite; }
.st-team { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.st-team.lose { color: #9fb0bf; }
.st-n { flex: 1; font-size: .92rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-s { font: 700 1.05rem var(--body); min-width: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.st-ff { font-size: .62rem; border: 1px solid #e58f8f; color: #ffb3b3; border-radius: 3px; padding: 0 3px; }
.st-pen { font-size: .7rem; color: #a8b6c3; }
.crest-xs { width: 22px; height: 22px; border-radius: 4px; font-size: .5rem; flex: none; }
.st-arrow { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.st-arrow:hover { background: rgba(255,255,255,.08); }
.st-all { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(159,217,189,.6); border-radius: 8px; color: #fff; text-decoration: none; padding: 10px 16px; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.st-all:hover { background: rgba(255,255,255,.06); }
@media (max-width: 719px) {
  .strip { padding: 12px 10px; }
  .st-arrow, .st-all span { display: none; }
  .st-all { padding: 10px; }
  .st-card { flex-basis: 180px; }
}

/* ---------- Bracket de postemporada ---------- */
.bk-wrap { overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.bk { --gap: 34px; display: flex; gap: var(--gap); min-width: max-content; align-items: stretch; }
.bk-col { display: flex; flex-direction: column; width: 256px; scroll-snap-align: start; }
.bk-title { font: 600 .7rem var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; margin-bottom: 8px; border-bottom: 2px solid var(--navy); }
.bk-body { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.bk-pair { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-around; padding: 6px 0; }
.bk-slot { position: relative; flex: 1; display: flex; align-items: center; padding: 6px 0; }
.bk-m { position: relative; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.bk-m.has { cursor: pointer; }
.bk-m.has:hover { border-color: var(--navy); }
.bk-m.ghost { background: var(--soft); border-style: dashed; }
.bk-m.live { border-color: var(--green); box-shadow: 0 0 0 2px rgba(30,106,76,.15); }
.bk-h { display: flex; justify-content: space-between; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.bk-h span:first-child { font-weight: 700; color: var(--green); }
.bk-t { display: flex; align-items: center; gap: 7px; min-height: 28px; }
.bk-t .bk-n { flex: 1; font-size: .9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-t b { font: 700 1rem var(--body); font-variant-numeric: tabular-nums; min-width: 18px; text-align: right; }
.bk-t b small { font-size: .7rem; color: var(--muted); font-weight: 600; margin-left: 2px; }
.bk-t.win .bk-n, .bk-t.win b { font-weight: 700; color: var(--navy); }
.bk-t.lose { color: #95a1ab; }
.bk-t.tbd { color: #95a1ab; font-style: italic; }
.bk-seed { width: 16px; font-size: .7rem; color: var(--muted); text-align: center; font-weight: 600; }
.tbd-c { background: #e3e8ec; }
/* líneas que conectan las rondas */
.bk-col:not(.champ-col) .bk-slot::after { content: ''; position: absolute; right: calc(var(--gap) / -2); top: 50%; width: calc(var(--gap) / 2); border-top: 2px solid #c9d2d9; }
.bk-pair:not(.solo)::after { content: ''; position: absolute; right: calc(var(--gap) / -2); top: 25%; bottom: 25%; border-right: 2px solid #c9d2d9; }
.bk-col.in .bk-slot::before { content: ''; position: absolute; left: calc(var(--gap) / -2); top: 50%; width: calc(var(--gap) / 2); border-top: 2px solid #c9d2d9; }
.bk-col.in .bk-slot .bk-m { z-index: 1; }
.bk-champ { width: 100%; text-align: center; border: 1px dashed #c9d2d9; border-radius: 10px; padding: 18px 12px; background: var(--soft); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bk-champ > .ico-svg { width: 34px; height: 34px; color: var(--gold); }
.bk-champ b { font: 700 1.1rem var(--head); text-transform: uppercase; letter-spacing: .04em; }
.bk-champ span { font-size: .78rem; color: var(--muted); }
.bk-champ.done { background: var(--navy); color: #fff; border: 0; }
.bk-champ.done span { color: var(--mint); }
.bk-champ .crest { width: 54px; height: 54px; }
@media (max-width: 719px) { .bk { --gap: 26px; } .bk-col { width: 214px; } }
.bk-hint { display: none; align-items: center; gap: 8px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
@media (max-width: 1100px) { .bk-hint { display: flex; } }

/* ---------- Logo transparente + crédito D-TEK ---------- */
.app-header img { background: transparent; padding: 0; border-radius: 0; width: 32px; height: 48px; object-fit: contain; }
.pl-crest img { background: transparent; padding: 0; width: 74px; height: 112px; filter: drop-shadow(0 8px 22px rgba(0,0,0,.35)); }
.login .logo { width: 84px; }
.pl-dev { position: absolute !important; bottom: calc(26px + env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pl-dev span { font: 600 .62rem Inter, system-ui, sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #7f91a1; }
.pl-dev img { height: 30px; width: auto; opacity: .9; }

/* Comentario obligatorio de suspendido / cancelado / por reanudar */
.estado-nota { margin: 8px 0 0; padding: 8px 10px; border-left: 3px solid #c58b16; background: #fdf6e7; color: #5b4510; font-size: .86rem; border-radius: 4px; white-space: pre-wrap; }
.estado-nota.center { text-align: left; max-width: 520px; margin: 10px auto 0; }
.estado-nota .ico, .estado-nota svg { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- Campana de notificaciones ---------- */
.bell { position: relative; display: inline-flex; }
.bell[hidden] { display: none; }
.bell-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.bell-btn:hover, .bell-btn[aria-expanded="true"] { background: rgba(255,255,255,.1); }
.bell-btn.has svg { animation: bell-ring 1.2s ease 1; transform-origin: 50% 10%; }
@keyframes bell-ring { 0%,100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }
@media (prefers-reduced-motion: reduce) { .bell-btn.has svg { animation: none; } }
.bell-badge { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #d64527; color: #fff; font: 700 11px/19px Inter, Arial, sans-serif; text-align: center; border: 2px solid var(--navy); }
.bell-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: #fff; color: var(--ink, #101d2a); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(8,20,35,.28); z-index: 60; overflow: hidden; }
.bell-panel[hidden] { display: none; }
.bell-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.bell-head .linkish { font-size: .82rem; }
.bell-list { overflow-y: auto; }
.bell-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.bell-item:hover { background: var(--soft); }
.bell-item.unread { background: #f3f8f5; }
.bell-item .grow { flex: 1; min-width: 0; }
.bell-title { display: block; font-weight: 700; font-size: .88rem; line-height: 1.3; }
.bell-body { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; line-height: 1.35; overflow-wrap: anywhere; }
.bell-ico { width: 32px; height: 32px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e8eef3; color: var(--navy); }
.bell-ico svg { width: 17px; height: 17px; }
.bell-item.warn .bell-ico { background: #fdf0d9; color: #9a6a0c; }
.bell-item.bad .bell-ico { background: #fbe4de; color: #b23c17; }
.bell-item.ok .bell-ico { background: #e3f4ea; color: #1e6a4c; }
.bell-dot { width: 9px; height: 9px; border-radius: 50%; background: #1e6a4c; flex: none; margin-top: 6px; }
.bell-empty { padding: 28px 16px; text-align: center; color: var(--muted); margin: 0; }
@media (max-width: 560px) { .bell { position: static; } .bell-panel { position: fixed; left: 12px; right: 12px; top: 68px; width: auto; } }
.status-warn { color: #9a6a0c; font-weight: 700; }
.bell-head .linkish { background: none; border: 0; padding: 0; color: #1e6a4c; text-decoration: underline; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600; }
