/* FuturLeague — estilos */
:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #0c1430;
  --ink-2: #2b3553;
  --muted: #5f6a85;
  --line: #dde2ef;
  --brand: #2f55ff;
  --brand-ink: #ffffff;
  --brand-soft: #e6ebff;
  --accent: #c6f432;
  --navy: #0b1433;
  --win: #14a44d;
  --win-soft: #e2f6e9;
  --draw: #a0a7b8;
  --loss: #e5484d;
  --gold: #f5b301;
  --danger: #d92d3a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(12, 20, 48, .06), 0 6px 24px rgba(12, 20, 48, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080d1c;
    --surface: #10172b;
    --surface-2: #172039;
    --ink: #eaeefa;
    --ink-2: #c9d0e4;
    --muted: #8d97b3;
    --line: #232d4a;
    --brand: #5b7bff;
    --brand-soft: #1b2552;
    --win-soft: #11301f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .2px; line-height: 1.05; margin: 0 0 .4em; }
h1 { font-size: clamp(34px, 6vw, 60px); }
h2 { font-size: clamp(26px, 3.6vw, 36px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ---------- cabecera y pie ---------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 40; }
.nav { display: flex; align-items: center; gap: 18px; height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; color: #fff; font: 800 25px/1 var(--display); letter-spacing: .3px; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.logo-mark svg { width: 19px; height: 19px; }
.nav nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav nav a:not(.btn) { color: #c9d2ee; padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.nav nav a:not(.btn):hover { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
@media (max-width: 640px) { .nav nav a.opt { display: none; } .logo { font-size: 22px; } }

.site-footer { margin-top: 64px; background: var(--navy); color: #b8c1de; padding: 36px 0 28px; font-size: 14px; }
.site-footer a { color: #dfe5f8; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); font: 600 15px/1.2 var(--font);
  transition: transform .12s ease, filter .15s ease, background .15s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-lg { padding: 15px 24px; font-size: 17px; border-radius: 12px; }
.btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.btn-accent { background: var(--accent); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--surface-2); filter: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-wa { background: #25d366; color: #062b14; }
.icon { width: 18px; height: 18px; flex: none; }

label.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 5px; display: block; }
input[type=text], input[type=number], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-sm); padding: 11px 12px; font: 16px/1.4 var(--font);
}
textarea { resize: vertical; min-height: 180px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* ---------- tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--brand-soft); color: var(--brand); }
.badge.lime { background: var(--accent); color: var(--navy); }
.badge.gray { background: var(--surface-2); color: var(--muted); }

/* ---------- portada ---------- */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #2a3f9e 0%, transparent 60%), var(--navy); color: #fff; padding: 56px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 18px; color: #c4cdea; max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: #aeb8dc; font-size: 14px; }
.hero-points span::before { content: "✓ "; color: var(--accent); font-weight: 700; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 40px 0 48px; } }

/* mini cuadro decorativo */
.demo-bracket { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: center; transform: rotate(-2deg); }
.demo-col { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; height: 300px; }
.demo-m { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; padding: 6px 10px; font-size: 13px; backdrop-filter: blur(4px); }
.demo-m div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; color: #c8d0ec; }
.demo-m div b { color: #fff; }
.demo-m div.w { color: #fff; font-weight: 600; }
.demo-m div.w b { color: var(--accent); }
.demo-trophy { text-align: center; font: 800 20px var(--display); color: var(--accent); }
.demo-trophy svg { width: 54px; height: 54px; display: block; margin: 0 auto 6px; }
@media (max-width: 860px) { .demo-bracket { display: none; } }

.section { padding: 56px 0 8px; }
.section-head { max-width: 640px; margin-bottom: 26px; }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.format-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.format-card h3 { margin-top: 12px; }
.format-card p { color: var(--muted); font-size: 14px; margin: 0; }
.f-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.f-icon svg { width: 26px; height: 26px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; counter-reset: step; }
.step { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--navy); font: 800 19px var(--display); margin-bottom: 10px; }
.explore-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.comp-item { display: block; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: border-color .15s, transform .15s; }
.comp-item:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); }
.comp-item strong { display: block; font-size: 16px; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-item .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- publicidad ---------- */
.ad-slot { margin: 26px auto; text-align: center; min-height: 0; }
.ad-slot.placeholder { min-height: 100px; border: 1px dashed var(--line); border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--muted); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; background: repeating-linear-gradient(45deg, transparent 0 10px, var(--surface-2) 10px 20px); }
.ad-slot.side.placeholder { min-height: 600px; }
.ad-label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* ---------- crear ---------- */
.page-title { padding: 34px 0 10px; }
.create-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
@media (max-width: 900px) { .create-grid { grid-template-columns: minmax(0, 1fr); } .create-grid aside { position: static; } }
.create-grid aside { position: sticky; top: 76px; }
.step-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-title b { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--accent); display: grid; place-items: center; font: 800 16px var(--display); flex: none; }
@media (prefers-color-scheme: dark) { .step-title b { background: var(--accent); color: var(--navy); } }
.step-title h2 { margin: 0; font-size: 26px; }
.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.type-pick label { position: relative; cursor: pointer; }
.type-pick input { position: absolute; opacity: 0; }
.type-pick .opt-card { height: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 14px; transition: border-color .15s, background .15s; }
.type-pick .opt-card strong { display: block; margin: 8px 0 2px; }
.type-pick .opt-card small { color: var(--muted); display: block; line-height: 1.35; }
.type-pick .opt-card svg { width: 28px; height: 28px; color: var(--brand); }
.type-pick input:checked + .opt-card { border-color: var(--brand); background: var(--brand-soft); }
.type-pick input:focus-visible + .opt-card { outline: 3px solid var(--brand-soft); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }
.tb-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.tb-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tb-list li:last-child { border-bottom: 0; }
.tb-list li.off { opacity: .55; }
.tb-list .tb-n { width: 22px; text-align: center; font-weight: 700; color: var(--muted); }
.tb-list .tb-name { flex: 1; font-size: 14px; }
.tb-list button { border: 0; background: var(--surface-2); color: var(--ink); width: 30px; height: 30px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.tb-list button:disabled { opacity: .3; cursor: default; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 16px; font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.errors { background: #fdecec; color: #8e1b22; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px; }
@media (prefers-color-scheme: dark) { .errors { background: #3a1418; color: #ffc9cc; } }
.errors:empty { display: none; }

/* ---------- competición ---------- */
.comp-head { background: var(--navy); color: #fff; padding: 26px 0 0; }
.comp-head h1 { color: #fff; font-size: clamp(30px, 5vw, 46px); margin-bottom: 8px; word-break: break-word; }
.comp-head .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: #b8c2e3; font-size: 14px; }
.comp-head .badge { background: rgba(255, 255, 255, .1); color: #fff; }
.comp-head .badge.lime { background: var(--accent); color: var(--navy); }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.head-actions .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.head-actions .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.progress { height: 6px; background: rgba(255, 255, 255, .12); border-radius: 9px; overflow: hidden; margin-top: 18px; max-width: 360px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }
.champion { margin-top: 18px; display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(245, 179, 1, .25), rgba(245, 179, 1, .05)); border: 1px solid rgba(245, 179, 1, .45); }
.champion svg { width: 30px; height: 30px; color: var(--gold); }
.champion small { display: block; color: #f5d97a; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.champion strong { font: 800 24px/1 var(--display); }
.tabs { display: flex; gap: 2px; margin-top: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; background: transparent; color: #b8c2e3; padding: 12px 16px; font: 600 15px var(--font); cursor: pointer; border-radius: 10px 10px 0 0; }
.tabs button:hover { color: #fff; }
.tabs button[aria-selected=true] { background: var(--bg); color: var(--ink); }
.comp-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; padding-top: 22px; align-items: start; }
.comp-body > aside { position: sticky; top: 76px; }
@media (max-width: 1080px) { .comp-body { grid-template-columns: minmax(0, 1fr); } .comp-body > aside { display: none; } }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; background: var(--accent); color: var(--navy); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.save-state { font-weight: 500; font-size: 13px; }

/* tablas */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table.st { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.st th { text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.st td { text-align: center; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.st tr:last-child td { border-bottom: 0; }
table.st .tl { text-align: left; }
table.st .team { text-align: left; font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
table.st .pts { font-weight: 800; font-size: 15px; }
table.st td.pos { width: 40px; font-weight: 700; color: var(--muted); position: relative; }
table.st tr.q td.pos { color: var(--win); }
table.st tr.q td.pos::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--win); }
table.st tr.first td.pos { color: var(--gold); }
.form { display: inline-flex; gap: 3px; }
.form i { width: 18px; height: 18px; border-radius: 5px; font: 700 10px/18px var(--font); font-style: normal; color: #fff; }
.form i.W { background: var(--win); }
.form i.D { background: var(--draw); }
.form i.L { background: var(--loss); }
.form i.B { background: var(--brand); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--win); margin-right: 6px; vertical-align: -1px; }
.groups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 18px; }
.group-card h3 { display: flex; justify-content: space-between; align-items: baseline; }

/* partidos */
.round-block { margin-bottom: 22px; }
.round-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.round-head h3 { margin: 0; font-size: 21px; }
.match-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 34px; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.match:last-child { border-bottom: 0; }
.match .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match .t.a { text-align: right; }
.match .t.tbd { color: var(--muted); font-weight: 500; font-style: italic; }
.match .t.win { color: var(--win); }
.match .sc { display: flex; align-items: center; gap: 6px; font: 800 20px/1 var(--display); min-width: 74px; justify-content: center; font-variant-numeric: tabular-nums; }
.match .sc .vs { color: var(--muted); font-size: 15px; font-weight: 600; }
.match .sc input { width: 46px; height: 38px; text-align: center; padding: 4px; font: 700 18px var(--font); -moz-appearance: textfield; }
.match .sc input::-webkit-outer-spin-button, .match .sc input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.match .info { grid-column: 1 / -1; text-align: center; font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.match .info.warn { color: var(--danger); font-weight: 600; }
.match .more { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; }
.match .more:hover { background: var(--surface-2); color: var(--ink); }
.match.bye { color: var(--muted); }
.tiepick { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.tiepick button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; }
.tiepick button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 520px) { .match { gap: 6px; padding: 10px 8px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 28px; } .match .t { font-size: 14px; } .match .sc input { width: 40px; } }

/* cuadro */
.bracket-section { margin-bottom: 28px; }
.bracket-scroll { overflow-x: auto; padding-bottom: 8px; }
.bracket { position: relative; display: flex; gap: 46px; min-width: min-content; padding: 4px 2px; }
.bracket svg.lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.bracket svg.lines path { fill: none; stroke: var(--line); stroke-width: 2; }
.b-col { display: flex; flex-direction: column; width: 210px; flex: none; }
.b-col h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); text-align: center; white-space: nowrap; }
.b-col .b-matches { display: flex; flex-direction: column; justify-content: space-around; flex: 1; gap: 14px; }
.bm { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); font-size: 14px; }
.bm.click { cursor: pointer; }
.bm.click:hover { border-color: var(--brand); }
.bm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; height: 34px; }
.bm-row + .bm-row { border-top: 1px solid var(--line); }
.bm-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-row b { font-variant-numeric: tabular-nums; min-width: 18px; text-align: right; }
.bm-row.w { font-weight: 700; background: var(--win-soft); }
.bm-row.tbd span:first-child { color: var(--muted); font-style: italic; font-size: 13px; }
.bm-row.l { color: var(--muted); }
.bm.final { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 179, 1, .18), var(--shadow); }
.bm-tag { font-size: 11px; color: var(--muted); padding: 4px 10px 0; text-transform: uppercase; letter-spacing: .5px; }

/* carreras (estilo F1) */
table.race-matrix th.rh { min-width: 34px; padding: 10px 4px; }
table.race-matrix th.rh sup { font-size: 9px; color: var(--brand); }
.rc { font-weight: 700; font-size: 13px; min-width: 32px; padding: 0 !important; height: 38px; }
td.rc, i.rc { background-clip: padding-box; }
.rc.p1 { background: #f8dc6c; color: #4a3500; }
.rc.p2 { background: #dfe3ea; color: #2b3240; }
.rc.p3 { background: #efc196; color: #4b2a0b; }
.rc.ppts { background: var(--win-soft); color: var(--win); }
.rc.p0 { color: var(--muted); }
.rc.dnf { background: #fde3e4; color: var(--loss); }
.rc.dns { color: var(--muted); font-weight: 400; }
.rc.pend { background: repeating-linear-gradient(45deg, transparent 0 5px, var(--surface-2) 5px 10px); }
.rc.fl { box-shadow: inset 0 -3px 0 #9b4dff; }
.rc.drop { opacity: .45; text-decoration: line-through; }
@media (prefers-color-scheme: dark) {
  .rc.p1 { background: #5c4a0c; color: #ffe27a; }
  .rc.p2 { background: #3a4150; color: #e6e9f0; }
  .rc.p3 { background: #5a3418; color: #ffc896; }
  .rc.dnf { background: #3a1418; }
}
.race-legend { align-items: center; gap: 6px 10px; }
.race-legend span::before { display: none; }
.race-legend i.rc { display: inline-grid; place-items: center; width: 26px; height: 22px; border-radius: 5px; font-style: normal; font-size: 11px; min-width: 0; }
.race-card { padding: 16px 18px; }
.race-card.next { border-color: var(--brand); }
.race-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.race-head strong { font-size: 16px; }
.race-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--navy); color: var(--accent); font: 800 15px var(--display); margin-right: 8px; vertical-align: 1px; }
@media (prefers-color-scheme: dark) { .race-n { background: var(--accent); color: var(--navy); } }
.race-res { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); columns: 2 260px; column-gap: 24px; }
.race-res li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-size: 14px; }
.race-res .rp { width: 28px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--surface-2); flex: none; }
.race-res .rp.p1 { background: #f8dc6c; color: #4a3500; }
.race-res .rp.p2 { background: #dfe3ea; color: #2b3240; }
.race-res .rp.p3 { background: #efc196; color: #4b2a0b; }
.race-res li.dnf { color: var(--muted); }
.race-res li.dnf .rp { color: var(--loss); }
.race-res .rn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.race-res b { font-variant-numeric: tabular-nums; }
.race-res .flb { color: #9b4dff; }
.race-res.editing { columns: auto; margin-top: 0; }
.race-res .x { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 28px; height: 28px; border-radius: 6px; }
.race-res .x:hover { background: var(--surface-2); color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 99px; padding: 8px 14px; font: 600 14px var(--font); cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.modal-box:has(#rBoard) { max-width: 560px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5, 10, 25, .55); }
.modal-box { width: 100%; max-width: 440px; background: var(--surface); border-radius: 16px; box-shadow: 0 24px 80px rgba(0, 0, 0, .35); padding: 22px; max-height: 90vh; overflow: auto; animation: pop .16s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal-box h3 { margin-bottom: 14px; }
.score-edit { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 16px; }
.score-edit .name { font-weight: 600; text-align: center; font-size: 14px; overflow-wrap: anywhere; }
.score-edit input { text-align: center; font: 800 26px var(--display); height: 56px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 11px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); z-index: 90; font-size: 14px; max-width: calc(100% - 32px); animation: pop .16s ease-out; }

/* páginas de texto */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose li { margin-bottom: 6px; }
.list-mine { display: grid; gap: 10px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.logo .lg-2 { color: var(--accent); }
