/* HT Tribuna · estética oscura tipo app de resultados deportivos */
:root {
  color-scheme: dark;
  --bg: #0A0E13;
  --bg-2: #0E141B;
  --surface: #131A23;
  --surface-2: #19222D;
  --surface-3: #212C39;
  --line: #243041;
  --text: #EAF0F6;
  --muted: #8B9AAD;
  --accent: #2BD67B;
  --accent-ink: #04261A;
  --live: #FF4D5E;
  --gold: #FFC24B;
  --home: #2BD67B;
  --away: #5AA9FF;
  --c-home: var(--home);
  --c-away: var(--away);
  --c-draw: #7D8A9A;
  --radius: 14px;
  --font: Manrope, "Segoe UI", system-ui, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1 { font: 700 2.3rem/1.05 var(--display); margin: .1rem 0 0; letter-spacing: .01em; }
h2 { font: 600 1rem/1.3 var(--font); margin: 0 0 .8rem; color: var(--text); }
h2 .sub { color: var(--muted); font-weight: 500; }
h3 { font: 700 1.25rem/1.2 var(--display); margin: 0; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1rem 0 .4rem; }
code { background: var(--surface-3); padding: .1rem .35rem; border-radius: 5px; font-size: .9em; }
.eyebrow { margin: 0; color: var(--accent); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.hint { color: var(--muted); font-size: .85rem; }
.empty { color: var(--muted); }
.error { color: #FF8A95; }

/* ---------- Estructura con menú lateral ---------- */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--line); padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: 1.2rem; }
.brand { display: flex; align-items: center; gap: .5rem; font: 700 1.45rem var(--display); text-decoration: none; letter-spacing: .02em; }
.brand-mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 1rem; }
.side-nav { display: grid; gap: .15rem; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; }
.side-nav a:hover { background: var(--surface); color: var(--text); }
.side-nav a.active { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.side-nav .ico { width: 1.2rem; text-align: center; }
.live-dot { display: inline-block; width: .55rem !important; height: .55rem; margin: 0 .32rem; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgba(255, 77, 94, .2); }
.side-follow h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: .5rem; }
#side-matches { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
#side-matches li a { display: grid; gap: .1rem; padding: .5rem .6rem; border-radius: 10px; background: var(--surface); border: 1px solid transparent; text-decoration: none; font-size: .82rem; }
#side-matches li a:hover { border-color: var(--line); }
#side-matches li.active a { border-color: var(--accent); }
#side-matches li.mine a { box-shadow: inset 3px 0 0 var(--gold); }
.side-row { display: flex; justify-content: space-between; gap: .5rem; }
.side-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-row b { font: 700 1rem var(--display); }
.side-status .badge { font-size: .66rem; padding: .05rem .4rem; }
.side-empty { color: var(--muted); font-size: .85rem; }
.side-foot { margin-top: auto; color: var(--muted); font-size: .72rem; }
.content { padding: 1.6rem clamp(1rem, 3vw, 2.4rem) 3rem; max-width: 1180px; width: 100%; }
.mobile-bar { display: none; }
.backdrop { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .mobile-bar { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; background: var(--bg-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .menu-btn { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; width: 2.4rem; height: 2.4rem; font-size: 1.1rem; cursor: pointer; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; }
  .nav-open .sidebar { transform: none; }
  .nav-open .backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .55); }
}

/* ---------- Elementos comunes ---------- */
.demo-banner { margin: 0 0 1rem; padding: .45rem .9rem; border-radius: 10px; font-size: .82rem; font-weight: 600; background: rgba(255, 194, 75, .12); color: var(--gold); border: 1px solid rgba(255, 194, 75, .3); }
.flash { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: .6rem .9rem; border-radius: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 0 0 1rem; }
.block { margin: 1.6rem 0; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.count { color: var(--muted); font: 600 1.3rem var(--display); }
.back { margin: 0 0 .8rem; }
.back a { color: var(--muted); text-decoration: none; font-weight: 600; }
.back a:hover { color: var(--text); }

.btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 10px; padding: .65rem 1.1rem; font: 700 .95rem var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.small { padding: .4rem .8rem; font-size: .85rem; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.link:hover { color: var(--live); }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .5rem; border-radius: 999px; font: 700 .72rem var(--font); letter-spacing: .03em; white-space: nowrap; }
.badge-live { background: rgba(255, 77, 94, .14); color: var(--live); }
.badge-live i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--live); animation: pulse 1.4s infinite; }
.badge-done { background: var(--surface-3); color: var(--muted); }
.badge-soon { background: rgba(90, 169, 255, .12); color: var(--away); }
.tag { font-size: .7rem; font-weight: 700; color: var(--gold); }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes goal { 0%, 100% { box-shadow: 0 0 0 0 rgba(43, 214, 123, 0); } 50% { box-shadow: 0 0 0 4px rgba(43, 214, 123, .55); } }
.goal-flash { animation: goal 1.2s ease-in-out 6; }

.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: .2rem; }
.segmented button { background: none; border: 0; color: var(--muted); padding: .45rem .85rem; border-radius: 8px; font: 600 .85rem var(--font); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }

.alerts-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.chip { background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .38rem .85rem; font: 600 .82rem var(--font); cursor: pointer; }
.chip[aria-pressed="true"] { color: var(--accent); border-color: rgba(43, 214, 123, .5); background: rgba(43, 214, 123, .1); }
.refresh { margin-left: auto; color: var(--muted); font-size: .78rem; }

.add-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1.2rem; }
.add-form label { color: var(--muted); font-size: .85rem; margin-right: .3rem; }
.add-form input { width: 13rem; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }

/* ---------- Portada ---------- */
.welcome { padding: 4rem 0; max-width: 38rem; }
.welcome h1 { font-size: clamp(2.6rem, 6vw, 3.6rem); margin: .4rem 0 1rem; }
.welcome p { color: var(--muted); font-size: 1.05rem; }
.sugg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.sugg { background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.sugg-date { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
.sugg-teams { margin: 0; font: 700 1.3rem/1.2 var(--display); display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; }
.sugg-teams .vs { color: var(--muted); font-size: .9rem; margin: 0 .15rem; }
.pos { font: 700 .72rem var(--font); background: var(--surface-3); color: var(--muted); padding: .05rem .35rem; border-radius: 6px; }
.sugg-reasons { margin: 0; padding: 0; list-style: none; display: grid; gap: .25rem; font-size: .85rem; color: var(--muted); flex: 1; }
.sugg-reasons li::before { content: "› "; color: var(--accent); font-weight: 700; }
.sugg form { margin: 0; }
.fixtures { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fixture { display: grid; grid-template-columns: 6.5rem 7rem 1fr auto; gap: .9rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.fixture:last-child { border-bottom: 0; }
.fixture .date { color: var(--muted); font-size: .85rem; }
.fixture form { margin: 0; }
@media (max-width: 640px) { .fixture { grid-template-columns: auto 1fr; } .fixture .teams { grid-column: 1 / -1; } }

/* ---------- En directo: tarjetas ---------- */
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.mcard.mine { border-color: rgba(255, 194, 75, .55); }
.mcard-link { display: block; padding: .9rem 1.1rem .6rem; text-decoration: none; }
.mcard-link:hover { background: var(--surface-2); }
.mcard-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.mcard-head .pmini, .mcard-head .pmini-none { margin-left: auto; }
.mrow { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .12rem 0; color: var(--muted); }
.mrow.lead { color: var(--text); }
.mteam { font-weight: 700; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgoals { font: 700 1.7rem/1 var(--display); min-width: 1.4ch; text-align: right; }
.tl-slot { padding: .2rem 1.1rem 0; }
.last { margin: 0; padding: .45rem 1.1rem; font-size: .82rem; color: var(--muted); min-height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mcard-foot { margin: auto 0 0; display: flex; justify-content: space-between; padding: .6rem 1.1rem; border-top: 1px solid var(--line); font-size: .82rem; }
.mcard-foot a { color: var(--accent); text-decoration: none; font-weight: 700; }

/* ---------- En directo: tabla ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mtable { width: 100%; border-collapse: collapse; font-size: .88rem; }
.mtable th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: .7rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mtable td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mtable tr:last-child td { border-bottom: 0; }
.mtable tbody tr:hover { background: var(--surface-2); }
.mtable tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.mtable a { text-decoration: none; }
.t-home { text-align: right !important; font-weight: 700; white-space: nowrap; }
.t-away { font-weight: 700; white-space: nowrap; }
.t-score { text-align: center !important; font: 700 1.25rem var(--display); white-space: nowrap; }
.t-last { color: var(--muted); min-width: 16rem; max-width: 26rem; }

/* Mini barra de pronóstico */
.pmini { display: inline-flex; flex-direction: column; gap: .15rem; min-width: 6.5rem; }
.pmini-bar { display: flex; height: .4rem; border-radius: 999px; overflow: hidden; gap: 2px; }
.pmini-bar .ph { background: var(--c-home); } .pmini-bar .pd { background: var(--c-draw); } .pmini-bar .pa { background: var(--c-away); }
.pmini-txt { font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pmini-none { color: var(--muted); font-size: .8rem; }

/* ---------- Línea de tiempo ---------- */
.timeline { display: grid; gap: .1rem; font-size: .72rem; color: var(--muted); }
.tl-team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-track { position: relative; height: 3.4rem; }
.tl-line, .tl-progress { position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; }
.tl-line { right: 0; background: var(--line); }
.tl-progress { background: var(--accent); box-shadow: 0 0 8px rgba(43, 214, 123, .5); }
.tl-track { margin-bottom: 1.1rem; }
.tl-mark { position: absolute; top: calc(100% + 3px); transform: translateX(-50%); font-size: .65rem; }
.tl-mark:first-of-type { transform: none; }
.tl-mark.end { transform: translateX(-100%); }
.mcard .tl-team { display: none; }
.tl-icon { position: absolute; transform: translateX(-50%); font-size: .9rem; line-height: 1; cursor: default; }
.tl-icon.home { top: 0; }
.tl-icon.away { bottom: 0; }

/* ---------- Página de partido ---------- */
.hero { position: relative; border-radius: 18px; padding: 1.4rem 1.2rem 1rem; margin-bottom: 1rem; border: 1px solid var(--line); text-align: center;
  background: radial-gradient(120% 140% at 50% 0%, rgba(43, 214, 123, .14), transparent 60%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.hero-status { min-height: 1.4rem; }
.hero-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.2rem; margin: .6rem 0; }
.hero-team { font: 700 clamp(1.2rem, 2.6vw, 1.8rem)/1.1 var(--display); }
.hero-team.home { text-align: right; }
.hero-team.away { text-align: left; }
.hero-digits { font: 700 clamp(3rem, 8vw, 4.6rem)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.hero-digits .sep { color: var(--muted); margin: 0 .2em; }
.mini-pred { margin: 0; font-size: .82rem; color: var(--muted); }
.mini-pred:empty { display: none; }

.tabs { display: flex; gap: .3rem; overflow-x: auto; margin: 0 0 1rem; padding: .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; scrollbar-width: thin; }
.tabs button { background: none; border: 0; color: var(--muted); padding: .5rem .9rem; border-radius: 9px; font: 600 .88rem var(--font); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); }

.events { list-style: none; margin: 0; padding: 0; max-height: 34rem; overflow-y: auto; }
.events li { display: grid; grid-template-columns: 2.8rem 1.6rem 1fr; gap: .5rem; padding: .55rem .2rem; border-bottom: 1px solid var(--line); }
.events li:last-child { border-bottom: 0; }
.events .min { font: 700 1rem var(--display); color: var(--accent); }
.events li.away .min { color: var(--away); }
.events li.neutral .min { color: var(--muted); }
.events li.cat-goal { background: linear-gradient(90deg, rgba(43, 214, 123, .12), transparent); border-radius: 8px; }
.events li.cat-goal .txt { font-weight: 700; }
.events li.cat-other .txt, .events li.cat-miss .txt { color: var(--muted); }

/* ---------- Predicción ---------- */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 0 0 1rem; }
.pcard.pre { border-color: rgba(255, 194, 75, .55); background: linear-gradient(160deg, rgba(255, 194, 75, .08), var(--surface) 45%); }
.seal { margin: 0 0 .8rem; font: 700 1.05rem var(--display); letter-spacing: .02em; }
.pcard.pre .seal { color: var(--gold); }
.pcard.live .seal { color: var(--live); }
.pbar { display: flex; gap: 3px; height: 2.2rem; border-radius: 10px; overflow: hidden; font: 700 1rem var(--display); }
.pbar span { display: flex; align-items: center; justify-content: center; color: #071018; min-width: 4px; }
.pbar .ph { background: var(--c-home); } .pbar .pd { background: var(--c-draw); color: var(--text); } .pbar .pa { background: var(--c-away); }
.plegend { display: flex; justify-content: space-between; gap: .5rem; font-size: .82rem; color: var(--muted); margin: .4rem 0 .7rem; }
.plegend span:nth-child(2) { text-align: center; } .plegend span:last-child { text-align: right; }
.pscores { margin: .25rem 0; font-size: .9rem; }
.pnotes { margin: .8rem 0; padding-left: 1.1rem; color: var(--muted); }
.pnotes li { margin: .25rem 0; }
.rel { font-size: .85rem; margin: .5rem 0; font-weight: 600; }
.rel-alta { color: var(--accent); } .rel-media { color: var(--gold); } .rel-baja { color: #FF8A95; }
details summary { cursor: pointer; color: var(--muted); font-size: .85rem; font-weight: 600; }
.used { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem 1.5rem; font-size: .82rem; color: var(--muted); }
.used ul { margin: 0; padding-left: 1rem; }
.deltas { list-style: none; padding: 0; margin: .5rem 0 .7rem; display: grid; gap: .25rem; }
.up { color: var(--accent); font-weight: 700; } .down { color: #FF8A95; font-weight: 700; } .same { color: var(--muted); }
.pcompare { margin: .7rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: var(--surface-2); }
.pcompare.ok { box-shadow: inset 3px 0 0 var(--accent); } .pcompare.ko { box-shadow: inset 3px 0 0 var(--live); }
.pchart { width: 100%; height: auto; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pchart .grid { stroke: var(--line); stroke-width: 1; }
.pchart .axis { fill: var(--muted); font: 11px var(--font); }
.pchart .mark { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; opacity: .6; }
.pchart text { font-size: 13px; }
.pchart .pl { fill: none; stroke-width: 2.6; stroke-linejoin: round; }
.pchart .ref { stroke-width: 1.4; stroke-dasharray: 6 5; opacity: .5; }
.pchart .c-home { stroke: var(--c-home); } .pchart .c-draw { stroke: var(--c-draw); } .pchart .c-away { stroke: var(--c-away); }
.chart-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .8rem; color: var(--muted); margin: .5rem 0; }
.chart-legend .k::before { content: ""; display: inline-block; width: 1.2em; height: 3px; margin-right: .35em; vertical-align: middle; background: currentColor; border-radius: 2px; }
.chart-legend .k.c-home { color: var(--c-home); } .chart-legend .k.c-draw { color: var(--c-draw); } .chart-legend .k.c-away { color: var(--c-away); }
#pred h3 { margin: 1.4rem 0 .6rem; }

/* ---------- Alineaciones ---------- */
.pitch-card { padding: 1rem; }
.pitch-legend { display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; font-size: .9rem; margin-bottom: .6rem; }
.pitch-legend > span { display: inline-flex; align-items: center; gap: .45rem; }
.team-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; flex: none; }
.team-dot.home { background: var(--home); } .team-dot.away { background: var(--away); }
.pitch-wrap { overflow-x: auto; }
.pitch { width: 100%; min-width: 560px; height: auto; display: block; border-radius: 12px; }
.pitch .s1 { fill: #0F3A28; } .pitch .s2 { fill: #124330; }
.pitch .lines rect, .pitch .lines line, .pitch .lines circle, .pitch .lines path { fill: none; stroke: rgba(255, 255, 255, .38); stroke-width: 2.5; }
.pitch .lines .dot { fill: rgba(255, 255, 255, .5); stroke: none; }
.pitch .pl circle { stroke: rgba(0, 0, 0, .45); stroke-width: 3; }
.pitch .pl.home circle { fill: var(--home); } .pitch .pl.away circle { fill: var(--away); }
.pitch .pl text { text-anchor: middle; font-family: var(--font); }
.pitch .pl-in { font-size: 20px; font-weight: 800; fill: #071018; }
.pitch .pl-name { font-size: 17px; font-weight: 700; fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, .7); stroke-width: 4px; }
.pitch .pl-badges { font-size: 16px; }
.pitch .pl.off { opacity: .35; }
.lineup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.lineup header { display: flex; align-items: center; gap: .55rem; margin-bottom: .6rem; }
.lineup .formation { margin-left: auto; font: 700 1.1rem var(--display); color: var(--muted); }
.spec-row { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.spec-chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 600; background: var(--surface-3); border-radius: 999px; padding: .1rem .5rem; white-space: nowrap; }
.lineup-list, .bench { list-style: none; margin: 0; padding: 0; }
.lineup-list li { display: grid; grid-template-columns: 8.5rem 1fr auto auto; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.lineup-list li.off { opacity: .45; text-decoration: line-through; }
.lpos { color: var(--muted); font-size: .78rem; }
.lname { font-weight: 600; }
.entered { display: block; font-weight: 500; font-size: .75rem; color: var(--accent); }
.bench li { display: flex; justify-content: space-between; gap: .5rem; padding: .3rem 0; font-size: .85rem; color: var(--muted); }
@media (max-width: 520px) { .lineup-list li { grid-template-columns: 1fr auto; } .lpos { grid-column: 1 / -1; } }

/* ---------- Ajustes ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.settings-grid .card { margin: 0; }
.settings-grid .wide { grid-column: 1 / -1; }
.settings-grid h2 + .hint { margin-top: -.4rem; }
.check { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
.range { display: grid; grid-template-columns: 1fr auto; gap: .3rem .8rem; align-items: center; margin-bottom: 1rem; font-size: .9rem; }
.range input { grid-column: 1; accent-color: var(--accent); }
.range output { grid-row: 2; grid-column: 2; color: var(--muted); font-variant-numeric: tabular-nums; }
.test-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.files { padding-left: 1.1rem; color: var(--muted); }
.files li { margin: .3rem 0; }

/* ---------- Escudos ---------- */
.crest { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.6rem; height: 1.6rem; vertical-align: middle; }
.crest img, .crest svg { width: 100%; height: 100%; object-fit: contain; }
.crest.xs { width: 1.05rem; height: 1.05rem; }
.crest.sm { width: 1.3rem; height: 1.3rem; }
.crest.xl { width: clamp(2.6rem, 6vw, 4rem); height: clamp(2.6rem, 6vw, 4rem); }
.mrow { justify-content: flex-start; }
.mrow .mgoals { margin-left: auto; }
.side-row { align-items: center; justify-content: flex-start; }
.side-row span:not(.crest) { flex: 1; }
.sugg-teams .crest { width: 1.4rem; height: 1.4rem; align-self: center; }
.fixture .teams { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.fixture .crest { width: 1.3rem; height: 1.3rem; }
.hero-side { display: flex; align-items: center; gap: .8rem; }
.hero-side.home { justify-content: flex-end; text-align: right; }
.hero-side.away { justify-content: flex-start; text-align: left; }
@media (max-width: 640px) { .hero-side { flex-direction: column-reverse; gap: .4rem; } .hero-side.away { flex-direction: column; } .hero-side.home, .hero-side.away { text-align: center; } }
.pitch-legend .crest, .lineup header .crest { width: 1.5rem; height: 1.5rem; }
.spec-img { width: 1.1em; height: 1.1em; object-fit: contain; vertical-align: -0.15em; }
.spec-legend .spec-chip { margin: .15rem 0; }

/* ---------- Ajustes: archivos y voz ---------- */
.field { display: grid; gap: .3rem; margin: .7rem 0; font-size: .9rem; color: var(--muted); }
.field input, .field select, .field textarea { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; font: inherit; }
.field textarea { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.res-list { list-style: none; margin: .6rem 0; padding: 0; }
.res-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.res-list li:last-child { border-bottom: 0; }
.res-list b.ok { color: var(--accent); } .res-list b.muted { color: var(--muted); font-weight: 600; }
.res-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
.upload input[type="file"] { color: var(--muted); font-size: .82rem; max-width: 15rem; }
.upload input[type="file"]::file-selector-button { background: var(--surface-3); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .7rem; margin-right: .5rem; cursor: pointer; font: 600 .8rem var(--font); }
.res-list + .upload, .card > .upload { margin-top: .8rem; }
.spec-grid { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.spec-grid li { display: grid; gap: .5rem; justify-items: start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; }
.spec-preview { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; background: var(--bg-2); font-size: 1.4rem; }
.spec-preview img { width: 2rem; height: 2rem; object-fit: contain; }

/* ---------- Diagnóstico ---------- */
.side-foot a { color: var(--muted); }
.side-foot a:hover { color: var(--text); }
.presets { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .6rem; }
.diag-form { max-width: 40rem; }
.diag-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.xml { margin: 0; max-height: 34rem; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: .9rem; font: .8rem/1.5 ui-monospace, Consolas, monospace; white-space: pre; color: #C9D6E3; }
.err-list { list-style: none; margin: 0; padding: 0; }
.err-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.err-list li:last-child { border-bottom: 0; }

/* ---------- Mosaico ---------- */
.mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: .6rem; }
.tile { display: grid; gap: .35rem; justify-items: center; text-align: center; padding: .7rem .5rem .6rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.tile:hover { border-color: var(--accent); background: var(--surface-2); }
.tile.mine { border-color: rgba(255, 194, 75, .6); }
.tile-score { display: flex; align-items: center; gap: .4rem; font: 700 1.7rem/1 var(--display); }
.tile-score i { color: var(--muted); font-style: normal; font-size: 1.2rem; }
.tile-score .crest { width: 1.5rem; height: 1.5rem; }
.tile-names { display: grid; width: 100%; font-size: .72rem; color: var(--muted); }
.tile-names span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Varios ---------- */
.hero-meta { margin: 0 0 .5rem; font-size: .82rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.hero-meta:empty { display: none; }
.segmented a { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); padding: .45rem .85rem; border-radius: 8px; font: 600 .85rem var(--font); text-decoration: none; }
.segmented a[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.segmented label { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .85rem; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.segmented label:has(input:checked) { background: var(--surface-3); }
.segmented label input { accent-color: var(--accent); }
.report-form { display: grid; gap: .6rem; max-width: 44rem; }
.report-form .segmented { justify-self: start; }
.steps { display: grid; gap: .6rem; padding-left: 0; list-style: none; }
.report header { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.report-text { white-space: pre-wrap; margin: .3rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
h2.mt { margin-top: 1.2rem; }
.page-head .segmented { flex-wrap: wrap; }

/* ---------- Selector de idioma ---------- */
.lang-switch { display: flex; gap: .25rem; margin-top: auto; }
.lang-switch a { flex: 1; text-align: center; padding: .35rem 0; border-radius: 8px; font: 700 .75rem var(--font); letter-spacing: .05em; color: var(--muted); text-decoration: none; border: 1px solid var(--line); }
.lang-switch a:hover { color: var(--text); border-color: var(--muted); }
.lang-switch a[aria-current="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.lang-switch + .side-foot { margin-top: .4rem; }

/* ---------- Estadísticas, especialistas, tabla e historial ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; }
.stats-grid .card { margin: 0; }
.stats-grid + .card { margin-top: 1rem; }
.cmp-head { display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; font-size: .88rem; margin: -.2rem 0 .4rem; }
.cmp-head span { display: inline-flex; align-items: center; gap: .4rem; }
.cmp-row { display: grid; grid-template-columns: minmax(4.5rem, auto) 1fr 1fr minmax(4.5rem, auto); gap: .15rem .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.cmp-row:last-of-type { border-bottom: 0; }
.cmp-row.total { font-weight: 700; }
.cmp-label { grid-column: 1 / -1; grid-row: 1; text-align: center; font-size: .76rem; color: var(--muted); }
.cmp-v { font-variant-numeric: tabular-nums; }
.cmp-v.a { text-align: right; }
.cmp-v.best { color: var(--accent); font-weight: 700; }
.cmp-v .g { color: var(--muted); font-size: .8rem; font-weight: 500; }
.cmp-bar { display: flex; justify-content: flex-end; height: .45rem; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.cmp-bar.right { justify-content: flex-start; }
.cmp-bar i { display: block; height: 100%; border-radius: 999px; }
.cmp-bar i.h { background: var(--home); } .cmp-bar i.a { background: var(--away); }
.cmp-row.spec .cmp-v { font-size: .85rem; }
.ratings-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.2fr); gap: 1.2rem; align-items: start; }
@media (max-width: 760px) { .ratings-grid { grid-template-columns: 1fr; } }
.radar { width: 100%; height: auto; display: block; }
.radar .rgrid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar .rh { fill: rgba(43, 214, 123, .22); stroke: var(--home); stroke-width: 2.5; stroke-linejoin: round; }
.radar .ra { fill: rgba(90, 169, 255, .22); stroke: var(--away); stroke-width: 2.5; stroke-linejoin: round; }
.radar text { fill: var(--muted); font: 600 12px var(--font); }
.poss { display: grid; grid-template-columns: 3rem 1fr 3rem; gap: .15rem .5rem; align-items: center; padding: .35rem 0; font-variant-numeric: tabular-nums; }
.poss span:nth-child(3) { text-align: right; }
.poss .cmp-label { grid-column: 1 / -1; grid-row: 1; }
.poss-bar { display: flex; gap: 2px; height: .5rem; border-radius: 999px; overflow: hidden; }
.poss-bar i.h { background: var(--home); } .poss-bar i.a { background: var(--away); }
.mtable.league td, .mtable.league th { text-align: center; }
.mtable.league .tb-team, .mtable.league th:nth-child(2) { text-align: left; white-space: nowrap; }
.mtable.league tr.playing td { background: rgba(43, 214, 123, .08); font-weight: 700; }
.mtable.league tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.tb-live { white-space: nowrap; }
.round-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.round-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.round-list li a { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; }
.round-list li.playing a { color: var(--accent); font-weight: 700; }
.h2h-summary { font-weight: 600; margin: 0 0 .6rem; }
.h2h-list { list-style: none; margin: 0; padding: 0; }
.h2h-list li { display: grid; gap: .15rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.h2h-list li:last-child { border-bottom: 0; }
.h2h-score { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-weight: 600; }

/* ---------- Encabezado en tres renglones, música y etiquetas en vivo ---------- */
.hero-meta { display: grid; gap: .15rem; margin: .4rem 0 .6rem; font-size: .86rem; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.hero-meta p { margin: 0; }
.hero-meta p:empty { display: none; }
.music-ctl { display: grid; gap: .45rem; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-top: auto; }
.music-ctl + .lang-switch { margin-top: .6rem; }
.music-btn { display: flex; align-items: center; gap: .5rem; background: none; border: 0; color: var(--muted); font: 700 .85rem var(--font); cursor: pointer; padding: 0; text-align: left; }
.music-btn[aria-pressed="true"] { color: var(--accent); }
.music-ctl input[type="range"] { width: 100%; accent-color: var(--accent); }
.music-ctl input[type="range"]:disabled { opacity: .4; }
.music-mini { margin-left: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; width: 2.4rem; height: 2.4rem; font-size: 1.05rem; cursor: pointer; opacity: .55; }
.music-mini[aria-pressed="true"] { opacity: 1; border-color: var(--accent); }
.live-tag { display: inline-flex; align-items: center; gap: .3rem; margin-left: .35rem; padding: .05rem .45rem; border-radius: 999px; background: rgba(255, 77, 94, .15); color: var(--live); font: 800 .66rem var(--font); letter-spacing: .06em; vertical-align: middle; }
.live-tag::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: var(--live); animation: pulse 1.4s infinite; }
.tb-delta { font-size: .72rem; color: var(--accent); font-weight: 700; margin-left: .2rem; }
.mtable.league td:first-child { white-space: nowrap; }
.rl-tags { display: inline-flex; align-items: center; gap: .5rem; margin-left: auto; }
.upload input[type="text"] { width: 15rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--text); font: inherit; }
.now-block h2 { display: flex; align-items: center; gap: .4rem; }
.sugg.now { border-color: rgba(255, 77, 94, .35); }
.sugg.now .vs { font: 700 1.1rem var(--display); color: var(--text); margin: 0 .3rem; }

/* ---------- Buscador del menú lateral ---------- */
.side-search { display: grid; grid-template-columns: 1fr auto; gap: .35rem; }
.side-search input[name="q"] { min-width: 0; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; }
.side-search .btn { padding: .4rem .6rem; }
.check.small { font-size: .75rem; color: var(--muted); padding: 0; gap: .4rem; grid-column: 1 / -1; }
.check.small input { width: .9rem; height: .9rem; }
.add-form .check.small { grid-column: auto; }

/* ---------- Nota Tribuna ---------- */
.note { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; padding: .1rem .45rem; border-radius: 999px; font: 800 .8rem var(--font); font-variant-numeric: tabular-nums; color: #071018; }
.n-top { background: #2BD67B; } .n-good { background: #9BE15D; } .n-mid { background: #FFC24B; } .n-low { background: #FF6B6B; }
.pitch .pl-note rect { stroke: rgba(0, 0, 0, .5); stroke-width: 2; }
.pitch .pl-note.n-top rect { fill: #2BD67B; } .pitch .pl-note.n-good rect { fill: #9BE15D; }
.pitch .pl-note.n-mid rect { fill: #FFC24B; } .pitch .pl-note.n-low rect { fill: #FF6B6B; }
.pitch .pl-note text { font: 800 13px var(--font); fill: #071018; text-anchor: middle; }
.lineup-list li { grid-template-columns: 8.5rem 1fr auto auto 2.8rem; }
.lnote { justify-self: end; }
@media (max-width: 520px) { .lineup-list li { grid-template-columns: 1fr auto auto; } }
.figure { display: grid; gap: .3rem; background: linear-gradient(160deg, rgba(255, 194, 75, .12), var(--surface) 55%); border-color: rgba(255, 194, 75, .45); }
.figure p { margin: 0; }
.figure-title { color: var(--gold); font: 700 1.05rem var(--display); }
.figure-name { display: flex; align-items: center; gap: .5rem; font: 700 1.5rem var(--display); }
.figure-each { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; font-size: .88rem; color: var(--muted); }
.figure-each span { display: inline-flex; align-items: center; gap: .4rem; }
.figure-each b { color: var(--text); }
