/* ============================================================================
   Estilo revista (noviembre 2026). Capa encima de style.css, market.css y
   alerts.css: se carga la última en layout.html, así que gana sin !important.

   Lo que cambia respecto a la base:
   - Papel y tinta: fondo crema en claro, verde casi negro en oscuro; los
     contenedores llevan filete de tinta de 2px y sombra desplazada sin
     difuminar (en vez de la sombra blanda).
   - Titulares de página en tres capas: tinta con sombra oro y verde (en
     oscuro, verde y negro).
   - Botones en pastilla con filete y sombra desplazada; el principal, oro.
   - Barras de arriba y abajo en papel con filete de tinta; la de abajo con
     las esquinas superiores redondeadas.
   Lo que NO cambia: clases, ids y estructura. Todo son reglas nuevas sobre
   los mismos ganchos, y la mayor parte del trabajo lo hacen los tokens.
   ========================================================================= */

:root {
  --ink-line: #0f1a12;
  --offset: #0f1a12;
  --h1-a: #f7b500; --h1-b: #15803d; --hl-b: #0f1a12;
  --paper: #fbf7ec; --paper-2: #f3ecd8;

  --surface-app: #fbf7ec; --surface-canvas: #fbf7ec; --surface-card: #fffdf6;
  --surface-inset: #f3ecd8; --surface-selector: #fffdf6;
  --surface-bar: rgba(251,247,236,.92);
  --surface-header: #fbf7ec;
  --border-header: 2px solid var(--ink-line);
  --surface-thead: #f3ecd8;
  --border-thead: 2px solid var(--ink-line);
  --text-body: #0f1a12; --text-heading: #0f1a12; --text-muted: #4e5a50; --text-faint: #66746a;
  --text-on-bar-muted: #3d4a40;
  --border-subtle: rgba(15,26,18,.10); --border-default: rgba(15,26,18,.16); --border-strong: rgba(15,26,18,.30);
  --grad-glow: none;
  --radius-card: 18px;
  --shadow-card: 4px 4px 0 var(--offset);
  --shadow-raised: 6px 6px 0 var(--offset);
  --glow-brand: 5px 5px 0 var(--offset);
  --nav-active-bar: var(--surface-brand);
}
:root[data-theme="dark"] {
  --ink-line: #f2efe2;
  --offset: #000;
  --h1-a: #15803d; --h1-b: #000; --hl-b: #000;
  --paper: #10170f; --paper-2: #18221a;

  --surface-app: #10170f; --surface-canvas: #10170f; --surface-card: #151f15;
  --surface-inset: #1c2a1d; --surface-selector: #1c2a1d;
  --surface-bar: rgba(16,23,15,.92);
  --surface-header: #10170f;
  --border-header: 2px solid var(--ink-line);
  --surface-thead: #18221a;
  --border-thead: 2px solid var(--ink-line);
  --text-body: #f2efe2; --text-heading: #f2efe2; --text-muted: #b5bfb3; --text-faint: #9aa79c;
  --text-on-bar-muted: #c3ccc1;
  --border-subtle: rgba(242,239,226,.08); --border-default: rgba(242,239,226,.16); --border-strong: rgba(242,239,226,.30);
  --shadow-card: 4px 4px 0 var(--offset);
  --shadow-raised: 6px 6px 0 var(--offset);
  --glow-brand: 5px 5px 0 var(--offset);
  --nav-active-bar: var(--surface-brand);
  --text-on-nav-active: #fff;
}

body { background-image: none; }

/* ── Titulares ─────────────────────────────────────────────────────────── */
h1 {
  color: var(--text-heading);
  text-shadow: 2px 2px 0 var(--h1-a), 4px 4px 0 var(--h1-b);
  line-height: .98;
}
.page-head h1, main > h1:first-child { font-size: clamp(1.9rem, 7.5vw, 2.9rem); }
@media (min-width: 761px) {
  h1 { text-shadow: 3px 3px 0 var(--h1-a), 5px 5px 0 var(--h1-b); }
}
/* El filete oro bajo el título sobra: el acento ya lo ponen las capas. */
.page-head h1::after, .hero h1::after { display: none; }
h2, h3 { color: var(--text-heading); }
.eyebrow { font-family: var(--font-mono); letter-spacing: .08em; }

/* ── Contenedores: filete de tinta y sombra desplazada ─────────────────── */
.feature-card, .table-wrap, .source-filter, .manager-summary, .chart-wrap,
.fixture-group, .team-pitch, .round-accuracy, .team-card, .ranking-picker,
.explain-panel, .account-panel, .initial-balance-help, .accuracy-comparison,
.league-option-card, .account-upsell-banner {
  border: 2px solid var(--ink-line);
  border-radius: var(--radius-card);
}
/* Tarjetas de Mi jornada, mercado, alertas y diálogos. */
.round-summary-tiles, .round-manager, .round-league-heading, .connection-card,
.player-detail-dialog, .market-dialog, .market-connect, .alerts-unlocks,
.market-release, .alerts-panel, .alerts-card, .alert-card, .alerts-form {
  border: 2px solid var(--ink-line);
  border-radius: var(--radius-card);
  box-shadow: 4px 4px 0 var(--offset);
}
.round-manager-own { border-color: var(--text-brand); box-shadow: 4px 4px 0 var(--surface-brand); }
.alert-deadline { border-left: 7px solid var(--text-accent-warm); }
.alert-unlock { border-left: 7px solid var(--text-brand); }
.market-search, .match-picker > button { border: 2px solid var(--ink-line); }
.bench-card, .position-calendar-row, .sources-panel > summary { border-color: var(--border-strong); }
.fixture-row { border-color: var(--border-strong); box-shadow: none; }
.empty-state { border: 2px dashed var(--border-strong); }
.league-option input:checked + .league-option-card { box-shadow: 4px 4px 0 var(--surface-brand); }
@media (min-width: 761px) {
  .feature-card, .table-wrap, .chart-wrap, .team-pitch, .round-accuracy,
  .team-card, .explain-panel, .account-panel { box-shadow: 6px 6px 0 var(--offset); }
}

/* ── Botones ───────────────────────────────────────────────────────────── */
.btn, button[type="submit"], form button {
  border: 2px solid var(--ink-line);
  background: var(--gold-500);
  color: #0d1710;
  box-shadow: 3px 3px 0 var(--offset);
  transition: transform 140ms ease, box-shadow 140ms ease, translate 140ms ease, background 140ms ease;
}
.btn:hover, button[type="submit"]:hover, form button:hover {
  transform: none; translate: -2px -2px; filter: none;
  box-shadow: 5px 5px 0 var(--offset);
}
.btn:active, button[type="submit"]:active, form button:active { translate: 0 0; box-shadow: 1px 1px 0 var(--offset); transform: none; }
.btn-ghost, form button.btn-ghost {
  background: var(--surface-card); color: var(--text-body);
  box-shadow: 3px 3px 0 var(--offset);
}
.btn-ghost:hover { background: var(--surface-card); box-shadow: 5px 5px 0 var(--offset); }
:root[data-theme="dark"] .btn, :root[data-theme="dark"] button[type="submit"], :root[data-theme="dark"] form button { border-color: #0d1710; }
:root[data-theme="dark"] .btn-ghost, :root[data-theme="dark"] form button.btn-ghost { border-color: var(--ink-line); }

/* ── Barra superior ────────────────────────────────────────────────────── */
.site-header { background: var(--surface-header); }
.theme-toggle, .alerts-entry, .nav-account-mobile, .top-nav .nav-cta-icon {
  border: 2px solid var(--ink-line) !important;
  background: var(--surface-card);
  box-shadow: none;
}
.top-nav a.active {
  background: var(--surface-brand); color: #fff;
  box-shadow: 2px 2px 0 var(--offset);
}
.alerts-entry.active, .nav-account-mobile[aria-current="page"] { background: var(--surface-brand); color: #fff; }

/* ── Barra inferior (móvil) ────────────────────────────────────────────── */
.bottom-nav {
  border-top: 2px solid var(--ink-line);
  border-radius: 20px 20px 0 0;
  padding-inline: 6px;
  box-shadow: 0 -6px 18px rgba(0,0,0,.06);
}
.bottom-nav-item.active {
  background: var(--surface-brand); color: #fff;
  border-radius: 14px;
  box-shadow: 2px 2px 0 var(--offset);
}

/* ── Pastillas y selectores ────────────────────────────────────────────── */
.view-switch { border: 2px solid var(--ink-line); border-radius: 999px; background: var(--surface-card); }
.view-switch button { border-radius: 999px; }
.view-switch button.active, .view-switch button.active:hover,
.position-picker a.active, .position-picker a.active:hover, .match-count-option.active {
  background: var(--surface-brand); color: #fff; box-shadow: none;
}
.dashboard-toolbar .toolbar-pill > summary, .dashboard-toolbar .toolbar-pill,
.calendar-round-selector .round-picker, .calendar-round-selector .round-step,
.round-nav-step, .round-xpts-toggle, .filter-pill > summary {
  border: 2px solid var(--ink-line);
  box-shadow: 2px 2px 0 var(--offset);
}

/* ── Tablas ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }

/* ── Pie ───────────────────────────────────────────────────────────────── */
footer { border-top: 2px solid var(--ink-line); }

/* ============================================================================
   Portada (home.html): cabecera de revista, titular en tres capas,
   teléfonos con capturas en móvil y ventanas de navegador en escritorio, y
   una galería que avanza en horizontal con el scroll (o deslizando de lado).
   ========================================================================= */
main.home { max-width: none; padding: 0 0 96px; }
main.home > .home-qa { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }

.gt-cover { position: relative; padding: 14px var(--gutter) 36px; overflow: hidden; max-width: var(--content-max); margin: 0 auto; }
.gt-cover::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, var(--gold-500) 28%, transparent 30%) 0 0 / 12px 12px;
  -webkit-mask: radial-gradient(ellipse 70% 55% at 80% 70%, #000, transparent 75%);
          mask: radial-gradient(ellipse 70% 55% at 80% 70%, #000, transparent 75%);
  opacity: .45;
}
.gt-cover > * { position: relative; }
.gt-mast {
  margin: 0; font: 400 12vw/.82 var(--font-display); text-transform: uppercase; letter-spacing: -.04em;
  transform: skewX(-8deg); transform-origin: left bottom; white-space: nowrap; color: var(--text-brand);
  -webkit-text-stroke: 2px var(--offset); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--offset);
}
:root[data-theme="dark"] .gt-mast { color: var(--green-400); }
.gt-mast > span { display: inline-block; }
.gt-mast b { font-weight: 400; color: var(--gold-500); }
.gt-mast-sub { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 0; padding-top: 6px; border-top: 2px solid var(--ink-line); font: 700 max(11px, .7rem) var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.gt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 18px; }
.gt-kicker { display: inline-block; background: #e0352b; color: #fff; font: 400 max(12px, .85rem) var(--font-display); text-transform: uppercase; padding: 5px 12px; border-radius: 8px; transform: skewX(-8deg); margin: 0; }
.gt-cover h1 { margin: 14px 0 0; font-size: clamp(2.4rem, 11vw, 5rem); line-height: .92; text-wrap: balance; }
.gt-cover h1 .hl { color: var(--text-brand); text-shadow: 2px 2px 0 var(--h1-a), 4px 4px 0 var(--hl-b); }
:root[data-theme="dark"] .gt-cover h1 .hl { color: var(--green-400); }
.gt-sub { margin: 14px 0 0; max-width: 46ch; color: var(--text-muted); font-size: 1.05rem; }
.gt-ctas { display: grid; gap: 10px; }
.gt-ctas form { display: contents; }
.gt-ctas .btn { min-height: 52px; font-size: 1rem; letter-spacing: .04em; }

.gt-lines { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.gt-lines::-webkit-scrollbar { display: none; }
.gt-line { flex: 0 0 76%; scroll-snap-align: start; display: grid; gap: 4px; padding: 14px 16px; border: 2px solid var(--ink-line); border-radius: 16px; background: var(--surface-card); box-shadow: 3px 3px 0 var(--offset); color: var(--text-body); }
.gt-line:hover { text-decoration: none; color: var(--text-body); }
.gt-line b { font: 700 1.3rem var(--font-mono); color: var(--text-brand); }
.gt-line strong { font: 400 1.05rem/1.1 var(--font-display); text-transform: uppercase; }
.gt-line span { color: var(--text-muted); line-height: 1.35; font-size: .95rem; }

.gt-shot { position: relative; height: 430px; }
.gt-phone { position: absolute; width: 196px; aspect-ratio: 9/19; border-radius: 30px; background: #0b0f0c; padding: 8px; box-shadow: 0 26px 50px rgba(0,0,0,.35), inset 0 0 0 2px #2a322c; }
.gt-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 23px; display: block; }
.gt-ph1 { left: 4%; top: 22px; rotate: -7deg; z-index: 2; animation: gt-bob 6s ease-in-out infinite; }
.gt-ph2 { right: 2%; top: 0; rotate: 7deg; animation: gt-bob 6s -3s ease-in-out infinite; }
@keyframes gt-bob { 50% { translate: 0 -10px; } }
.gt-star {
  position: absolute; z-index: 3; left: 46%; bottom: 0; width: 118px; aspect-ratio: 1; display: grid; place-items: center; text-align: center;
  background: #e0352b; color: #fff; font: 400 .82rem/1 var(--font-display); text-transform: uppercase;
  clip-path: polygon(50% 0,61% 13%,77% 6%,79% 23%,96% 25%,89% 41%,100% 54%,86% 64%,90% 82%,72% 82%,63% 98%,50% 87%,37% 98%,28% 82%,10% 82%,14% 64%,0 54%,11% 41%,4% 25%,21% 23%,23% 6%,39% 13%);
  animation: gt-spin 24s linear infinite;
}
.gt-star span { padding: 20px; animation: gt-spin 24s linear infinite reverse; }
@keyframes gt-spin { to { rotate: 360deg; } }
.gt-desk { display: none; }
.gt-win { position: absolute; border: 2px solid var(--ink-line); border-radius: 16px; background: var(--surface-card); overflow: hidden; box-shadow: 8px 8px 0 var(--offset); }
.gt-win .chrome { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-bottom: 2px solid var(--ink-line); background: var(--surface-inset); }
.gt-win .chrome i { width: 10px; height: 10px; border-radius: 50%; background: #e0352b; }
.gt-win .chrome i:nth-child(2) { background: var(--gold-500); } .gt-win .chrome i:nth-child(3) { background: var(--green-500); }
.gt-win .chrome span { margin-left: 10px; font: 700 .68rem var(--font-mono); color: var(--text-muted); }
.gt-win img { display: block; width: 100%; height: calc(100% - 30px); object-fit: cover; object-position: top; }
.gt-w1 { right: 0; top: 0; width: 92%; aspect-ratio: 16/11; animation: gt-bob 7s ease-in-out infinite; }
.gt-w2 { left: 0; bottom: 0; width: 46%; aspect-ratio: 1; z-index: 2; animation: gt-bob 7s -3.5s ease-in-out infinite; }

/* Galería anclada: el scroll vertical la mueve en horizontal. */
.gt-hs { position: relative; height: 540svh; view-timeline: --gths block; }
.gt-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-top: 84px; padding-bottom: calc(env(safe-area-inset-bottom) + 84px); touch-action: pan-y; }
.gt-hs-label { padding: 0 var(--gutter) 12px; display: flex; justify-content: space-between; align-items: end; }
.gt-hs-label h2 { margin: 0; font-size: 1.5rem; }
.gt-dots { display: flex; gap: 6px; }
.gt-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); transition: background .2s, width .2s; }
.gt-dots i.on { background: #e0352b; width: 22px; border-radius: 4px; }
.gt-track { flex: 1; min-height: 0; display: flex; gap: 16px; width: max-content; padding: 0 var(--gutter) 8px; animation: gt-slide linear both; animation-timeline: --gths; animation-range: contain 0% contain 100%; }
@keyframes gt-slide { to { transform: translateX(calc(-100% + 100vw)); } }
.gt-spread {
  width: calc(100vw - 48px); height: 100%; max-height: 640px; display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--surface-card); border: 2px solid var(--ink-line); border-radius: 22px; box-shadow: 5px 5px 0 var(--offset); overflow: hidden; color: var(--text-body);
}
.gt-spread:hover { text-decoration: none; color: var(--text-body); }
.gt-spread .txt { padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; border-bottom: 2px solid var(--ink-line); }
.gt-spread .n { grid-row: span 2; font: 400 3rem/.8 var(--font-display); color: transparent; -webkit-text-stroke: 2px currentColor; }
.gt-spread h3 { margin: 0; font-size: 1.5rem; line-height: .95; color: inherit; }
.gt-spread p { margin: 0; line-height: 1.35; font-size: .95rem; opacity: .88; }
.gt-spread .go { display: none; }
.gt-spread .img { position: relative; overflow: hidden; background: var(--surface-inset); display: grid; place-items: center; padding: 16px 0 0; }
.gt-spread .img .gt-phone { position: relative; width: auto; height: 100%; max-height: 520px; border-radius: 28px 28px 0 0; padding: 8px 8px 0; box-shadow: 0 -2px 30px rgba(0,0,0,.2); }
.gt-spread .img .gt-phone img { border-radius: 21px 21px 0 0; }
.gt-spread:nth-child(2) .txt { background: var(--gold-500); color: #0d1710; }
.gt-spread:nth-child(3) .txt { background: var(--green-700); color: #fff; }
.gt-spread:nth-child(4) .txt { background: #2f80ed; color: #fff; }
.gt-spread:nth-child(5) .txt { background: #e0352b; color: #fff; }
.gt-outro { padding: 64px var(--gutter) 56px; text-align: center; }
.gt-outro h2 { font-size: clamp(2rem, 9vw, 3.6rem); line-height: .95; margin: 0 0 24px; text-wrap: balance; text-shadow: 2px 2px 0 var(--h1-a), 4px 4px 0 var(--h1-b); }
.gt-outro h2 .hl { color: var(--text-brand); text-shadow: 2px 2px 0 var(--h1-a), 4px 4px 0 var(--hl-b); }
:root[data-theme="dark"] .gt-outro h2 .hl { color: var(--green-400); }
main.home .home-qa { border-top: 2px solid var(--ink-line); padding-top: 36px; }

@media (min-width: 900px) {
  .gt-cover { padding: 20px clamp(24px, 4vw, 48px) 60px; }
  .gt-mast { -webkit-text-stroke-width: 3px; text-shadow: 7px 7px 0 var(--offset); }
  .gt-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; column-gap: 48px; row-gap: 24px; }
  .gt-grid > :not(.gt-desk) { grid-column: 1; }
  .gt-cover h1 { font-size: clamp(2.6rem, 5vw, 5rem); text-shadow: 3px 3px 0 var(--h1-a), 6px 6px 0 var(--h1-b); }
  .gt-cover h1 .hl { text-shadow: 3px 3px 0 var(--h1-a), 6px 6px 0 var(--hl-b); }
  .gt-ctas { display: flex; flex-wrap: wrap; }
  .gt-lines { flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .gt-line { box-shadow: none; border-width: 2px 0 0; border-radius: 0; padding: 10px 0 0; background: none; grid-template-columns: auto 1fr; column-gap: 14px; }
  .gt-line b { grid-row: span 2; font-size: 1.6rem; }
  .gt-shot { display: none; }
  .gt-desk { display: block; position: relative; grid-column: 2; grid-row: 1 / span 4; height: min(64vh, 560px); }
  .gt-star { width: 140px; font-size: .95rem; left: auto; right: -2%; bottom: -4%; }
  .gt-pin { padding-bottom: 40px; }
  .gt-spread { width: min(1040px, 82vw); grid-template-rows: none; grid-template-columns: .8fr 1.2fr; max-height: 600px; border-radius: 26px; box-shadow: 8px 8px 0 var(--offset); }
  .gt-spread .txt { grid-template-columns: none; align-content: start; border-bottom: 0; border-right: 2px solid var(--ink-line); padding: 32px; gap: 14px; }
  .gt-spread .n { font-size: 7rem; }
  .gt-spread h3 { font-size: 2.3rem; } .gt-spread p { font-size: 1.05rem; }
  .gt-spread .go { display: inline-block; margin-top: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
  .gt-spread .img { padding: 0; }
  .gt-spread .img .gt-phone { display: contents; }
  .gt-spread .img img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; object-fit: cover; object-position: top; }
}
@media (prefers-reduced-motion: reduce) {
  .gt-phone, .gt-win, .gt-star, .gt-star span { animation: none; }
}

/* ============================================================================
   Campo (Onces probables y Mi once): franjas de césped, líneas blancas,
   jugadores con filete de tinta y el porcentaje en pastilla oscura, como en
   la demo.
   ========================================================================= */
.pitch {
  background: repeating-linear-gradient(180deg, #1d7a3c 0 11%, #23894a 11% 22%);
  isolation: isolate;
}
:root[data-theme="dark"] .pitch { background: repeating-linear-gradient(180deg, #145a2b 0 11%, #186634 11% 22%); }
.pitch::before {
  content: ""; position: absolute; inset: 10px; z-index: -1; pointer-events: none;
  border: 2px solid rgba(255,255,255,.35); border-radius: 10px;
  background:
    linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.3)) 0 50% / 100% 2px no-repeat;
}
.pitch::after {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: 24%; aspect-ratio: 1; translate: -50% -50%;
  border: 2px solid rgba(255,255,255,.3); border-radius: 50%; pointer-events: none;
}
.player-photo-clip { border: 2px solid #0f1a12; box-shadow: none; background: #fffdf6; }
.player-dot { border: 2px solid #0f1a12; }
.player-position-badge, .pitch .round-player-position { border: 1.5px solid #0f1a12; }
.team-pitch-head .formation { font-family: var(--font-mono); font-size: max(12px, .78rem); }
.unanimous-badge { border: 0; padding: 1px 6px; border-radius: 6px; background: var(--gold-500); color: #0d1710; }

/* Banquillo como lista de tarjetas (demo). */
.bench-card { border: 2px solid var(--ink-line); border-radius: 14px; background: var(--surface-card); }
.bench-pct { font-weight: 700; }

/* Selector de partido: pastillas con escudos. */
.match-picker > button { border-radius: 999px; background: var(--surface-card); }
.match-picker > button[aria-pressed="true"], .match-picker > button.active { background: var(--surface-brand); border-color: var(--ink-line); color: #fff; box-shadow: 3px 3px 0 var(--offset); }
.match-picker > button[aria-pressed="true"] small, .match-picker > button.active small { color: rgba(255,255,255,.85); }

/* ============================================================================
   Calendario: semáforo de la demo. Cada partido es una casilla redondeada
   con el escudo dentro, coloreada de fácil (verde) a difícil (rojo); el
   icono de casa/fuera basta y no lleva texto. La columna de equipo, solo
   con el escudo.
   ========================================================================= */
:root { --cal-1: #cdeed5; --cal-2: #e4f2c2; --cal-3: #fde9b6; --cal-4: #f9d1cc; --cal-ink: rgba(15,26,18,.22); }
:root[data-theme="dark"] { --cal-1: #1a4a2a; --cal-2: #33461c; --cal-3: #4a3c14; --cal-4: #4f201b; --cal-ink: rgba(242,239,226,.22); }
#schedule-difficulty-table .fixture-chip, .position-fixture-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  min-width: 52px; min-height: 46px; padding: 6px; border-radius: 14px;
  border: 1.5px solid var(--cal-ink); color: var(--text-body);
}
#schedule-difficulty-table .fixture-chip .team-crest, .position-fixture-chip > img { width: 28px; height: 28px; flex-basis: 28px; }
.fixture-chip-t1, .position-fixture-chip.heat-high { background: var(--cal-1); color: var(--text-body); }
.fixture-chip-t2 { background: var(--cal-2); color: var(--text-body); }
.fixture-chip-t3, .position-fixture-chip.heat-mid { background: var(--cal-3); color: var(--text-body); }
.fixture-chip-t4, .position-fixture-chip.heat-low { background: var(--cal-4); color: var(--text-body); }
.fixture-venue { opacity: .7; }
#schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest {
  width: 30px; height: 30px; flex-basis: 30px; padding: 3px; border-radius: 50%;
  background: var(--surface-inset); border: 2px solid var(--ink-line); box-sizing: content-box;
}
#schedule-difficulty-table .team-cell-content, #position-calendar-table .team-cell-content { align-items: center; }
@media (max-width: 640px) {
  #schedule-difficulty-table .fixture-chip, .position-fixture-chip { min-width: 42px; min-height: 40px; padding: 4px; border-radius: 12px; }
  #schedule-difficulty-table .fixture-chip .team-crest, .position-fixture-chip > img { width: 22px; height: 22px; flex-basis: 22px; }
  #schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest { width: 24px; height: 24px; flex-basis: 24px; }
}

/* ============================================================================
   Mercado: cabecera sin tarjeta oscura, selectores en pastilla y tarjetas
   de jugador con el rango probable (demo).
   ========================================================================= */
.market-horizon-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.market-signals, .market-horizons, .market-units {
  display: inline-flex; gap: 2px; padding: 3px; border: 2px solid var(--ink-line); border-radius: 999px; background: var(--surface-card);
}
.market-signals a, .market-horizons a, .market-units a {
  display: inline-grid; place-items: center; min-height: 36px; min-width: 40px; padding: 0 14px; border-radius: 999px; border: 0;
  background: none; box-shadow: none; color: var(--text-body); font-weight: 800; font-size: .88rem; text-decoration: none;
}
.market-signals a.is-active, .market-horizons a.is-active, .market-units a.is-active { background: var(--surface-brand); color: #fff; box-shadow: none; }
.market-units a { font-family: var(--font-mono); }

.market-cards { list-style: none; margin: 0; padding: 4px 16px; border: 2px solid var(--ink-line); border-radius: var(--radius-card); background: var(--surface-card); box-shadow: 4px 4px 0 var(--offset); }
.market-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--border-default); cursor: pointer; }
.market-card:first-child { border-top: 0; }
.market-card .market-photo { grid-row: span 2; align-self: start; }
.market-card-who { min-width: 0; }
.market-card-who .market-player-toggle { display: block; font-weight: 800; color: var(--text-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-card-who small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; color: var(--text-muted); font-size: .82rem; }
.market-card-val { text-align: right; font-family: var(--font-mono); }
.market-card-val strong { display: block; font-size: 1rem; }
.market-card-val small { display: block; font-size: .74rem; font-weight: 700; color: var(--text-muted); }
.market-card-val small.market-up { color: var(--status-win); } .market-card-val small.market-down { color: var(--status-loss); }
.market-card-range { grid-column: 2 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; font: 600 .68rem var(--font-mono); color: var(--text-muted); }
.market-card-range .r { position: relative; height: 8px; border-radius: 4px; background: var(--surface-inset); --c: var(--text-muted); }
.market-card-range .r.is-up { --c: var(--status-win); } .market-card-range .r.is-down { --c: var(--status-loss); }
.market-card-range .r i { position: absolute; top: 0; bottom: 0; left: var(--a); right: calc(100% - var(--b)); border-radius: 4px; background: color-mix(in srgb, var(--c) 45%, transparent); }
.market-card-range .r em { position: absolute; top: -4px; bottom: -4px; left: var(--m); width: 3px; border-radius: 2px; background: var(--c); }
.market-card-range .r s { position: absolute; top: -6px; bottom: -6px; left: 50%; width: 2px; background: var(--ink-line); text-decoration: none; }
.market-card-key { margin: 10px 0 0; color: var(--text-muted); font-size: .85rem; }
.market-match-warning { display: inline-flex; color: var(--text-accent-warm); }
.market-horizon-row { justify-content: flex-start; margin-bottom: 16px; }
.market-horizons, .market-signals { flex: none; width: auto; height: auto; margin: 0; }
.market-horizons > a, .market-signals > a { flex: none; font-size: .88rem; }
.market-head { margin-bottom: 14px; }

/* ============================================================================
   Dinero (demo): selector Saldo / Puja máxima / Detalles, lista en tarjeta y
   «Quién sobrepuja» en porcentaje, por encima de las gráficas plegadas.
   ========================================================================= */
.money-view-switch { display: inline-flex; gap: 2px; margin: 4px 0 14px; padding: 3px; border: 2px solid var(--ink-line); border-radius: 999px; background: var(--surface-card); max-width: 100%; overflow-x: auto; }
.money-view-switch button, form .money-view-switch button {
  min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: none; box-shadow: none;
  color: var(--text-body); font: 800 .88rem var(--font-body); text-transform: none; letter-spacing: 0; white-space: nowrap;
}
.money-view-switch button:hover { translate: none; box-shadow: none; background: var(--surface-inset); }
.money-view-switch button.on, .money-view-switch button.on:hover { background: var(--surface-brand); color: #fff; }
.money-card { margin-bottom: 18px; padding: 16px; border: 2px solid var(--ink-line); border-radius: var(--radius-card); background: var(--surface-card); box-shadow: 4px 4px 0 var(--offset); }
.money-card h2 { margin: 0 0 10px; font-size: 1.15rem; }
.money-card h2 small { display: block; margin-top: 6px; font: 700 max(11px, .68rem) var(--font-mono); letter-spacing: .06em; color: var(--text-muted); text-transform: uppercase; }
.money-list { list-style: none; margin: 0; padding: 0; }
.money-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border-default); }
.money-row:first-child { border-top: 0; }
.money-row.is-own { margin: 0 -10px; padding-inline: 10px; border-radius: 12px; background: color-mix(in srgb, var(--gold-500) 22%, transparent); border-top-color: transparent; }
.money-row.is-own + .money-row { border-top-color: transparent; }
.money-rank { width: 22px; flex: none; text-align: center; font: 700 .85rem var(--font-mono); color: var(--text-muted); }
.money-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text-body); }
.money-who:hover { text-decoration: none; color: var(--text-brand); }
.money-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.money-who em { font-style: normal; color: var(--text-muted); font-weight: 600; }
.money-who .manager-avatar { flex: none; }
.money-value { flex: none; text-align: right; font: 700 1rem var(--font-mono); font-variant-numeric: tabular-nums; }
.money-value small { display: block; font: 500 .72rem var(--font-body); color: var(--text-muted); }
.money-value.is-over { color: var(--status-loss); } .money-value.is-under { color: var(--status-win); }
.money-pending { color: var(--text-muted); margin: 0; }
.dashboard-page .lazy-chart { margin-top: 14px; }
@media (min-width: 761px) { .money-card { max-width: 820px; box-shadow: 6px 6px 0 var(--offset); } }

/* ============================================================================
   Segunda ronda de ajustes (revisión del 19/11)
   ========================================================================= */

/* Portada: el logo de la barra sobra junto a la cabecera GUIDETTIPS. */
.site-header.is-home .brand { display: none; }
.site-header.is-home .header-inner { justify-content: flex-end; }

/* Barra inferior: botones algo más pequeños y con aire, como en la demo. */
.bottom-nav { gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav-item, .bottom-nav .logout-form button { min-height: 54px; padding: 6px 2px; border-radius: 14px; color: var(--text-body); font-weight: 800; font-size: max(11px, .7rem); }
.bottom-nav-item svg { width: 24px; height: 24px; }
@media (max-width: 520px) { .bottom-nav-item, .bottom-nav .logout-form button { font-size: max(10px, .63rem); letter-spacing: 0; padding-inline: 1px; } }
.bottom-nav-item.active { box-shadow: 2px 2px 0 var(--offset); }

/* Fotos de futbolistas y sus insignias, siempre con filete negro. */
.player-photo-frame-photo, .lineups-detail-portrait, .round-manager-avatar {
  border: 2px solid #0f1a12; box-sizing: border-box;
}
.mi-once-player .player-photo-frame-photo { box-shadow: none; }
.player-photo-frame-crest, .lineups-detail-club {
  border: 1.5px solid #0f1a12; border-radius: 50%; background: #fffdf6; padding: 1px; box-sizing: border-box;
}
.round-player-position, .market-position, .mi-once-role { border: 1.5px solid #0f1a12; }

/* Mi jornada: las cuatro cifras en tarjetas sueltas; la primera, en oro. */
.round-summary-tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
}
.round-summary-tiles > div, .round-summary-tiles > div:first-child {
  padding: 14px; border: 2px solid var(--ink-line); border-radius: 16px; background: var(--surface-card);
}
.round-summary-tiles > div:first-child { background: var(--gold-500); }
.round-summary-tiles > div:first-child :is(dt, dd, small, .round-own-xpts) { color: #0d1710; }
.round-summary-tiles dd { font-size: 1.9rem; line-height: 1.05; margin: 4px 0 2px; }
@media (min-width: 761px) { .round-summary-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Onces: el campo dentro de la tarjeta del partido no lleva otra tarjeta. */
.fixture-group .team-pitch, .fixture-group .table-wrap, .team-pitch .table-wrap {
  border: 0; border-radius: 0; box-shadow: none;
}
.fixture-group .team-pitch + .team-pitch { border-top: 2px solid var(--ink-line); }

/* Comparador de fuentes: tabla limpia dentro de la tarjeta. */
.lineup-comparison table { border-collapse: separate; border-spacing: 0; }
.lineup-comparison thead th {
  background: var(--surface-inset); border-bottom: 2px solid var(--ink-line); border-radius: 0;
  font: 700 max(11px, .68rem) var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
}
.lineup-comparison .comparison-summary th { background: var(--surface-card); border-bottom: 1px solid var(--border-default); text-transform: none; letter-spacing: 0; }
.lineup-comparison tbody th { font-weight: 700; background: var(--surface-card); }
.lineup-comparison tbody tr > * { border-bottom: 1px solid var(--border-default); }
.lineup-comparison tbody td { font: 700 max(12px, .8rem) var(--font-mono); text-align: center; }
.lineup-comparison .weighted-col { background: color-mix(in srgb, var(--gold-500) 14%, var(--surface-card)); }

/* Tablas: la cabecera solo redondea arriba; por abajo va recta. */
thead th, thead tr { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }

/* Calendario: tarjeta con filas separadas (demo), sin cabecera teñida. */
#schedule-difficulty-table, #position-calendar-table { border-collapse: separate; border-spacing: 0 6px; }
#schedule-difficulty-table thead th, #position-calendar-table thead th {
  background: none; border: 0; padding-bottom: 2px;
  font: 700 max(11px, .66rem) var(--font-mono); letter-spacing: .08em; color: var(--text-muted);
}
#schedule-difficulty-table td, #position-calendar-table td { border: 0; padding-top: 0; padding-bottom: 0; }
#schedule-difficulty-table td:first-child, #position-calendar-table td:first-child { background: var(--surface-card); }
.calendar-subnav ~ .table-wrap, #schedule-difficulty-table, #position-calendar-table { background: var(--surface-card); }
.round-summary-tiles > div:nth-child(n) { padding: 14px !important; border: 2px solid var(--ink-line) !important; border-radius: 16px !important; }
.market-card-past { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: .76rem; color: var(--text-muted); }
.market-card-past b { font-family: var(--font-mono); color: var(--text-body); }
.market-card-past b.market-up { color: var(--status-win); } .market-card-past b.market-down { color: var(--status-loss); }

/* Mi once: pastilla de rival/xPts con filete negro y sugerencias de
   cambio cortadas con puntos suspensivos si el nombre no cabe. */
.mi-once-fixture { border: 1.5px solid #0f1a12; }
.bench-card { min-width: 0; }
.bench-swap { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mercado (3.ª ronda): selectores en una línea (subidas/bajadas con icono),
   sin barras de intervalo, y la flecha de tendencia en cada tarjeta: un
   círculo con filete de tinta cuyo color dice el momentum. */
.market-horizon-row { flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.market-horizon-row::-webkit-scrollbar { display: none; }
.market-signals a, .market-horizons a, .market-units a { min-width: 38px; padding: 0 10px; }
.market-signals a svg { display: block; }
.market-card { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.market-card-past { grid-column: 2 / -1; }
.market-card-trend .market-trend, .market-trend {
  width: 32px; min-width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 1.5px solid #0f1a12;
}
.market-card-trend .market-trend svg { width: 18px; height: 18px; }

/* ── Onces: porcentajes en caja (como la demo) ─────────────────────────────
   Tramos de percentage_tone: <=65 amarillo, <=90 verde, >90 azul. Colores
   sólidos de la demo en vez de los tonos neón sobre fondo transparente. */
.consensus-count, .bench-pct {
  min-width: 36px; padding: 1px 6px; border-radius: 6px;
  background: rgba(0,0,0,.45); color: #fff;
  border: 1.5px solid #0f1a12; text-shadow: none;
  font-size: max(10px, .66rem);
}
.consensus-count.pct-warm, .bench-pct.pct-warm { background: #f7b500; color: #0f1a12; }
.consensus-count.pct-green, .bench-pct.pct-green { background: #15803d; color: #fff; }
.consensus-count.pct-blue, .bench-pct.pct-blue { background: #2f80ed; color: #fff; }
.consensus-full > .consensus-count { border: 1.5px solid #0f1a12; box-shadow: 1.5px 1.5px 0 #0f1a12; }
.bench-pct { font-size: max(12px, .74rem); }
.lineup-comparison .weighted-col.pct-warm, .lineup-candidates .weighted-col.pct-warm { color: #b07d00; }
.lineup-comparison .weighted-col.pct-green, .lineup-candidates .weighted-col.pct-green { color: #15803d; }
.lineup-comparison .weighted-col.pct-blue, .lineup-candidates .weighted-col.pct-blue { color: #2f80ed; }
:root[data-theme="dark"] .lineup-comparison .weighted-col.pct-warm { color: #f7b500; }
:root[data-theme="dark"] .lineup-comparison .weighted-col.pct-green { color: #22c55e; }
:root[data-theme="dark"] .lineup-comparison .weighted-col.pct-blue { color: #6aa8ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lineup-comparison .weighted-col.pct-warm { color: #f7b500; }
  :root:not([data-theme="light"]) .lineup-comparison .weighted-col.pct-green { color: #22c55e; }
  :root:not([data-theme="light"]) .lineup-comparison .weighted-col.pct-blue { color: #6aa8ff; }
}

/* ── Onces: qué fuente acierta más, por partido (tarjeta de la demo) ───── */
.source-accuracy-card {
  grid-column: 1 / -1; padding: 14px 16px; border: 2px solid var(--ink-line);
  border-radius: var(--radius-card); background: var(--surface-card); box-shadow: var(--shadow-card);
}
.source-accuracy-card h3 { margin: 0 0 10px; font-size: 1.05rem; }
.source-accuracy-card h3 small { display: block; margin-top: 2px; color: var(--text-muted); font: 500 .78rem var(--font-body, inherit); }
.source-accuracy-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.source-accuracy-team h4 { margin: 0 0 2px; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.source-accuracy-team ol { margin: 0; padding: 0; list-style: none; }
.source-accuracy-team li {
  display: grid; grid-template-columns: minmax(84px, 9.5em) minmax(0, 1fr) 42px; align-items: center; gap: 8px;
  padding: 7px 0; border-top: 1px solid var(--border-default); font-weight: 700; font-size: .86rem;
}
.source-accuracy-team li:first-child { border-top: 0; }
.source-accuracy-team .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-accuracy-team .track { height: 12px; border-radius: 6px; background: var(--border-subtle); overflow: hidden; border: 1px solid var(--border-default); }
.source-accuracy-team .track i { display: block; height: 100%; width: var(--w); border-radius: 6px; background: var(--surface-brand); }
.source-accuracy-team li:not(.best) .track i { background: #2f80ed; }
.source-accuracy-team .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.source-accuracy-team li.best { color: var(--text-brand); }
@media (max-width: 700px) { .source-accuracy-teams { grid-template-columns: minmax(0, 1fr); } }

/* ── Mercado: bloque inferior en tarjetas ──────────────────────────────── */
.market-sidebar { gap: 16px; border-top: 0; padding-top: 8px; align-items: start; }
.market-side-card, .market-calendar-link, .market-method {
  padding: 14px 16px; border: 2px solid var(--ink-line); border-radius: var(--radius-card);
  background: var(--surface-card); box-shadow: var(--shadow-card);
}
.market-side-card h3 { margin: 0 0 10px; font: 400 1.05rem var(--font-display, inherit); }
.market-side-card h3 small { display: block; margin-top: 3px; color: var(--text-muted); font: 500 .78rem var(--font-body); }
.market-accuracy-list { margin: 0; padding: 0; list-style: none; }
.market-accuracy-result {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px;
  padding: 10px 0; border-top: 1px solid var(--border-default);
}
.market-accuracy-result:first-child { border-top: 0; }
.market-accuracy-horizon {
  grid-row: span 2; display: grid; place-items: center; min-width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface-brand); color: #fff; border: 2px solid #0f1a12; font: 700 .9rem var(--font-mono);
}
.market-accuracy-dates { color: var(--text-muted); font: 500 .74rem var(--font-mono); }
.market-accuracy-mae { display: grid; justify-items: end; line-height: 1.1; }
.market-accuracy-mae b { font: 700 .95rem var(--font-mono); color: var(--text-body); }
.market-accuracy-mae small { font-size: .68rem; }
.market-accuracy-cov { grid-column: 2 / -1; display: grid; gap: 4px; }
.market-accuracy-cov small { font-size: .74rem; }
.market-accuracy-cov b { color: var(--text-body); font-family: var(--font-mono); }
.market-accuracy-track { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--border-subtle); border: 1px solid var(--border-default); }
.market-accuracy-track i { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 5px; background: var(--surface-brand); }
.market-accuracy-track em { position: absolute; left: 80%; top: -3px; bottom: -3px; width: 2px; background: var(--ink-line); }
.market-accuracy-wait { grid-column: 2 / -1; color: var(--text-muted); font-size: .82rem; }
.market-side-card .market-side-note { margin: 10px 0 0; padding-top: 10px; font-size: .74rem; }
.market-budget-card .market-budget { display: block; margin: 2px 0 8px; font: 700 1.6rem var(--font-mono); color: var(--text-body); }
.market-calendar-link { color: var(--text-body); text-decoration: none; transition: transform .12s, box-shadow .12s; }
.market-calendar-link:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-raised); text-decoration: none; }
.market-calendar-arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--h1-a, #f7b500); color: #0f1a12; border: 2px solid #0f1a12; }
.market-method summary { min-height: 32px; font-weight: 700; }
.market-method[open] summary span { transform: rotate(45deg); }

/* ── Escudos: fondo con el color del club (--team-c, filtro crest_style) ── */
img[style*="--team-c"] {
  background: var(--team-c) !important; border-radius: 50%; padding: 3px; box-sizing: border-box;
  border: 1.5px solid #0f1a12; object-fit: contain;
}
.market-team-crest[style*="--team-c"], .mi-once-crest[style*="--team-c"] { padding: 2px; }

/* ── Calendario: una sola tarjeta, sin cabecera de tabla ───────────────── */
.cal-card {
  margin-top: 4px; padding: 14px 14px 10px; border: 2px solid var(--ink-line);
  border-radius: var(--radius-card); background: var(--surface-card); box-shadow: var(--shadow-card);
}
.cal-card-title { margin: 0 0 6px; font-size: 1.05rem; }
.cal-card-title small { display: block; margin-top: 2px; color: var(--text-muted); font: 500 .78rem var(--font-body); text-transform: none; letter-spacing: 0; }
.cal-card .table-wrap { border: 0 !important; box-shadow: none !important; background: none !important; padding: 0; margin: 0; border-radius: 0; }
.cal-card #schedule-difficulty-table thead, .cal-card #position-calendar-table thead {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.cal-card #schedule-difficulty-table, .cal-card #position-calendar-table { background: none; }
.cal-card #schedule-difficulty-table tbody tr + tr td, .cal-card #position-calendar-table tbody tr + tr td { border-top: 1px dashed var(--border-default); padding-top: 6px; }
.cal-card #schedule-difficulty-table td:first-child, .cal-card #position-calendar-table td:first-child { background: var(--surface-card); }
.cal-card #schedule-difficulty-table td:nth-last-child(2), .cal-card .position-points { font: 700 1.05rem var(--font-mono); }
.cal-picks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.cal-picks ol { margin: 6px 0 4px; padding: 0; list-style: none; display: grid; gap: 8px; }
.cal-pick {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--ink-line);
  border-radius: 14px; background: var(--surface-inset);
}
.cal-pick .team-crest { width: 34px; height: 34px; flex: none; }
.cal-pick-who { flex: 1; min-width: 0; }
.cal-pick-who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-pick-who small { display: block; color: var(--text-muted); font: 500 .74rem var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-pick-num { font: 700 1.2rem var(--font-mono); color: var(--status-win, #15803d); }
.cal-pick.bad .cal-pick-num { color: var(--status-loss, #c62a20); }
@media (max-width: 700px) { .cal-picks-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Power Ranking: tarjeta única, filas con puesto, sin cabecera ──────── */
.cal-card .comparison-pin-bar, .cal-card .standard-pin-bar { display: none !important; }
.rank-card #team-ranking-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rank-card #team-ranking-table { counter-reset: rank; border-collapse: collapse; width: 100%; background: none; }
.rank-card #team-ranking-table tbody tr { counter-increment: rank; }
.rank-card #team-ranking-table td { border: 0; padding: 9px 6px; vertical-align: middle; background: none; }
.rank-card #team-ranking-table tbody tr + tr td { border-top: 1px dashed var(--border-default); }
.rank-card #team-ranking-table .team-name-with-crest { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.rank-card #team-ranking-table .team-name-with-crest::before {
  content: counter(rank); flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  border: 2px solid var(--ink-line); background: var(--surface-inset); font: 700 .8rem var(--font-mono); color: var(--text-body);
}
.rank-card #team-ranking-table tbody tr:nth-child(-n+3) .team-name-with-crest::before { background: var(--h1-a, #f7b500); color: #0f1a12; border-color: #0f1a12; }
.rank-card #team-ranking-table .team-crest { width: 32px; height: 32px; flex: none; }
.rank-card #team-ranking-table td:nth-child(2) { font: 700 1.05rem var(--font-mono); text-align: right; }
.rank-card #team-ranking-table .ranking-weekly-change { width: 1%; white-space: nowrap; text-align: right; font: 700 .8rem var(--font-mono); }
.rank-card #team-ranking-table .ranking-weekly-change.positive, .rank-card #team-ranking-table .ranking-weekly-change.negative {
  padding-inline: 8px;
}
.rank-card #team-ranking-table .ranking-weekly-change.positive { color: var(--status-win, #15803d); }
.rank-card #team-ranking-table .ranking-weekly-change.negative { color: var(--status-loss, #c62a20); }

/* ── Tablas: cabecera fija (lineups-experience.js) igual que la del perfil
   de manager: redondeada solo arriba, sin borde ni sombra por abajo. La
   barra hereda la clase .table-wrap y con ella el radio en las cuatro
   esquinas; aquí se le quita. */
.standard-pin-view, .comparison-pin-bar.is-pinned .standard-pin-view,
.comparison-pin-view, .comparison-pin-bar .comparison-pin-view {
  border-radius: var(--radius-card) var(--radius-card) 0 0 !important;
  border-bottom: 0 !important; box-shadow: none !important; margin: 0 !important;
}
.comparison-pin > .standard-pin-original { border-top-left-radius: var(--radius-card); border-top-right-radius: var(--radius-card); }
.table-wrap thead th { background: var(--surface-thead); border-bottom: 2px solid var(--ink-line); }
.table-wrap thead tr:first-child > th:first-child { border-top-left-radius: calc(var(--radius-card) - 2px); }
.table-wrap thead tr:first-child > th:last-child { border-top-right-radius: calc(var(--radius-card) - 2px); }

/* ── Avatares de mánager: filete negro siempre; grande en su perfil ────── */
.manager-avatar { border: 2px solid #0f1a12; box-sizing: border-box; overflow: hidden; }
.manager-head-row .manager-avatar.manager-avatar-lg {
  width: 84px; height: 84px; flex: 0 0 84px; border-width: 2.5px; box-shadow: 3px 3px 0 var(--offset);
  font: 400 1.6rem var(--font-display, inherit); background: var(--grad-pitch, #15803d); color: #fff;
}
@media (max-width: 640px) { .manager-head-row .manager-avatar.manager-avatar-lg { width: 64px; height: 64px; flex-basis: 64px; font-size: 1.25rem; } }

/* Paginación de tablas largas (table-pager.js). */
.table-pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -8px 0 24px; }
.table-pager button {
  min-width: 44px; min-height: 40px; padding: 0 14px; border: 2px solid var(--ink-line); border-radius: 999px;
  background: var(--surface-card); color: var(--text-body); font-weight: 700; box-shadow: 2px 2px 0 var(--offset);
}
.table-pager button:disabled { opacity: .4; box-shadow: none; cursor: default; }
.table-pager span { min-width: 64px; text-align: center; font: 700 .85rem var(--font-mono); color: var(--text-muted); }

/* ── Dinero: evolución del saldo/valor como en la demo ─────────────────────
   Tarjeta de tinta, título en display, periodo en pastilla, media en línea
   discontinua y leyenda en pastillas. Con ligas grandes la leyenda se queda
   en tres filas y se desplaza. */
.lazy-chart { background: var(--surface-card); box-shadow: var(--shadow-card); overflow: hidden; }
.lazy-chart > summary { padding: 14px 16px; font: 400 1.05rem var(--font-display, inherit); text-transform: uppercase; color: var(--text-heading); }
.lazy-chart[open] > summary { border-bottom: 1.5px dashed var(--border-default); }
.lazy-chart .chart-wrap { padding: 12px 16px 14px 28px; background: none; }
.chart-ranges {
  display: inline-flex; gap: 2px; padding: 3px; border: 2px solid var(--ink-line); border-radius: 999px; background: var(--surface-card);
}
.chart-range { min-height: 30px; padding: 0 11px; border: 0 !important; border-radius: 999px; font: 700 .76rem var(--font-body); color: var(--text-body); display: inline-grid; place-items: center; }
.chart-range.active { background: var(--surface-brand) !important; color: #fff !important; }
.chart-axis-label { font-family: var(--font-mono); }
.chart-average-line { stroke-dasharray: 4 4; }
.chart-average-band { fill-opacity: .06; }
.chart-legend-controls { margin: 12px 0 8px; gap: 6px; }
.chart-toggle-all-btn {
  min-height: 30px; padding: 0 12px; border: 2px solid var(--ink-line); color: var(--text-body);
  font-size: .72rem; letter-spacing: .03em; box-shadow: 2px 2px 0 var(--offset);
}
.chart-legend {
  /* Tres filas de pastillas (34px + 6px de hueco) y el resto con scroll. */
  max-height: calc(3 * 34px + 2 * 6px + 4px); overflow-y: auto; overscroll-behavior: contain;
  padding: 2px 4px 2px 2px; scrollbar-width: thin;
}
.chart-legend-item { min-height: 34px; border: 2px solid var(--border-default); font-weight: 600; font-size: .82rem; background: var(--surface-card); }
.chart-legend-item .chart-swatch { border: 1.5px solid #0f1a12; width: 11px; height: 11px; flex-basis: 11px; }
.chart-legend-item[data-manager-id="__average"] { border-color: var(--ink-line); }
.market-pagination { gap: 8px; }
.market-pagination a {
  display: inline-grid; place-items: center; min-height: 40px; padding: 0 14px; border: 2px solid var(--ink-line); border-radius: 999px;
  background: var(--surface-card); color: var(--text-body); font-weight: 700; box-shadow: 2px 2px 0 var(--offset); text-decoration: none;
}
.market-pagination .market-page-count { font: 700 .85rem var(--font-mono); color: var(--text-muted); }
.market-sidebar .market-side-card h3 { font-family: var(--font-heading, var(--font-display)); text-transform: uppercase; font-style: italic; letter-spacing: .01em; }
.market-sidebar .market-side-card p.market-side-note { font-size: .74rem; line-height: 1.45; }

/* ── Cambio de tema: círculo que se abre desde el botón (theme.js) ─────── */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) {
  clip-path: circle(0 at var(--vx, 90%) var(--vy, 0));
  animation: gt-theme-reveal .5s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes gt-theme-reveal { to { clip-path: circle(150% at var(--vx, 90%) var(--vy, 0)); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-new(root) { animation: none; clip-path: none; } }

/* ============================================================================
   Portada, tercera ronda (20/11): sin barra de cabecera, la cabecera
   GUIDETTIPS fija arriba; Próxima jornada destacada; final y preguntas en
   tarjetas con relieve.
   ========================================================================= */
.site-header.is-home { display: none; }
.gt-mastbar {
  position: sticky; top: 0; z-index: 40; padding: calc(env(safe-area-inset-top) + 8px) var(--gutter) 8px;
  background: color-mix(in srgb, var(--surface-app) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--ink-line);
}
.gt-mastbar .gt-mast { display: block; max-width: var(--content-max); margin: 0 auto; text-decoration: none; }
.gt-mastbar .gt-mast:hover { text-decoration: none; }
.gt-cover .gt-mast-sub { margin-top: 0; border-top: 0; padding-top: 2px; }
.gt-kicker { border-radius: 0; }
.gt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.gt-tags i {
  font-style: normal; padding: 3px 9px; border: 1.5px solid var(--ink-line); border-radius: 999px;
  background: var(--surface-inset); color: var(--text-body); font: 700 .78rem var(--font-body);
}
.gt-line-feature { position: relative; background: color-mix(in srgb, var(--gold-500) 16%, var(--surface-card)); border-color: var(--ink-line); }
.gt-line-feature b { color: var(--text-body); }
.gt-badge {
  justify-self: start; margin-top: 4px; padding: 2px 8px; background: var(--surface-brand); color: #fff;
  font: 700 .7rem var(--font-mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase;
  border: 1.5px solid #0f1a12; transform: skewX(-8deg);
}
.gt-spread .gt-tags { margin-top: 4px; }

/* Final: tarjeta grande con lista y botón. */
.gt-outro { padding: 48px var(--gutter) 40px; }
.gt-outro-card {
  position: relative; max-width: 760px; margin: 0 auto; padding: 28px 22px 26px; text-align: left; overflow: hidden;
  border: 2px solid var(--ink-line); border-radius: 26px; background: var(--surface-card); box-shadow: 8px 8px 0 var(--offset);
}
.gt-outro-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: radial-gradient(circle, var(--gold-500) 28%, transparent 30%) 0 0 / 12px 12px;
  -webkit-mask: radial-gradient(ellipse 60% 70% at 100% 100%, #000, transparent 70%); mask: radial-gradient(ellipse 60% 70% at 100% 100%, #000, transparent 70%);
}
.gt-outro-card > * { position: relative; }
.gt-outro-card h2 { margin: 14px 0 18px; }
.gt-outro-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.gt-outro-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid var(--ink-line); border-radius: 14px; background: var(--surface-inset); font-weight: 700; }
.gt-outro-list b { font: 700 1rem var(--font-mono); color: var(--text-brand); }

/* Preguntas y respuestas: tarjetas con relieve. */
main.home .home-qa { border-top: 0; padding-top: 8px; max-width: var(--content-max); }
.home-qa-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.home-qa-item {
  position: relative; display: flex; flex-direction: column; padding: 18px 18px 12px; border: 2px solid var(--ink-line) !important;
  border-radius: 18px; background: var(--surface-card); box-shadow: 4px 4px 0 var(--offset); transition: transform .15s, box-shadow .15s;
}
.home-qa-item:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--offset); }
.home-qa-n { align-self: flex-start; margin-bottom: 8px; padding: 2px 8px; background: var(--gold-500); color: #0f1a12; border: 1.5px solid #0f1a12; font: 700 .78rem var(--font-mono); transform: skewX(-8deg); }
.home-qa-item h3 { margin-bottom: 8px; }
.home-qa-item p { line-height: 1.6; }
.home-qa-more { margin-top: auto; align-self: flex-start; text-decoration: none; text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; }
.home-qa-more::after { content: " →"; }
@media (min-width: 900px) {
  .gt-mastbar { padding-inline: clamp(24px, 4vw, 48px); }
  .gt-line-feature { padding: 12px 14px; border-width: 2px; border-radius: 16px; box-shadow: 3px 3px 0 var(--offset); }
  .gt-outro-card { padding: 40px 44px 36px; }
  .gt-outro-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gt-outro-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .home-qa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

/* Dinero: la fórmula de puja máxima se elige en la propia tarjeta. */
.money-formula { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.money-formula select {
  max-width: 100%; min-height: 34px; padding: 0 30px 0 12px; border: 2px solid var(--ink-line); border-radius: 999px;
  background: var(--surface-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  -webkit-appearance: none; appearance: none; color: var(--text-body); font: 700 .8rem var(--font-body); box-shadow: 2px 2px 0 var(--offset); cursor: pointer;
}
.money-bulk { margin-bottom: 12px; }
.money-bulk > summary { padding: 12px 16px; font-weight: 700; }
.money-bulk .toolbar-setting { padding: 0 16px 12px; }
.money-formula .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ── Escudos, ronda 4: principal grande y con color; secundario, solo el escudo ── */
/* Leyenda de la tarjeta de calendario (dificultad 1-4 o puntos esperados). */
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; color: var(--text-muted); font: 600 .76rem var(--font-body); }
.cal-legend i {
  display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 7px; border-radius: 8px;
  border: 1.5px solid var(--cal-ink); font: 700 .76rem var(--font-mono); font-style: normal; color: var(--text-body);
}
.cal-legend i.heat-high { background: var(--cal-1); } .cal-legend i.heat-mid { background: var(--cal-3); } .cal-legend i.heat-low { background: var(--cal-4); }
/* Escudo principal de cada fila: más grande, con el color del club. */
#schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest {
  width: 46px; height: 46px; flex-basis: 46px; padding: 5px; box-sizing: border-box;
  border: 2px solid var(--ink-line); border-radius: 50%;
}
.cal-pick .team-crest, .rank-card #team-ranking-table .team-crest { width: 40px; height: 40px; padding: 4px; }
/* Rivales: solo el escudo, sin círculo ni fondo, y un poco más grande. */
#schedule-difficulty-table .fixture-chip .team-crest, .position-fixture-chip > img { width: 30px; height: 30px; flex-basis: 30px; background: none; border: 0; padding: 0; border-radius: 0; }
@media (max-width: 640px) {
  #schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest { width: 38px; height: 38px; flex-basis: 38px; padding: 4px; }
  #schedule-difficulty-table .fixture-chip .team-crest, .position-fixture-chip > img { width: 26px; height: 26px; flex-basis: 26px; }
}
/* Badge del escudo junto a la foto del jugador: sin círculo ni fondo. */
.player-photo-frame-crest, .lineups-detail-club {
  border: 0 !important; border-radius: 0 !important; background: none !important; padding: 0 !important;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}
.mi-once-crest { width: 20px; height: 20px; flex-basis: 20px; }
/* Si la foto es tan pequeña que el escudo no se distinguiría, no se pinta. */
.player-photo-frame { container-type: inline-size; }
.player-photo-frame-crest { min-width: 18px; min-height: 18px; }
@container (max-width: 35px) { .player-photo-frame-crest { display: none; } }

/* ── Power Ranking: selector de puntuación como pastilla desplegable ───── */
.ranking-method-control { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative; z-index: 35; }
.ranking-method-pill > summary { min-height: 44px; padding: 0 16px; }
.ranking-method-pill .filter-pill-label { display: inline; }
.ranking-method-pill .filter-menu {
  min-width: 230px; padding: 6px; border: 2px solid var(--ink-line); border-radius: 14px;
  box-shadow: 4px 4px 0 var(--offset);
}
.ranking-method-pill .filter-menu button {
  display: grid; gap: 1px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
  background: none; color: var(--text-body); font: 600 15px var(--font-body); text-align: left; cursor: pointer;
}
.ranking-method-pill .filter-menu button:hover:not(:disabled) { background: var(--surface-brand-soft); }
.ranking-method-pill .filter-menu button[aria-checked="true"] { background: var(--surface-brand); color: #fff; font-weight: 800; }
.ranking-method-pill .filter-menu button:disabled { color: var(--text-muted); cursor: not-allowed; }
.ranking-method-pill .filter-menu small { font-size: .75rem; font-weight: 500; color: var(--text-muted); }
#ranking-method-status:empty { display: none; }

/* ── Dinero: vista y fórmula en la misma fila ──────────────────────────── */
.money-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 14px; }
.money-controls .money-view-switch { margin: 0; }
.money-controls .money-formula { margin: 0; }
.money-controls .money-formula select { min-height: 44px; padding: 0 34px 0 16px; font: 700 .9rem var(--font-body); font-style: normal; text-transform: none; letter-spacing: 0; }
.money-controls .money-formula [role="status"] { font: 600 .8rem var(--font-body); color: var(--text-muted); }

/* ── Gráficos de Dinero como en la demo ────────────────────────────────── */
/* Ejes en mono pequeño y gris; la altura fija hace que 2.5 unidades del
   viewBox (alto 50) rindan ~11-12 px en pantalla. */
.chart-svg { height: 230px; }
@media (min-width: 761px) { .chart-svg { height: 280px; } }
.chart-axis-label { font-size: 2.5px; font-weight: 600; fill: var(--text-muted); letter-spacing: 0; }
@media (min-width: 761px) { .chart-axis-label { font-size: 2.1px; } }
.chart-axis-label-year { font-size: 1.7px; }
.chart-gridline { stroke: var(--border-default); }
.chart-line { stroke-width: 2px; }
.chart-average-line { stroke-width: 2px; stroke: var(--ink-line); }
.chart-average-band { display: none; }
/* Serie oculta: atenuada, como en la demo, no borrada. */
.chart-series.hidden, .chart-summary.hidden { display: inline; opacity: .12; pointer-events: none; }
.chart-wrap .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.lazy-chart .chart-wrap .card-head { justify-content: flex-end; }
.chart-legend-item.inactive { opacity: .45; }

/* Carga de la gráfica: esqueleto animado en vez de una línea de texto. */
.chart-skeleton { padding: 16px 16px 18px; }
.chart-skeleton svg { display: block; width: 100%; height: 200px; }
.chart-skeleton .sk-grid { stroke: var(--border-default); stroke-width: 1; }
.chart-skeleton .sk-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: gt-sk-draw 1.6s ease-in-out infinite; }
.chart-skeleton .sk-line:nth-of-type(2) { animation-delay: .15s; } .chart-skeleton .sk-line:nth-of-type(3) { animation-delay: .3s; }
.chart-skeleton .sk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chart-skeleton .sk-chips i { width: 72px; height: 30px; border-radius: 999px; background: var(--surface-inset); animation: gt-sk-pulse 1.2s ease-in-out infinite alternate; }
.chart-skeleton p { margin: 10px 0 0; color: var(--text-muted); font: 600 .78rem var(--font-mono); }
@keyframes gt-sk-draw { 0% { stroke-dashoffset: 400; opacity: .9; } 70% { stroke-dashoffset: 0; opacity: .9; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes gt-sk-pulse { from { opacity: .45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chart-skeleton .sk-line { animation: none; stroke-dashoffset: 0; } .chart-skeleton .sk-chips i { animation: none; } }

/* ── Dinero · Detalles: la tabla dentro de una tarjeta, como las listas ── */
.money-detail-card { max-width: none !important; padding: 16px 0 6px; }
.money-detail-card > h2 { padding: 0 16px; }
.money-detail-card .table-wrap { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; margin-inline: 0; margin-bottom: 0; background: none; }
.money-detail-card #ledger-table { border-collapse: collapse; background: none; }
.money-detail-card #ledger-table thead th, .money-detail-card .standard-pin-view thead th {
  background: var(--surface-inset); border: 0; border-bottom: 2px solid var(--ink-line); border-radius: 0;
  font: 800 .68rem var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; padding: 10px 12px;
}
.money-detail-card #ledger-table td { border: 0; border-top: 1px dashed var(--border-default); padding: 10px 12px; background: none; white-space: nowrap; }
.money-detail-card #ledger-table tbody tr:first-child td { border-top: 0; }
.money-detail-card #ledger-table td.num { font: 600 .9rem var(--font-mono); }
.money-detail-card #ledger-table td.total-cell { font-weight: 800; }
.money-detail-card #ledger-table td:first-child, .money-detail-card #ledger-table th:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--surface-card);
}
.money-detail-card #ledger-table thead th:first-child, .money-detail-card .standard-pin-view thead th:first-child { background: var(--surface-inset); z-index: 2; }
.money-detail-card .standard-pin-view thead th:first-child { position: sticky; left: 0; }
.money-detail-card .standard-pin-view { border-radius: 0 !important; background: var(--surface-inset); }
.money-detail-card .standard-pin-view thead th { border-radius: 0 !important; }
.money-detail-card #ledger-table tr.is-own td { background: color-mix(in srgb, var(--gold-500) 20%, var(--surface-card)); }
.money-detail-card .manager-link { display: flex; align-items: center; gap: 8px; color: var(--text-body); font-weight: 700; text-decoration: none; }
.money-detail-card input.baseline-input {
  min-height: 34px; width: 120px; padding: 0 12px; border: 2px solid var(--ink-line); border-radius: 999px;
  background: var(--surface-card); font: 600 .85rem var(--font-mono); text-align: right; box-shadow: 2px 2px 0 var(--offset);
}

/* Calendario: aire entre las tarjetas y el desplegable de explicación. */
.cal-picks-grid + .explain-panel, .cal-card + .explain-panel { margin-top: 24px !important; }
.money-detail-card .standard-pin-view { scrollbar-width: none; } .money-detail-card .standard-pin-view::-webkit-scrollbar { display: none; }

/* ── Calendario: escudos de rival más grandes sin perder la dificultad ── */
#schedule-difficulty-table .fixture-chip .team-crest, .position-fixture-chip > img { width: 36px; height: 36px; flex-basis: 36px; }
#schedule-difficulty-table .fixture-chip, .position-fixture-chip { flex-direction: column; gap: 1px; }
@media (max-width: 640px) {
  /* Las casillas se reparten el ancho: con 5 partidos la media sigue a la vista. */
  #schedule-difficulty-table td.fixture-cell, #position-calendar-table td.fixture-cell { padding: 4px 2px; }
  #schedule-difficulty-table .fixture-chip, .position-fixture-chip { min-width: 0; width: 100%; max-width: 64px; padding: 4px 2px; }
  #schedule-difficulty-table .fixture-chip .team-crest, .position-fixture-chip > img { width: 32px; height: 32px; flex-basis: 32px; }
  :is(#schedule-difficulty-table, .difficulty-pin-table) th:nth-last-child(2), #schedule-difficulty-table td:nth-last-child(2) { width: auto; padding-inline: 4px 2px; }
  .cal-card #schedule-difficulty-table td:nth-last-child(2), .cal-card .position-points { font-size: .95rem; }
  #schedule-difficulty-table td.team-cell-form, #position-calendar-table td:first-child { padding-inline: 2px 4px; }
  :is(#schedule-difficulty-table, #position-calendar-table)[data-slots="4"] .team-name-line .team-crest,
  :is(#schedule-difficulty-table, #position-calendar-table)[data-slots="5"] .team-name-line .team-crest { width: 34px; height: 34px; flex-basis: 34px; padding: 3px; }
  :is(#schedule-difficulty-table, #position-calendar-table)[data-slots="5"] .fixture-chip .team-crest,
  #position-calendar-table[data-slots="5"] .position-fixture-chip > img { width: 26px; height: 26px; flex-basis: 26px; }
}
@media (max-width: 640px) {
  /* Equipo y media con ancho fijo; Desajuste queda justo fuera y se ve
     deslizando. Los partidos se reparten lo demás, sean 3 o 5. */
  .cal-card #schedule-difficulty-table, .cal-card #schedule-difficulty-table[data-slots] { min-width: 0; width: calc(100% + 60px); table-layout: fixed; }
  
  
  
  .cal-card #position-calendar-table { table-layout: fixed; width: 100%; min-width: 0; }
  .cal-card :is(#schedule-difficulty-table, #position-calendar-table) col.col-team { width: 50px; }
  .cal-card #schedule-difficulty-table col.col-score { width: 42px; }
  .cal-card #position-calendar-table col.col-score { width: 44px; }
  .cal-card #schedule-difficulty-table col.col-gap { width: 60px; }
  
  
}
.rank-card #team-ranking-table .team-crest { width: 48px; height: 48px; padding: 5px; } @media (max-width: 640px) { .rank-card #team-ranking-table .team-crest { width: 44px; height: 44px; } }

/* ── Ronda 6 ───────────────────────────────────────────────────────────── */
/* Cuenta: cerrar sesión en rojo anaranjado. */
.account-logout .btn, .account-logout .btn.btn-ghost {
  background: #e4572e; color: #fff; border: 2px solid #0f1a12; box-shadow: 3px 3px 0 var(--offset);
}
.account-logout .btn:hover { background: #cf4520; color: #fff; }
/* Dinero: selector de fórmula con cara corta encima del <select> real. */
.money-controls .money-formula { position: relative; }
.money-formula-face {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 34px 0 16px; border: 2px solid var(--ink-line); border-radius: 999px;
  background: var(--surface-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  box-shadow: 2px 2px 0 var(--offset); font: 700 .9rem var(--font-body); color: var(--text-body); white-space: nowrap; pointer-events: none;
}
.money-controls .money-formula select { position: absolute; inset: 0; width: 100%; min-height: 0; height: 100%; opacity: 0; cursor: pointer; }
.money-controls .money-formula select:focus-visible + * , .money-controls .money-formula:focus-within .money-formula-face { outline: 2px solid var(--surface-brand); outline-offset: 2px; }
.money-controls .money-formula [role="status"] { position: static; }
/* Escudos con círculo de color: más margen interior para que no se corten
   las esquinas de los escudos cuadrados o anchos. */
img[style*="--team-c"] { padding: 4px; }
#schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest { padding: 8px; }
.rank-card #team-ranking-table .team-crest { padding: 8px; }
.cal-pick .team-crest { padding: 7px; }
.team-crest-lg[style*="--team-c"] { padding: 12px; }
@media (max-width: 640px) {
  #schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest { padding: 7px; }
  :is(#schedule-difficulty-table, #position-calendar-table):is([data-slots="4"], [data-slots="5"]) .team-name-line .team-crest { padding: 5px; }
}
@media (max-width: 520px) {
  /* Vista y fórmula en la misma fila también en móvil. */
  .money-controls { gap: 6px; flex-wrap: nowrap; }
  .money-controls .money-view-switch button, .money-controls form .money-view-switch button { padding: 0 8px; min-height: 40px; font-size: .76rem; }
  .money-controls .money-formula-face { min-height: 44px; padding: 0 24px 0 10px; font-size: .76rem; background-position: right 8px center; }
}

/* ── Desplegables de toda la app con el estilo del Power Ranking ───────── */
.gt-dd-native { display: none !important; }
.filter-pill > summary { min-height: 44px; padding: 0 16px; gap: 8px; font: 700 .9rem var(--font-body); }
.filter-pill > summary strong { font: inherit; }
.filter-pill .filter-menu {
  z-index: 45; min-width: 210px; max-height: min(60vh, 360px); overflow-y: auto; overscroll-behavior: contain;
  padding: 6px; border: 2px solid var(--ink-line); border-radius: 14px; background: var(--surface-card); box-shadow: 4px 4px 0 var(--offset);
}
.filter-pill .filter-menu :is(a, button) {
  display: grid; gap: 1px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; box-shadow: none;
  color: var(--text-body); font: 600 15px var(--font-body); text-align: left; text-decoration: none; cursor: pointer; text-transform: none; letter-spacing: 0; min-height: 0; translate: none;
}
.filter-pill .filter-menu :is(a, button):hover:not(:disabled) { background: var(--surface-brand-soft); text-decoration: none; }
.filter-pill .filter-menu :is(a[aria-current="page"], button[aria-checked="true"]) { background: var(--surface-brand); color: #fff; font-weight: 800; }
.filter-pill .filter-menu button:disabled { color: var(--text-muted); cursor: not-allowed; }
.filter-pill .filter-menu small { font-size: .75rem; font-weight: 500; color: var(--text-muted); }
.filter-pill .filter-menu.is-row { display: flex; min-width: 0; gap: 4px; }
.filter-pill .filter-menu.is-row :is(a, button) { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; font-family: var(--font-mono); font-weight: 700; text-align: center; }
.filter-pill .filter-menu.filter-menu-end { left: auto; right: 0; }
/* Contenedores que antes vestían el <select> nativo: ahora solo envuelven. */
.gt-dd-host:is(.round-picker, .mi-once-round-picker, .ranking-picker) { border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; min-height: 0; }
.gt-dd-host:is(.round-picker, .mi-once-round-picker) > svg { display: none; }
.mi-once-round-picker .gt-dd > summary { min-height: 36px; padding: 0 12px; font-size: .85rem; }
.mi-once-round-picker .gt-dd .filter-menu { min-width: 120px; }

/* Dinero: vista y fórmula más grandes, como en la demo. */
.money-controls .money-formula .gt-dd > summary { min-height: 46px; }
@media (max-width: 520px) {
  .money-controls .money-view-switch button, .money-controls form .money-view-switch button { padding: 0 10px; min-height: 42px; font-size: .86rem; }
  .money-controls .money-formula .gt-dd > summary { padding: 0 12px; font-size: .86rem; gap: 6px; }
}
.filter-pill .filter-menu :is(a, button) { justify-items: start; justify-content: start; text-align: left !important; }
.money-value.is-negative, .money-value small.is-negative { color: var(--status-loss, #c62a20) !important; }

/* ── Ronda 7: escudos grandes y sin recortar ───────────────────────────── */
/* El círculo de color y su aro de 2 px se pintan como fondo (gradiente), sin
   border-radius: el redondeo de una <img> recorta su contenido y eso cortaba
   las esquinas de los escudos cuadrados o anchos. Así el escudo puede ocupar
   casi todo el círculo y, si asoma un pico, asoma entero. */
img[style*="--team-c"] {
  --crest-ring: var(--ink-line);
  background: radial-gradient(circle closest-side, var(--team-c) calc(100% - 2.6px), var(--crest-ring) calc(100% - 2px), var(--crest-ring) calc(100% - .6px), transparent 100%) !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  padding: var(--crest-pad, 3px) !important; box-sizing: border-box !important; object-fit: contain;
}
#schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest,
.rank-card #team-ranking-table .team-crest { --crest-pad: 5px; }
.cal-pick .team-crest { --crest-pad: 4px; }
.team-crest-lg { --crest-pad: 9px; }
/* Tamaños de los escudos principales (con el padding de arriba el escudo
   ocupa ~82% del círculo). */
#schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest { width: 48px; height: 48px; flex-basis: 48px; }
.rank-card #team-ranking-table .team-crest { width: 50px; height: 50px; }
.cal-pick .team-crest { width: 44px; height: 44px; }
@media (max-width: 640px) {
  #schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest { width: 44px; height: 44px; flex-basis: 44px; }
  :is(#schedule-difficulty-table, #position-calendar-table):is([data-slots="4"], [data-slots="5"]) .team-name-line .team-crest { width: 42px; height: 42px; flex-basis: 42px; }
  .rank-card #team-ranking-table .team-crest { width: 48px; height: 48px; }
}
/* Escudos de rival dentro de las casillas: solo el escudo, lo más grande que quepa. */
#schedule-difficulty-table .fixture-chip .team-crest, .position-fixture-chip > img { width: 38px; height: 38px; flex-basis: 38px; }
@media (max-width: 640px) {
  #schedule-difficulty-table .fixture-chip .team-crest, .position-fixture-chip > img { width: 34px; height: 34px; flex-basis: 34px; }
  #schedule-difficulty-table[data-slots="4"] .fixture-chip .team-crest, #position-calendar-table[data-slots="4"] .position-fixture-chip > img { width: 30px; height: 30px; flex-basis: 30px; }
  #schedule-difficulty-table[data-slots="5"] .fixture-chip .team-crest, #position-calendar-table[data-slots="5"] .position-fixture-chip > img { width: 28px; height: 28px; flex-basis: 28px; }
  #schedule-difficulty-table .fixture-chip, .position-fixture-chip { padding: 3px 1px; }
}

/* ── Dificultad con los colores de los puntos (azul, verde, naranja, rojo) ── */
:root {
  --cal-1: color-mix(in srgb, #2f80ed 24%, var(--surface-card));
  --cal-2: color-mix(in srgb, #15803d 22%, var(--surface-card));
  --cal-3: color-mix(in srgb, #e88800 26%, var(--surface-card));
  --cal-4: color-mix(in srgb, #c0392b 24%, var(--surface-card));
}
:root[data-theme="dark"] {
  --cal-1: color-mix(in srgb, #2f80ed 38%, var(--surface-card));
  --cal-2: color-mix(in srgb, #22c55e 30%, var(--surface-card));
  --cal-3: color-mix(in srgb, #ffad33 32%, var(--surface-card));
  --cal-4: color-mix(in srgb, #ff6b5e 34%, var(--surface-card));
}
.position-fixture-chip.heat-mid, .cal-legend i.heat-mid { background: var(--cal-2); }
.position-fixture-chip.heat-low, .cal-legend i.heat-low { background: var(--cal-3); }

/* ── Patrón de escudos (noviembre 2026, página «Escudos de LaLiga») ────────
   Un único sitio decide cómo se pinta un escudo con el color del club:
   - círculo del color (--team-c) y aro de tinta de 2 px, como fondo;
   - aire del 12 % del tamaño alrededor del escudo, siempre;
   - ajuste de posición (--crest-dx/--crest-dy, fracción del tamaño, ver
     _CREST_OFFSETS en app.py) con relleno asimétrico, para que el escudo se
     desplace entero en vez de recortarse.
   Cada contexto solo fija --crest-size. */
:where(img[style*="--team-c"]) { --crest-size: 36px; --crest-ring: var(--ink-line); }
img[style*="--team-c"] {
  width: var(--crest-size) !important; height: var(--crest-size) !important;
  min-width: var(--crest-size); flex: 0 0 var(--crest-size) !important;
  padding: calc(var(--crest-size) * (.12 + var(--crest-dy, 0))) calc(var(--crest-size) * (.12 - var(--crest-dx, 0)))
           calc(var(--crest-size) * (.12 - var(--crest-dy, 0))) calc(var(--crest-size) * (.12 + var(--crest-dx, 0))) !important;
  background: radial-gradient(circle closest-side, var(--team-c) calc(100% - 2.6px), var(--crest-ring) calc(100% - 2px), var(--crest-ring) calc(100% - .6px), transparent 100%) !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  box-sizing: border-box !important; object-fit: contain !important; object-position: center !important;
}
#schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest { --crest-size: 48px; }
.rank-card #team-ranking-table .team-crest { --crest-size: 50px; }
.cal-pick .team-crest { --crest-size: 44px; }
.team-crest-lg { --crest-size: 60px; }
.accuracy-crest { --crest-size: 40px; }
.accuracy-team-heading .team-crest { --crest-size: 44px; }
.fixture-match-crest { --crest-size: 42px; }
.match-picker-teams img { --crest-size: 30px; }
@media (max-width: 640px) {
  #schedule-difficulty-table .team-name-line .team-crest, #position-calendar-table .team-name-line .team-crest { --crest-size: 44px; }
  :is(#schedule-difficulty-table, #position-calendar-table):is([data-slots="4"], [data-slots="5"]) .team-name-line .team-crest { --crest-size: 42px; }
  .rank-card #team-ranking-table .team-crest { --crest-size: 48px; }
  .fixture-match-crest { --crest-size: 36px; }
  .team-crest-lg { --crest-size: 52px; }
}

/* ============================================================================
   Ronda 7
   ========================================================================= */

/* Onces: escudos del selector de partido sin círculo y más grandes. */
.match-picker-teams img { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; object-fit: contain; }

/* Onces: cada equipo es una tarjeta redondeada; la franja de arriba
   (unánimes) y la de suplentes quedan dentro de las esquinas. */
.fixture-group .team-pitch { border: 2px solid var(--ink-line) !important; border-radius: 16px !important; overflow: hidden; }
.fixture-group .team-pitch + .team-pitch { margin-top: 10px; border-top: 2px solid var(--ink-line); }
.team-pitch > .team-pitch-head { border-bottom: 2px solid var(--ink-line); }
.team-pitch > .lineup-candidates { border-top: 2px solid var(--ink-line); }

/* «Unánimes» en caja verde con resalte: el mismo resalte que llevan los
   porcentajes de los jugadores unánimes en el campo. */
.unanimous-badge { padding: 1px 7px; border: 1.5px solid #0f1a12; border-radius: 6px; background: #15803d; color: #fff; box-shadow: 1.5px 1.5px 0 #0f1a12; }

/* Mi once y Próxima jornada: el % de titularidad en la misma caja que los
   porcentajes de Onces probables. */
.mi-once-chance {
  display: inline-block; min-width: 36px; padding: 1px 6px; border: 1.5px solid #0f1a12; border-radius: 6px;
  background: rgba(0,0,0,.45); color: #fff; text-shadow: none; text-align: center;
  font: 700 max(10px, .66rem) var(--font-mono); line-height: 1.5;
}
.mi-once-chance.pct-warm { background: #f7b500; color: #0f1a12; }
.mi-once-chance.pct-green { background: #15803d; color: #fff; }
.mi-once-chance.pct-blue { background: #2f80ed; color: #fff; }

/* Mercado: el horizonte (1d/2d/7d) y las unidades (%/€) con el mismo
   relieve que subidas/bajadas: cada opción es una pastilla con sombra y la
   activa lleva el filete dorado de abajo. */
.market-horizon-row :is(.market-horizons, .market-units) { gap: 4px; }
.market-horizon-row :is(.market-horizons, .market-units) > a { background: var(--surface-card); box-shadow: 0 2px 3px #102d1c20; }
.market-horizon-row :is(.market-horizons, .market-units) > a.is-active {
  background: var(--nav-active-bar); color: var(--text-on-nav-active); box-shadow: 0 2px 3px #102d1c30, inset 0 -2px 0 var(--text-accent-warm);
}

/* Mercado: el desplegable de posición cabe dentro de la barra de búsqueda. */
.market-search .gt-dd > summary { min-height: 30px; height: 30px; padding: 0 10px; border-width: 1.5px; box-shadow: none; }
.market-search .gt-dd { align-self: center; }

/* Mercado: el aviso de partido en el horizonte va en la misma línea que el
   puesto y el equipo; el margen superior del estilo antiguo lo bajaba. */
.market-card-who .market-match-warning { margin: 0; line-height: 1; }
.market-card-who .market-match-warning svg { display: block; }

/* Mercado: la X para borrar la búsqueda se ve siempre que haya texto, no
   solo con el foco (la nativa del navegador queda oculta). */
#market-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.market-search-clear {
  display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; min-height: 0; padding: 0; margin: 0 2px;
  border: 0; border-radius: 50%; background: var(--surface-inset); color: var(--text-muted); box-shadow: none; cursor: pointer;
}
.market-search-clear:hover { color: var(--text-strong); }
.market-search:has(#market-search:placeholder-shown) .market-search-clear { display: none; }

/* Mercado: paginación en una sola línea; primera y última son flechas. */
.market-pagination { flex-wrap: nowrap; gap: 6px; }
.market-pagination a { white-space: nowrap; min-height: 36px; padding: 0 12px; }
.market-pagination a.market-page-edge { width: 36px; padding: 0; font-size: 1.1rem; }
.market-pagination .market-page-arrow { display: none; }

/* ── Mi jornada: clasificación en una sola tarjeta (demo) ──────────────────
   Los mánagers son filas de la misma tarjeta, separadas por un filete; el
   interior de cada uno no cambia. Tu fila va resaltada en naranja. */
.round-standings, .round-own-pitch-card {
  padding: 16px; border: 2px solid var(--ink-line); border-radius: var(--radius-card);
  background: var(--surface-card); box-shadow: 4px 4px 0 var(--offset);
}
.round-standings-title {
  margin: 0 0 8px; font: 400 1.15rem/1.05 var(--font-display); text-transform: uppercase; font-style: italic;
}
.round-standings-title small {
  display: block; margin: 6px 0 0; font: 700 max(11px, .68rem) var(--font-mono); font-style: normal;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
}
.round-standings .round-manager-list { margin: 0; }
.round-standings .round-manager {
  margin: 0; border: 0 !important; border-top: 1px solid var(--border-default) !important; border-radius: 0 !important;
  background: none; box-shadow: none !important;
}
.round-standings .round-manager:first-child { border-top: 0 !important; }
.round-standings .round-manager > summary { padding: 12px 4px; }
.round-standings .round-manager-own {
  margin: 4px -8px; padding: 0 8px; border-top-color: transparent !important; border-radius: 14px !important;
  background: color-mix(in srgb, #e88800 20%, transparent);
}
.round-standings .round-manager-own + .round-manager { border-top-color: transparent !important; }
.round-standings .round-manager-own .round-manager-name small { color: var(--text-body); }

/* Tu once en el campo: solo en escritorio, al lado de la clasificación. */
.round-own-pitch-card { display: none; }
.round-pitch-score {
  display: inline-block; min-width: 30px; padding: 1px 6px; border: 1.5px solid #0f1a12; border-radius: 6px;
  background: var(--surface-card); color: var(--text-body); text-align: center; font: 700 max(11px, .72rem) var(--font-mono);
}
.round-pitch-score.round-points-blue { background: #2f80ed; color: #fff; }
.round-pitch-score.round-points-green { background: #15803d; color: #fff; }
.round-pitch-score.round-points-orange { background: #f9a825; color: #0f1a12; }
.round-pitch-score.round-points-red { background: #c0392b; color: #fff; }
.round-pitch-score.is-live { box-shadow: 0 0 0 2px #e4572e; }
@media (min-width: 1024px) {
  .round-layout.has-own-pitch { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: start; }
  .round-layout.has-own-pitch .round-own-pitch-card { display: block; position: sticky; top: 96px; }
  .round-standings, .round-own-pitch-card { padding: 20px; box-shadow: 6px 6px 0 var(--offset); }
  .round-own-pitch { min-height: 520px; border-radius: 14px; }
}
main[data-round-summary] .round-standings-title small { margin: 6px 0 0; font-size: max(11px, .68rem); line-height: 1.4; }
@media (max-width: 640px) { .round-standings { padding: 14px 12px; } }

/* ── Portada: banda superior de la demo ────────────────────────────────────
   Logo pequeño, tema y «Entrar» fijos arriba; la cabecera GUIDETTIPS grande
   deja de ser fija y va con la portada. */
.gt-bar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 8px) var(--gutter) 8px;
  background: color-mix(in srgb, var(--surface-app) 92%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 2px solid var(--ink-line);
}
.gt-bar-logo { margin-right: auto; line-height: 0; }
.gt-bar-logo img { display: block; width: auto; height: 30px; }
.gt-bar .gt-bar-theme { display: grid; place-items: center; width: 44px; height: 44px; }
.gt-bar-pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--ink-line); border-radius: 999px;
  background: var(--gold-500); color: #0d1710; font: 800 .9rem var(--font-body); text-decoration: none; box-shadow: 2px 2px 0 var(--offset);
}
.gt-bar-pill:hover { text-decoration: none; filter: brightness(1.04); }
.gt-mastbar { position: static; padding-top: 14px; padding-bottom: 0; background: none; border-bottom: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (min-width: 761px) {
  .gt-bar { padding-inline: clamp(24px, 4vw, 48px); }
  .gt-bar > * { flex: none; }
  .gt-bar-logo { margin-right: auto; }
}

/* ── Dinero en escritorio ─────────────────────────────────────────────────
   Saldo y Puja: la lista a la izquierda y «Quién sobrepuja» en el lateral.
   Detalles mantiene la tabla a todo el ancho y la sobrepuja debajo. Las dos
   evoluciones van lado a lado para no tener que bajar tanto. */
@media (min-width: 900px) {
  .money-layout.money-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: start; }
  .money-layout.money-split > .money-card { margin: 0; }
  .money-layout.money-split > .money-overpay { position: sticky; top: 96px; }
  .lazy-charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
  .lazy-charts-grid > .lazy-chart { margin: 0; }
}

/* ── Calendario en escritorio: «Para fichar» y «Para vender» ───────────────
   Debajo de la tabla, con más peso: escudo grande, cifra en pastilla y la
   tarjeta teñida de verde o rojo. */
@media (min-width: 900px) {
  main > .cal-picks-grid { margin-top: 24px; gap: 24px; }
  .cal-picks { padding: 18px 20px; }
  .cal-picks:first-child { background: color-mix(in srgb, #15803d 9%, var(--surface-card)); }
  .cal-picks:last-child { background: color-mix(in srgb, #c0392b 8%, var(--surface-card)); }
  .cal-picks ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .cal-pick { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .cal-pick .team-crest { --crest-size: 56px; }
  .cal-pick-who { width: 100%; }
  .cal-pick-num {
    padding: 2px 10px; border: 1.5px solid #0f1a12; border-radius: 8px; font-size: 1.15rem;
    background: #15803d; color: #fff !important; box-shadow: 2px 2px 0 #0f1a12;
  }
  .cal-pick.bad .cal-pick-num { background: #c0392b; }
}

/* Onces: «Qué fuente acierta más» con las jornadas medidas entre paréntesis,
   en letra más pequeña. */
.source-accuracy-team li { grid-template-columns: minmax(84px, 9.5em) minmax(0, 1fr) auto; }
.source-accuracy-team .num { white-space: nowrap; }
.source-accuracy-team .num .rounds { font-size: .7rem; font-weight: 500; color: var(--text-muted); }
@media (max-width: 640px) { .source-accuracy-teams { grid-template-columns: minmax(0, 1fr); } }

/* Próxima jornada: cuenta atrás hasta el primer partido. */
.round-countdown {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 10px 14px; padding: 10px 14px;
  border: 2px solid var(--ink-line); border-radius: 14px; background: color-mix(in srgb, #15803d 12%, var(--surface-card));
  box-shadow: 3px 3px 0 var(--offset);
}
.round-countdown-label { font: 700 max(11px, .7rem) var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.round-countdown strong { font: 400 1.35rem/1 var(--font-display); text-transform: uppercase; font-style: italic; }
.round-countdown small { margin-left: auto; font: 600 .78rem var(--font-mono); color: var(--text-muted); }
.round-countdown.is-urgent { background: color-mix(in srgb, #e88800 20%, var(--surface-card)); }
.updated-at[hidden] { display: none !important; }

/* Portada en escritorio como la demo: la cabecera GUIDETTIPS ocupa todo el
   ancho (el ajuste de home-cover.js llega hasta 13rem) y las capturas,
   más grandes, llenan la columna derecha. */
@media (min-width: 900px) {
  .gt-cover { max-width: none; }
  .gt-mastbar { padding-inline: clamp(24px, 4vw, 48px); }
  .gt-mastbar .gt-mast { max-width: none; }
  .gt-desk { height: min(72vh, 680px); }
  .gt-w1 { width: 100%; }
  .gt-w2 { width: 52%; left: -4%; }
}

/* Banda de la portada: en escritorio, las secciones como en el resto de la
   web; en móvil ya están en la barra inferior. */
.gt-bar-nav { display: none; }
@media (min-width: 900px) {
  .gt-bar-nav { display: flex; gap: 4px; margin-right: 8px; }
  .gt-bar-nav a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
    color: var(--text-body); font: 800 .82rem var(--font-body); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  }
  .gt-bar-nav a:hover { background: var(--surface-inset); text-decoration: none; }
}

/* Onces en escritorio: campo más achatado (en móvil sigue 3:4). */
@media (min-width: 900px) {
  .team-pitch .pitch { aspect-ratio: auto; height: clamp(440px, 36vw, 540px); }
}
/* Con los dos equipos lado a lado, sin el margen de cuando van apilados. */
@media (min-width: 901px) {
  .fixture-group { align-items: start; }
  .fixture-group > .team-pitch, .fixture-group > .team-pitch + .team-pitch { margin-top: 0 !important; }
}

/* Onces: escudos del selector algo menores, los de la cabecera del partido
   más grandes y la línea de fecha y estadio más pequeña para que quepa. */
.match-picker-teams img { width: 33px; height: 33px; }
.fixture-match-crest { --crest-size: 50px; }
.fixture-group-head .fixture-match-details { font-size: max(11px, .72rem); letter-spacing: 0; gap: 4px 10px; }
@media (max-width: 640px) {
  .fixture-match-crest { --crest-size: 44px; }
  .fixture-group-head .fixture-match-details { font-size: 11px; }
}

/* Precisión: la tabla va pegada a la tarjeta; su cabecera no se redondea. */
.round-accuracy .accuracy-table, .round-accuracy .accuracy-table table { border-radius: 0 !important; }
.round-accuracy .accuracy-table thead tr, .round-accuracy .accuracy-table thead th { border-radius: 0 !important; }

/* Onces: el partido elegido en un verde más claro que el de la marca. */
.match-picker > button[aria-pressed="true"], .match-picker > button.active { background: var(--nav-active-bar); }

/* Calendario por posición: cuatro tramos de puntos esperados con la paleta
   de puntos: azul > 6, verde 4-6, naranja 2-4, rojo < 2. */
.position-fixture-chip.heat-top, .cal-legend i.heat-top { background: var(--cal-1); }
.position-fixture-chip.heat-high, .cal-legend i.heat-high { background: var(--cal-2); }
.position-fixture-chip.heat-mid, .cal-legend i.heat-mid { background: var(--cal-3); }
.position-fixture-chip.heat-low, .cal-legend i.heat-low { background: var(--cal-4); }

/* Calendario por posición: las casillas de rival, igual de anchas que en la
   vista por equipo. */
@media (max-width: 640px) {
  #position-calendar-table .position-fixture-chip { width: 100%; max-width: 64px !important; padding: 3px 1px; margin-inline: auto; }
}

/* Desplegable en fila (Próximos 1-5): números centrados en botones iguales
   y redondos, no alineados a la izquierda como las listas. */
.filter-pill .filter-menu.is-row { padding: 6px; gap: 6px; flex-wrap: nowrap; width: max-content; }
.filter-pill .filter-menu.is-row :is(a, button) {
  justify-items: center !important; justify-content: center !important; text-align: center !important;
  width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 12px; font-size: 1rem;
}

/* ── Mi jornada: cabecera como la demo ─────────────────────────────────────
   Línea de datos con filete (jornada · puntuación · estado), la liga en
   pequeño y los resultados de la jornada en una tira con escudos. */
.round-head .round-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 10px 0 0; padding-top: 8px;
  border-top: 2px solid var(--ink-line); font: 700 max(11px, .72rem) var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
}
.round-head .round-meta .updated-at { margin: 0 0 0 auto; font: inherit; color: var(--text-muted); }
.round-meta-live { display: inline-flex; align-items: center; gap: 7px; color: #e4572e; }
.round-meta-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e4572e; animation: round-live-pulse 1.4s ease-in-out infinite; }
@keyframes round-live-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .round-meta-live::before { animation: none; } }
.round-head .round-league-line {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 0; border: 0 !important; border-radius: 0 !important;
  background: none; box-shadow: none !important; font-size: .86rem; color: var(--text-muted);
}
.round-league-line .round-league-image { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.round-league-line .round-league-title { display: inline-flex; align-items: baseline; gap: 8px; }
.round-league-line .round-league-name { font-weight: 700; color: var(--text-body); }
.round-league-line .round-league-switch { font-size: .8rem; font-weight: 700; color: var(--text-brand); }
.round-ticker {
  display: flex; gap: 8px; overflow-x: auto; margin: 14px calc(-1 * var(--gutter)) 0; padding: 2px var(--gutter) 8px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.round-ticker::-webkit-scrollbar { display: none; }
.round-match {
  flex: none; scroll-snap-align: start; display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 2px 8px;
  padding: 8px 12px; border: 2px solid var(--ink-line); border-radius: 14px; background: var(--surface-card);
  font: 700 .82rem var(--font-mono);
}
.round-match-team { display: inline-flex; align-items: center; gap: 5px; }
.round-match-team img { width: 20px; height: 20px; object-fit: contain; }
.round-match-score { font-size: 1rem; text-align: center; }
.round-match small { grid-column: 1 / -1; font: 700 .64rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.round-match.is-live { border-color: #e4572e; box-shadow: 3px 3px 0 #e4572e; }
.round-match.is-live small { color: #e4572e; }
@media (min-width: 900px) { .round-ticker { margin-inline: 0; padding-inline: 2px; flex-wrap: wrap; } }
main[data-round-summary] .round-league-line .round-league-name { font: 700 .9rem var(--font-body) !important; text-transform: none !important; font-style: normal !important; letter-spacing: 0 !important; transform: none !important; }
main[data-round-summary] .round-league-line .round-league-switch { padding: 0; border: 0; background: none; box-shadow: none; text-decoration: underline; text-underline-offset: 2px; }

/* Mi jornada: resultados siempre en una línea (deslizable) y escudos con el
   patrón de fondo; en rojo la tarjeta del partido que se está jugando. */
.round-ticker { flex-wrap: nowrap !important; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
@media (min-width: 900px) { .round-ticker { margin-inline: 0; padding-inline: 2px; } }
.round-match { gap: 4px 8px; }
.round-match-team { gap: 6px; }
.round-match .round-match-crest { --crest-size: 30px; }
.round-match.is-live { border-color: #e4572e !important; box-shadow: 3px 3px 0 #e4572e !important; }

/* Mercado: el desplegable de posición, compacto y pegado a su botón. */
.market-search .gt-dd .filter-menu { left: auto; right: 0; min-width: 0; width: max-content; padding: 4px; border-radius: 12px; box-shadow: 3px 3px 0 var(--offset); }
.market-search .gt-dd .filter-menu :is(a, button) { min-width: 76px; padding: 6px 10px; border-radius: 8px; font-size: 13px; }

/* Selectores de sección (Mercado, Onces, Calendario): borde negro como el resto. */
.section-subnav { border: 2px solid var(--ink-line) !important; }

/* Conectar liga: la misma tarjeta en Jornada, Dinero, Onces, Mercado y Alertas. */
.empty-state.connect-card {
  display: grid; justify-items: center; gap: 12px; max-width: 620px; margin: 8px auto 24px; padding: 28px 24px;
  border: 2px solid var(--ink-line) !important; border-radius: 20px; background: var(--surface-card);
  box-shadow: 5px 5px 0 var(--offset); text-align: center;
}
.empty-state.connect-card > * { margin: 0; }
.empty-state.connect-card > p { max-width: 44ch; color: var(--text-muted); }

/* Botones de acceso (Email, Google, Apple, Facebook) con borde y relieve. */
.login-method-grid { gap: 12px; }
.login-method-grid label {
  min-height: 50px; border: 2px solid var(--ink-line); border-radius: 999px; box-shadow: 3px 3px 0 var(--offset);
  font-weight: 700; transition: translate .12s, box-shadow .12s;
}
.login-method-grid label:hover { translate: -1px -1px; box-shadow: 4px 4px 0 var(--offset); }
#login-method-email:checked ~ .login-method-grid label[for="login-method-email"],
#login-method-google:checked ~ .login-method-grid label[for="login-method-google"],
#login-method-apple:checked ~ .login-method-grid label[for="login-method-apple"],
#login-method-facebook:checked ~ .login-method-grid label[for="login-method-facebook"] {
  background: var(--surface-brand); color: #fff; box-shadow: 3px 3px 0 var(--offset);
}
.section-subnav-indicator, .section-subnav:not(.has-indicator) a.active { box-shadow: inset 0 -2px 0 var(--text-accent-warm) !important; }
.section-subnav a:not(.active) { color: var(--ink-line); }
/* El ajuste del carrusel respeta el margen izquierdo. */
.round-ticker { scroll-padding-inline: var(--gutter); }
@media (min-width: 900px) { .round-ticker { scroll-padding-inline: 2px; } }

/* Menos del 40 % de jugar, en rojo. */
.consensus-count.pct-red, .bench-pct.pct-red, .mi-once-chance.pct-red { background: #c62a20; color: #fff; }
.lineup-comparison .weighted-col.pct-red, .lineup-candidates .weighted-col.pct-red, .lineup-comparison td.pct-red { color: #c62a20; }
:root[data-theme="dark"] .lineup-comparison :is(.weighted-col, td).pct-red { color: #ff6b5e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lineup-comparison :is(.weighted-col, td).pct-red { color: #ff6b5e; } }

/* Mercado: cabecera tan compacta como en Onces y Calendario. */
.section-subnav.market-subnav { margin: 4px 0 16px !important; }
.market-head { margin-bottom: 8px !important; }

/* Calendario: tarjetas de rivales con el borde negro de la casa. */
#schedule-difficulty-table .fixture-chip:not(.fixture-chip-empty), .position-fixture-chip:not(.heat-empty), .cal-legend i { border: 2px solid var(--ink-line) !important; }

/* Mi jornada: cada partido de la tira es un botón que abre sus puntos. */
button.round-match { color: var(--text-body); cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
button.round-match:focus-visible { outline: 3px solid var(--text-accent-warm); outline-offset: 2px; }
.round-match.is-open { box-shadow: 3px 3px 0 var(--ink-line), inset 0 -3px 0 var(--text-accent-warm); }
.round-match.is-live.is-open { box-shadow: 3px 3px 0 #e4572e, inset 0 -3px 0 var(--text-accent-warm) !important; }
.round-match-detail { margin-top: 10px; padding: 14px; border: 2px solid var(--ink-line); border-radius: 18px; background: var(--surface-card); box-shadow: 4px 4px 0 var(--offset); }
.round-match-detail .loading-state { margin: 0; padding: 12px; border: 0; box-shadow: none; background: none; }
.round-match-detail-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 20px; }
.round-match-side h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 800 .95rem var(--font-body); text-transform: uppercase; letter-spacing: .02em; transform: none; }
.round-match-side h3 .round-match-crest { --crest-size: 26px; }
.round-match-players { display: grid; margin: 0; padding: 0; list-style: none; }
.round-match-players li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--border-subtle, rgba(0,0,0,.15)); }
.round-match-players li:first-child { border-top: 0; }
.round-match-players li.is-own .round-match-player-name { font-weight: 800; }
/* Foto del futbolista con el puesto como insignia en la esquina. */
.round-match-photo { position: relative; display: block; width: 40px; height: 40px; flex: none; }
.round-match-photo-clip { display: block; width: 100%; height: 100%; overflow: hidden; border: 1.5px solid var(--ink-line); border-radius: 50%; background: var(--surface-inset); }
.round-match-photo-clip img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.round-match-players .player-position-badge { right: -5px; bottom: -4px; width: 20px; height: 20px; font-size: max(8px, .5rem); }
.round-match-player-name { display: grid; min-width: 0; font-size: .9rem; font-weight: 600; }
.round-match-player-name small { overflow: hidden; color: var(--text-muted); font-size: .72rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.round-match-players li.is-own .round-match-player-name small { color: var(--text-brand); }
.round-match-players .round-pitch-score { min-width: 32px; text-align: center; }
.round-match-empty { margin: 4px 0; color: var(--text-muted); font-size: .85rem; }

/* Fichas de jugador: la X va por encima del título (antes el h2 se llevaba
   el toque) y con 44px de zona táctil; el título no pasa por debajo. */
.player-detail-dialog .dialog-close { z-index: 5; width: 44px; height: 44px; min-height: 44px; right: 10px; top: 8px; display: grid; place-items: center; touch-action: manipulation; }
.player-detail-dialog .dialog-close::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.player-detail-body > :first-child, .player-detail-body h2:first-of-type { padding-right: 48px; }

/* ── Mercado compacto: tendencia y, a su derecha, valor, variación real y
   prevista. Sin línea inferior: la previsión pasada queda en la ficha. ─── */
/* Rejilla: foto, nombre con su puesto y bloque tendencia + valor en la
   primera fila; etiquetas de estado debajo de la foto. El bloque de valor
   tiene ancho fijo en em, así que las flechas caen siempre en la misma
   columna. Cifras en la fuente de texto con números tabulares: ocupa menos
   que la monoespaciada y deja la letra más grande. */
.market-card { grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 8px 14px; padding: 14px 0; }
.market-card .market-photo { grid-column: 1; grid-row: 1; align-self: center; }
.market-card-who { display: contents; }
.market-card-name { grid-column: 2; grid-row: 1; align-self: center; display: grid; justify-items: start; gap: 5px; min-width: 0; }
.market-card-who .market-player-toggle { min-height: 0; font-size: 1rem; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
.market-card .market-pos-tag { width: auto; min-width: 0; height: auto; padding: 1px 6px; border: 1.5px solid #0f1a12; border-radius: 6px; font: 700 .66rem/1.25 var(--font-mono); letter-spacing: .04em; }
.market-card .market-pos-tag.market-position-por { background: #f5b400; color: #0f1a12; }
.market-card .market-pos-tag.market-position-def { background: #2f80ed; color: #fff; }
.market-card .market-pos-tag.market-position-med { background: #15803d; color: #fff; }
.market-card .market-pos-tag.market-position-del { background: #e0352b; color: #fff; }
.market-card-who small { grid-column: 1 / 3; grid-row: 2; margin-top: 0; gap: 5px; }
.market-card-who small:empty { display: none; }
.market-card-value { grid-column: 3; grid-row: 1 / 3; align-self: center; display: flex; align-items: center; gap: 12px; }
.market-card-trend .market-trend { width: 36px; min-width: 36px; height: 36px; }
.market-card-trend .market-trend svg { width: 20px; height: 20px; }
.market-card-value .market-card-val { width: 15em; font-size: 14px; text-align: left; }
.market-card-val strong { display: block; margin-bottom: 2px; font-size: 1.2em; line-height: 1.15; }
.market-value-line { display: block; font-family: var(--font-body); font-size: 1em; font-weight: 400; line-height: 1.4; font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap; }
.market-value-label { font-weight: 500; }
.market-value-num.is-key { font-weight: 600; color: var(--text-body); }
.market-value-num.is-key.market-up { color: var(--status-win); } .market-value-num.is-key.market-down { color: var(--status-loss); }
@media (max-width: 640px) {
  .market-cards { padding-inline: 10px; }
  .market-card { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; padding: 12px 0; }
  .market-card .market-photo, .market-card .market-photo .market-photo-frame { width: 40px; height: 40px; flex-basis: 40px; }
  .market-card-name { gap: 4px; }
  .market-card-who .market-player-toggle { font-size: .92rem; hyphens: auto; }
  .market-card-value { gap: 7px; }
  .market-card-trend .market-trend { width: 30px; min-width: 30px; height: 30px; }
  .market-card-trend .market-trend svg { width: 17px; height: 17px; }
  .market-card-value .market-card-val { font-size: clamp(12px, 3.15vw, 13.5px); }
}
/* Móviles estrechos (≤380 px): flecha y cifras algo menores para que el
   nombre no se parta a mitad de palabra. */
@media (max-width: 380px) {
  .market-cards { padding-inline: 8px; }
  .market-card { gap: 8px 7px; }
  .market-card-who .market-player-toggle { font-size: .85rem; }
  .market-card-value { gap: 6px; }
  .market-card-trend .market-trend { width: 26px; min-width: 26px; height: 26px; }
  .market-card-trend .market-trend svg { width: 15px; height: 15px; }
  .market-card-value .market-card-val { font-size: 11.5px; }
}

/* Etiquetas de estado: colores sólidos con filete de tinta. */
.market-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 5px; border: 1.5px solid #0f1a12; border-radius: 999px; font: 800 .7rem/1.35 var(--font-body); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; color: #0f1a12; }
.market-chip svg { flex: none; display: block; }
.market-chip-injured { background: #e0352b; color: #fff; }
.market-chip-sanctioned { background: #7a1f2b; color: #fff; }
.market-chip-doubt { background: #f59e0b; }
.market-chip-warned { background: #fff3b0; }
.market-chip-other { background: var(--surface-inset); color: var(--text-body); }
.market-dialog-meta .market-chip { margin-left: 6px; vertical-align: middle; }
.market-match-notice { padding: 12px 14px; border: 2px solid var(--ink-line); border-radius: 14px; background: #cfe3ff; color: #123a73; box-shadow: 3px 3px 0 var(--offset); }
.market-match-notice p { color: inherit; }
:root[data-theme="dark"] .market-match-notice { background: #1b3358; color: #d6e6ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .market-match-notice { background: #1b3358; color: #d6e6ff; } }
