/* NBA365 WebApp · estilos (sin dependencias, CSP estricta: nada en línea) */
:root {
  --bg: #0a0e16; --surface: #111827; --surface-2: #172032; --surface-3: #1e293d; --border: #253150;
  --text: #e8edf7; --muted: #8e9ab3; --faint: #5d6a85;
  --accent: #ff7a2f; --accent-2: #ffb36b; --blue: #4f8cff;
  --green: #22c55e; --green-bg: rgba(34,197,94,.14); --yellow: #eab308; --yellow-bg: rgba(234,179,8,.14);
  --red: #ef4444; --red-bg: rgba(239,68,68,.14); --orange: #f97316; --orange-bg: rgba(249,115,22,.14);
  --gray: #94a3b8; --gray-bg: rgba(148,163,184,.13);
  --radius: 14px; --radius-sm: 9px; --shadow: 0 6px 24px rgba(0,0,0,.28);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f5fa; --surface: #ffffff; --surface-2: #f6f8fc; --surface-3: #edf1f8; --border: #dde3ee;
    --text: #131a2a; --muted: #5d6882; --faint: #95a0b8; --shadow: 0 4px 18px rgba(20,30,60,.08);
    --green-bg: rgba(34,197,94,.12); --yellow-bg: rgba(234,179,8,.16); --red-bg: rgba(239,68,68,.10);
    --orange-bg: rgba(249,115,22,.12); --gray-bg: rgba(100,116,139,.12); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f5fa; --surface: #ffffff; --surface-2: #f6f8fc; --surface-3: #edf1f8; --border: #dde3ee;
  --text: #131a2a; --muted: #5d6882; --faint: #95a0b8; --shadow: 0 4px 18px rgba(20,30,60,.08);
  --green-bg: rgba(34,197,94,.12); --yellow-bg: rgba(234,179,8,.16); --red-bg: rgba(239,68,68,.10);
  --orange-bg: rgba(249,115,22,.12); --gray-bg: rgba(100,116,139,.12); color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased;
       min-height: 100vh; padding-bottom: 76px; }
@media (min-width: 900px) { body { padding-bottom: 0; } }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--green); } .neg { color: var(--red); }

/* ---------- barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 10px 18px;
          background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px);
          border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: .3px; font-size: 17px; white-space: nowrap; }
.brand .ball { width: 26px; height: 26px; }
.brand small { color: var(--accent); font-weight: 700; }
.tabs { display: none; gap: 2px; margin-left: 8px; overflow-x: auto; }
@media (min-width: 900px) { .tabs { display: flex; } }
.tabs a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.tabs a.active { background: var(--surface-3); color: var(--text); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px;
        font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); display: inline-block; flex: none; }
.dot.ok { background: var(--green); } .dot.warn { background: var(--yellow); } .dot.bad { background: var(--red); }
.dot.live { background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.7); } 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--border);
            background: var(--surface); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- navegación inferior (móvil) ---------- */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
             background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .bottomnav { display: none; } }
.bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border: 0;
             background: none; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; border-radius: 10px; }
.bottomnav a.active, .bottomnav button.active { color: var(--accent); }
.bottomnav svg { width: 22px; height: 22px; }
.bottomnav a:hover { text-decoration: none; }
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; }
.sheet-panel { width: 100%; background: var(--surface); border-radius: 18px 18px 0 0; padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
               display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-panel a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 12px;
                 background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13px; }
.sheet-panel svg { width: 24px; height: 24px; color: var(--accent); }

/* ---------- contenido ---------- */
main { max-width: 1500px; margin: 0 auto; padding: 18px 16px 30px; }
@media (min-width: 900px) { main { padding: 22px 24px 40px; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; margin: 0; letter-spacing: -.2px; }
.page-head .sub { color: var(--muted); font-size: 13.5px; }
.page-head .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card h2 .tag { margin-left: auto; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.kpi .value { font-size: 24px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .hint { color: var(--faint); font-size: 12px; margin-top: 2px; }

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border);
       background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a0d03; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
        font-weight: 600; font-size: 13px; cursor: pointer; }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { opacity: .7; margin-left: 4px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 11px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button.active { background: var(--surface-3); color: var(--text); }
.seg button svg { width: 16px; height: 16px; display: block; }

/* ---------- decisiones ---------- */
.dec { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
       white-space: nowrap; border: 1px solid transparent; }
.dec.JUGADA { background: var(--green-bg); color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.dec.VIGILAR { background: var(--yellow-bg); color: var(--yellow); }
.dec.NO { background: var(--red-bg); color: var(--red); }
.dec.REVISAR { background: var(--orange-bg); color: var(--orange); }
.dec.SIN_CUOTA { background: var(--gray-bg); color: var(--gray); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700;
       background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.tag.live { background: var(--red-bg); color: var(--red); } .tag.ok { background: var(--green-bg); color: var(--green); }
.tag.warn { background: var(--yellow-bg); color: var(--yellow); } .tag.accent { background: var(--orange-bg); color: var(--accent); }

/* ---------- tarjetas de partido ---------- */
.games { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.game { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
        padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, transform .15s; }
.game:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.game.is-live { border-left: 3px solid var(--red); }
.game.has-value { box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 45%, transparent), var(--shadow); }
.game.is-final { opacity: .72; }
.game-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.prio { min-width: 26px; height: 22px; display: inline-grid; place-items: center; border-radius: 7px; background: var(--surface-3);
        color: var(--text); font-weight: 800; font-size: 12px; padding: 0 6px; }
.game-top .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.team { display: flex; flex-direction: column; }
.team.home { align-items: flex-end; text-align: right; }
.team .abbr { font-size: 19px; font-weight: 800; letter-spacing: .4px; }
.team .name { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.pts { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.score-mid { text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; min-width: 74px; }
.score-mid .big { display: block; font-size: 15px; color: var(--text); }
.reasons { display: flex; flex-wrap: wrap; gap: 5px; }
.best { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 10px;
        display: flex; flex-direction: column; gap: 5px; }
.best .line1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.best .pick-name { font-weight: 650; }
.best .meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.mine { display: flex; flex-direction: column; gap: 6px; }
.mine-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.mine-row .txt { overflow: hidden; text-overflow: ellipsis; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; grid-column: 1 / -1; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--gray); width: 0; transition: width .4s; }
.bar > i.g { background: var(--green); } .bar > i.y { background: var(--yellow); } .bar > i.r { background: var(--red); }
.game-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* ---------- tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; background: var(--surface-2);
     position: sticky; top: 0; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.r, th.r { text-align: right; }
tr.clickable { cursor: pointer; }
.stake-input { width: 84px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }

/* ---------- gráficos ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-txt { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .lbl { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend i.c1 { background: var(--accent); } .legend i.c2 { background: var(--blue); } .legend i.c3 { background: var(--gray); }
.legend i.c4 { background: var(--green); }
.hbar { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr auto; gap: 8px 12px; align-items: center; font-size: 13px; }
.hbar .track { height: 10px; background: var(--surface-3); border-radius: 99px; position: relative; overflow: hidden; }
.hbar .track > i { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.hbar .track > i.pos-bar { background: var(--green); left: 50%; }
.hbar .track > i.neg-bar { background: var(--red); right: 50%; }
.hbar .track::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--faint); }

/* ---------- avisos ---------- */
.callout { border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--border); background: var(--surface-2); }
.callout.bad { background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.callout.good { background: var(--green-bg); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.callout.warn { background: var(--yellow-bg); border-color: color-mix(in srgb, var(--yellow) 35%, transparent); }
.callout h3 { margin: 0 0 6px; font-size: 15px; }
.callout p { margin: 4px 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 34px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--bg);
         padding: 10px 16px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.toast.err { background: var(--red); color: #fff; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%;
            animation: sk 1.2s infinite; border-radius: var(--radius); min-height: 160px; border: 1px solid var(--border); }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.spin { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: rot .8s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- ajustes ---------- */
.setting { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: center; }
.setting:last-child { border-bottom: 0; }
.setting .help { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border: 1px solid var(--border); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 2px; top: 2px; background: var(--muted); border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
select.sel { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); min-width: 90px; }

/* ---------- manuales ---------- */
.manual-layout { display: grid; gap: 16px; }
@media (min-width: 1000px) { .manual-layout { grid-template-columns: 260px 1fr; } }
.toc { position: sticky; top: 70px; align-self: start; max-height: calc(100vh - 90px); overflow: auto; }
.toc a { display: block; padding: 4px 0; color: var(--muted); font-size: 13px; }
.toc a.h3 { padding-left: 12px; font-size: 12.5px; }
.md { line-height: 1.65; max-width: 900px; overflow-wrap: anywhere; }
.md h1 { font-size: 24px; margin: 6px 0 14px; } .md h2 { font-size: 19px; margin: 26px 0 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.md h3 { font-size: 16px; margin: 20px 0 8px; } .md h4 { font-size: 14.5px; margin: 16px 0 6px; }
.md p { margin: 8px 0; } .md ul, .md ol { padding-left: 22px; margin: 8px 0; } .md li { margin: 3px 0; }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
.md pre { background: var(--surface-2); border: 1px solid var(--border); padding: 12px; border-radius: 10px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--muted); }
.md table { margin: 10px 0; display: block; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 380px; }
/* v11.9: login SIN card, oscuro, sobre un collage minimalista de los 30 equipos */
.login-wrap { position: fixed; inset: 0; overflow: hidden; background: #05070b; color: #e9edf5; z-index: 50;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.login-wrap.hidden { display: none; }
.login-bg { position: absolute; inset: -6%; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); grid-auto-rows: 92px;
  gap: 18px; padding: 10px; transform: rotate(-8deg) scale(1.12); animation: lb-drift 60s linear infinite alternate; }
@media (min-width: 900px) { .login-bg { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-auto-rows: 120px; gap: 26px; } }
.lb-cell { display: grid; place-items: center; transform: rotate(var(--r, 0deg)); opacity: 0; animation: lb-in .9s ease-out forwards; }
.lb-cell img { width: 74%; height: 74%; object-fit: contain; filter: grayscale(.85) brightness(.9) contrast(1.05); opacity: .34; transition: opacity .4s, filter .4s; }
@media (hover: hover) { .lb-cell:hover img { filter: none; opacity: .55; } }
@keyframes lb-in { from { opacity: 0; transform: rotate(var(--r, 0deg)) scale(.7); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes lb-drift { from { translate: 0 0; } to { translate: -40px -60px; } }
@media (prefers-reduced-motion: reduce) { .login-bg { animation: none; } .lb-cell { animation: none; opacity: 1; } }
.login-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(5,7,11,.72) 0, rgba(5,7,11,.45) 38%, rgba(5,7,11,.7) 80%, rgba(5,7,11,.92) 100%),
              linear-gradient(180deg, rgba(255,122,47,.07), transparent 40%); }
.login-wrap .login { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.login-wrap .login h1.brand-badge { align-self: center; margin: 0 0 6px; }
.login-sub { color: #8d97a8; font-size: 13.5px; margin-bottom: 18px; letter-spacing: .3px; }
.login-wrap .field { text-align: left; margin: 0 0 12px; }
.login-wrap .field label { color: #8d97a8; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.login-wrap .field input { background: rgba(14,18,26,.72); border: 1px solid rgba(255,255,255,.1); color: #fff; padding: 14px 14px; border-radius: 14px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 16px; }
.login-wrap .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,47,.25); }
.login-wrap .check { justify-content: center; color: #8d97a8; margin: 2px 0 14px; }
.login-wrap .btn.primary { width: 100%; justify-content: center; padding: 14px; font-size: 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(255,122,47,.25); }
.login-wrap .link-btn { margin-top: 12px; color: #8d97a8; }
.login-wrap .muted { color: #8d97a8; }
.login-wrap .err-msg:not(:empty) { margin-bottom: 10px; }
.login h1 { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 0 0 4px; }
.login .ball { width: 34px; height: 34px; }
.field { display: flex; flex-direction: column; gap: 5px; margin: 12px 0; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.field input { padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.field input:focus, select.sel:focus, .stake-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.err-msg { color: var(--red); font-size: 13.5px; min-height: 20px; }
.list-compact td { padding: 7px 10px; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }

/* ---------- v1.1: tarjetas de jugada (como en Telegram) ---------- */
.picks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.pick { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px;
        display: flex; flex-direction: column; gap: 9px; }
.pick.is-value { border-color: color-mix(in srgb, var(--green) 55%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 30%, transparent); }
.pick.is-mine { border-left: 3px solid var(--accent); }
.pick-head { display: flex; align-items: flex-start; gap: 10px; }
.pick-head .tag { margin-left: auto; }
.medal { font-size: 26px; line-height: 1; flex: none; }
.medal.sm { font-size: 18px; }
.pick-title b { font-size: 15.5px; line-height: 1.3; }
.pick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px; }
.pick-stats > div { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pick-stats .lbl, .hero-stats .lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.pick-stats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pick-dec { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pick-why { font-size: 13.5px; color: var(--muted); }
.pick-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; border-top: 1px dashed var(--border); }
.mini-pick { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.mini-pick + .mini-pick { border-top: 1px dashed var(--border); padding-top: 7px; }
.mini-pick .meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12.5px; align-items: center; margin-top: 3px; }
.bet-wrap { display: flex; flex-direction: column; gap: 4px; }
.bet-game { padding-left: 4px; }

/* ---------- pantalla de partido ---------- */
.game-hero { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface));
             border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 8px 0 12px; }
.hero-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.hero-teams .abbr { font-size: 24px; font-weight: 800; }
.hero-teams .pts { font-size: 32px; font-weight: 800; display: block; text-align: center; }
.hero-teams .score-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.hero-stats > div { background: color-mix(in srgb, var(--bg) 35%, transparent); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.toast.clickable, .notif.clickable { cursor: pointer; }
.toast { z-index: 95; }                  /* v2.1: siempre por encima de las ventanas (antes quedaba detrás del modal) */
.toast.err { white-space: normal; max-width: min(520px, calc(100vw - 32px)); }
.notif.clickable:active { opacity: .7; }
.snd-list .setting { gap: 8px; }
#hero-stats b { white-space: nowrap; font-size: 17px; }
#hero-stats .arrow { color: var(--muted); font-weight: 400; margin: 0 1px; }
#hero-stats .hs-total { outline: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
@media (max-width: 380px) { #hero-stats b { font-size: 15px; } #hero-stats .faint { font-size: 10.5px; } }
.hero-stats.c2 { grid-template-columns: repeat(2, 1fr); }
.totals-bar { margin-top: 10px; }
.totals-bar > div { min-width: 0; }
.hero-stats b { font-size: 18px; } .hero-stats .faint { font-size: 11.5px; }
.action-bar { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; margin-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.action-bar::-webkit-scrollbar { display: none; }
.action-bar .btn { flex: none; }
@media (max-width: 899px) { .action-bar { position: sticky; top: 56px; z-index: 5; background: var(--bg); margin: 0 -16px 6px; padding: 8px 16px; } }
.section-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; }
.section-title h2 { font-size: 17px; margin: 0; }
.analysis-card p { margin: 6px 0; }
.analysis-card .callout { margin-top: 6px; padding: 8px 12px; }
details summary { cursor: pointer; }
.timeline { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.tl-row { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.tl-when { display: flex; flex-direction: column; font-weight: 700; }
.tl-what { display: flex; flex-direction: column; gap: 3px; }
.tag-right { margin-left: auto; }
.tg { line-height: 1.55; font-size: 14px; overflow-wrap: anywhere; }
.tg code { font-family: var(--mono); background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }

/* ---------- hoja inferior / modal ---------- */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .modal { align-items: center; } }
.modal-panel { width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; background: var(--surface);
               border-radius: 18px 18px 0 0; box-shadow: var(--shadow); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 700px) { .modal-panel { border-radius: 18px; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 14px 16px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
body.no-scroll { overflow: hidden; }
.form .field { margin: 10px 0; }
.btn.block { width: 100%; justify-content: center; padding: 12px; }
textarea { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font: inherit; color: inherit; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin: 4px 0 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- v1.2: logos, cuartos, notificaciones, herramientas en vivo ---------- */
.logo { width: 34px; height: 34px; object-fit: contain; display: block; margin-bottom: 3px; }
.team.home .logo { margin-left: auto; }
.logo.lg { width: 58px; height: 58px; margin-bottom: 6px; }
.hero-teams .team.home .logo { margin-left: auto; }
.logo.xs { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; margin: 0 4px 0 0; }
.nowrap { white-space: nowrap; }
.qtable { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.qtable th, .qtable td { padding: 3px 5px; text-align: center; border: 0; background: none; position: static; text-transform: none; letter-spacing: 0; }
.qtable th { color: var(--faint); font-weight: 700; font-size: 11px; }
.qtable td:first-child, .qtable th:first-child { text-align: left; }
.qtable td:last-child { color: var(--accent); }
.qtable tbody tr:hover { background: none; }
.live-card h2 { gap: 8px; flex-wrap: wrap; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field input, .field select, .form select.sel { width: 100%; min-width: 0; box-sizing: border-box; }
.modal-body { overflow-x: hidden; }
.modal-panel { overflow: hidden; }
.bell { position: relative; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
         background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.notif-list { display: flex; flex-direction: column; margin-top: 12px; }
.notif { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.notif.unread { background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 8px; }
.n-ic { font-size: 18px; }

/* ---------- v1.3: dashboard en vivo (cinta, progreso, momentum, destellos), push, intervalos ---------- */
.ticker { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px 4px; scroll-snap-type: x mandatory;
          scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ticker::-webkit-scrollbar { display: none; }
.tick { flex: none; scroll-snap-align: start; min-width: 132px; display: flex; flex-direction: column; gap: 3px; padding: 9px 11px;
        border-radius: 14px; border: 1px solid color-mix(in srgb, var(--red) 40%, var(--border)); cursor: pointer; text-align: left;
        background: linear-gradient(160deg, color-mix(in srgb, var(--red) 12%, var(--surface)), var(--surface)); color: var(--text); }
.tick-row { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 4px; font-size: 14px; }
.tick-row .num { font-weight: 800; font-size: 16px; }
.tick-clock { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: 2px; }
/* v3.0: filas de pastillas/botones: se reparten el ancho por igual; si no caben, carrusel horizontal */
.pill-row { display: flex !important; flex-wrap: nowrap !important; gap: 6px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.pill-row::-webkit-scrollbar { display: none; }
.pill-row > * { flex: 1 1 0; min-width: max-content; justify-content: center; text-align: center; scroll-snap-align: start; }
.pill-row > .seg, .pill-row > .chip.ghost { flex: 0 0 auto; }
.game-actions.pill-row > * { display: inline-flex; align-items: center; gap: 6px; }
.game-actions .btn svg, .action-bar .btn svg, .page-head .btn svg { width: 16px; height: 16px; }
.btn.on { border-color: var(--accent); color: var(--accent); }
.page-head .actions.pill-row { width: 100%; margin-left: 0; }
.seg.pill-row a { flex: 1 1 0; text-align: center; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: inherit; font-weight: 600; }
.seg.pill-row a.active { background: var(--accent); color: #111; }
.gsec { margin-top: 12px; }
.edit-row { display: flex; justify-content: center; margin: 18px 0 6px; }
/* orden editable */
.ord-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ord-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--surface-3); }
.ord-row .ord-name { flex: 1; font-weight: 600; min-width: 0; }
.ord-row.off .ord-name { opacity: .45; text-decoration: line-through; }
.switch.sm { transform: scale(.8); }
/* animaciones (apagables) */
.fx-pop { animation: fx-pop .45s cubic-bezier(.2,1.8,.4,1); }
@keyframes fx-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.fx-burst { position: fixed; z-index: 130; pointer-events: none; font-size: 16px; color: #ffc43d; transform: translate(-50%, -50%);
  animation: fx-burst .75s ease-out forwards; text-shadow: 0 0 6px rgba(255,159,28,.7); }
@keyframes fx-burst { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.6); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.2); } }
/* «Más»: cuadrícula o lista */
.more-mode { display: flex; gap: 6px; margin-bottom: 10px; grid-column: 1 / -1; }
.more-mode button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.more-mode svg { width: 16px; height: 16px; }
.sheet-panel { display: block !important; }
.more-links.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.more-links.list { display: flex; flex-direction: column; gap: 4px; }
.more-links.list a { flex-direction: row !important; justify-content: flex-start; gap: 12px !important; padding: 12px 10px !important; text-align: left; }
.more-links.list .more-arrow { margin-left: auto; color: var(--muted); font-size: 20px; }
/* historial */
.filters { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.filters .search { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-3); color: var(--text); font: inherit; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row .sel { flex: 1 1 140px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0; }
.hist-games { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.hist-game { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.hg-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.hg-score { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.hg-score .num { font-weight: 800; margin: 0 4px; }
/* cuenta: pendientes */
.miss-list { display: flex; flex-direction: column; gap: 6px; }
.miss-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--amber, #f5a524) 40%, var(--border)); background: color-mix(in srgb, var(--amber, #f5a524) 8%, var(--surface));
  color: var(--text); font: inherit; cursor: pointer; }
/* v3.1: cuartos dentro de la tarjeta del marcador + 🌡 momentum */
/* v3.3: el marcador por cuartos en su propia caja, con el mismo estilo que las de arriba */
.hero-q:not(:empty) { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 35%, transparent); }
.hero-q .qtable { width: 100%; margin: 0; }
.hero-q .qtable th { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.momo-sim { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 3px; }
.momo { margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-3); display: flex; flex-direction: column; gap: 4px;
  border-left: 4px solid var(--muted); }
.momo.mood-hot { border-left-color: #ff6b35; } .momo.mood-cold { border-left-color: #3da5ff; } .momo.mood-tense { border-left-color: #ffc43d; }
.momo-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
/* 💬 asistente */
.chat-box { display: flex; flex-direction: column; gap: 10px; min-height: 40vh; max-height: 62vh; overflow-y: auto; padding: 4px 2px 10px; }
.msg { max-width: 92%; padding: 10px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; }
.msg.me { align-self: flex-end; background: var(--accent); color: #111; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 4px; }
.chat-form { position: sticky; bottom: 70px; display: flex; gap: 8px; align-items: center; padding: 8px 0; background: var(--bg); }
.chat-form input#chat-in { flex: 1; min-width: 0; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-3); color: var(--text); font: inherit; }
.btn.icon-only { padding: 9px 12px; font-size: 18px; cursor: pointer; }
.chat-empty { padding: 18px 6px; }
/* 🏆 pick del día */
.pick-day { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 12px; border-radius: 18px; cursor: pointer;
  border: 1px solid rgba(255,196,92,.35); background: radial-gradient(circle at 12% 50%, rgba(255,159,28,.18), transparent 60%), var(--surface);
  color: var(--text); font: inherit; }
.pd-logo { position: relative; flex: none; width: 64px; height: 64px; display: grid; place-items: center; }
.pd-logo img, .pd-logo svg { width: 52px; height: 52px; position: relative; z-index: 1; }
.pd-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,196,92,.6); box-shadow: 0 0 18px rgba(255,159,28,.55); }
.pd-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pd-txt b { font-size: 18px; }
.pick-day.anim .pd-logo img, .pick-day.anim .pd-logo svg { animation: pd-bounce 2.4s ease-in-out infinite; }
.pick-day.anim .pd-ring { animation: pd-spin 6s linear infinite, pd-glow 2.4s ease-in-out infinite; border-style: dashed; }
@keyframes pd-bounce { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.07); } }
@keyframes pd-spin { to { transform: rotate(360deg); } }
@keyframes pd-glow { 0%, 100% { box-shadow: 0 0 10px rgba(255,159,28,.35); } 50% { box-shadow: 0 0 26px rgba(255,159,28,.85); } }
@media (prefers-reduced-motion: reduce) { .pick-day.anim .pd-logo img, .pick-day.anim .pd-ring { animation: none; } }
/* v3.0: logo «balón + NBA365» con el diseño del icono (siempre sobre negro para que la plata luzca en tema claro) */
.brand-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 5px; border-radius: 999px;
  background: linear-gradient(160deg, #1b1b1b, #050505); box-shadow: inset 0 0 0 1px rgba(255,196,92,.18); text-decoration: none; }
.brand-badge .ball { width: 26px; height: 26px; }
.brand-badge .wordmark { height: 18px; width: auto; display: block; }
a.brand-badge:active { transform: scale(.97); }
.login h1.brand-badge { display: inline-flex; width: auto; padding: 6px 16px 6px 6px; margin-bottom: 10px; }
.login h1.brand-badge .ball { width: 38px; height: 38px; }
.login h1.brand-badge .wordmark { height: 26px; }
/* v2.7: selector de icono */
.icon-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 10px 0; }
.icon-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 16px; cursor: pointer;
  background: var(--surface-3); border: 2px solid transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; }
.icon-opt img { width: 96px; height: 96px; border-radius: 22%; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.icon-opt.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
/* v2.4: recuperar contraseña */
.link-btn { background: none; border: 0; padding: 8px 0 0; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; text-align: center; width: 100%; }
#recover-form .btn { width: 100%; margin-top: 10px; }
#recover-form h1 { font-size: 20px; }
/* v2.3: 🏆 celebración al ganar */
.celebrate { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(255,196,61,.28), rgba(0,0,0,.72) 60%); animation: cel-in .35s ease-out; cursor: pointer; }
.celebrate.out { animation: cel-out .4s ease-in forwards; }
.cf-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cf { position: absolute; top: -20px; border-radius: 2px; opacity: .95; animation-name: cf-fall; animation-timing-function: cubic-bezier(.25,.6,.5,1);
  animation-fill-mode: forwards; }
@keyframes cf-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx, 0), 105vh) rotate(var(--rot, 720deg)); opacity: .9; } }
.win-card { position: relative; max-width: 360px; width: 100%; text-align: center; padding: 22px 18px 16px; border-radius: 22px;
  background: linear-gradient(160deg, #1b1206, #0b0b10); border: 2px solid #ffc43d;
  box-shadow: 0 0 0 4px rgba(255,196,61,.15), 0 0 40px rgba(255,159,28,.45); animation: win-pop .6s cubic-bezier(.2,1.6,.4,1); }
.win-flags { font-size: 46px; line-height: 1; animation: win-wave 1.2s ease-in-out infinite; }
.win-title { margin: 8px 0 6px; font-size: 34px; font-weight: 900; letter-spacing: .5px;
  background: linear-gradient(90deg, #ffc43d, #ff6b35, #e62e78); -webkit-background-clip: text; background-clip: text; color: transparent; }
.win-line { color: #f3f3f3; font-size: 15px; margin: 3px 0; }
@keyframes win-pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes win-wave { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.08); } }
@keyframes cel-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cel-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cf { display: none; } .win-flags { animation: none; } }
/* v2.2: tus resultados por periodo */
.res-kpis { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.res-tile.up { border-color: color-mix(in srgb, var(--green, #22c55e) 45%, var(--border)); }
.res-tile.down { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
/* v2.2: cinta LED de tus apuestas (arriba del partido) */
.led { display: flex; align-items: stretch; gap: 0; margin: 0 0 10px; border-radius: 12px; overflow: hidden;
  background: #07090d; border: 1px solid #1f2a1f; box-shadow: inset 0 0 12px rgba(0,255,120,.08); font-size: 13px; }
.led-tag { flex: none; display: flex; align-items: center; padding: 0 10px; font-weight: 800; font-size: 11.5px; color: #0a0e16;
  background: linear-gradient(180deg, #ffd166, #ff9f1c); white-space: nowrap; }
.led-win { flex: 1; min-width: 0; overflow: hidden; position: relative; }
.led-track { display: flex; width: max-content; }
.led-run { display: flex; align-items: center; white-space: nowrap; padding: 8px 0 8px 10px; color: #c8ffd9;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .2px; text-shadow: 0 0 6px rgba(80,255,150,.45); }
.led-run .faint { color: #7fb894; }
.led-run .pos { color: #4dff9a; } .led-run .neg { color: #ff6b6b; } .led-run .amb { color: #ffd166; }
.led-item { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.led-item.cur { color: #fff; }
.led-sep { color: #ff9f1c; margin: 0 12px; }
.led:not(.scroll) .led-run.dup { display: none; }
.led.scroll .led-track { animation: led-run 30s linear infinite; }
.led.scroll:hover .led-track, .led.scroll:active .led-track { animation-play-state: paused; }
@keyframes led-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .led.scroll .led-track { animation-duration: 90s !important; } }
.live-prob { padding: 7px 10px; border-radius: 10px; font-size: 13.5px; background: var(--surface-3); margin: 4px 0; }
.live-prob.good { background: color-mix(in srgb, var(--green, #22c55e) 18%, var(--surface)); }
.live-prob.mid { background: color-mix(in srgb, var(--amber, #f5a524) 18%, var(--surface)); }
.live-prob.bad { background: color-mix(in srgb, var(--red) 18%, var(--surface)); }
.tick-prob { margin-left: auto; padding: 1px 6px; border-radius: 99px; background: var(--surface-3); color: var(--text); font-weight: 800; }
.tick-prob.mid { background: color-mix(in srgb, var(--amber, #f5a524) 30%, var(--surface)); }
.tick-prob.hi { background: color-mix(in srgb, var(--green, #22c55e) 35%, var(--surface)); }
.gbar { display: block; height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.gbar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--red)); transition: width .6s; }
.game .gbar { margin-top: -2px; }
.momentum { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.mbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.mbar > i { display: block; height: 100%; width: 0; transition: width .6s; }
.mbar > i.a { background: var(--blue); } .mbar > i.h { background: var(--accent); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.flash { animation: flash 1.1s ease-out 2; }
.game.flash .pts, .game.flash .big { color: var(--accent); transition: color .3s; }
@keyframes pulse2 { 0%, 100% { transform: none; } 50% { transform: scale(1.015); } }
.pulse { animation: pulse2 .6s ease-in-out 2; border-color: var(--accent) !important; }
.game.is-live { background: linear-gradient(180deg, color-mix(in srgb, var(--red) 6%, var(--surface)) 0%, var(--surface) 55%); }
@media (max-width: 600px) {
  .kpis.compact { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .kpis.compact .kpi { padding: 8px 6px; text-align: center; }
  .kpis.compact .kpi .label { font-size: 9.5px; letter-spacing: .2px; }
  .kpis.compact .kpi .value { font-size: 19px; }
  .kpis.compact .kpi .hint { display: none; }
  #live-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 4px; }
  #live-chips::-webkit-scrollbar { display: none; }
  #live-chips .chip { flex: none; }
  .game { padding: 12px; }
}
.int-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* v2.1: chips de re-análisis con su propio renglón dentro de la tarjeta (antes quedaban apretadas entre bloques) */
.game .int-chips, .int-chips.boxed { width: 100%; box-sizing: border-box; padding: 8px 10px; margin: 2px 0; border-radius: 12px;
  background: color-mix(in srgb, var(--surface-3) 60%, transparent); border: 1px solid var(--border); }
.int-chips > .small { margin-right: 4px; white-space: nowrap; }
.int-chips .chip.sm { padding: 4px 10px; min-height: 28px; }
/* v2.1: separación entre cinta de partidos, indicadores, filtros y tarjetas */
#live-ticker:not(:empty), #live-kpis, #live-chips { margin-bottom: 12px; }
#live-ticker .ticker { margin-bottom: 0; padding-bottom: 4px; }
/* v2.1: Pausar / Actualizar / vista alineados a la izquierda en el móvil */
@media (max-width: 899px) { .page-head .actions { margin-left: 0; width: 100%; justify-content: flex-start; } }
.chip.sm { padding: 4px 10px; font-size: 12px; }
.push-card { margin-bottom: 8px; }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 2px 12px; margin: 8px 0; }
.kind-grid .check { margin: 3px 0; color: var(--text); }
.skeleton.sm { min-height: 60px; }

/* ---------- v1.5: nada puede ensanchar la página (en iOS eso «aleja» la vista y desalinea todo) ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
#app, main, #view { max-width: 100%; overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
.mono, code, .tg, .md, .pick-title, .pick-why, .best, .notif, .callout, .setting, .kpi, .sub { overflow-wrap: anywhere; word-break: break-word; }
.mono { word-break: break-all; }
.card, .pick, .game, .kpi, .grid > *, .picks > *, .games > *, .stack > * { min-width: 0; }
img, svg { max-width: 100%; }
.modal-panel { max-width: min(560px, 100vw); }
/* v1.5.1: las etiquetas (.tag) no se partían: «modelo estadístico (modo rápido) · en vivo sin IA…» medía 438 px y
   hacía que Safari alejara la página al pulsar Analizar en un partido en vivo. */
.tag, .dec, .pill, .chip { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.card h2, .section-title, .pick-dec, .reasons, .game-top { flex-wrap: wrap; }
.card h2 > *, .section-title > * { min-width: 0; }
.btn { max-width: 100%; white-space: normal; }
.action-bar .btn, .seg button, .tabs a { white-space: nowrap; }
.toast { left: 16px; right: 16px; transform: none; margin: 0 auto; width: fit-content; }

/* ---------- v1.6: total por cuarto ---------- */
.qcard { border-top: 1px dashed var(--border); padding-top: 12px; }
.qcard h3 { margin: 0 0 4px; font-size: 15px; }
.qline { padding: 8px 0; border-bottom: 1px solid var(--border); }
.qline:last-of-type { border-bottom: 0; }
.qhead { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.qopts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.qopt { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 10px; padding: 7px 9px; min-width: 0; }
.qopt b { font-size: 18px; }

/* ---------- v1.8: combinadas ---------- */
.leg { padding: 10px 12px; margin-bottom: 10px; box-shadow: none; background: var(--surface-2); }
.leg .field { margin: 6px 0; }
.leg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ---------- iPhone: app a pantalla completa ---------- */
.topbar { padding-top: calc(10px + env(safe-area-inset-top)); padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
@media (max-width: 899px) {
  input, select, textarea, .stake-input { font-size: 16px !important; }     /* iOS no hace zoom al escribir */
  .btn.sm { padding: 8px 12px; font-size: 13.5px; }                         /* áreas táctiles más grandes */
  .pick-stats b { font-size: 14px; }
}
@media (display-mode: standalone) { body { -webkit-user-select: none; user-select: none; } .tg, .md, input, textarea { -webkit-user-select: text; user-select: text; } }
.md li.sub { margin-left: 18px; list-style: circle; }
@media (max-width: 600px) { .hide-sm { display: none; } .pts { font-size: 26px; } .kpi .value { font-size: 21px; } }

/* ---------- v11.6: fila de botones del partido alineada + efecto elástico ---------- */
/* El imán del carrusel (scroll-snap) pegaba el 1.er botón al borde de la pantalla: el margen interno lo respeta ahora. */
@media (max-width: 899px) { .action-bar { scroll-padding-inline: 16px; overscroll-behavior-x: contain; } }
.pill-row { overscroll-behavior-x: contain; }
.pill-row.spring { transition: transform .55s cubic-bezier(.34, 1.56, .64, 1); }

/* ---------- v11.6: cabecera GRANDE del partido (iPad / opcional en iPhone) ---------- */
.game-hero.big { position: relative; overflow: hidden; padding: 22px 24px 16px; }
.game-hero.big .hero-teams { align-items: center; gap: 18px; }
.game-hero.big .team { display: flex; flex-direction: row; align-items: center; gap: 16px; min-width: 0; }
.game-hero.big .team.home { flex-direction: row-reverse; text-align: right; }
.game-hero.big .crest { width: clamp(84px, 11vw, 132px); height: clamp(84px, 11vw, 132px); object-fit: contain; flex: none;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.45)); }
.game-hero.big .t-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.game-hero.big .abbr { font-size: 30px; line-height: 1.05; }
.game-hero.big .name { color: var(--muted); font-size: 13px; }
.game-hero.big .pts { font-size: 46px; }
.team-data { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.game-hero.big .team.home .team-data { justify-content: flex-end; }
.td-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  background: color-mix(in srgb, var(--bg) 45%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border)); white-space: nowrap; }
.td-chip i { font-style: normal; }
/* entrada: el escudo de la izquierda BAJA desde la esquina; el de la derecha aparece difuminándose; luego entran los datos */
.game-hero.big.anim .team:not(.home) .crest { animation: crest-drop .8s cubic-bezier(.34, 1.4, .64, 1) both; }
.game-hero.big.anim .team.home .crest { animation: crest-fade 1s ease-out .15s both; }
.game-hero.big.anim .td-chip { animation: td-in .45s ease-out both; }
.game-hero.big.anim .td-chip:nth-child(1) { animation-delay: .55s; } .game-hero.big.anim .td-chip:nth-child(2) { animation-delay: .65s; }
.game-hero.big.anim .td-chip:nth-child(3) { animation-delay: .75s; } .game-hero.big.anim .td-chip:nth-child(4) { animation-delay: .85s; }
.game-hero.big.anim .td-chip:nth-child(5) { animation-delay: .95s; }
@keyframes crest-drop { from { transform: translate(-60px, -120px) rotate(-14deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes crest-fade { from { filter: blur(16px) drop-shadow(0 8px 22px rgba(0,0,0,.45)); transform: scale(1.25); opacity: 0; }
  to { filter: blur(0) drop-shadow(0 8px 22px rgba(0,0,0,.45)); transform: none; opacity: 1; } }
@keyframes td-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .game-hero.big.anim .crest, .game-hero.big.anim .td-chip { animation: none; } }
/* en iPhone (si se activa «Siempre»): escudo arriba, datos debajo y más compactos */
@media (max-width: 699px) {
  .game-hero.big { padding: 16px 14px 12px; }
  .game-hero.big .team, .game-hero.big .team.home { flex-direction: column; align-items: flex-start; gap: 6px; }
  .game-hero.big .team.home { align-items: flex-end; }
  .game-hero.big .crest { width: 64px; height: 64px; }
  .game-hero.big .abbr { font-size: 22px; } .game-hero.big .pts { font-size: clamp(22px, 7.6vw, 30px); }
  .td-chip { font-size: 11px; padding: 3px 7px; }
}

/* ---------- v11.7: tope de la fila de botones alineado con las cards (también al final) ---------- */
/* El relleno derecho de un carrusel se pierde al llegar al final: un separador invisible lo repone (8 px + 8 px de hueco = 16). */
@media (max-width: 899px) { .action-bar { padding-right: 0; } .action-bar::after { content: ""; flex: 0 0 8px; } }

/* ---------- v11.7: tarjetas de propuestas DESPLEGABLES ---------- */
.pick.fold { display: block; padding: 0; }
.pick.fold > summary { list-style: none; cursor: pointer; padding: 14px; display: flex; flex-direction: column; gap: 9px; -webkit-tap-highlight-color: transparent; }
.pick.fold > summary::-webkit-details-marker { display: none; }
.pick.fold > :not(summary) { margin: 0 14px 9px; }
.pick.fold > :last-child { margin-bottom: 14px; }
.fold-chev { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin-left: auto;
  background: var(--surface-2); border: 1px solid var(--border); transition: transform .25s ease; }
.pick-head .tag ~ .fold-chev { margin-left: 6px; }
.fold-chev::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); }
.pick.fold[open] .fold-chev { transform: rotate(180deg); }
.pick-mini { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pm-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-variant-numeric: tabular-nums; }
.pm-stats .lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.pm-stats b { font-size: 15px; }
.pm-stats .pos { color: var(--green); } .pm-stats .neg { color: var(--red); }
.pm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pick.fold[open] .pick-mini { display: none; }          /* abierta: se ve la tarjeta clásica completa */
.pick.fold[open] > :not(summary) { animation: td-in .3s ease-out both; }

/* ---------- v11.7: Total del cuarto en su propia card ---------- */
.q-card .qcard { border-top: 0; padding-top: 0; margin-top: 0; }

/* ---------- v11.7: marcador que no se parte en iPhone (108 – 109 en una línea) ---------- */
.hero-teams { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.hero-teams .team { min-width: 0; }
.hero-teams .team .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-teams .pts { white-space: nowrap; letter-spacing: -.5px; }
@media (max-width: 600px) { .hero-teams .pts { font-size: clamp(22px, 7.6vw, 30px); } .game-hero:not(.big) .hero-teams .name { font-size: 11.5px; } }

/* ---------- v11.7: siglas del tablero de cuartos con el logo pequeñito de fondo ---------- */
.qtable.qlogo td.qt { position: relative; overflow: hidden; min-width: 92px; padding: 6px 8px; border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, var(--surface-2)), transparent 92%); }
.qtable.qlogo tr + tr td.qt { background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 18%, var(--surface-2)), transparent 92%); }
.qtable.qlogo td.qt b { position: relative; z-index: 1; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.qt-bg { position: absolute; right: -6px; top: 50%; height: 190%; width: auto; transform: translateY(-50%) rotate(-12deg); opacity: .42; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
.qtable.qlogo tbody tr { border-bottom: 3px solid transparent; }

/* ---------- v11.12: 🧸 mascota del Pick del día (logo más arriba, mascota debajo) ---------- */
.pd-left { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pick-day.with-mascot { align-items: flex-start; }
.pick-day.with-mascot .pd-logo { margin-top: -4px; height: 58px; }
.mascot { display: block; width: 76px; height: 74px; }
.mascot svg { width: 100%; height: 100%; overflow: visible; }
.mascot svg * { transform-box: view-box; }
/* v11.13: cada estado muestra su cara y sus accesorios (balón, canasta, nube, fuego…) */
.mascot .m-mouth, .mascot .m-tear, .mascot .m-sweat, .mascot .m-brows, .mascot .m-prop, .mascot .m-fx { display: none; }
.m-wait .m-o, .m-wait .m-zzz, .m-wait .m-ball-hold,
.m-live .m-ball-live, .m-lead .m-smile, .m-lead .m-fire, .m-tie .m-flat, .m-tie .m-brows, .m-trail .m-frown, .m-trail .m-sweat, .m-trail .m-brows,
.m-happy .m-smile, .m-happy .m-spark, .m-happy .m-hoop, .m-happy .m-ball-shot,
.m-sad .m-frown, .m-sad .m-tear, .m-sad .m-cloud, .m-sad .m-ball-ground { display: inline; }
.m-trail .m-brows { transform: rotate(180deg); transform-origin: 40px 22px; }   /* cejas de preocupado */
/* accesorios de equipo animados */
.pick-day.anim .mascot .m-flame { transform-origin: 40px 13px; animation: m-flick .35s ease-in-out infinite alternate; }
.pick-day.anim .mascot .m-zap, .pick-day.anim .mascot .m-twk { animation: m-twinkle 1.4s ease-in-out infinite; }
.pick-day.anim .mascot .m-lamp { animation: m-twinkle 2s ease-in-out infinite; }
.pick-day.anim .mascot .m-sunrays { transform-origin: 40px 27px; animation: m-rot 9s linear infinite; }
.pick-day.anim .mascot .m-notes { animation: m-zzz 2.4s ease-in-out infinite; }
.pick-day.anim .mascot .m-sway2 { transform-origin: 46px 12px; animation: m-sway 2s ease-in-out infinite; }
.pick-day.anim .mascot .m-spin { transform-box: fill-box; transform-origin: center; animation: m-rot 3s linear infinite; }
/* en vivo: va ganando (bota tranquilo y con fuego), parejo (concentrado), perdiendo (bota rápido, sudando) */
.pick-day.anim .m-trail .m-ball-live { animation-duration: .32s !important; }
.pick-day.anim .m-trail .m-arm-r { animation-duration: .32s !important; }
.pick-day.anim .m-trail .m-sweat { animation: m-tear 1.2s ease-in infinite; }
.pick-day.anim .m-lead .m-fire { transform-origin: 80px 50px; animation: m-flick .4s ease-in-out infinite alternate; }
.pick-day.anim .m-tie .m-fig { animation: m-bob .45s ease-in-out infinite alternate; }
/* feliz: tiro a la canasta · triste: el balón se aleja rodando */
.pick-day.anim .m-happy .m-ball-shot { animation: m-shot 1.6s ease-in-out infinite; }
.pick-day.anim .m-sad .m-ball-ground { transform-box: fill-box; transform-origin: center; animation: m-roll 3s ease-in-out infinite; }
.pick-day.anim .m-wait .m-ball-hold { animation: m-bob 1.6s ease-in-out infinite alternate; }
/* v11.16: alas del avispón y llama del cuerpo */
.pick-day.anim .mascot .m-buzz { transform-box: fill-box; transform-origin: center; animation: m-buzz .12s linear infinite alternate; }
.pick-day.anim .mascot .m-flick-body { transform-origin: 40px 64px; animation: m-flick .5s ease-in-out infinite alternate; }
@keyframes m-buzz { from { opacity: .45; } to { opacity: .95; } }
@keyframes m-flick { from { transform: scaleY(1) skewX(0); } to { transform: scaleY(1.12) skewX(4deg); } }
@keyframes m-rot { to { transform: rotate(360deg); } }
@keyframes m-shot { 0% { transform: translate(0, 0); opacity: 1; } 40% { transform: translate(9px, -30px); } 60% { transform: translate(15px, -22px); }
  80% { transform: translate(15px, -8px); opacity: 1; } 100% { transform: translate(15px, -6px); opacity: 0; } }
@keyframes m-roll { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(-6px) rotate(-200deg); } }
.m-arm-l { transform-origin: 29px 47px; } .m-arm-r { transform-origin: 51px 47px; } .m-head { transform-origin: 40px 40px; }
.m-fig { transform-origin: 40px 76px; }
/* poses fijas (se ven aunque las animaciones estén apagadas) */
.m-happy .m-arm-l { transform: rotate(95deg); } .m-happy .m-arm-r { transform: rotate(-95deg); }
.m-sad .m-head { transform: translateY(3px) rotate(-6deg); } .m-sad .m-arm-l { transform: rotate(-12deg); } .m-sad .m-arm-r { transform: rotate(12deg); }
.m-live .m-arm-r { transform: rotate(18deg); }
/* animaciones */
.pick-day.anim .m-wait .m-fig { animation: m-sway 3.2s ease-in-out infinite; }
.pick-day.anim .m-wait .m-zzz { animation: m-zzz 2.6s ease-in-out infinite; }
.pick-day.anim .mascot .m-eyes { transform-origin: 40px 26px; animation: m-blink 4s infinite; }
.pick-day.anim .m-live .m-ball-live { animation: m-dribble .55s cubic-bezier(.5,0,.5,1) infinite alternate; }
.pick-day.anim .m-live .m-arm-r { animation: m-hand .55s cubic-bezier(.5,0,.5,1) infinite alternate; }
.pick-day.anim .m-live .m-fig { animation: m-bob .55s ease-in-out infinite alternate; }
.pick-day.anim .m-happy .m-fig { animation: m-jump .8s cubic-bezier(.3,1.6,.5,1) infinite; }
.pick-day.anim .m-happy .m-arm-l { animation: m-wave-l .4s ease-in-out infinite alternate; }
.pick-day.anim .m-happy .m-arm-r { animation: m-wave-r .4s ease-in-out infinite alternate; }
.pick-day.anim .m-happy .m-spark { animation: m-twinkle 1s ease-in-out infinite; }
.pick-day.anim .m-sad .m-tear { animation: m-tear 1.8s ease-in infinite; }
.pick-day.anim .m-sad .m-cloud { animation: m-cloud 3s ease-in-out infinite alternate; }
.pick-day.anim .m-sad .m-fig { animation: m-sigh 3s ease-in-out infinite; }
@keyframes m-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes m-zzz { 0% { transform: translate(0, 4px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translate(4px, -6px); opacity: 0; } }
@keyframes m-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes m-dribble { from { transform: translateY(-14px); } to { transform: translateY(8px); } }
@keyframes m-hand { from { transform: rotate(-8deg); } to { transform: rotate(24deg); } }
@keyframes m-bob { from { transform: translateY(0); } to { transform: translateY(1.5px); } }
@keyframes m-jump { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-9px); } }
@keyframes m-wave-l { from { transform: rotate(80deg); } to { transform: rotate(110deg); } }
@keyframes m-wave-r { from { transform: rotate(-80deg); } to { transform: rotate(-110deg); } }
@keyframes m-twinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes m-tear { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes m-cloud { from { transform: translateX(-3px); } to { transform: translateX(3px); } }
@keyframes m-sigh { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.5px) scaleY(.98); } }
@media (prefers-reduced-motion: reduce) { .pick-day.anim .mascot * { animation: none !important; } }
/* v11.12: los logos oscuros (Nets, Spurs, Bucks…) se perdían al final de la tira: luz detrás del logo + contorno claro */
.qtable.qlogo td.qt { background-image: radial-gradient(circle at 84% 50%, rgba(255,255,255,.16), transparent 58%),
  linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, var(--surface-2)), color-mix(in srgb, var(--accent) 6%, var(--surface-2)) 100%); }
.qtable.qlogo tr + tr td.qt { background-image: radial-gradient(circle at 84% 50%, rgba(255,255,255,.16), transparent 58%),
  linear-gradient(90deg, color-mix(in srgb, var(--blue) 18%, var(--surface-2)), color-mix(in srgb, var(--blue) 7%, var(--surface-2)) 100%); }
.qt-bg { opacity: .62; filter: drop-shadow(0 0 1px rgba(255,255,255,.85)) drop-shadow(0 0 6px rgba(255,255,255,.3)) brightness(1.12); }
:root[data-theme="light"] .qt-bg { filter: none; opacity: .5; }
@media (min-width: 700px) { .qtable.qlogo { table-layout: fixed; } .qtable.qlogo th:first-child { width: 150px; } }

/* ---------- v11.7: cinta LED con más «píxeles» (matriz de puntos) ---------- */
.led-run { font-size: 15px; font-weight: 800; letter-spacing: 1px; padding: 10px 0 10px 12px;
  font-family: "Courier New", ui-monospace, Menlo, Consolas, monospace; }
.led-win::after { content: ""; position: absolute; inset: 0; pointer-events: none;   /* rejilla de LEDs: cada letra se ve hecha de puntitos */
  background: radial-gradient(circle at center, transparent 0 .7px, rgba(7,9,13,.8) 1.05px) 0 0 / 2.2px 2.2px; }
.led-win::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;      /* brillo de vidrio */
  background: linear-gradient(180deg, rgba(255,255,255,.06), transparent 45%, rgba(0,0,0,.25)); }
.led-run { text-shadow: 0 0 3px currentColor, 0 0 10px rgba(80,255,150,.5); }

/* ---------- v11.7: celebración con varios aciertos ---------- */
.win-sub { color: #ffe39a; font-size: 15px; margin: -2px 0 8px; }
.win-count { display: inline-block; font-size: 12px; font-weight: 800; color: #111; background: #ffc43d; border-radius: 99px; padding: 2px 10px; margin-bottom: 6px; }
.win-slide { min-height: 64px; }
.win-slide.in-r { animation: win-in-r .32s ease-out; } .win-slide.in-l { animation: win-in-l .32s ease-out; }
@keyframes win-in-r { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes win-in-l { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.win-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.win-arrow { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #ffc43d; background: rgba(255,196,61,.12); color: #ffc43d; font-size: 22px; line-height: 1; cursor: pointer; }
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); cursor: pointer; transition: transform .2s, background .2s; }
.win-dots i.on { background: #ffc43d; transform: scale(1.3); }
.win-acts { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.win-acts [hidden] { display: none; }

/* ---------- v11.10: TODAS las filas de pastillas/botones se recortan a la altura de las cards ---------- */
/* Al deslizar, las pastillas desaparecen justo donde empiezan y terminan las cards (como si hubiera un margen), no en el
   borde de la pantalla; en reposo la primera y la última quedan alineadas con las cards. Rebote elástico incluido. */
.pill-row:not(.seg), .action-bar, #live-chips { margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important;
  scroll-padding-inline: 0 !important; max-width: 100%; }
.pill-row::after, .action-bar::after, #live-chips::after { content: none !important; display: none !important; }
/* v11.10: escudo y nombre CENTRADOS en su columna (tarjetas del tablero y cabecera clásica del partido) */
.score .team, .score .team.home, .game-hero:not(.big) .hero-teams .team, .game-hero:not(.big) .hero-teams .team.home {
  align-items: center; text-align: center; }
.score .team .logo, .game-hero:not(.big) .hero-teams .team .logo { margin-left: auto; margin-right: auto; }
.score .team .name { max-width: 100%; }
@media (max-width: 899px) {
  .action-bar { padding-top: 8px !important; padding-bottom: 8px !important; box-shadow: 0 0 0 16px var(--bg); clip-path: inset(0 -16px); }
}

/* ---------- v11.19: tarjeta que entra al partido, 🎫 de apuesta, aviso de brecha con la casa ---------- */
.tap-card { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tap-card:active { transform: scale(.992); }
@media (hover: hover) { .tap-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); } }
.bet-badge { background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); color: var(--text); font-weight: 800; margin-right: 6px; }
.tick-bet { font-size: 12px; }
.warn-gap { color: #ffcf6e; background: color-mix(in srgb, #ffb020 10%, transparent); border-left: 3px solid #ffb020;
  padding: 5px 8px; border-radius: 6px; }
.tag.warn { background: color-mix(in srgb, #ffb020 18%, var(--surface-2)); color: #ffcf6e; }

/* ---------- v11.19: «Más» por grupos y Ajustes plegables con buscador ---------- */
.more-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 8px; }
.more-head b { font-size: 17px; }
.more-head .more-mode { margin: 0; width: auto; }
.more-head .more-mode button { flex: none; padding: 6px 10px; }
.more-group + .more-group { margin-top: 10px; }
.more-gtitle { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 4px 6px 4px; }
.more-links.list a { background: var(--surface-2); }
.ml-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ml-txt small { color: var(--muted); font-size: 12px; font-weight: 500; white-space: normal; }
.more-links.grid .ml-txt { align-items: center; }
.set-search { width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: inherit; font: inherit; }
.set-group > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding-right: 26px; position: relative; }
.set-group > summary::-webkit-details-marker { display: none; }
.set-group > summary::after { content: ""; position: absolute; right: 4px; top: 6px; width: 8px; height: 8px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.set-group[open] > summary::after { transform: rotate(225deg); top: 10px; }
.set-group[open] > summary { margin-bottom: 8px; }
.set-group .setting[hidden] { display: none; }
.set-title { margin: 18px 4px 8px; font-size: 14px; color: var(--muted); }
/* v11.20: jugada cuya cuota ya no está activa en Betano (cerrada o suspendida) */
.betano-off { opacity: .55; }
.betano-off .pick-stats b, .betano-off .pm-stats b { text-decoration: line-through; text-decoration-thickness: 1px; }
.bt-state { margin-left: 4px; }
.mascot-preview .mp-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); justify-items: center; gap: 4px; padding: 8px 4px; margin: 8px 0 0; cursor: default; }
.mascot-preview .mascot { width: 100%; max-width: 84px; height: auto; aspect-ratio: 96 / 94; }
