/*
 * app.css — Estilo de PCSoccer: estética de retransmisión deportiva nocturna.
 * Fondo casi negro con verde césped como acento; tipografía condensada
 * (Barlow Condensed) para marcadores y titulares, Inter para datos.
 * Tema claro disponible por prefers-color-scheme; el visor de partido es
 * siempre oscuro (como una retransmisión) a propósito.
 */
:root {
  --bg: #0b0f0d; --bg2: #111814; --panel: #151e19; --panel2: #1b2620; --line: #26352d;
  --text: #e8f0ea; --muted: #8fa396; --accent: #2fd27a; --accent2: #b6f24a; --warn: #ffb020; --bad: #ff5a5a; --blue: #4aa8ff;
  --radius: 10px; --shadow: 0 8px 30px rgba(0,0,0,.35);
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif; --sans: 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef2ef; --bg2: #e3e9e5; --panel: #ffffff; --panel2: #f3f6f4; --line: #d4ddd7;
    --text: #0f1a14; --muted: #5a6b61; --accent: #0f9d58; --accent2: #5a8f00; --shadow: 0 6px 20px rgba(0,0,0,.08);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
h1, h2, h3 { font-family: var(--cond); letter-spacing: .02em; margin: 0 0 .5em; line-height: 1.1; }
h1 { font-size: 34px; } h2 { font-size: 24px; } h3 { font-size: 18px; text-transform: uppercase; color: var(--muted); }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); padding: 8px 14px; border-radius: 8px; font-weight: 600; transition: .15s; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #04140a; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.big { font-family: var(--cond); font-size: 20px; padding: 12px 22px; letter-spacing: .04em; text-transform: uppercase; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn.on { background: var(--accent); color: #04140a; border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Layout principal: ver «CARCASA RESPONSIVA» al final del archivo ── */

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.kpi { font-family: var(--cond); font-size: 30px; font-weight: 700; }
.kpi small { font-size: 14px; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.muted { color: var(--muted); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tag.live { background: var(--bad); color: #fff; border-color: var(--bad); }
.tag.green { color: var(--accent); border-color: var(--accent); }
.crest { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px 7px 12px 12px; font: 700 11px var(--cond); color: #fff; border: 2px solid rgba(255,255,255,.25); flex: none; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.crest.lg { width: 56px; height: 60px; font-size: 20px; border-radius: 10px 10px 26px 26px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }

/* Próximo partido */
.next-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; text-align: center; padding: 10px 0; }
.next-match .team { display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--cond); font-size: 22px; font-weight: 700; }
.next-match .vs { font-family: var(--cond); font-size: 40px; color: var(--muted); }
.modes { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.mode-btn { border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 10px; padding: 10px 14px; min-width: 120px; text-align: left; }
.mode-btn b { display: block; font-family: var(--cond); font-size: 18px; }
.mode-btn span { font-size: 12px; color: var(--muted); }
.mode-btn.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* Tablas */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; font-weight: 700; position: sticky; top: 0; background: var(--panel); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.me td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
tr.promo td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.releg td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--panel2); }
.scroll { overflow: auto; max-height: 70vh; }
.form-dots { display: inline-flex; gap: 3px; }
.form-dots i { width: 14px; height: 14px; border-radius: 3px; font: 700 9px/14px var(--sans); color: #000; text-align: center; font-style: normal; }
.form-dots .V { background: var(--accent); } .form-dots .E { background: #9aa; } .form-dots .D { background: var(--bad); }
.ovr { display: inline-grid; place-items: center; min-width: 30px; height: 22px; border-radius: 5px; font: 700 13px var(--cond); color: #04140a; }
.pos { font: 700 11px var(--cond); padding: 2px 6px; border-radius: 4px; background: var(--panel2); border: 1px solid var(--line); }
.pos.GK { color: #ffb020; } .pos.DEF { color: #4aa8ff; } .pos.MID { color: #2fd27a; } .pos.FWD { color: #ff6b6b; }
.bar { height: 6px; background: var(--bg2); border-radius: 3px; overflow: hidden; min-width: 50px; }
.bar i { display: block; height: 100%; background: var(--accent); }

/* Pizarra de alineación */
.pitch2d { position: relative; aspect-ratio: 68/80; background: repeating-linear-gradient(0deg, #1d6b3a 0 10%, #1a6135 10% 20%); border-radius: 10px; border: 2px solid #2b8a4f; overflow: hidden; }
.pitch2d::before { content: ''; position: absolute; inset: 8% 22% auto; height: 0; }
.pitch2d .lines { position: absolute; inset: 0; pointer-events: none; }
.slot { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; width: 76px; }
.slot .shirt { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--cond); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.slot .nm { font-size: 11px; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; padding: 1px 5px; border-radius: 4px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .rl { font: 700 10px var(--cond); color: #cfe; }
.slot.sel .shirt { outline: 3px solid var(--accent2); }
.slider { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 10px; margin: 8px 0; }
input[type=range] { accent-color: var(--accent); padding: 0; }

/* Auth / claim */
.hero { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 600px at 70% -10%, rgba(47,210,122,.18), transparent 60%),
  repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 60px, transparent 60px 120px), var(--bg); }
.hero-box { width: min(980px, 100%); display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.hero h1 { font-size: 64px; font-weight: 800; }
.hero h1 b { color: var(--accent); }
.hero-logo { display: block; grid-column: 1 / -1; width: 100%; height: auto; }
.hero .claim { font-family: var(--cond); font-size: 26px; color: var(--muted); margin-bottom: 18px; }
.hero ul { padding-left: 18px; color: var(--muted); }
.auth { display: grid; gap: 10px; }
.club-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.club-pick .opt { text-align: left; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 12px; display: flex; gap: 10px; align-items: center; }
.club-pick .opt.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* TV */
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tv-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; transition: .15s; position: relative; }
.tv-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tv-card.featured { border-color: var(--warn); }
.tv-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 8px 0; font-family: var(--cond); font-weight: 700; font-size: 18px; }
.tv-score .sc { font-size: 28px; padding: 0 8px; background: var(--bg2); border-radius: 6px; }
.tv-score .t { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tv-score .t.r { justify-content: flex-end; }

.news-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.news-item time { color: var(--muted); font-size: 11px; display: block; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--accent); color: var(--text); padding: 10px 16px; border-radius: 10px; z-index: 1000; box-shadow: var(--shadow); max-width: 90vw; }
#toast.err { border-color: var(--bad); }

/* ── Visor de partido (siempre oscuro) ────────────────────────────── */
.match { position: fixed; inset: 0; background: #000; color: #fff; z-index: 50; overflow: hidden; font-family: var(--sans); }
.match canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud-top { position: absolute; top: 14px; left: 14px; display: flex; gap: 10px; align-items: stretch; z-index: 3; }
.scorebug { display: flex; align-items: stretch; font-family: var(--cond); font-weight: 700; font-size: 22px; box-shadow: 0 4px 20px rgba(0,0,0,.5); border-radius: 6px; overflow: hidden; }
.scorebug .tm { display: flex; align-items: center; gap: 8px; padding: 4px 12px; background: rgba(10,14,12,.92); }
.scorebug .tm i { width: 6px; align-self: stretch; margin: -4px 0 -4px -12px; }
.scorebug .sc { background: #fff; color: #000; padding: 4px 12px; min-width: 70px; text-align: center; }
.scorebug .clk { background: var(--accent); color: #04140a; padding: 4px 10px; min-width: 64px; text-align: center; }
.scorebug .ctl { font-size: 12px; opacity: .8; }
.live-badge { background: #e11; color: #fff; font: 700 12px var(--sans); padding: 0 10px; display: flex; align-items: center; gap: 6px; border-radius: 6px; letter-spacing: .06em; }
.live-badge .n { font-weight: 500; opacity: .9; }
.hud-right { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; z-index: 3; flex-wrap: wrap; justify-content: flex-end; max-width: 60vw; }
.hbtn { background: rgba(10,14,12,.8); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 6px 10px; font: 600 12px var(--sans); backdrop-filter: blur(6px); }
.hbtn:hover { border-color: var(--accent); }
.hbtn.on { background: var(--accent); color: #04140a; border-color: var(--accent); }
.control-bar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; background: rgba(10,14,12,.85); padding: 6px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.control-bar .cb { background: transparent; border: 1px solid transparent; color: #fff; padding: 8px 14px; border-radius: 8px; font: 700 15px var(--cond); letter-spacing: .05em; text-transform: uppercase; }
.control-bar .cb.on { background: var(--accent); color: #04140a; }
.control-bar .cb:hover:not(.on) { border-color: rgba(255,255,255,.3); }
.side-panel { position: absolute; top: 64px; right: 14px; bottom: 76px; width: 330px; display: flex; flex-direction: column; gap: 8px; z-index: 3; pointer-events: none; }
.side-panel > * { pointer-events: auto; }
.glass { background: rgba(10,14,12,.82); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; backdrop-filter: blur(8px); }
.feed { flex: 1; min-height: 80px; overflow-y: auto; padding: 8px 10px; font-size: 13px; }
.feed .e { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.feed .e b { font-family: var(--cond); color: var(--accent); margin-right: 6px; }
.feed .e.goal { color: var(--accent2); font-weight: 700; }
.feed .e.card { color: var(--warn); }
.chat { display: flex; flex-direction: column; height: 34%; min-height: 150px; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 8px 10px; font-size: 13px; }
.chat .msgs .m b { color: var(--blue); margin-right: 4px; }
.chat .msgs .m.mgr b { color: var(--warn); }
.chat form { display: flex; gap: 6px; padding: 6px; border-top: 1px solid rgba(255,255,255,.1); }
.chat input { flex: 1; background: rgba(0,0,0,.4); border-color: rgba(255,255,255,.15); color: #fff; }
.stats-box { padding: 10px; font-size: 12px; }
.stats-box .srow { display: grid; grid-template-columns: 38px 1fr 38px; gap: 6px; align-items: center; margin: 3px 0; text-align: center; }
.stats-box .srow .lab { font-size: 11px; color: #aab; text-transform: uppercase; }
.stats-box .duo { display: flex; height: 4px; border-radius: 2px; overflow: hidden; background: #333; grid-column: 1 / -1; margin-top: -2px; }
.radar { position: absolute; left: 14px; bottom: 14px; z-index: 3; width: 230px; height: 150px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(12,60,30,.75); }
.mgr-panel { position: absolute; left: 14px; top: 64px; width: 320px; max-height: calc(100% - 240px); overflow-y: auto; z-index: 4; padding: 12px; font-size: 13px; }
.mgr-panel h4 { font-family: var(--cond); font-size: 16px; margin: 10px 0 6px; letter-spacing: .04em; text-transform: uppercase; color: #aac; }
.mgr-panel .pl { display: grid; grid-template-columns: 24px 1fr 60px auto; gap: 6px; align-items: center; padding: 3px 0; }
.mgr-panel .pl .en { height: 5px; background: #333; border-radius: 3px; overflow: hidden; }
.mgr-panel .pl .en i { display: block; height: 100%; }
.mgr-panel select, .mgr-panel .btn { font-size: 12px; }
.banner { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font: 800 64px var(--cond); letter-spacing: .06em; text-shadow: 0 4px 30px rgba(0,0,0,.8); z-index: 3; pointer-events: none; text-transform: uppercase; animation: pop .5s ease-out; text-align: center; }
.banner small { display: block; font-size: 22px; font-weight: 600; opacity: .9; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }
.keys { position: absolute; left: 50%; transform: translateX(-50%); bottom: 70px; z-index: 3; font-size: 11px; color: #cdd; padding: 6px 10px; line-height: 1.6; }
.keys kbd { background: #222; border: 1px solid #555; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font: 600 11px var(--sans); color: #fff; }
.power { position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%); width: 200px; height: 10px; background: rgba(0,0,0,.6); border: 1px solid #fff4; border-radius: 5px; overflow: hidden; z-index: 3; }
.power i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--warn), var(--bad)); width: 0; }
.replay-tag { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); background: #fc0; color: #000; font: 800 16px var(--cond); padding: 4px 14px; border-radius: 4px; z-index: 3; letter-spacing: .1em; }
.embed .side-panel, .embed .control-bar, .embed .hud-right, .embed .keys, .embed .mgr-panel, .embed .radar { display: none !important; }

/* (el antiguo bloque para < 900 px vive ahora en «CARCASA RESPONSIVA») */

/* ── Oficina del club (office.js) ─────────────────────────────────────────── */
.fin-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) 2fr minmax(80px, auto); gap: 10px; align-items: center; margin: 5px 0; font-size: 13px; }
.fin-row .bar i.neg { background: var(--bad); }
.fin-chart { width: 100%; height: 150px; display: block; }
.fin-list { max-height: 260px; overflow: auto; font-size: 13px; }
.fin-list .row { padding: 3px 0; border-bottom: 1px solid var(--line); }
.fac-grid, .staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.fac { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.fac.busy { border-color: var(--warn); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 12px; height: 12px; border-radius: 3px; background: var(--bg2); border: 1px solid var(--line); }
.pips i.on { background: var(--accent); border-color: var(--accent); }
.brand { display: inline-block; font-family: var(--cond); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; font-size: 14px; }
.led-preview { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; margin-bottom: 10px; background: #050807; border-radius: 6px; }
.offer, .cand { padding: 6px 0; border-bottom: 1px solid var(--line); gap: 8px; flex-wrap: wrap; }
.stars { color: #ffc93c; letter-spacing: 1px; }
.stars i { color: var(--line); font-style: normal; }
details summary { cursor: pointer; color: var(--accent); margin-top: 8px; font-size: 13px; }
.form { display: inline-block; width: 18px; text-align: center; border-radius: 3px; font-size: 11px; font-weight: 700; margin-left: 2px; }
.form.V { background: var(--accent); color: #04140a; } .form.E { background: var(--warn); color: #111; } .form.D { background: var(--bad); color: #fff; }
@media (max-width: 700px) { .fin-row { grid-template-columns: 1fr auto; } .fin-row .bar { grid-column: 1 / -1; } }
a.clock-pill { color: inherit; text-decoration: none; }

/* Diálogos propios (ask / confirmBox en app.js): sustituyen a prompt()/confirm(). */
.dlg-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.dlg { width: min(420px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* ── Ecosistema (eco.js): pronósticos, tienda, pase, social, canal, Plus ─── */
/* Temas de interfaz (cosmético ui_theme): solo cambian los acentos. */
:root[data-ui="azul"] { --accent: #4aa8ff; --accent2: #8fd0ff; }
:root[data-ui="morado"] { --accent: #b98cff; --accent2: #e0c8ff; }
:root[data-ui="oro"] { --accent: #f2c14e; --accent2: #ffe08a; }
:root[data-ui="carmesi"] { --accent: #ff4d6d; --accent2: #ff9aac; }
:root[data-ui="plus"] { --accent: #2fe0c0; --accent2: #ffd24a; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 14px; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; color: var(--muted); padding: 8px 14px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tag.title { color: var(--accent2); border-color: currentColor; }
.rules { font-size: 12px; margin-top: 14px; }
.spacer { flex: 1; }
.pred-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; margin-top: 12px; }
.pred-card { display: flex; flex-direction: column; gap: 8px; }
.pred-card.mine { border-color: var(--accent); }
.pred-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-weight: 600; }
.pred-teams .t { display: flex; align-items: center; gap: 6px; } .pred-teams .t.r { justify-content: flex-end; text-align: right; }
.pred-teams .sc { display: flex; align-items: center; gap: 4px; font-family: var(--cond); font-size: 20px; }
.pred-teams .sc input { width: 46px; text-align: center; padding: 6px 2px; }
.pred-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pred-extra select { width: 100%; font-size: 12px; padding: 6px; }
.pred-extra select:first-child { grid-column: 1 / -1; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel2); font-size: 12px; }
.badge.trophy { border-color: var(--warn); color: var(--warn); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shop-item { border: 1px solid var(--line); border-top: 3px solid var(--rar); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: var(--panel2); }
.shop-item.eq { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.shop-item .prev { height: 70px; display: flex; align-items: center; justify-content: center; }
.shop-item .rar { font-size: 10px; text-transform: uppercase; color: var(--rar); letter-spacing: .06em; }
.shop-item .how { font-size: 11px; min-height: 14px; }
.shop-item .buy { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.ico-prev { font-size: 34px; }
.font-prev { font-size: 40px; font-weight: 700; } .f-barlow { font-family: var(--cond); } .f-clasica { font-family: Georgia, "Times New Roman", serif; }
.f-retro { font-family: "Courier New", monospace; letter-spacing: -.05em; } .f-futura { font-family: "Trebuchet MS", "Century Gothic", sans-serif; }
.ui-prev { width: 44px; height: 44px; border-radius: 50%; display: block; }
.ui-prev[data-ui="verde"] { background: #2fd27a; } .ui-prev[data-ui="azul"] { background: #4aa8ff; } .ui-prev[data-ui="morado"] { background: #b98cff; }
.ui-prev[data-ui="oro"] { background: #f2c14e; } .ui-prev[data-ui="carmesi"] { background: #ff4d6d; } .ui-prev[data-ui="plus"] { background: linear-gradient(135deg, #2fe0c0, #ffd24a); }
/* Formas de escudo (cosmético crest). */
.crest.sh-escudo { clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); border-radius: 0; }
.crest.sh-circulo { border-radius: 50%; }
.crest.sh-estrella { clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 78%, 20% 100%, 30% 60%, 0 38%, 38% 35%); border-radius: 0; }
.crest.sh-diamante { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); border-radius: 0; }
.crest.sh-corona { clip-path: polygon(0 20%, 25% 40%, 50% 0, 75% 40%, 100% 20%, 100% 100%, 0 100%); border-radius: 0 0 6px 6px; }
.pass-grid { display: grid; grid-template-columns: 70px 1fr 1fr; }
.pass-grid > div { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.pass-h { font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: 12px; }
.pass-lv { font-family: var(--cond); font-size: 22px; color: var(--muted); } .pass-lv.reached { color: var(--accent); }
.pass-cell { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pass-cell.ready { background: color-mix(in srgb, var(--accent) 10%, transparent); } .pass-cell.claimed { opacity: .55; } .pass-cell.locked { opacity: .7; }
.prod ul { padding-left: 0; list-style: none; margin: 10px 0; } .prod li { padding: 3px 0; }
.prod.plus { border-color: #2fe0c0; } .prod.creator { border-color: #ff8ab5; }
.user-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.channel-head { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); margin-bottom: 16px; background: linear-gradient(120deg, color-mix(in srgb, var(--ch) 35%, var(--panel)), var(--panel)); border: 1px solid var(--ch); }
.ch-ico { font-size: 44px; }
.tv-creator { font-size: 12px; margin-top: 6px; padding: 3px 8px; border-left: 3px solid var(--ch); background: color-mix(in srgb, var(--ch) 15%, transparent); border-radius: 4px; }
.depth { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; } .depth .card { padding: 8px; }
.ad { display: block; margin: 10px 0; padding: 8px 12px; border-radius: 8px; font-size: 12px; line-height: 1.35; }
.ad:empty { display: none; }
.ad b { display: block; font-size: 13px; } .ad-tag { float: right; font-size: 9px; opacity: .7; text-transform: uppercase; letter-spacing: .08em; }
.side .ad { margin: 10px 8px; }
/* Marcadores de retransmisión (cosmético broadcast_overlay) y rótulo del canal en la emisión. */
.scorebug.ov-neon .tm { background: rgba(8,4,24,.92); box-shadow: inset 0 -2px 0 #b98cff; } .scorebug.ov-neon .sc { background: #b98cff; color: #120526; } .scorebug.ov-neon .clk { background: #ff4dd8; }
.scorebug.ov-retro { border-radius: 0; font-family: "Courier New", monospace; } .scorebug.ov-retro .tm { background: #1a1a1a; } .scorebug.ov-retro .sc { background: #ffe14a; } .scorebug.ov-retro .clk { background: #ff7a1a; color: #000; }
.scorebug.ov-dorado .sc { background: linear-gradient(#ffe7a0, #d8a93a); } .scorebug.ov-dorado .clk { background: #d8a93a; color: #231800; } .scorebug.ov-dorado .tm { background: rgba(28,20,4,.94); }
.scorebug.ov-minimal { box-shadow: none; font-size: 18px; } .scorebug.ov-minimal .tm { background: rgba(0,0,0,.45); } .scorebug.ov-minimal .sc { background: rgba(255,255,255,.85); } .scorebug.ov-minimal .clk { background: rgba(0,0,0,.45); color: #fff; }
.scorebug.ov-pro { border-radius: 2px; } .scorebug.ov-pro .tm { background: linear-gradient(#1d2733, #0c1219); text-transform: uppercase; letter-spacing: .06em; } .scorebug.ov-pro .sc { background: #fff; font-size: 26px; } .scorebug.ov-pro .clk { background: #e8183c; color: #fff; }
.ch-lower { position: absolute; left: 14px; bottom: 18px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; background: rgba(8,10,12,.85); border-left: 5px solid var(--ch, #2fd27a); border-radius: 4px; font-family: var(--cond); color: #fff; }
.ch-lower b { font-size: 22px; } .ch-lower span { font-size: 14px; opacity: .8; }
/* Configuración de controles (match.js → panel ⌨️). */
.ctrl-panel { position: absolute; inset: 0; z-index: 20; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ctrl-box { width: min(640px, 100%); max-height: 90vh; overflow: auto; }
.ctrl-row { display: grid; grid-template-columns: 1fr 110px 110px; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.ctrl-row .kbtn { font-family: var(--cond); font-size: 16px; min-width: 100px; justify-content: center; }
.ctrl-row .kbtn.wait { border-color: var(--warn); color: var(--warn); animation: pulse 1s infinite; }
.ctrl-row .kbtn.dup { border-color: var(--bad); color: var(--bad); }
@keyframes pulse { 50% { opacity: .5; } }
@media (max-width: 700px) { .pred-list { grid-template-columns: 1fr; } .pass-grid { grid-template-columns: 50px 1fr 1fr; } }

/* Panel de volúmenes del visor (audio.js). */
.snd-pop { position: absolute; top: 58px; right: 14px; z-index: 6; width: 240px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.snd-pop input[type=range] { width: 120px; }

/* Paneles plegables del visor: cabecera por panel y botón ◨ para todos. */
.side-panel .ph { align-self: flex-end; background: rgba(10,14,12,.75); color: #cfd8d2; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; font-size: 11px; padding: 2px 8px; margin-bottom: -6px; text-transform: uppercase; letter-spacing: .06em; }
.side-panel .ph::after { content: ' ▾'; } .side-panel .ph.off::after { content: ' ▸'; } .side-panel .ph.off { opacity: .7; }
.side-panel .collapsed { display: none !important; }
.match.panels-off .side-panel { display: none; }
.hbtn.on { border-color: var(--accent); }

/* Copas: cuadro por rondas (desplazable en horizontal en pantallas estrechas). */
.section-h { margin: 22px 0 10px; }
.tag.cup { color: var(--warn); border-color: currentColor; }
.cup-card { display: block; color: var(--text); } .cup-card:hover { border-color: var(--accent); }
.champ { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--warn); border-radius: 999px; color: var(--warn); font-family: var(--cond); font-size: 20px; }
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.bk-round { display: flex; flex-direction: column; gap: 8px; }
.bk-round h3 { position: sticky; top: 0; }
.bk-match { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; display: grid; gap: 2px; cursor: pointer; }
.bk-match:hover { border-color: var(--accent); }
.bk-team { display: flex; align-items: center; gap: 6px; font-size: 13px; opacity: .75; } .bk-team.won { opacity: 1; font-weight: 700; } .bk-team.me span { color: var(--accent); }
.bk-team .crest { width: 20px; height: 20px; font-size: 8px; }
.bk-score { font-family: var(--cond); font-size: 16px; display: flex; gap: 6px; align-items: baseline; padding-left: 26px; } .bk-score small { color: var(--muted); font-size: 12px; }

/* Balón parado en preparación y tarjeta en pantalla (match.js → drawSetPiece). */
.restart-pill { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 4; pointer-events: none;
  font: 700 18px var(--cond); letter-spacing: .12em; text-transform: uppercase; padding: 6px 16px; border-radius: 4px;
  background: rgba(8,12,10,.82); color: #fff; border-bottom: 3px solid var(--accent); animation: pop .3s ease-out; }
.restart-pill.rp-offside { border-color: #ffd24a; } .restart-pill.rp-free, .restart-pill.rp-penalty { border-color: var(--bad); }
.card-show { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 5; pointer-events: none; display: flex; align-items: center; gap: 14px;
  padding: 12px 20px 12px 14px; background: rgba(8,12,10,.9); border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.6); animation: cardIn .45s cubic-bezier(.2,1.4,.4,1); }
.cs-card { position: relative; width: 44px; height: 62px; border-radius: 5px; box-shadow: 0 4px 14px rgba(0,0,0,.5); transform: rotate(-8deg); }
.cs-card.yellow { background: linear-gradient(160deg, #ffe45c, #f2c200); } .cs-card.red { background: linear-gradient(160deg, #ff5a5a, #c8102e); }
.cs-card .cs-y { position: absolute; left: -14px; top: 6px; width: 44px; height: 62px; border-radius: 5px; background: linear-gradient(160deg, #ffe45c, #f2c200); transform: rotate(-14deg); z-index: -1; }
.cs-txt { display: flex; flex-direction: column; font-family: var(--cond); color: #fff; }
.cs-txt small { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.cs-txt b { font-size: 28px; display: flex; align-items: center; gap: 8px; }
.cs-num { min-width: 34px; height: 34px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
@keyframes cardIn { from { opacity: 0; transform: translate(-50%, 30px) scale(.8); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* ══════════════════════════════════════════════════════════════════════════
   CARCASA RESPONSIVA (2026-09-27): PC · tableta · móvil · televisor
   ──────────────────────────────────────────────────────────────────────────
   Tramos:
     ≥ 1200 px  PC: barra lateral de 248 px con secciones.
     900-1199   Tableta horizontal: raíl de iconos de 76 px (el texto sale en
                el título al pasar el ratón o al enfocar).
     < 900      Tableta vertical y móvil: cajón lateral (☰ / "Más") y barra de
                pestañas abajo con lo más usado. Las rejillas pasan a 1-2 columnas.
     ≥ 1800     Televisor / monitor enorme: todo escalado con `zoom` (lectura a
                3 m) y foco muy visible para el mando a distancia (spatialNav en app.js).
   El visor del partido (.match) no se escala: se adapta aparte, más abajo.
   ══════════════════════════════════════════════════════════════════════════ */
:root { --side-w: 248px; --top-h: 64px; --tab-h: 62px; --radius: 12px; --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.28); }
body { font-size: 14.5px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 18px 12px 14px;
  background: linear-gradient(180deg, var(--bg2), color-mix(in srgb, var(--bg2) 70%, var(--bg))); border-right: 1px solid var(--line); z-index: 30; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 26px var(--cond); letter-spacing: .03em; color: var(--text); margin: 0 8px 16px; white-space: nowrap; }
.logo b { color: var(--accent); }
.logo.sm { font-size: 20px; margin: 0; }
.ball { width: 24px; height: 24px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 40%, #bbb 41% 100%); box-shadow: inset -3px -3px 0 rgba(0,0,0,.25); }
.logo-img { display: block; height: 42px; width: auto; max-width: 100%; object-fit: contain; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sec { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .12em; color: color-mix(in srgb, var(--muted) 75%, transparent); margin: 14px 12px 4px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; transition: background .15s, color .15s; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--text); }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.nav .ico { width: 22px; text-align: center; font-size: 17px; flex: none; }
.nav .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .live-dot, .tabbar .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); animation: pulse 1.6s infinite; flex: none; }
.plus-chip { font: 800 9px var(--sans); letter-spacing: .08em; padding: 2px 5px; border-radius: 4px; background: linear-gradient(135deg, #2fe0c0, #ffd24a); color: #06140e; vertical-align: middle; }
.side .ad { margin: 14px 4px 0; }
.side .me { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: grid; gap: 8px; }
.me-name b { color: var(--text); }
.me-wallet { display: flex; gap: 8px; }
.me-wallet a { flex: 1; text-align: center; padding: 6px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 700; }
.me-out { font-size: 12px; color: var(--muted); }
.scrim { display: none; }

.main { padding: 0 32px 72px; max-width: 1440px; width: 100%; margin: 0 auto; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: var(--top-h); margin: 0 -32px 22px; padding: 10px 32px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .spacer { flex: 1; }
.burger { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 20px; }
.club-id { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.club-id span { display: flex; flex-direction: column; min-width: 0; }
.club-id b { font: 700 18px var(--cond); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.club-id small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock-pill { white-space: nowrap; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 13px; color: var(--text); }
.clock-pill.money b { color: var(--accent); }
.tabbar { display: none; }
.view { animation: viewIn .25s ease-out; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
.loading { display: flex; gap: 8px; justify-content: center; padding: 60px 0; }
.loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: bounce 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; } .loading span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* Piezas comunes, más pulidas */
h1 { font-size: clamp(26px, 3.2vw, 36px); }
.card { border-radius: var(--radius); background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, #fff 4%), var(--panel)); }
.card > h3:first-child, .card > .row:first-child > h3 { letter-spacing: .08em; font-size: 15px; }
.card:has(> table) { overflow-x: auto; }
.btn { border-radius: 10px; min-height: 36px; }
.btn.small { min-height: 28px; border-radius: 8px; }
.btn.primary { box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--panel2) 35%, transparent); }
th { background: color-mix(in srgb, var(--panel) 96%, #000); }
input, select { min-height: 36px; }

/* ── Tableta horizontal: raíl de iconos ── */
@media (min-width: 900px) and (max-width: 1199px) {
  :root { --side-w: 76px; }
  .side { padding: 14px 8px; align-items: center; }
  .logo { margin: 0 0 12px; } .side .logo .lbl { display: none; } .side .logo-img { height: auto; max-width: 56px; }
  .nav { width: 100%; }
  .nav-sec { height: 1px; margin: 10px 8px; background: var(--line); font-size: 0; }
  .nav a { justify-content: center; padding: 11px 0; }
  .nav a .lbl { display: none; }
  .nav a .live-dot { position: absolute; top: 6px; right: 12px; }
  .nav a.active::before { left: -8px; }
  .side .ad, .side .me { display: none; }
  .main { padding: 0 24px 64px; } .topbar { margin: 0 -24px 18px; padding: 10px 24px; }
}

/* ── Tableta vertical y móvil: cajón + pestañas ── */
@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: 100%; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .side.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 25; }
  .scrim.on { opacity: 1; pointer-events: auto; }
  .burger { display: inline-grid; place-items: center; flex: none; }
  .main { padding: 0 16px calc(var(--tab-h) + 28px); }
  .topbar { margin: 0 -16px 14px; padding: 8px 12px; gap: 8px; min-height: 56px; }
  .topbar .lbl { display: none; }
  #world-clock { font-size: 12px; padding: 6px 10px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    z-index: 22; background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 600; background: none; border: 0; }
  .tabbar .ico { font-size: 20px; }
  .tabbar a.active { color: var(--accent); }
  .tabbar a.active::after { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .tabbar .live-dot { position: absolute; top: 8px; right: calc(50% - 18px); }
  #toast { bottom: calc(var(--tab-h) + 16px); }
  /* Rejillas con columnas fijas escritas en línea (plantilla, competición…): una columna. */
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scroll { max-height: none; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  #balance-pill { display: none; }                      /* el saldo sigue en Finanzas y en Inicio */
  .club-id b { font-size: 16px; } .club-id small { display: none; }
  .card { padding: 14px; }
  .next-match .team { font-size: 17px; } .next-match .vs { font-size: 28px; }
  .mode-btn { min-width: 0; flex: 1 1 30%; padding: 8px; }
  .kpi { font-size: 24px; }
  .tv-grid, .pred-list { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 40px; } .hero .claim { font-size: 20px; }
  .slider { grid-template-columns: 90px 1fr 34px; }
  th, td { padding: 7px 6px; }
}

/* ── Televisor: escala de lectura a distancia y foco grande ── */
@media (min-width: 1800px) {
  /* zoom escala también el ancho: un 100 % ocuparía 125 % de la pantalla. Se compensa dividiendo. */
  .shell, .hero { zoom: 1.25; width: calc(100% / 1.25); min-height: calc(100vh / 1.25); }
  .side { height: calc(100vh / 1.25); }
  .dlg-back, #toast { zoom: 1.25; }
  :focus-visible { outline-width: 4px; outline-offset: 3px; }
  .nav a:focus-visible, .tabbar a:focus-visible { background: color-mix(in srgb, var(--accent) 25%, var(--panel)); }
}
@media (min-width: 2500px) { .shell, .hero { zoom: 1.65; width: calc(100% / 1.65); min-height: calc(100vh / 1.65); } .side { height: calc(100vh / 1.65); } .dlg-back, #toast { zoom: 1.65; } }

/* ── Visor de partido en pantallas pequeñas ── */
@media (max-width: 900px) {
  .hud-top { top: 8px; left: 8px; gap: 6px; }
  .radar, .keys { display: none; }                       /* no caben junto al joystick; el campo ya se ve entero */
  .live-badge { display: none; }
  .hud-right { top: 8px; right: 8px; max-width: 58vw; gap: 4px; }
  .hbtn { padding: 5px 7px; font-size: 11px; }
  .hbtn.cam:not(.on) { display: none; }                 /* en el móvil solo se ve la cámara activa; se cambia con 1-6 o tocando la activa */
  .side-panel { left: 8px; right: 8px; width: auto; top: auto; bottom: 64px; height: 36vh; flex-direction: column; }
  .side-panel .stats-box { max-height: 30%; overflow: auto; }
  .chat { height: 42%; min-height: 0; }
  .control-bar { bottom: 8px; width: calc(100% - 16px); justify-content: space-between; }
  .control-bar .cb { padding: 7px 8px; font-size: 13px; flex: 1; }
  .restart-pill { top: 50px; font-size: 14px; }
  .card-show { bottom: 44vh; } .cs-txt b { font-size: 20px; }
}
@media (min-width: 1800px) {
  .scorebug { font-size: 30px; } .hbtn { font-size: 15px; padding: 9px 14px; } .feed, .chat .msgs { font-size: 16px; }
  .side-panel { width: 420px; } .restart-pill { font-size: 24px; }
}

/* Mandos táctiles del visor (match.js → bindTouch). */
.touch { position: absolute; inset: auto 0 0 0; height: 44vh; z-index: 6; pointer-events: none; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px calc(76px + env(safe-area-inset-bottom)); }
.touch > * { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.tjoy { width: 132px; height: 132px; border-radius: 50%; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.25); display: grid; place-items: center; backdrop-filter: blur(4px); }
.tjoy i { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.tbtns { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; align-items: end; }
.tbtns button { height: 50px; border-radius: 25px; border: 2px solid rgba(255,255,255,.3); background: rgba(10,14,12,.7); color: #fff; font: 700 13px var(--cond); letter-spacing: .04em; text-transform: uppercase; }
.tbtns button.big { height: 64px; border-radius: 32px; font-size: 15px; background: color-mix(in srgb, var(--accent) 70%, #000); }
.tbtns button.shoot { background: color-mix(in srgb, var(--bad) 75%, #000); }
.tbtns button.on { background: var(--warn); color: #111; }
.tbtns button:active { transform: scale(.94); }
.match .touch:not([hidden]) ~ .control-bar { bottom: 8px; }

/* Resumen final del partido (match.js → showSummary): sustituye a la vista del campo. */
.match.show-summary canvas.gl, .match.show-summary .side-panel, .match.show-summary .radar, .match.show-summary .hud-top,
.match.show-summary .restart-pill, .match.show-summary .card-show, .match.show-summary #banner { visibility: hidden; }
.summary { position: absolute; inset: 0; z-index: 30; overflow-y: auto; padding: 24px 16px 40px;
  background: radial-gradient(900px 500px at 50% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), linear-gradient(180deg, #0b110e, #060907); }
.sm-wrap { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; animation: viewIn .4s ease-out; }
.sm-head { display: flex; justify-content: space-between; align-items: center; }
.sm-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; text-align: center; }
.sm-team { display: flex; flex-direction: column; align-items: center; gap: 10px; font: 700 clamp(18px, 3vw, 28px) var(--cond); }
.sm-crest { width: clamp(56px, 9vw, 88px); height: clamp(60px, 9.6vw, 94px); display: grid; place-items: center; border-radius: 12px 12px 36px 36px; font: 800 clamp(16px, 2.4vw, 24px) var(--cond); color: #fff; border: 3px solid rgba(255,255,255,.25); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.sm-res div { font: 800 clamp(48px, 9vw, 96px) var(--cond); line-height: 1; letter-spacing: .02em; }
.sm-res div span { color: var(--muted); }
.sm-res small { display: block; color: var(--muted); font-size: 15px; margin-top: 6px; } .sm-res .sm-win { color: var(--accent); font-weight: 700; }
.sm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sm-col { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px; }
.sm-h { font: 700 13px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #9fb3a6; margin: 14px 0 8px; } .sm-h:first-child { margin-top: 0; }
.sm-ev { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 14px; } .sm-ev .r { text-align: right; } .sm-ev small { color: var(--muted); }
.sm-pens { font-size: 13px; color: #cdd; max-height: 180px; overflow: auto; }
.sm-stat { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; text-align: center; font-size: 13px; margin: 6px 0; }
.sm-stat span { color: #aab; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.sm-bar { grid-column: 1 / -1; display: flex; gap: 3px; height: 5px; margin-top: 3px; } .sm-bar i { border-radius: 3px; min-width: 2px; }
.sm-mvp { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid var(--warn); font-size: 18px; }
.sm-mvp span { color: var(--muted); font-size: 13px; flex: 1; }
.sm-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sm-pl { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 6px; font-size: 13px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.sm-pl.mvp { color: var(--warn); font-weight: 700; }
.sm-num { color: var(--muted); font: 700 12px var(--cond); } .sm-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-rt { min-width: 34px; text-align: center; padding: 2px 5px; border-radius: 5px; color: #06140c; font: 700 13px var(--cond); } .sm-rt.big { font-size: 20px; padding: 4px 10px; }
.sm-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sm-actions .hbtn { font-size: 14px; padding: 9px 14px; }
@media (max-width: 760px) { .sm-grid, .sm-rates { grid-template-columns: 1fr; } .summary { padding: 16px 10px 90px; } }
/* Cuadro: ida/vuelta y global. */
.bk-leg { font: 600 10px var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.bk-score { flex-wrap: wrap; } .bk-agg { color: var(--accent) !important; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════════════
   DISEÑO 2026-09-28 — "retransmisión nocturna" (referencia aportada por Jordi)
   ──────────────────────────────────────────────────────────────────────────
   Paleta: azul casi negro (fondo #070b11, paneles #0e141c) en vez del verde
   oscuro anterior; acento verde menta (#1fe08f) para lo que se pulsa y lo
   propio (tu fila en la tabla, el botón Jugar); dorado para las monedas, rojo
   para el LIVE, azul para "ver en directo". Tarjetas con cabecera blanca en
   minúsculas (no en mayúsculas grises), borde fino y radio de 14 px. Iconos de
   línea (icons.js) en el menú y en las tarjetas.
   Este bloque va al FINAL a propósito: pisa lo de arriba sin tocar cada regla
   (las pantallas antiguas heredan colores y tarjetas nuevas sin rehacerlas).
   ══════════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #070b11; --bg2: #0a0f16; --panel: #0e141c; --panel2: #141c26; --line: #1c2633;
  --text: #eef2f6; --muted: #8a97a8; --accent: #1fe08f; --accent2: #13b870; --warn: #f5b83d; --bad: #ef3b4a; --blue: #2f7cf6; --gold: #f5c542;
  --radius: 14px; --side-w: 232px; --top-h: 60px;
  --shadow: 0 1px 0 rgba(255,255,255,.035) inset, 0 12px 32px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef1f5; --bg2: #e4e8ee; --panel: #ffffff; --panel2: #f3f5f8; --line: #d7dde6;
    --text: #0d141d; --muted: #5b6878; --accent: #0fa968; --accent2: #0b8a55; --gold: #c9950f;
  }
}
body { background: radial-gradient(1200px 600px at 70% -10%, color-mix(in srgb, var(--blue) 7%, transparent), transparent 60%), var(--bg); }
.ic { width: 20px; height: 20px; flex: none; }
h3 { text-transform: none; color: var(--text); font: 700 16px var(--sans); letter-spacing: 0; }
.card { background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, #1b2a3d 8%), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); }
.card > h3:first-child, .card > .row:first-child > h3 { letter-spacing: 0; font-size: 16px; }
.btn { border-radius: 10px; font-weight: 700; }
.btn.primary { color: #03170d; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.outline { background: transparent; border: 1px solid color-mix(in srgb, var(--text) 30%, transparent); color: var(--text); }
.btn.outline:hover { border-color: var(--accent); color: var(--accent); }
.btn.outline.blue { border-color: var(--blue); color: #cfe0ff; } .btn.outline.blue:hover { background: color-mix(in srgb, var(--blue) 18%, transparent); color: #fff; }
.btn.wide { width: 100%; justify-content: center; }
.btn .ic { width: 17px; height: 17px; }
.tag.live { background: var(--bad); border-color: var(--bad); }
tbody tr.me td { background: linear-gradient(90deg, #178a4c, #1c9e59) !important; color: #fff; }
tbody tr.me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ── Barra lateral ── */
.side { background: linear-gradient(180deg, #080c12, #070a10); padding: 14px 12px; gap: 0; }
.logo { gap: 2px; margin: 4px 10px 18px; font: italic 900 28px var(--cond); letter-spacing: .02em; }
.side .logo { width: 100%; justify-content: center; margin: 6px 0 18px; }
.logo-mark { color: var(--text); background: none; } .logo .lbl { color: var(--text); }
.logo-mark { position: relative; padding-right: 2px; }
.logo-mark::after { content: ''; position: absolute; right: -3px; top: 6px; bottom: 6px; width: 3px; transform: skewX(-14deg); background: var(--accent); border-radius: 2px; }
.nav { gap: 1px; }
.nav a { gap: 14px; padding: 9px 14px; border-radius: 10px; color: #c9d2de; font-weight: 500; font-size: 14.5px; }
.nav a .ic { width: 21px; height: 21px; color: #aeb9c7; }
.nav a:hover { background: color-mix(in srgb, var(--panel2) 80%, transparent); color: #fff; }
.nav a.active { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, #0c1a14), color-mix(in srgb, var(--accent) 8%, #0c1a14)); color: #fff; font-weight: 700; }
.nav a.active .ic { color: #fff; }
.nav a.active::before { left: -12px; top: 0; bottom: 0; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.nav-sep { height: 1px; background: var(--line); margin: 10px 12px; }
.nav-badge { font: 800 10px var(--sans); padding: 2px 6px; border-radius: 6px; background: var(--accent); color: #03170d; }
.nav-badge.live { background: var(--bad); color: #fff; letter-spacing: .04em; }
.plus-promo { display: flex; flex-direction: column; gap: 8px; margin: 18px 4px 6px; padding: 16px; border-radius: 14px; color: #dfe6ef; font-size: 13px;
  background: radial-gradient(120% 90% at 100% 100%, rgba(245,197,66,.18), transparent 60%), linear-gradient(160deg, #141d2a, #0b1119); border: 1px solid #243246; }
.plus-promo b { font: italic 900 19px var(--cond); letter-spacing: .02em; color: #fff; display: flex; align-items: center; gap: 4px; }
.plus-promo b i { color: var(--gold); font-style: italic; }
.pp-mark { background: var(--accent); color: #03170d; padding: 0 4px; border-radius: 3px; margin-right: 2px; font-size: 14px; }
.pp-btn { margin-top: 4px; text-align: center; padding: 9px; border-radius: 10px; background: var(--gold); color: #1d1600; font-weight: 800; }
.plus-promo:hover .pp-btn { filter: brightness(1.08); }
.me-out { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 14px; color: var(--muted); font-size: 13px; border-radius: 10px; }
.me-out:hover { color: var(--text); background: var(--panel); }
.me-out .ic { width: 18px; height: 18px; }

/* ── Barra superior ── */
.topbar { gap: 14px; background: color-mix(in srgb, var(--bg) 86%, transparent); }
.search { position: relative; flex: 1 1 380px; max-width: 460px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 42px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 0; min-height: 0; outline: none; color: var(--text); }
.search-res { position: absolute; left: 0; right: 0; top: 48px; z-index: 40; max-height: 70vh; overflow-y: auto; padding: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.search-res a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: var(--text); }
.search-res a:hover, .search-res a:focus { background: var(--panel2); }
.search-res span:not(.crest):not(.avatar):not(.pos) { display: flex; flex-direction: column; min-width: 0; } .search-res small { color: var(--muted); }
.sr-sec { font: 700 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 10px 8px 6px; }
.sr-empty { padding: 12px; color: var(--muted); }
.top-ic { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #c9d2de; }
.top-ic:hover { background: var(--panel); color: #fff; }
.top-ic .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
.coins { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.coins > .ic { color: var(--gold); } .coins b { font-weight: 800; }
.coins-add { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #03170d; }
.coins-add .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.profile { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 14px; color: var(--text); }
.profile:hover { background: var(--panel); }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none; font: 800 14px var(--sans); color: #03170d; background: linear-gradient(135deg, var(--accent), #7af0c0); box-shadow: 0 0 0 2px #0b1119, 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.pf-txt { display: flex; flex-direction: column; line-height: 1.2; } .pf-txt b { font-size: 14px; } .pf-txt small { color: var(--muted); font-size: 12px; }
.clock-pill { background: var(--panel); border-color: var(--line); }
.topbar .club-id { display: none; }                      /* el club ya está en la cabecera del inicio y en el menú */

/* ── Barra de estado inferior ── */
.statusbar { position: sticky; bottom: 0; z-index: 15; display: flex; justify-content: flex-end; align-items: center; gap: 22px; margin: 24px -32px 0; padding: 10px 32px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.statusbar a, .statusbar span { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.statusbar a:hover { color: var(--text); } .statusbar b { color: var(--text); font-weight: 600; }
.statusbar .ic { width: 16px; height: 16px; }
.sb-online i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.main { padding-bottom: 0; }
.view { padding-bottom: 8px; min-height: calc(100vh - var(--top-h) - 120px); }

/* ── Inicio ── */
.home { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.home > div { min-width: 0; display: flex; } .home > div > .card { flex: 1; }
.h-hero { grid-column: span 18; } .h-next { grid-column: span 6; }
.h-last, .h-table, .h-news { grid-column: span 6; } .h-tv { grid-column: span 6; grid-row: span 2; }
.h-squad { grid-column: span 6; } .h-eco { grid-column: span 3; } .h-ev { grid-column: span 3; } .h-grow { grid-column: span 6; }
.h-scout { grid-column: 1 / -1; }
.card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.card-h h3 { margin: 0; }
.card-h a, .card-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.card-h a:hover, .card-link:hover { color: var(--accent); } .card-h .ic, .card-link .ic { width: 15px; height: 15px; }
.card-link { color: var(--accent); margin-top: 12px; justify-content: flex-end; width: 100%; }

.crest.xl { width: 116px; height: 128px; font-size: 38px; border-radius: 18px 18px 58px 58px; border-width: 4px; border-color: #e6b94a; box-shadow: 0 0 0 3px #3a2a06, 0 14px 40px rgba(230,185,74,.25); }
.hc { position: relative; overflow: hidden; min-height: 250px; display: flex; background: #070b12; }
.hc-art { position: absolute; inset: 0 0 0 30%; }
.hc-art svg { width: 100%; height: 100%; display: block; }
.hc-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #070b12 0%, rgba(7,11,18,.85) 22%, rgba(7,11,18,.15) 60%, rgba(7,11,18,.35)); }
.hc-body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; padding: 26px 32px; flex: 1; min-width: 0; }
.hc-id { display: flex; align-items: center; gap: 28px; }
.hc-id > div:last-child { min-width: 0; }
.hc-name { font: 800 clamp(30px, 3.6vw, 54px) var(--cond); letter-spacing: .01em; margin: 0; text-transform: uppercase; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* País como chapita con su código (las banderas emoji no se dibujan en Windows: salen dos letras sueltas). */
.hc-flag { display: inline-block; vertical-align: middle; font: 800 13px var(--sans); letter-spacing: .06em; padding: 3px 7px; border-radius: 5px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #fff; margin-left: 6px; }
.hc-comp { margin-top: 10px; color: #c3ccd8; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; } .hc-comp span { color: var(--muted); margin: 0 4px; }
.hc-stats { display: flex; gap: 0; flex-wrap: wrap; }
.hc-stats > div { display: flex; flex-direction: column; gap: 6px; padding: 0 28px; border-left: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
.hc-stats > div:first-child { padding-left: 0; border-left: 0; }
.hc-stats span { color: #aeb9c7; font-size: 13px; } .hc-stats b { font: 700 28px var(--cond); }
.hc-form { display: flex; align-items: center; gap: 3px; }
.fm { font-style: normal; } .fm-V { color: var(--accent); } .fm-E { color: #c3ccd8; } .fm-D { color: var(--bad); } .fm-sep { color: var(--muted); font-weight: 400; }
.hc-stadium { position: relative; z-index: 1; align-self: flex-end; margin: 0 22px 22px 0; padding: 14px 16px; border-radius: 12px; min-width: 220px; font-size: 13px; color: #c3ccd8;
  background: rgba(8,12,19,.72); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.08); display: grid; gap: 5px; }
.hc-stadium .row { gap: 8px; color: #fff; } .hc-stadium .ic { width: 17px; height: 17px; } .hc-stadium b { color: #fff; }
.hc-stadium .btn { margin-top: 6px; justify-self: start; }

.nm { display: flex; flex-direction: column; }
.nm-comp { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); } .nm-comp b { color: var(--text); }
.nm-comp span { margin-left: auto; text-align: right; } .nm-comp .ic { width: 18px; height: 18px; color: var(--gold); }
.nm-teams, .lm-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 18px 0; text-align: center; }
.nm-team { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.nm-team b { font: 700 17px var(--cond); line-height: 1.1; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nm-vs { color: var(--muted); font: 600 16px var(--sans); display: flex; flex-direction: column; gap: 4px; } .nm-vs small { color: var(--accent); font-size: 11px; font-weight: 700; }
.nm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.nm-btns .btn { justify-content: center; min-height: 44px; }
.nm-btns .btn.outline.on { border-color: var(--accent); color: var(--accent); }
.nm-btns .btn.primary:not(.on) { filter: saturate(.9); }
.nm-manager { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; background: none; border: 0; color: var(--muted); font-size: 12.5px; padding: 6px; border-radius: 8px; }
.nm-manager.on { color: var(--accent); } .nm-manager:hover { color: var(--text); } .nm-manager .ic { width: 16px; height: 16px; }
.nm-enter { margin-top: 10px; justify-content: center; }
.lm-res { font: 800 46px var(--cond); line-height: 1; display: flex; flex-direction: column; align-items: center; } .lm-res small { font: 600 11px var(--sans); color: var(--muted); margin-top: 4px; }
.lm-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 12.5px; color: #c3ccd8; }
.lm-goals div div { display: flex; align-items: center; gap: 6px; margin: 3px 0; } .lm-goals .r div { justify-content: flex-end; } .lm-goals .ic { color: var(--accent); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 8px 12px; font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tb-t { width: 100%; font-size: 13.5px; } .tb-t th { background: none; color: var(--muted); font-weight: 600; font-size: 12px; }
.tb-t td { padding: 9px 8px; } .tb-t a.row { color: inherit; gap: 10px; } .tb-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.tb-t tbody tr:nth-child(even) td { background: none; }
.tb-cup { padding: 14px 4px; display: grid; gap: 12px; }
.tb-cup-st { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: var(--panel2); }
.tb-cup-st div { display: flex; flex-direction: column; } .tb-cup-st span { color: var(--muted); font-size: 13px; }
.tb-cup-st.on .ic { color: var(--accent); } .tb-cup-st.win .ic { color: var(--gold); } .tb-cup-st.out .ic { color: var(--muted); }

.nw-top { display: block; color: var(--text); }
.nw-art { position: relative; height: 150px; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.nw-art > svg { width: 100%; height: 100%; display: block; }
.nw-shirt { position: absolute; inset: 0; display: grid; place-items: center; filter: drop-shadow(0 10px 20px rgba(0,0,0,.6)); }
.nw-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; line-height: 1.35; }
.nw-more { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12.5px; font-weight: 600; margin-top: 6px; } .nw-more .ic { width: 14px; height: 14px; }
.nw-list, .tvc-list { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.nw-list { margin-top: 12px; display: grid; }
.nw-item { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); color: var(--text); }
.nw-item span:last-child { display: flex; flex-direction: column; min-width: 0; }
.nw-item b { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .nw-item small { color: var(--muted); font-size: 11.5px; }
.nw-ic { display: grid; place-items: center; width: 44px; height: 36px; flex: none; border-radius: 8px; background: color-mix(in srgb, var(--nc) 28%, #0c121a); color: #fff; }

.tvc { display: flex; flex-direction: column; }
.tvc-live { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); } .tvc-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); animation: pulse 1.6s infinite; }
.tvc-prev { display: block; }
.tvc-pitch { position: relative; height: 150px; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: repeating-linear-gradient(90deg, #2c8a3c 0 22px, #287f37 22px 44px); box-shadow: inset 0 0 60px rgba(0,0,0,.55); }
.tvc-pitch::before { content: ''; position: absolute; inset: 14px 18px; border: 2px solid rgba(255,255,255,.7); border-radius: 2px; background: linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.7) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); }
.tvc-pitch::after { content: ''; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border: 2px solid rgba(255,255,255,.7); border-radius: 50%; }
.tvc-pitch .tag.live { position: absolute; left: 10px; top: 10px; z-index: 1; } .tvc-min { position: absolute; right: 10px; top: 10px; z-index: 1; font: 700 13px var(--cond); background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 6px; }
.tvc-sc { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 10px; background: rgba(6,10,16,.78); } .tvc-sc b { font: 800 24px var(--cond); }
.tvc-pitch.off { color: #e8f5e6; text-align: center; } .tvc-pitch.off span, .tvc-pitch.off small { position: relative; z-index: 1; background: rgba(6,10,16,.7); padding: 4px 10px; border-radius: 8px; }
.tvc-pitch.off { grid-template-rows: auto auto; align-content: center; gap: 6px; }
.tvc-title { display: flex; flex-direction: column; margin: 10px 0; } .tvc-title small { color: var(--muted); }
.tvc-list { display: grid; }
.tvc-list a { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--text); }
.tvc-list a > span:not(.crest) { display: flex; flex-direction: column; min-width: 0; flex: 1; } .tvc-list b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvc-list small { color: var(--muted); font-size: 11.5px; } .tvc-list em { font-style: normal; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 3px; white-space: nowrap; }

.sq-sub { color: var(--muted); font-size: 13px; margin: -6px 0 10px; }
.sq-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.sq-pitch { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; border: 2px solid rgba(255,255,255,.18);
  background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)) center 50% / 100% 2px no-repeat, repeating-linear-gradient(180deg, #1f7a35 0 12.5%, #1b6e2f 12.5% 25%); }
.sq-pitch::before { content: ''; position: absolute; left: 30%; right: 30%; bottom: 0; height: 13%; border: 2px solid rgba(255,255,255,.5); border-bottom: 0; }
.sq-pitch::after { content: ''; position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid rgba(255,255,255,.5); border-radius: 50%; }
.sq-p { position: absolute; z-index: 1; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; width: 60px; }
.mshirt { width: 30px; height: 30px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.sq-p span { font-size: 10.5px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 64px; }
.sq-bench { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .sq-bench .sr-sec { margin: 0 0 6px; }
.sq-b { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.sq-n { color: var(--muted); font: 700 12px var(--cond); } .sq-bn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-bench .btn { margin-top: auto; }

.eco { display: flex; flex-direction: column; }
.eco-bal { font: 800 28px var(--cond); margin: 2px 0 6px; }
.spark { width: 100%; height: 46px; margin-bottom: 8px; }
.eco-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.eco-row span { color: var(--muted); grid-column: 1 / -1; } .eco-row b { font-size: 16px; }
.eco-row em { font-style: normal; font-weight: 700; font-size: 12px; align-self: center; } .eco-row em.up { color: var(--accent); } .eco-row em.down { color: var(--bad); }
.eco .card-link { margin-top: auto; }

.evc { display: flex; flex-direction: column; }
.ev { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--text); }
.card-h + .ev { border-top: 0; }
.ev { min-width: 0; } .evc, .nw, .tvc, .eco { min-width: 0; }
.ev span:last-child { display: flex; flex-direction: column; min-width: 0; } .ev b { font-size: 13px; font-weight: 600; } .ev small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.ev-ic { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; color: #fff; background: color-mix(in srgb, var(--ec) 35%, #0c121a); border: 1px solid color-mix(in srgb, var(--ec) 55%, transparent); }
.ev-ic .ic { width: 17px; height: 17px; }

.grow { position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 200px; color: var(--text); }
.grow-art { position: absolute; inset: 0; } .grow-art svg { width: 100%; height: 100%; display: block; }
.grow-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,11,18,.1), rgba(7,11,18,.92)); }
.grow-body { position: relative; padding: 22px; } .grow-body h2 { font: 800 28px var(--cond); margin: 0 0 6px; } .grow-body p { color: #c3ccd8; margin: 0 0 14px; font-size: 13.5px; }
.grow:hover .btn.primary { filter: brightness(1.1); }

/* Inicio en tableta y móvil */
@media (max-width: 1499px) {
  .h-hero { grid-column: 1 / -1; }
  .h-next, .h-last, .h-table, .h-news, .h-tv, .h-squad, .h-eco, .h-ev, .h-grow { grid-column: span 8; } .h-tv { grid-row: auto; }
}
@media (max-width: 1199px) {
  .h-next, .h-last, .h-table, .h-news, .h-tv, .h-squad, .h-eco, .h-ev, .h-grow { grid-column: span 12; }
  .search { max-width: none; }
  .pf-txt { display: none; }
}
@media (max-width: 899px) {
  .home > div { grid-column: 1 / -1 !important; }
  .hc { flex-direction: column; } .hc-art { inset: 0; } .hc-body { padding: 20px; } .hc-id { gap: 16px; }
  .crest.xl { width: 76px; height: 84px; font-size: 26px; border-radius: 12px 12px 38px 38px; }
  .hc-stats > div { padding: 0 14px; } .hc-stats b { font-size: 22px; }
  .hc-stadium { align-self: stretch; margin: 0 16px 16px; }
  .search { order: 5; flex-basis: 100%; height: 38px; } .topbar { flex-wrap: wrap; }
  .statusbar { display: none; } .view { min-height: 0; }
  .coins { height: 36px; } .top-ic { width: 36px; height: 36px; }
  .sq-body { grid-template-columns: 1fr; }
  .sq-pitch { width: 100%; max-width: 380px; margin: 0 auto; } .mshirt { width: 34px; height: 34px; }
}
@media (max-width: 640px) {
  .top-ic, .clock-pill#world-clock { display: none; }
  .hc-stats { row-gap: 12px; } .hc-stats > div { flex: 1 1 40%; border-left: 0; padding: 0; }
  .nm-btns { grid-template-columns: 1fr; }
}
/* Raíl de tableta: el ancho del raíl (este bloque redefine --side-w arriba) y sin tarjeta de Plus ni texto de cierre. */
@media (min-width: 900px) and (max-width: 1199px) { :root { --side-w: 76px; } }
@media (min-width: 900px) and (max-width: 1199px) { .plus-promo, .me-out .lbl { display: none; } .me-out { justify-content: center; padding: 10px 0; } .nav-sep { margin: 8px; } .nav a .nav-badge, .nav a .plus-chip { position: absolute; top: 3px; right: 6px; font-size: 8px; padding: 1px 3px; } }
.tabbar .ic { width: 22px; height: 22px; }
@media (min-width: 1800px) { .statusbar { margin: 24px -32px 0; } }
.tvc-list small, .nw-item small, .ev small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.nm-mode { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; } .nm-mode b { color: var(--accent); }
.side { overflow-x: hidden; }
@media (min-width: 900px) and (max-width: 1199px) { .statusbar { margin: 24px -24px 0; padding: 10px 24px; } }
.hc, .grow { color: #eef2f6; }

/* Aviso de la tanda del partido de esta jornada (y de que Jugar / Dirigir lo empiezan ya). */
.nm-when { margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: rgba(31, 224, 143, .08); border: 1px solid rgba(31, 224, 143, .25); font-size: 12.5px; line-height: 1.45; color: #cfe9dc; }
.nm-when b { color: #eef2f6; }

/* ═══ PLANTILLA y TÁCTICAS (2026-09-28, js/squad.js): dos pantallas distintas ═══ */
/* Control segmentado (vistas y filtros). */
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { background: none; border: 0; color: var(--muted); font: 600 13px var(--font, inherit); padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.seg button:hover:not(.on) { color: var(--text); }
/* Plantilla: cifras arriba, herramientas, tabla y ficha a la derecha. */
.sq-page { display: grid; gap: 14px; }
.sq-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.sq-kpis div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.sq-kpis small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.sq-kpis b { font: 700 18px var(--cond); }
.sq-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sq-tools input[type=search] { flex: 1; min-width: 160px; }
.sq-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.sq-card { position: sticky; top: calc(var(--top-h, 64px) + 12px); }
table.sq th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.sq th.sortable.on { color: var(--accent); }
table.sq td.pl-name { white-space: nowrap; }
table.sq.atributos td.at { font: 700 13px var(--cond); color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); text-align: center; min-width: 34px; }
table.sq.atributos th.num { text-align: center; }
/* Ficha del jugador. */
.pc-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pc-head h2 { margin: 0 0 4px; font-size: 20px; }
.pc-ovr { text-align: center; }
.pc-ovr .ovr { font-size: 22px; height: 38px; min-width: 50px; }
.pc-ovr small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.pc-status { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: 13px; }
.pc-status .bar { width: 80px; }
.pc-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.pc-grp h4, .pc-sub { margin: 0 0 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pc-sub { margin-top: 14px; }
.pc-at { display: grid; grid-template-columns: 1fr 60px 26px; gap: 8px; align-items: center; font-size: 13px; padding: 2px 0; }
.pc-at b { text-align: right; font-family: var(--cond); }
.pc-fits { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-fit { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.pc-fit.nat { border-color: var(--accent); }
.pc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.pc-facts div { background: var(--bg2); border-radius: 8px; padding: 6px 9px; }
.pc-facts small { display: block; color: var(--muted); font-size: 11px; }
.pc-facts b { font-size: 13px; }
/* Tácticas: pizarra grande a la izquierda, panel del jugador e instrucciones a la derecha. */
.tc-page { display: grid; grid-template-columns: minmax(320px, 560px) minmax(0, 1fr); gap: 14px; align-items: start; }
.tc-head { flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tc-pitch { position: relative; aspect-ratio: 68 / 100; max-height: 78vh; margin: 0 auto; border-radius: 12px; overflow: hidden; touch-action: none;
  background: repeating-linear-gradient(0deg, #1d6b3a 0 5%, #1a6135 5% 10%); border: 2px solid #2b8a4f; }
.tc-pitch .lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tc-attack { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font: 700 11px var(--cond); color: rgba(255,255,255,.55); letter-spacing: .1em; pointer-events: none; }
.tk { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 1px; cursor: grab; user-select: none; touch-action: none; z-index: 2; }
.tk.drag { cursor: grabbing; z-index: 5; }
.tk.drag .tk-shirt { transform: scale(1.12); box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.tk.gk { cursor: pointer; }
.tk-shirt { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--cond); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7);
  background: var(--c1); border: 3px solid var(--c2); box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .12s; }
.tk.sel .tk-shirt { outline: 3px solid var(--accent); outline-offset: 2px; }
.tk-nm { font: 700 12px var(--cond); color: #fff; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.tk-rl { font: 700 10px var(--cond); color: #d9f7e6; letter-spacing: .05em; }
.tk-mk { font: 700 10px var(--cond); color: #ffd24a; background: rgba(0,0,0,.55); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.tc-benchrow { margin-top: 10px; }
.tc-benchrow small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
#tc-bench { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tc-sub { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
#tc-side h4 { margin: 10px 0 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
#tc-side select.wide { width: 100%; }
.tc-cands { display: grid; gap: 4px; max-height: 340px; overflow: auto; }
.tc-cand { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color: var(--text); text-align: left; cursor: pointer; font-size: 13px; }
.tc-cand:hover:not([disabled]) { border-color: var(--accent); }
.tc-cand[disabled] { opacity: .45; cursor: not-allowed; }
.tc-cand .tcn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1200px) { .sq-body { grid-template-columns: 1fr; } .sq-card { position: static; } .sq-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .tc-page { grid-template-columns: 1fr; } .tc-pitch { max-height: none; width: 100%; } }
@media (max-width: 640px) { .sq-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pc-groups { grid-template-columns: 1fr; } .tk-shirt { width: 32px; height: 32px; font-size: 13px; } .tk-nm { font-size: 11px; } }
