:root {
  --bg: #f5f6f8; --panel: #ffffff; --panel2: #f0f2f5; --line: #e3e6eb;
  --text: #171a1f; --muted: #6b7380; --accent: #1f5eff; --accent-soft: #e8eeff;
  --win: #15803d; --win-soft: #dcfce7; --loss: #b91c1c; --loss-soft: #fee2e2; --draw: #a16207; --draw-soft: #fef3c7;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.05);
  --radius: 10px;
  --home: #1f5eff; --away: #e8590c; --turf: #e7f1e8; --turf2: #dcebdd; --fline: #9bb7a0; --floor: #f3eadb; --flline: #b9a582; --dirt: #ead9c0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116; --panel: #161a21; --panel2: #1d222b; --line: #2a303b;
    --text: #e7eaf0; --muted: #8b94a3; --accent: #6b93ff; --accent-soft: #1c2640;
    --win: #4ade80; --win-soft: #12301e; --loss: #f87171; --loss-soft: #3a1717; --draw: #facc15; --draw-soft: #352c0d;
    --shadow: none;
    --home: #6b93ff; --away: #ff8a4c; --turf: #13221a; --turf2: #172a1f; --fline: #3e6149; --floor: #221d16; --flline: #5b4d38; --dirt: #2b2419;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116; --panel: #161a21; --panel2: #1d222b; --line: #2a303b;
  --text: #e7eaf0; --muted: #8b94a3; --accent: #6b93ff; --accent-soft: #1c2640;
  --win: #4ade80; --win-soft: #12301e; --loss: #f87171; --loss-soft: #3a1717; --draw: #facc15; --draw-soft: #352c0d;
  --shadow: none;
    --home: #6b93ff; --away: #ff8a4c; --turf: #13221a; --turf2: #172a1f; --fline: #3e6149; --floor: #221d16; --flline: #5b4d38; --dirt: #2b2419;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; text-align: right; }
.mono { font-family: 'JetBrains Mono', monospace; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand span { color: var(--accent); margin-left: 3px; }
.window { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.menu-btn, .theme-btn { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; }
.menu-btn { display: none; }

.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 54px); }
.side { border-right: 1px solid var(--line); background: var(--panel); padding: 12px 10px; position: sticky; top: 54px; height: calc(100vh - 54px); overflow-y: auto; }
.side h4 { margin: 14px 8px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.side h4:first-child { margin-top: 2px; }
.side a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--text); font-size: 13.5px; }
.side a:hover { background: var(--panel2); }
.side a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

main { padding: 22px 24px 60px; min-width: 0; max-width: 1200px; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
h1 img { width: 34px; height: 34px; object-fit: contain; }
h2 { font-size: 15px; margin: 26px 0 10px; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.crumb { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.crumb a { color: var(--accent); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.card .k { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.card .v { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.card .s { color: var(--muted); font-size: 12px; margin-top: 2px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--text); border-color: var(--accent); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; background: var(--panel2); position: sticky; top: 0; }
th.sort { cursor: pointer; user-select: none; }
th.sort.on { color: var(--accent); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--panel2); }
td .who { display: flex; align-items: center; gap: 8px; }
td .who img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.gside { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.gside img { width: 40px; height: 40px; object-fit: contain; }
td a.lnk:hover { color: var(--accent); text-decoration: underline; }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.W { background: var(--win-soft); color: var(--win); }
.L { background: var(--loss-soft); color: var(--loss); }
.D { background: var(--draw-soft); color: var(--draw); }
.form { display: inline-flex; gap: 3px; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.game { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow); display: block; }
a.game:hover { border-color: var(--accent); }
.game .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-bottom: 6px; gap: 8px; }
.game .meta span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game .row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.game .row img { width: 20px; height: 20px; object-fit: contain; }
.game .row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game .row .sc { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.game .row.lose { color: var(--muted); }
.game .row.lose .sc { font-weight: 500; }
.game .sets { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.day { color: var(--muted); font-size: 12px; font-weight: 600; margin: 18px 0 8px; text-transform: capitalize; }
.day:first-child { margin-top: 0; }

.insights { list-style: none; margin: 0; padding: 4px 0; }
.insights li { padding: 9px 14px 9px 30px; border-bottom: 1px solid var(--line); position: relative; }
.insights li:last-child { border-bottom: 0; }
.insights li::before { content: ''; position: absolute; left: 14px; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.toolbar input, .toolbar select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; min-width: 0; }
.toolbar input { flex: 1 1 200px; max-width: 320px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: var(--panel); border: 0; padding: 7px 12px; font: inherit; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.chart { padding: 12px 14px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .ttl { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.bar-pos { fill: var(--win); } .bar-neg { fill: var(--loss); } .bar-zero { fill: var(--draw); }
.axis { stroke: var(--line); } .lbl { fill: var(--muted); font-size: 10px; font-family: Inter, sans-serif; }
.line-a { stroke: var(--accent); fill: none; stroke-width: 2; } .dot-a { fill: var(--accent); }

.cmp td:first-child { color: var(--muted); }
.cmp .better { color: var(--win); font-weight: 600; }

.loading, .empty, .err { padding: 40px 16px; text-align: center; color: var(--muted); }
.err { color: var(--loss); }
.spin { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: s .8s linear infinite; margin: 0 auto 10px; }
@keyframes s { to { transform: rotate(360deg); } }
.note { font-size: 12px; color: var(--muted); margin-top: 10px; }

.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.home-grid a.card:hover { border-color: var(--accent); }
.home-grid .g { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.home-grid .nm { font-weight: 600; font-size: 15px; margin-top: 2px; }

/* probabilidades */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.chip { flex: none; display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.chip span { color: var(--muted); font-size: 11px; font-weight: 400; }
.chip:hover, .chip.on { border-color: var(--accent); }
.chip.on { background: var(--accent-soft); }
.fld { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.fld.inl { flex-direction: row; align-items: center; gap: 6px; }
.fld select, .fld input { min-width: 0; max-width: 100%; }
.toolbar .fld input { flex: none; width: 110px; }
.toolbar .fld select { min-width: 200px; }
.toolbar.lines { margin-top: 18px; }
.card.tm { display: flex; align-items: center; gap: 12px; }
.card.tm img { width: 36px; height: 36px; object-fit: contain; flex: none; }
.card.tm .nm { font-weight: 600; font-size: 15px; }
.card.tm .s { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.warn { margin-top: 10px; padding: 9px 12px; border-radius: 8px; background: var(--draw-soft); color: var(--draw); font-size: 12.5px; }
table.odds td { vertical-align: middle; }
table.odds td .s { color: var(--muted); font-size: 11.5px; }
table.odds tr.grp td { background: var(--panel2); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding-top: 6px; padding-bottom: 6px; }
.pbar { display: inline-block; width: 54px; height: 6px; border-radius: 3px; background: var(--panel2); margin-right: 8px; vertical-align: middle; overflow: hidden; }
.pbar span { display: block; height: 100%; background: var(--accent); }
input.odd { width: 72px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; font: inherit; text-align: right; }
input.odd:focus { outline: none; border-color: var(--accent); }
.vtag { display: inline-block; padding: 2px 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; }
.vtag.pos { background: var(--win-soft); color: var(--win); }
.vtag.neu { background: var(--panel2); color: var(--muted); }
.vtag.neg { background: var(--loss-soft); color: var(--loss); }

/* consultar apuesta */
.side a.bet-link { margin-bottom: 6px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent-soft); }
.betform { padding: 14px 16px; margin-bottom: 14px; }
.betform label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.betrow { display: flex; gap: 8px; }
.betrow input { flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; }
.betrow input:focus { outline: none; border-color: var(--accent); }
.betrow button { flex: none; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 0 18px; font: inherit; font-weight: 600; cursor: pointer; }
.betex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.betex button, .alt button { background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.betex button:hover, .alt button:hover, .alt button.on { border-color: var(--accent); }
.alt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.alt button { border-radius: 8px; text-align: left; }
.alt button span { color: var(--muted); }
.alt button.on { background: var(--accent-soft); }
.betres { display: flex; gap: 20px; padding: 18px; align-items: flex-start; }
.bigp { flex: none; min-width: 120px; text-align: center; }
.bigp .num { font-size: 42px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.bigp .lvl { margin-top: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 5px; display: inline-block; }
.lvl.alta { background: var(--win-soft); color: var(--win); }
.lvl.media { background: var(--accent-soft); color: var(--accent); }
.lvl.baja { background: var(--draw-soft); color: var(--draw); }
.lvl.muy-baja { background: var(--loss-soft); color: var(--loss); }
.bdet { min-width: 0; flex: 1; }
.bdet .blabel { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.bdet .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* en vivo */
.livepill { display: inline-block; background: var(--loss); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; margin-right: 4px; }
.lvhead { padding: 14px 16px; }
.lvhead .s { color: var(--muted); font-size: 12px; }
.lvstatus { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 10px; flex-wrap: wrap; }
.lvscore { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.lvteam { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.lvteam img { width: 48px; height: 48px; object-fit: contain; }
.lvteam .nm { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.lvteam.home .nm { color: var(--home); } .lvteam.away .nm { color: var(--away); }
.lvscore .big { font-size: 40px; font-weight: 700; letter-spacing: -.02em; display: flex; gap: 10px; }
.lvscore .big span { color: var(--muted); font-weight: 400; }
table.lines { margin-top: 12px; font-size: 12px; } table.lines th, table.lines td { padding: 4px 8px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.dot.home { background: var(--home); } .dot.away { background: var(--away); }
table.tsets td { font-size: 16px; padding: 8px 10px; } table.tsets td.won { font-weight: 700; } table.tsets sup { font-size: 10px; color: var(--muted); }
table.tsets tr.lose td { color: var(--muted); }
table.tsets td.who { white-space: normal; width: 100%; }
table.tsets td.who img { width: 22px; height: 16px; object-fit: contain; vertical-align: -3px; margin-right: 8px; }
.srv { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--draw); margin-left: 8px; }

.pitchwrap { padding: 10px; }
.pitchwrap svg { width: 100%; height: auto; display: block; }
.pitch .turf { fill: var(--turf); } .pitch .stripe { fill: var(--turf2); }
.pl * { fill: none; stroke: var(--fline); stroke-width: .35; }
.pl .spot { fill: var(--fline); }
.pl .goalbox { fill: var(--fline); fill-opacity: .25; }
.pitchlbl { font-size: 2.4px; fill: var(--muted); }
.mk.home { fill: var(--home); } .mk.away { fill: var(--away); } .mk.nside { fill: var(--muted); }
.mk.hollow { fill: none; stroke-width: .4; } .mk.hollow.home { stroke: var(--home); } .mk.hollow.away { stroke: var(--away); }
.mk.faint { opacity: .45; }
.goalmk { stroke: var(--panel); stroke-width: .45; }
.shotline { stroke-width: .3; stroke-dasharray: .8 .6; } .shotline.home { stroke: var(--home); } .shotline.away { stroke: var(--away); }
.xmk line { stroke-width: .4; } .xmk.home line { stroke: var(--home); } .xmk.away line { stroke: var(--away); } .xmk.faint { opacity: .55; }
.lastring { fill: none; stroke: var(--text); stroke-width: .3; stroke-dasharray: .7 .5; }
.card-yellow { fill: #facc15; } .card-red { fill: #dc2626; }
.pkey { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 4px 2px; font-size: 12px; color: var(--muted); align-items: center; }
.pkey i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; background: var(--muted); }
.pkey .k-off i, .pkey .k-miss i { background: none; border: 1.5px solid var(--muted); }
.pkey .k-blocked i { border-radius: 1px; transform: rotate(45deg) scale(.8); }
.pkey .k-corner i { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.pkey .k-foul i { width: 6px; height: 6px; opacity: .5; }
.pkey .k-goal i { width: 11px; height: 11px; background: var(--text); }
.lastev { margin-top: 8px; font-size: 13px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 8px 8px 0; }
.keyev { padding: 6px 0; }
.keyev > div { display: flex; gap: 10px; align-items: center; padding: 6px 14px; font-size: 13px; }
.keyev > div.away { color: var(--away); } .keyev > div.home { color: var(--home); flex-direction: row-reverse; text-align: right; }
.keyev .t { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 40px; }
.ic { width: 10px; height: 13px; border-radius: 2px; flex: none; }
.ic-goal { width: 11px; height: 11px; border-radius: 50%; background: currentColor; } .ic-yellow { background: #facc15; } .ic-red { background: #dc2626; }
.chart .bar.home { fill: var(--home); } .chart .bar.away { fill: var(--away); }
.wp-line { fill: none; stroke: var(--home); stroke-width: 2; }
.wpl { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.sbars { padding: 6px 14px; }
.sbar { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sbar:last-child { border-bottom: 0; } .sbar > span:last-child { text-align: right; }
.sbar .lbl { text-align: center; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.sbar .track { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--panel2); gap: 2px; }
.sbar .track .home { background: var(--home); } .sbar .track .away { background: var(--away); }
.feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.feed li { display: flex; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed li.sc { font-weight: 600; }
.feed .t { color: var(--muted); flex: none; min-width: 52px; font-variant-numeric: tabular-nums; }
.feed li span:nth-child(2) { flex: 1; min-width: 0; }
.court .floor { fill: var(--floor); } .court .pl * { stroke: var(--flline); stroke-width: .25; }
.court .rim { stroke: var(--loss); fill: none; stroke-width: .3; } .court .board { stroke-width: .5; }
.field .grass { fill: var(--turf); } .field .dirt { fill: var(--dirt); } .field .infield { fill: var(--turf2); }
.field .pl line { stroke: var(--fline); stroke-width: 1; }
.base { fill: var(--panel); stroke: var(--fline); stroke-width: 1; } .base.on { fill: var(--draw); }
.plate { fill: var(--panel); stroke: var(--fline); }
.hit { stroke: var(--panel); stroke-width: .8; } .hit.hit { fill: var(--win); } .hit.hr { fill: var(--accent); } .hit.out { fill: var(--muted); opacity: .6; } .hit.other { fill: var(--draw); }
.pkey .k-hit i { background: var(--win); } .pkey .k-hr i { background: var(--accent); } .pkey .k-out i { opacity: .6; }
.zone .kzone { fill: none; stroke: var(--text); stroke-width: 1; } .zone .kgrid { stroke: var(--line); stroke-width: .6; }
.zone .pitch { stroke: var(--panel); stroke-width: 1; } .zone .pitch.ball { fill: var(--win); } .zone .pitch.strike { fill: var(--loss); } .zone .pitch.inplay { fill: var(--accent); }
.zone .pn { font-size: 8px; fill: #fff; text-anchor: middle; font-weight: 700; }
.pkey .k-ball i { background: var(--win); } .pkey .k-strike i { background: var(--loss); } .pkey .k-inplay i { background: var(--accent); }
.count { display: flex; gap: 16px; justify-content: center; font-size: 13px; padding: 6px 0 4px; align-items: center; flex-wrap: wrap; }
.count span { color: var(--muted); margin-right: 5px; font-weight: 600; }
.count i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); margin-right: 3px; vertical-align: -1px; }
.count i.b { background: var(--win); border-color: var(--win); } .count i.s { background: var(--loss); border-color: var(--loss); } .count i.o { background: var(--draw); border-color: var(--draw); }
.tcourt .tturf { fill: var(--turf); } .tcourt .net { stroke: var(--text); stroke-width: .5; }
.tname { font-size: 2.6px; fill: var(--muted); } .tbig { font-size: 8px; font-weight: 700; fill: var(--text); }

@media (max-width: 820px) {
  .lvscore .big { font-size: 30px; }
  .lvteam img { width: 36px; height: 36px; }
  .betres { flex-direction: column; gap: 12px; }
  .bigp { text-align: left; }
  .toolbar .fld { flex: 1 1 140px; }
  .toolbar .fld select { min-width: 0; width: 100%; }
  .menu-btn { display: inline-block; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 54px; width: 240px; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
  .side.open { transform: none; }
  main { padding: 16px 16px 50px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .window { display: none; }
  .games { grid-template-columns: minmax(0, 1fr); }
}

/* acceso */
body.locked .side, body.locked .menu-btn { display: none; }
body.locked .layout { grid-template-columns: minmax(0, 1fr); }
.login { max-width: 360px; margin: 10vh auto 0; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.login h1 { margin: 0; }
.login .sub { margin: 0 0 6px; }
.login input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font: inherit; font-size: 15px; }
.login input:focus { outline: none; border-color: var(--accent); }
.login button { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 11px; font: inherit; font-weight: 600; cursor: pointer; }
.login button:disabled { opacity: .6; }
.lerr { color: var(--loss); font-size: 13px; min-height: 18px; }
