/* ═══════════════════════════════════════════════════
   DESKTOP LAYOUT — ≥ 1024px
   Additive only — zero regression on mobile
   ═══════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --red: #c8102e;
  --green: #00a86b;
  --gold: #e8a317;
  --orange: #ff6b35;
  --surface-1: #1a1a1a;
  --surface-2: #222;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --font-editorial: Georgia, 'Times New Roman', Times, serif;
}

/* ══ DESKTOP-ONLY ELEMENTS — hidden by default ══ */
.desktop-only { display: none; }
.desktop-header { display: none; }
.desktop-rail { display: none; }
.desktop-ticker { display: none; }
.desktop-carousel { display: none; }
.desktop-archive { display: none; }

/* ══ BREAKPOINT: 1024px+ ══ */
@media (min-width: 1024px) {

  /* ── Show desktop, hide mobile ── */
  .desktop-only { display: block; }
  .desktop-header { display: flex; }
  .desktop-rail { display: flex; }
  .desktop-ticker { display: flex; }
  .desktop-carousel { display: block; }
  .desktop-archive { display: block; }
  .mobile-header .app-header { display: none; }
  .mobile-only { display: none; }

  /* ── Body layout ── */
  body {
    padding-bottom: 0;
    max-width: none;
    border: none;
    background: #000;
  }

  /* ── DESKTOP HEADER (sticky) ── */
  .desktop-header {
    position: sticky;
    top: 0;
    z-index: 200;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: #111;
    border-bottom: 1px solid #222;
  }

  .dh-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .dh-cta {
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: 0.3px;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
  }
  .dh-cta:hover { opacity: 0.85; }
  .dh-cta.bet { background: var(--green); }
  .dh-cta.shop { background: var(--gold); color: #000; }
  .dh-cta.ttfl { background: var(--orange); }

  .dh-center {
    text-align: center;
    flex: 1;
  }

  .dh-logo {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
  }

  .dh-baseline {
    display: block;
    font-size: 0.6rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: -2px;
    padding-bottom: 2px;
    border-bottom: 2px solid var(--red);
  }

  .dh-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }

  .dh-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #333;
    background: transparent;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s;
  }
  .dh-btn:hover { color: #fff; border-color: #666; }

  /* ── LEFT RAIL (fixed) ── */
  .desktop-rail {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 120px;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 1rem 0;
    background: #000;
    border-right: 1px solid #1a1a1a;
    z-index: 50;
    overflow-y: auto;
  }

  .rail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0.8rem 0;
    width: 100%;
    text-decoration: none;
    color: #666;
    font-size: 0.6rem;
    font-style: italic;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s, background 0.2s;
    position: relative;
  }

  .rail-item:hover { color: #fff; background: rgba(255,255,255,0.03); }
  .rail-item.active { color: var(--red); }
  .rail-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--red);
    border-radius: 0 3px 3px 0;
  }

  .rail-item svg { width: 22px; height: 22px; }
  .rail-item.hot { color: var(--orange); }
  .rail-item.hot svg { color: var(--orange); }

  /* ── MAIN CONTENT (pushed right by rail) ── */
  .desktop-main {
    margin-left: 120px;
    margin-top: 0;
  }

  .desktop-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 1.5rem;
  }

  /* ── TICKER ── */
  .desktop-ticker {
    height: 40px;
    align-items: center;
    padding: 0 1rem;
    background: #0d0d0d;
    border-bottom: 1px solid #1a1a1a;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .desktop-ticker::-webkit-scrollbar { display: none; }

  .ticker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .ticker-team { font-weight: 600; color: #ccc; }
  .ticker-score { font-weight: 800; font-variant-numeric: tabular-nums; }
  .ticker-score.win { color: var(--green); }
  .ticker-status {
    font-size: 0.55rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: #222;
  }
  .ticker-status.live { background: var(--red); color: #fff; }
  .ticker-status.final { background: #333; color: #888; }
  .ticker-link {
    font-size: 0.7rem;
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
    margin-left: auto;
    flex-shrink: 0;
  }

  /* ── HERO GRID (65/35) ── */
  .hero-grid {
    display: grid;
    grid-template-columns: 1.85fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  /* HERO MAIN */
  .hero-main { min-width: 0; }

  .hero-bevel {
    display: inline-block;
    padding: 0.4rem 1rem 0.4rem 1.2rem;
    background: var(--red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: 0.8px;
    clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%);
    margin-bottom: 0.8rem;
  }

  .hero-image {
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    position: relative;
  }

  .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
  }

  .hero-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    font-style: italic;
    padding: 0.2rem 0.6rem;
    background: #222;
    color: #ccc;
    border-radius: 3px;
  }
  .hero-badge.accent { background: var(--red); color: #fff; }

  .hero-title {
    font-family: var(--font-editorial);
    font-size: 2.6rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 0.5rem;
  }

  .hero-chapo {
    font-family: var(--font-editorial);
    font-size: 0.95rem;
    color: #999;
    line-height: 1.5;
    margin-bottom: 1rem;
  }

  .hero-body {
    font-size: 0.88rem;
    color: #bbb;
    line-height: 1.7;
    max-width: 70ch;
  }

  /* HERO SIDEBAR */
  .hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .sidebar-promo {
    border: 2px solid #333;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
  }
  .sidebar-promo:hover { border-color: #666; }

  .sidebar-promo img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
  }

  .sidebar-promo .promo-label {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
    font-style: italic;
    font-weight: 700;
    color: #ccc;
    border-top: 1px solid #222;
  }

  .sidebar-list {
    display: flex;
    flex-direction: column;
  }

  .sidebar-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    color: inherit;
  }
  .sidebar-item:last-child { border-bottom: none; }
  .sidebar-item:hover { opacity: 0.8; }

  .sidebar-thumb {
    width: 100px;
    height: 72px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
  }

  .sidebar-item-content { min-width: 0; }

  .sidebar-item-tags {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.2rem;
  }

  .sidebar-item-tag {
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    background: #222;
    color: #888;
  }

  .sidebar-item-title {
    font-family: var(--font-editorial);
    font-size: 0.88rem;
    font-style: italic;
    font-weight: 700;
    line-height: 1.3;
    color: #ddd;
  }

  /* ── CAROUSEL SECTION ── */
  .desktop-carousel {
    background: var(--red);
    padding: 2rem 1.5rem;
    margin: 0 -1.5rem 2rem;
  }

  .carousel-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }

  .carousel-title {
    font-size: 1.3rem;
    font-weight: 700;
    font-style: italic;
    color: #fff;
  }

  .carousel-hatch {
    flex: 1;
    height: 12px;
    background: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 4px,
      rgba(255,255,255,0.2) 4px,
      rgba(255,255,255,0.2) 8px
    );
  }

  .carousel-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
  }
  .carousel-track::-webkit-scrollbar { display: none; }

  .carousel-card {
    min-width: 300px;
    max-width: 320px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  .carousel-media {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 6px;
    border: 4px solid #fff;
    background-size: cover;
    background-position: center;
    overflow: hidden;
  }

  .carousel-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: background 0.2s;
  }
  .carousel-play:hover { background: rgba(0,0,0,0.4); }

  .carousel-play svg {
    width: 48px;
    height: 48px;
    opacity: 0.8;
  }

  .carousel-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    font-style: italic;
    color: #fff;
    margin-top: 0.5rem;
    line-height: 1.3;
  }

  .carousel-nav {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
  }
  .carousel-arrow:hover { border-color: #fff; }

  /* ── ARCHIVE GRID (3 cols) ── */
  .desktop-archive { margin-top: 2rem; }

  .archive-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }

  .archive-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ccc;
  }

  .archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .archive-card {
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    color: inherit;
  }
  .archive-card:hover { opacity: 0.85; }

  .archive-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
  }

  .archive-card-tags {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
  }

  .archive-card-tag {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    background: #222;
    color: #999;
  }

  .archive-card-title {
    font-family: var(--font-editorial);
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 700;
    line-height: 1.3;
    color: #ddd;
    margin-bottom: 0.3rem;
  }

  .archive-card-date {
    font-size: 0.72rem;
    color: #666;
  }

  /* ══ LIGHT THEME OVERRIDES ══ */
  html.light {
    --surface-1: #f0f0f0;
    --surface-2: #e4e4e4;
  }

  html.light body { background: #f4f4f4; }
  html.light .desktop-header { background: #fff; border-color: #ddd; }
  html.light .desktop-rail { background: #fafafa; border-color: #e0e0e0; }
  html.light .dh-logo { color: #000; }
  html.light .rail-item { color: #888; }
  html.light .rail-item:hover { color: #000; background: rgba(0,0,0,0.03); }
  html.light .desktop-ticker { background: #eee; border-color: #ddd; }
  html.light .ticker-team { color: #333; }
  html.light .hero-badge { background: #ddd; color: #555; }
  html.light .hero-title { color: #000; }
  html.light .hero-chapo { color: #666; }
  html.light .hero-body { color: #444; }
  html.light .sidebar-item { border-color: #ddd; }
  html.light .sidebar-item-title { color: #222; }
  html.light .archive-card-title { color: #222; }

} /* end media 1024px */

/* ══ BREAKPOINT: 1440px+ ══ */
@media (min-width: 1440px) {
  .desktop-container { padding: 2rem 3rem; }
  .desktop-carousel { padding: 2.5rem 3rem; margin: 0 -3rem 2rem; }
  .hero-title { font-size: 3rem; }
}
