/* ============================================================================
   SportMyLife — Production Audit Polish v2026120301
   Covers:
     1) Zero-CLS height reservation (<= 0.10) & SSR Hero/Editorial LCP shell
     2) Mobile sticky header solid opaque "Sports Menu · 30" slot + 320px 7-icon rhythm
     3) Zero horiz_clip on Wing CTA buttons at 390px & 320px (Law #18)
     4) Solid opaque non-overlapping Cookie Consent Banner (1440 / 390 / 320px)
     5) Unslop-UI-Craft Esports & Gaming brand slate/emerald restraint (zero AI purple)
   ============================================================================ */

/* 1. BROADCAST TICKER & ZERO-CLS HEIGHT RESERVATION */
#sml-broadcast-ticker.sml-bticker {
  height: 35px;
  min-height: 35px;
  max-height: 35px;
  overflow: hidden;
  box-sizing: border-box;
}

#sml-broadcast-ticker .sml-bticker-inner,
#sml-broadcast-ticker .sml-bticker-track {
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  overflow: hidden;
  box-sizing: border-box;
}

#world-editorial-magazine.world-editorial-magazine {
  min-height: 750px;
}

#world-sport-hero.world-sport-hero {
  min-height: 290px;
}

#world-sports-showcase.world-sports-showcase {
  min-height: 2200px;
}

#world-sport-chronicle.world-sport-chronicle {
  min-height: 540px;
}

/* Lightweight SSR Editorial Cover Shell (replaced smoothly by editorialGallery.js) */
.sml-ed-ssr-shell {
  padding: 20px 22px 22px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  color: #0a0e17;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  min-height: 710px;
  box-sizing: border-box;
}

html[data-theme='dark'] .sml-ed-ssr-shell {
  background: #0f1623;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.sml-ed-ssr-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.sml-ed-ssr-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #059669;
  margin-bottom: 6px;
}

html[data-theme='dark'] .sml-ed-ssr-kicker {
  color: #f0c35a;
}

.sml-ed-ssr-title {
  margin: 0;
  font-size: clamp(20px, 2.3vw, 28px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.sml-ed-ssr-sub {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: #475569;
}

html[data-theme='dark'] .sml-ed-ssr-sub {
  color: #94a3b8;
}

.sml-ed-ssr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.sml-ed-ssr-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
}

html[data-theme='dark'] .sml-ed-ssr-card {
  background: #141d2c;
  border-color: rgba(255, 255, 255, 0.09);
}

.sml-ed-ssr-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #0f172a;
}

.sml-ed-ssr-cap {
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .sml-ed-ssr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sml-ed-ssr-card:nth-child(3) {
    display: none;
  }
}

@media (max-width: 768px) {
  #world-editorial-magazine.world-editorial-magazine {
    min-height: 590px;
  }
  .sml-ed-ssr-shell {
    padding: 14px;
    min-height: 560px;
  }
}

@media (max-width: 520px) {
  #world-editorial-magazine.world-editorial-magazine {
    min-height: 520px;
  }
  .sml-ed-ssr-shell {
    min-height: 495px;
  }
  .sml-ed-ssr-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sml-ed-ssr-card:nth-child(2),
  .sml-ed-ssr-card:nth-child(3) {
    display: none;
  }
}

/* 2. MOBILE STICKY HEADER — SOLID OPAQUE "SPORTS MENU · 30" SLOT (NO TITLE OVERLAP) */
@media (max-width: 960px) {
  html {
    scroll-padding-top: 112px;
  }

  html body .site-header {
    height: auto !important;
    overflow: visible !important;
    background: #0a1019 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 0 !important;
  }

  html[data-theme='light'] body .site-header {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html body .site-header > .sml-nav-pull-bar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 5px 12px 7px;
    margin: 0;
    background: #0d1522 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(230, 196, 115, 0.24);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
  }

  html[data-theme='light'] body .site-header > .sml-nav-pull-bar {
    background: #f8faf8 !important;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
    border-bottom: 1px solid rgba(18, 60, 37, 0.14);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  }

  html body .site-header > .sml-nav-pull-bar .sml-nav-pull-handle {
    height: 26px;
    padding: 0 14px;
    border: 0 !important;
    background-origin: border-box;
    background-clip: border-box;
    box-shadow: 0 2px 8px rgba(18, 60, 37, 0.24);
  }
}

/* 320px–359px ULTRA-NARROW MOBILE HEADER — EVEN GAPS ACROSS ALL 7 ICONS */
@media (max-width: 359px) {
  html body .site-header .container.header-inner {
    padding-inline: 6px !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
  }

  html body .site-header .header-left-group {
    gap: 4px !important;
    flex-shrink: 0;
  }

  html body .site-header .brand-mark {
    padding: 0 !important;
  }

  html body .site-header .brand-emblem-wrap,
  html[data-theme='light'] body .site-header .brand-emblem-wrap,
  html[data-theme='dark'] body .site-header .brand-emblem-wrap,
  html body .site-header .brand-emblem-img {
    width: 28px !important;
    height: 28px !important;
  }

  html body .site-header .header-controls {
    gap: 4px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    min-width: 0;
  }

  html body .site-header #header-live-btn {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    font-size: 10.5px !important;
    gap: 3px !important;
  }

  html body .site-header #header-tickets-btn,
  html body .site-header #header-sports-btn,
  html body .site-header .theme-toggle-btn,
  html body .site-header #header-auth-btn,
  html body .site-header .header-nav-toggle-btn,
  html body .site-header #header-back-world-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    flex-shrink: 0;
  }

  html body .site-header .lang-toggle-btn {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    gap: 3px !important;
    font-size: 10px !important;
    flex-shrink: 0;
  }
}

/* 3. ZERO HORIZ_CLIP ON WING CTA BUTTONS AT 390px & 320px (LAW #18) */
@media (max-width: 859px) {
  html body .ws-detail-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  html body .ws-detail-actions > .btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 42px !important;
    padding: 8px 9px !important;
    font-size: 11.5px !important;
    line-height: 1.22 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: break-word !important;
    text-align: center !important;
    border: 0 !important;
    background-origin: border-box !important;
    background-clip: border-box !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 360px) {
  html body .ws-detail-actions > .btn {
    font-size: 11px !important;
    padding: 8px 6px !important;
    min-height: 40px !important;
  }
}

/* 4. SOLID OPAQUE COMPACT COOKIE CONSENT BANNER (NO BLEED-THROUGH, NO OVERLAP) */
html body .sml-consent {
  left: 16px !important;
  right: auto !important;
  bottom: 14px !important;
  width: min(430px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 110px) !important;
  padding: 12px 14px 12px !important;
  border-radius: 15px !important;
  background: #faf8f3 !important;
  color: #152218 !important;
  border: 1px solid rgba(31, 92, 58, 0.28) !important;
  box-shadow: 0 14px 36px rgba(10, 18, 13, 0.28) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme='dark'] body .sml-consent {
  background: #0f1713 !important;
  color: #f4f1e6 !important;
  border-color: rgba(230, 196, 115, 0.38) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.56) !important;
}

html[dir='rtl'] body .sml-consent {
  left: auto !important;
  right: 16px !important;
}

html body .sml-consent-head {
  margin-bottom: 4px !important;
}

html body .sml-consent-title {
  font-size: 14px !important;
}

html body .sml-consent-text {
  margin: 0 0 9px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

html body .sml-consent-actions {
  gap: 6px !important;
}

html body .sml-consent-btn {
  min-height: 36px !important;
  padding: 6px 11px !important;
  font-size: 12px !important;
}

html body .sml-consent-btn.is-primary {
  border: 0 !important;
  background-origin: border-box;
  background-clip: border-box;
}

@media (max-width: 640px) {
  html body .sml-consent,
  html[dir='rtl'] body .sml-consent {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    bottom: calc(60px + 8px + env(safe-area-inset-bottom)) !important;
    padding: 10px 11px !important;
    border-radius: 13px !important;
  }

  html body .sml-consent-title {
    font-size: 13px !important;
  }

  html body .sml-consent-link {
    font-size: 11.5px !important;
  }

  html body .sml-consent-text {
    font-size: 11.2px !important;
    line-height: 1.34 !important;
    margin-bottom: 7px !important;
  }

  html body .sml-consent-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  html body .sml-consent-btn {
    min-height: 34px !important;
    padding: 5px 6px !important;
    font-size: 10.8px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }
}

/* 5. UNSLOP-UI-CRAFT — ESPORTS & GAMING BRAND SLATE/EMERALD RESTRAINT & NO CARD-IN-CARD */
html body #world-cat-esports_arena.ws-cat-section {
  --cat-accent: #0f766e !important;
  border-top: 3px solid #0f766e !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
  background: transparent !important;
  padding-inline: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html[data-theme='dark'] body #world-cat-esports_arena.ws-cat-section {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

html body #world-cat-esports_arena .ws-live-col {
  --hub-accent: #0f766e !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme='dark'] body #world-cat-esports_arena .ws-live-col {
  border-color: rgba(148, 163, 184, 0.2) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34) !important;
}

html body #world-cat-esports_arena .ws-live-col-cta,
html body #world-sports-showcase [data-slide-target='esports'].ws-live-col-cta,
html body .sdir-sport-card[data-sport-id='esports'] .sdir-enter-btn {
  border: 0 !important;
  background: linear-gradient(135deg, #0f4c3a 0%, #1e293b 100%) !important;
  background-origin: border-box !important;
  background-clip: border-box !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22) !important;
}

html body #world-sport-hero .ws-cat-tile[data-world-cat-jump='esports_arena'] {
  --cat-accent: #0f766e !important;
}

/* Footer legal owner line clarity */
html body .footer-legal-voen {
  font-weight: 600;
  opacity: 0.92;
}
