/* ==========================================================================
   CP ELORA — 2026 VISUAL SYSTEM
   --------------------------------------------------------------------------
   This file is the last stylesheet on every page, so it is the one that
   decides how the site actually looks. It is a complete design language, not
   a patch: canvas, type scale, header, rail, hero, cards, sections, channel
   page and footer are all defined here.

   Direction: midnight canvas, one acid accent for action and live, violet
   kept as the brand's secondary, tightly-spaced editorial type, and a
   video-first card language. No markup, no JS and no API call depends on it.
   ========================================================================== */

/* ---------- 1. Canvas and palette ---------- */
:root {
  color-scheme: dark;

  --bg: #07080a;
  --bg-elev: #0a0c0f;
  --surface: #0e1116;
  --surface-2: #141821;
  --surface-3: #1b2029;
  --line: #1e232c;
  --line-strong: #2c333f;
  --text: #f4f6f8;
  --muted: #9aa3ae;
  --dim: #6a7280;

  /* Action colour: acid lime. Live dots and primary buttons only. */
  --lime: #ccff42;
  --lime-bright: #dcff6b;
  --lime-soft: rgba(204, 255, 66, .13);
  --neon: #ccff42;
  --neon-bright: #dcff6b;
  --neon-deep: #a8d92b;

  /* Brand colour: the wordmark's violet, now secondary. */
  --violet: #a97bff;
  --violet-bright: #c4a2ff;
  --violet-soft: rgba(169, 123, 255, .14);

  --neon-cyan: #71e6d2;
  --neon-cyan-soft: rgba(113, 230, 210, .14);
  --copper: #ff8a3c;
  --copper-soft: rgba(255, 138, 60, .14);
  --neon-magenta: #ff8fb1;
  --neon-magenta-soft: rgba(255, 143, 177, .14);
  --red: #ff3d5e;

  --on-accent: #0a0f02;
  --field: #0b0e12;
  --field-focus: #10141a;
  --header-bg: rgba(7, 8, 10, .82);
  --scrim: rgba(4, 5, 7, .78);
  --card: #0e1116;
  --card-2: #141821;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --max: 1560px;

  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(1100px 620px at 12% -12%, rgba(169, 123, 255, .10), transparent 62%),
    radial-gradient(900px 520px at 88% -6%, rgba(204, 255, 66, .05), transparent 60%),
    var(--bg) !important;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  letter-spacing: -.005em;
}

/* ---------- 2. Type scale ---------- */
h1, h2, h3, h4, .display, .brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.038em;
  line-height: 1.08;
}
h1 { font-size: clamp(30px, 3.6vw, 46px); }
body .section-heading h2,
body .hero-strip-head h2,
body .channel-videos-head h2 {
  font-size: clamp(19px, 1.5vw, 23px) !important;
  letter-spacing: -.03em !important;
}
body .section-heading p {
  margin: 6px 0 0 !important;
  font-size: 13px !important;
  color: var(--dim) !important;
  letter-spacing: 0;
}
.eyebrow,
.feature-eyebrow,
.rail-label,
.creator-banner-label,
body .section-heading > div > h2::before {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--violet);
}

/* ---------- 3. Header ---------- */
.arc-header {
  position: sticky !important;
  top: 0;
  z-index: 90;
  height: auto !important;
  padding: 0 !important;
  background: var(--header-bg) !important;
  background-color: var(--header-bg) !important;
  border-bottom: 1px solid var(--line) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.arc-header .header-inner {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  width: 100%;
  max-width: var(--max);
  height: 68px !important;
  margin: 0 auto;
  padding: 0 26px !important;
}
.arc-header .brand { flex: 0 0 auto; display: flex; align-items: center; }
.arc-header .brand-lock { height: 30px !important; width: auto !important; }
.arc-header .brand-mark { height: 28px !important; width: auto !important; }

.arc-header .main-nav {
  display: flex !important;
  align-items: center;
  gap: 4px !important;
  flex: 0 0 auto;
}
.arc-header .main-nav a {
  position: relative;
  padding: 8px 13px !important;
  border-radius: 999px !important;
  font-size: 13.5px !important;
  font-weight: 550 !important;
  color: var(--muted) !important;
  box-shadow: none !important;
  transition: color .15s, background .15s;
}
.arc-header .main-nav a:hover { color: var(--text) !important; background: var(--surface-2) !important; }
.arc-header .main-nav a.active {
  color: var(--text) !important;
  background: var(--surface-2) !important;
  box-shadow: inset 0 -2px 0 var(--lime) !important;
}

.arc-header .header-search {
  flex: 1 1 auto;
  display: flex !important;
  align-items: center;
  gap: 8px;
  max-width: 380px;
  height: 40px;
  margin: 0 0 0 8px !important;
  padding: 0 6px 0 13px !important;
  background: var(--field) !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  transition: border-color .15s, background .15s;
}
.arc-header .header-search:focus-within {
  border-color: var(--violet) !important;
  background: var(--field-focus) !important;
}
.arc-header .header-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0 !important;
  background: transparent !important;
  font-size: 13.5px !important;
  outline: none;
}
.arc-header .header-search button {
  height: 28px;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--surface-3) !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.arc-header .header-search button:hover { background: var(--lime) !important; color: var(--on-accent) !important; }
.arc-header .search-icon { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: var(--dim); stroke-width: 2; }

.arc-header .nav-actions { display: flex; align-items: center; gap: 8px !important; margin-left: auto; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 18px !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 999px !important;
  background: var(--surface-2) !important;
  color: var(--text) !important;
  font-family: var(--font-body);
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
  box-shadow: none !important;
  transition: transform .12s, background .15s, border-color .15s, color .15s;
}
.button:hover { transform: translateY(-1px); border-color: var(--muted) !important; }
.button.small { min-height: 34px; padding: 0 14px !important; font-size: 12.5px !important; }
.button-primary {
  background: var(--lime) !important;
  border-color: var(--lime) !important;
  color: var(--on-accent) !important;
  font-weight: 700 !important;
}
.button-primary:hover { background: var(--lime-bright) !important; border-color: var(--lime-bright) !important; }
.button-quiet { background: transparent !important; border-color: var(--line) !important; color: var(--muted) !important; }
.button-quiet:hover { color: var(--text) !important; background: var(--surface-2) !important; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line) !important;
  border-radius: 999px;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 11.5px !important;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.theme-toggle:hover { color: var(--text) !important; border-color: var(--line-strong) !important; }

/* ---------- 4. Rail ---------- */
body.has-rail .app-rail {
  position: fixed !important;
  inset: 68px auto 0 0 !important;
  width: 248px !important;
  padding: 20px 14px 28px !important;
  background: var(--bg-elev) !important;
  border-right: 1px solid var(--line) !important;
  overflow-y: auto;
  scrollbar-width: thin;
  z-index: 70;
}
/* shell.css pads the body for the rail AND main carries a margin; keep only the body
   offset, or the whole page is pushed 244px too far right. */
body.has-rail { padding-left: 248px !important; }
body.has-rail .arc-header { margin-left: 0 !important; }
body.has-rail main,
body.has-rail .arc-footer { margin-left: 0 !important; width: 100% !important; }
body.has-rail main { max-width: none !important; }

.app-rail-brand {
  display: flex !important;
  align-items: center;
  height: 46px;
  margin: 0 6px 18px !important;
}
.app-rail-brand .app-rail-lock { height: 30px !important; width: auto !important; }
.app-rail-brand .app-rail-mark { display: none !important; }
.rail-group { margin: 0 0 22px !important; }
.rail-label {
  display: block;
  margin: 0 0 8px 12px !important;
  font-size: 9.5px !important;
  letter-spacing: .24em !important;
  color: var(--dim) !important;
}
.rail-link {
  display: flex !important;
  align-items: center;
  gap: 11px !important;
  height: 40px !important;
  margin: 0 0 2px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  color: var(--muted) !important;
  font-size: 13.5px !important;
  font-weight: 550 !important;
  transition: background .14s, color .14s;
}
.rail-link svg {
  width: 17px !important;
  height: 17px !important;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.rail-link:hover { background: var(--surface-2) !important; color: var(--text) !important; }
.rail-link.active {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  box-shadow: inset 2px 0 0 var(--lime) !important;
}
.rail-link.active svg { stroke: var(--lime) !important; }

.sidebar-channels { display: flex; flex-direction: column; gap: 2px; }
.sidebar-empty { padding: 10px 12px; font-size: 12px; color: var(--dim); }
.sidebar-channel {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  transition: background .14s;
}
.sidebar-channel:hover { background: var(--surface-2) !important; }
.sidebar-channel img,
.sidebar-channel .sidebar-avatar {
  width: 28px; height: 28px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}
.sidebar-channel strong { font-size: 12.5px !important; font-weight: 600; }
.sidebar-channel small { font-size: 11px !important; color: var(--dim) !important; }

/* ---------- 5. Page frame ---------- */
main { background: transparent !important; }
body .wrap { width: min(var(--max), calc(100% - 52px)) !important; }
.home-shell,
.home-shell-wide {
  display: block !important;
  width: 100% !important;
  max-width: var(--max) !important;
  margin: 0 auto !important;
  padding: 24px 26px 72px !important;
}
/* design.css caps the column at a narrow page width; the new frame uses the whole
   space beside the rail. */
.home-main {
  display: flex !important;
  flex-direction: column;
  gap: 46px;
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding: 0 !important;
}
/* shell.css turns the live grid into a horizontal scroller; the new look is a real grid. */
body .home-main .stream-grid {
  display: grid !important;
  grid-auto-flow: row !important;
  grid-auto-columns: auto !important;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)) !important;
  overflow: visible !important;
  scroll-snap-type: none !important;
}
.home-section { margin: 0 !important; padding: 0 !important; }

/* ---------- 6. Hero ---------- */
.home-hero {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.hero-feature-controls {
  position: absolute;
  top: 18px; left: 20px; right: 20px;
  z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.hero-live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 26px; padding: 0 12px;
  border-radius: 999px;
  background: rgba(7, 8, 10, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #fff;
}
.hero-live-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.carousel-controls { display: flex; gap: 6px; pointer-events: auto; }
.carousel-controls button {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(7, 8, 10, .6);
  color: #fff; font-size: 15px; line-height: 1;
  backdrop-filter: blur(10px);
}
.carousel-controls button:hover { background: var(--lime); color: var(--on-accent); border-color: var(--lime); }

.hero-feature.feature-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 344px !important;
  gap: 0 !important;
  min-height: 0;
}
.arc-feature-card {
  position: relative;
  display: flex !important;
  flex-direction: column;
  min-width: 0;
  background: #0a0c10;
}
.arc-feature-media {
  position: relative;
  height: clamp(340px, 46vh, 520px);
  background: #0a0c10;
  overflow: hidden;
}
.arc-feature-media::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 8, 10, .55) 0%, rgba(7, 8, 10, 0) 26%),
    linear-gradient(0deg, rgba(7, 8, 10, .92) 2%, rgba(7, 8, 10, 0) 58%);
}
.arc-feature-media img,
.arc-feature-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.arc-feature-media video { width: 100%; height: 100%; object-fit: cover; }
.arc-feature-placeholder {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
  height: 100%; padding: 56px clamp(24px, 4vw, 56px);
  gap: 12px;
  max-width: 620px;
}
/* Nobody is on air: the panel is a designed state rather than an empty grey box. */
.feature-layout.is-empty .arc-feature-media {
  min-height: 400px !important;
  height: auto !important;
  background:
    radial-gradient(120% 130% at 8% 0%, rgba(169, 123, 255, .16), transparent 58%),
    radial-gradient(100% 120% at 92% 100%, rgba(204, 255, 66, .08), transparent 55%),
    var(--bg-elev) !important;
}
.feature-layout.is-empty .arc-feature-media::before {
  content: "ON AIR";
  position: absolute;
  right: -10px; bottom: -34px;
  font-family: var(--font-display);
  font-size: clamp(90px, 12vw, 170px);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: .8;
  color: rgba(255, 255, 255, .035);
  pointer-events: none;
  white-space: nowrap;
}
.feature-layout.is-empty .feature-title { font-size: clamp(28px, 3vw, 42px) !important; }
.feature-title { font-size: clamp(26px, 2.6vw, 38px) !important; letter-spacing: -.04em !important; }
.feature-text { color: var(--muted); font-size: 14px; max-width: 46ch; }
.feature-actions { display: flex; gap: 10px; margin-top: 8px; }
.arc-feature-overlay { position: absolute; top: 18px; left: 20px; z-index: 3; }
.arc-feature-info {
  display: flex !important;
  align-items: center;
  gap: 14px !important;
  padding: 16px 20px 18px !important;
  background: var(--surface) !important;
  border-top: 1px solid var(--line);
}
.arc-feature-info .stream-avatar { width: 42px !important; height: 42px !important; font-size: 15px !important; }
.feature-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.feature-copy strong {
  font-family: var(--font-display);
  font-size: 19px !important; font-weight: 700;
  letter-spacing: -.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feature-copy small { font-size: 12.5px !important; color: var(--muted) !important; }
.feature-cta {
  margin-left: auto;
  display: inline-flex !important; align-items: center; gap: 7px;
  height: 40px; padding: 0 20px !important;
  border-radius: 999px !important;
  background: var(--lime) !important;
  color: var(--on-accent) !important;
  font-size: 13.5px !important; font-weight: 700 !important;
  white-space: nowrap;
}
.feature-cta:hover { background: var(--lime-bright) !important; }

/* Hero chat */
.hero-feature .arc-chat {
  display: flex !important;
  flex-direction: column;
  border-left: 1px solid var(--line) !important;
  background: var(--bg-elev) !important;
  min-width: 0;
  max-height: none;
}
.arc-chat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--line) !important;
}
.arc-chat-head h2 { font-size: 13px !important; letter-spacing: .02em; font-weight: 600 !important; }
.arc-chat-head p { margin: 2px 0 0 !important; font-size: 11px !important; color: var(--dim) !important; }
.arc-chat-count {
  font-family: var(--font-mono); font-size: 9px !important; font-weight: 700;
  letter-spacing: .16em;
  padding: 4px 8px !important; border-radius: 999px !important;
  background: var(--red) !important; color: #fff !important;
}
.arc-chat-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px !important;
  border-bottom: 1px solid var(--line) !important;
}
.arc-chat-avatar { width: 26px !important; height: 26px !important; font-size: 11px !important; }
.arc-chat-profile strong { font-size: 12.5px; }
.arc-chat-profile small { font-size: 11px !important; color: var(--dim) !important; }
.arc-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px !important;
  display: flex; flex-direction: column; gap: 7px;
  font-size: 12.5px !important;
  min-height: 160px;
}
.arc-chat-empty { color: var(--dim) !important; font-size: 12px !important; }
.arc-chat-composer {
  display: flex; gap: 7px;
  padding: 11px 12px !important;
  border-top: 1px solid var(--line) !important;
}
.arc-chat-composer input {
  flex: 1; min-width: 0; height: 34px;
  padding: 0 12px !important;
  border-radius: 999px !important;
  border: 1px solid var(--line) !important;
  background: var(--field) !important;
  font-size: 12.5px !important;
}
.arc-chat-composer button {
  height: 34px; padding: 0 14px !important;
  border: 0 !important; border-radius: 999px !important;
  background: var(--lime) !important; color: var(--on-accent) !important;
  font-size: 12px !important; font-weight: 700;
}
.arc-chat-note { margin: 0 !important; padding: 0 14px 12px !important; font-size: 10.5px !important; color: var(--dim) !important; }

/* ---------- 7. For-you strip ---------- */
.hero-strip {
  margin-top: 22px;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 17, 22, .6);
}
.hero-strip-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 12px !important;
}
.hero-strip-head a { font-size: 12px !important; color: var(--violet) !important; font-weight: 600; }
.for-you-rail {
  display: flex !important;
  gap: 12px !important;
  overflow-x: auto;
  padding-bottom: 4px !important;
  scrollbar-width: thin;
}
.for-you-card {
  flex: 0 0 168px !important;
  width: 168px !important;
  min-width: 0;
}
.for-you-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 10px !important;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.for-you-thumb img { width: 100%; height: 100%; object-fit: cover; }
.for-you-card strong {
  display: block;
  margin: 7px 0 0 !important;
  font-size: 12.5px !important; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.for-you-card small { font-size: 11px !important; color: var(--dim) !important; }
.for-you-glyph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; color: var(--dim); }
/* An empty line-up should read as a quiet note, not a full-width empty box. */
.for-you-rail > .discovery-empty {
  flex: 1 1 auto;
  padding: 10px 4px !important;
  border: 0 !important;
  background: transparent !important;
  text-align: left !important;
}
.for-you-rail:has(> .discovery-empty) { min-height: 0; }
.hero-strip:has(.discovery-empty) { padding-bottom: 12px; }

/* ---------- 8. Section headings ---------- */
body .section-heading {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid var(--line) !important;
}
body .section-heading > div > h2 {
  display: flex; align-items: center; gap: 9px;
}
body .text-link {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--muted) !important;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
body .text-link:hover { color: var(--lime) !important; border-bottom-color: var(--lime); }
.home-filter-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px !important; }
.filter-chip,
.browse-chip {
  height: 30px !important;
  padding: 0 13px !important;
  border-radius: 999px !important;
  border: 1px solid var(--line) !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 550 !important;
}
.filter-chip:hover { border-color: var(--line-strong) !important; color: var(--text) !important; }
.browse-chip.active {
  background: var(--text) !important;
  border-color: var(--text) !important;
  color: #07080a !important;
  font-weight: 650 !important;
}

/* Off-palette leftovers from the store cards and panels. */
.arc-recommended-buy,
.arc-panel-steam-action {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}
.arc-recommended-buy:hover,
.arc-panel-steam-action:hover {
  border-color: var(--lime) !important;
  color: var(--lime) !important;
}
.arc-recommended-card,
.arc-recommended-card-body {
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
}
.arc-chat-count { min-width: 42px; text-align: center; }

/* ---------- 9. Stream cards ---------- */
.stream-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)) !important;
  gap: 22px 16px !important;
  align-items: start;
}
.stream-card {
  display: block !important;
  min-width: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  transition: transform .18s ease;
}
.stream-card:hover { transform: translateY(-3px); }
.stream-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 12px !important;
  overflow: hidden;
  background: var(--surface-2) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  transition: border-color .18s, box-shadow .18s;
}
.stream-card:hover .stream-thumb {
  border-color: var(--line-strong) !important;
  box-shadow: 0 12px 34px -14px rgba(0, 0, 0, .9), 0 0 0 1px rgba(204, 255, 66, .22) !important;
}
.stream-thumb img,
.stream-thumb video,
.channel-thumb-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-art {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 30px;
  color: rgba(255, 255, 255, .3);
}
.thumb-overlay-label {
  position: absolute; inset: auto 0 0 0;
  padding: 26px 12px 11px;
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 700; letter-spacing: .18em;
  color: #fff;
  background: linear-gradient(0deg, rgba(4, 5, 7, .9), transparent);
}
.live-pill {
  position: absolute; top: 9px; left: 9px;
  display: inline-flex !important; align-items: center; gap: 5px;
  height: 21px; padding: 0 8px !important;
  border-radius: 6px !important;
  background: var(--red) !important;
  color: #fff !important;
  font-family: var(--font-mono);
  font-size: 9.5px !important; font-weight: 700 !important; letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: none !important;
}
.live-pill i { width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.offline-pill {
  position: absolute; top: 9px; left: 9px;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  background: rgba(4, 5, 7, .74) !important;
  color: var(--muted) !important;
  font-family: var(--font-mono);
  font-size: 9.5px !important; font-weight: 600 !important; letter-spacing: .1em;
}
.viewer-count {
  position: absolute; bottom: 9px; right: 9px;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  background: rgba(4, 5, 7, .8) !important;
  color: #fff !important;
  font-size: 10.5px !important; font-weight: 600;
  letter-spacing: 0;
}
.stream-card-meta {
  display: flex !important;
  align-items: flex-start;
  gap: 10px !important;
  padding: 10px 2px 0 !important;
}
.stream-avatar {
  width: 34px !important; height: 34px !important;
  flex: 0 0 auto;
  border-radius: 999px !important;
  display: grid; place-items: center;
  font-size: 13px !important; font-weight: 700;
  overflow: hidden;
  border: 1px solid var(--line) !important;
  color: var(--text) !important;
  background: var(--surface-3) !important;
}
.stream-avatar img { width: 100%; height: 100%; object-fit: cover; }
.stream-card-copy { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.stream-card-copy strong {
  font-size: 13.5px !important; font-weight: 600 !important;
  line-height: 1.35;
  letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.stream-card-copy small { font-size: 12px !important; color: var(--muted) !important; }
.stream-card-copy .category-label { color: var(--dim) !important; font-size: 11.5px !important; }

.discovery-empty {
  padding: 26px !important;
  border: 1px dashed var(--line) !important;
  border-radius: var(--radius) !important;
  color: var(--dim) !important;
  font-size: 13px;
  text-align: center;
  background: rgba(14, 17, 22, .4) !important;
}

/* ---------- 10. Categories ---------- */
.category-search { margin: 0 0 16px !important; }
.category-search-field {
  display: flex; align-items: center; gap: 10px;
  height: 46px;
  padding: 0 16px !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--field) !important;
}
.category-search-field:focus-within { border-color: var(--violet) !important; }
.category-search-field input { border: 0 !important; background: transparent !important; width: 100%; height: 100%; outline: none; font-size: 13.5px !important; }
.category-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)) !important;
  gap: 12px !important;
}
.category-card {
  position: relative;
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: 118px !important;
  padding: 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
  overflow: hidden;
  transition: border-color .16s, transform .16s;
}
.category-card:hover { border-color: var(--line-strong) !important; transform: translateY(-2px); }
.category-card::before {
  content: "";
  position: absolute; inset: 0;
  opacity: .5;
  background: radial-gradient(120% 120% at 100% 0%, var(--violet-soft), transparent 62%);
}
.category-card:nth-child(2n)::before { background: radial-gradient(120% 120% at 100% 0%, var(--lime-soft), transparent 62%); }
.category-card:nth-child(3n)::before { background: radial-gradient(120% 120% at 100% 0%, var(--neon-cyan-soft), transparent 62%); }
.category-icon {
  position: absolute; top: 10px; right: 12px;
  font-size: 20px;
  color: rgba(255, 255, 255, .26) !important;
}
.category-card strong { position: relative; font-size: 14.5px !important; font-weight: 650; letter-spacing: -.02em; }
.category-card small { position: relative; font-size: 11.5px !important; color: var(--dim) !important; }

/* ---------- 11. Creator banner ---------- */
.creator-banner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--surface) !important;
  overflow: hidden;
  box-shadow: none !important;
}
.creator-banner-copy {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 36px 40px !important;
}
.creator-banner-copy h2,
.creator-banner-copy h3 {
  font-size: clamp(24px, 2.2vw, 34px) !important;
  max-width: 22ch;
}
.creator-banner-copy p { margin: 0 !important; max-width: 52ch; color: var(--muted) !important; font-size: 13.5px !important; }
.creator-banner-side {
  position: relative;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 28px 30px !important;
  border-left: 1px solid var(--line) !important;
  background:
    radial-gradient(140% 140% at 100% 0%, var(--violet-soft), transparent 60%),
    var(--bg-elev) !important;
  overflow: hidden;
}
.creator-banner-label { color: var(--dim) !important; font-size: 9.5px !important; letter-spacing: .24em !important; }
.creator-banner-big {
  font-family: var(--font-display);
  font-size: 46px !important;
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.05em;
  color: var(--text);
}
.creator-banner-arrow { position: absolute; right: 24px; bottom: 20px; font-size: 22px; color: var(--lime); }

/* ---------- 12. Channel / watch page ---------- */
.channel-page { background: transparent !important; }
.channel-shell {
  width: 100% !important;
  max-width: var(--max) !important;
  margin: 0 auto !important;
  padding: 0 26px 64px !important;
}
.channel-shell-main,
.channel-main,
.channel-layout,
.channel-watch-layout { width: 100% !important; max-width: none !important; }

.channel-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  height: 44px;
  border-bottom: 1px solid var(--line);
  background: transparent !important;
}
.channel-watch-layout,
.channel-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 360px !important;
  gap: 20px !important;
  margin: 18px 0 0 !important;
  align-items: start;
}
.channel-player,
.arcstream-video {
  border-radius: var(--radius) !important;
  overflow: hidden;
  border: 1px solid var(--line) !important;
  background: #000 !important;
}
.channel-player .arcstream-video,
.channel-player video { width: 100% !important; aspect-ratio: 16 / 9; height: auto !important; display: block; }

/* Banner + profile plate */
.channel-banner,
.channel-header,
.channel-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.channel-profile {
  display: flex !important;
  align-items: center;
  gap: 18px !important;
  padding: 20px 22px !important;
  margin: 14px 0 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
  flex-wrap: wrap;
}
.channel-profile .stream-avatar,
.channel-profile-avatar,
.channel-profile img {
  width: 62px !important; height: 62px !important;
  border-radius: 999px !important;
  border: 1px solid var(--line-strong) !important;
  font-size: 22px !important;
}
.channel-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.channel-info h1,
.channel-info strong { font-size: 24px !important; font-weight: 700; letter-spacing: -.035em; }
.channel-info small,
.channel-follow-line { font-size: 12.5px !important; color: var(--muted) !important; }
.channel-category-link { color: var(--violet) !important; font-size: 12px !important; font-weight: 600; }
.channel-report-link { color: var(--dim) !important; font-size: 11.5px !important; }

/* Tabs */
.channel-tabs {
  display: flex !important;
  align-items: center;
  gap: 4px !important;
  margin: 22px 0 0 !important;
  border-bottom: 1px solid var(--line) !important;
  padding: 0 !important;
  overflow-x: auto;
  scrollbar-width: none;
}
.channel-tab-link {
  position: relative;
  padding: 12px 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 550 !important;
  white-space: nowrap;
}
.channel-tab-link:hover { color: var(--text) !important; }
.channel-tab-link.active {
  color: var(--text) !important;
  box-shadow: inset 0 -2px 0 var(--lime) !important;
}
.channel-tab-count { font-size: 11px !important; color: var(--dim) !important; margin-left: 5px; }
.channel-tab-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-left: 12px; }
.channel-tab-panel { padding: 22px 0 0 !important; }

/* Panels: about, goals, schedule, socials */
.channel-schedule-panel,
.channel-goals-panel,
.channel-videos-panel,
.arc-panels-editor,
.channel-tab-panel .arc-community-section,
.channel-tab-panel > section {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: var(--surface) !important;
  padding: 20px !important;
  box-shadow: none !important;
}
.channel-goals-panel,
.channel-goals-panel * { text-align: left !important; }
.channel-goals-head,
.channel-videos-head {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 10px;
  margin: 0 0 14px !important;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.channel-goals-list small,
.channel-goals-panel p { color: var(--dim) !important; font-size: 12px !important; }
.channel-goals-head h2,
.channel-goals-head h3,
.channel-videos-head h2,
.channel-videos-head h3 { font-size: 15px !important; }
.channel-goals-list,
.channel-schedule-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.channel-goals-list li,
.channel-schedule-list li {
  padding: 10px 0 !important;
  border-bottom: 1px solid var(--line) !important;
  font-size: 13px !important;
}
.channel-goals-list li:last-child,
.channel-schedule-list li:last-child { border-bottom: 0 !important; }

.channel-videos-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 18px 14px !important;
}

/* Socials dialog */
.channel-socials-dialog {
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--surface) !important;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .9) !important;
  color: var(--text) !important;
}
.channel-socials-dialog::backdrop { background: rgba(3, 4, 6, .72); backdrop-filter: blur(6px); }
.channel-socials-dialog-head { padding: 18px 20px !important; border-bottom: 1px solid var(--line) !important; }
.channel-socials-link {
  display: flex !important; align-items: center; gap: 12px;
  padding: 14px 20px !important;
  border-bottom: 1px solid var(--line) !important;
  font-size: 13.5px !important;
  color: var(--text) !important;
}
.channel-socials-link:hover { background: var(--surface-2) !important; }

/* ---------- 13. Footer ---------- */
.arc-footer {
  margin-top: 64px !important;
  border-top: 1px solid var(--line) !important;
  background: var(--bg-elev) !important;
  padding: 0 !important;
}
.arc-footer .footer-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 26px 26px !important;
}
.footer-top {
  display: grid !important;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) !important;
  gap: 48px !important;
  padding-bottom: 34px;
}
.footer-brand .brand-lock { height: 34px; width: auto; }
.footer-brand p { margin: 12px 0 0 !important; font-size: 12.5px !important; color: var(--dim) !important; max-width: 34ch; }
.footer-badges { display: flex; gap: 6px; margin-top: 14px; }
.footer-badges .pill {
  font-family: var(--font-mono);
  font-size: 9.5px !important; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 9px !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  color: var(--dim) !important;
  background: transparent !important;
}
.footer-cols { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 24px !important; }
.footer-col h3 {
  margin: 0 0 12px !important;
  font-family: var(--font-mono);
  font-size: 9.5px !important; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--dim) !important;
}
.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 12.5px !important;
  color: var(--muted) !important;
}
.footer-col a:hover { color: var(--lime) !important; }
.footer-build {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--dim);
  opacity: .7;
}
.footer-bottom {
  display: flex !important; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px !important;
  border-top: 1px solid var(--line) !important;
  font-size: 11.5px !important;
  color: var(--dim) !important;
}

/* ---------- 13b. Light theme ---------- */
/* This layer paints a few surfaces by hand for depth; in light mode they fall back
   to the token palette so the theme toggle still produces a light page. */
html[data-theme="light"] .feature-layout.is-empty .arc-feature-media {
  background:
    radial-gradient(120% 130% at 8% 0%, rgba(110, 70, 190, .12), transparent 58%),
    radial-gradient(100% 120% at 92% 100%, rgba(85, 127, 0, .08), transparent 55%),
    var(--surface-2) !important;
}
html[data-theme="light"] .feature-layout.is-empty .arc-feature-media::before { color: rgba(20, 23, 15, .05); }
html[data-theme="light"] .hero-strip { background: var(--surface) !important; }
html[data-theme="light"] .creator-banner-side { background: var(--surface-2) !important; }
html[data-theme="light"] .live-pill { color: #fff !important; }
/* In light mode the accent fill carries dark ink, so the primary button needs the
   light-mode accent rather than the acid green. */
html[data-theme="light"] .button-primary,
html[data-theme="light"] .feature-cta,
html[data-theme="light"] .arc-chat-composer button,
html[data-theme="light"] .arc-recommended-buy {
  background: #a97bff !important;
  border-color: #a97bff !important;
  color: #12170a !important;
}
html[data-theme="light"] .rail-link.active { box-shadow: inset 2px 0 0 #557f00 !important; }
html[data-theme="light"] .rail-link.active svg { stroke: #557f00 !important; }

/* ---------- 14. Responsive ---------- */
@media (max-width: 1400px) {
  .hero-feature.feature-layout { grid-template-columns: minmax(0, 1fr) 320px !important; }
  .channel-watch-layout,
  .channel-layout { grid-template-columns: minmax(0, 1fr) 330px !important; }
}
@media (max-width: 1180px) {
  body.has-rail { padding-left: 0 !important; }
  body.has-rail .app-rail { display: none !important; }
  /* No rail means the logo has to come back into the header. */
  body.has-rail .arc-header .brand { display: flex !important; }
  body.has-rail main,
  body.has-rail .arc-footer { margin-left: 0 !important; }
  .hero-feature.feature-layout { grid-template-columns: minmax(0, 1fr) !important; }
  .hero-feature .arc-chat { display: none !important; }
  .channel-watch-layout,
  .channel-layout { grid-template-columns: minmax(0, 1fr) !important; }
  .footer-top { grid-template-columns: minmax(0, 1fr) !important; gap: 30px !important; }
}
@media (max-width: 900px) {
  /* The rail is gone at this width, so navigation becomes a scrollable row under
     the bar instead of disappearing with it. */
  .arc-header .header-inner { flex-wrap: wrap !important; height: auto !important; padding: 10px 16px 0 !important; gap: 10px !important; }
  .arc-header .main-nav {
    display: flex !important;
    order: 3;
    width: 100%;
    gap: 2px !important;
    padding: 0 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .arc-header .main-nav::-webkit-scrollbar { display: none; }
  .arc-header .main-nav a { white-space: nowrap; padding: 7px 11px !important; font-size: 12.5px !important; }
  .arc-header .mobile-menu { display: none !important; }
  .arc-header .header-search { flex: 1 1 140px; max-width: none !important; margin-left: 0 !important; }
  .arc-header .theme-toggle-label,
  .arc-header .button-quiet.small,
  .arc-header .pwa-install { display: none !important; }
  .arc-header .nav-actions { gap: 6px !important; }
  /* The old layer centred and stacked section headings on a phone; keep them as a
     left-aligned title with its link on the right. */
  body .section-heading {
    flex-direction: row !important;
    align-items: flex-end !important;
    text-align: left !important;
  }
  body .section-heading p { display: none !important; }
  body .section-heading h2 { font-size: 18px !important; }
  .home-shell, .home-shell-wide, .channel-shell { padding: 16px 16px 52px !important; }
  body .wrap { width: calc(100% - 32px) !important; }
  .creator-banner { grid-template-columns: minmax(0, 1fr) !important; }
  .creator-banner-side { display: none !important; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .stream-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; gap: 16px 10px !important; }
  .arc-feature-media { height: 300px; }
}
@media (max-width: 560px) {
  .arc-header .header-inner { padding: 0 14px !important; gap: 10px !important; }
  .arc-header .header-search { display: none !important; }
  .arc-feature-info { flex-wrap: wrap; }
  .feature-cta { width: 100%; justify-content: center; margin-left: 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   15. FRAME V2 — no side rail
   --------------------------------------------------------------------------
   The vertical rail is replaced by a fixed horizontal bar directly under the
   header: destinations on the left, who is live on the right. The page content
   is no longer inset by a 248px column, so the hero runs edge to edge and the
   sections get the full width of the window.
   ========================================================================== */

body.has-rail { padding-left: 0 !important; }
body.has-rail main,
body.has-rail .arc-footer { margin-left: 0 !important; width: 100% !important; }

/* The logo belongs in the header again now that the rail does not carry it. */
body.has-rail .arc-header .brand { display: flex !important; }
body.has-rail .main-nav { display: flex !important; }
body.has-rail .arc-header .header-inner { gap: 16px !important; }
body.has-rail .header-search { max-width: 360px !important; margin-left: auto !important; }

/* --- Horizontal section bar --- */
body.has-rail .app-rail {
  position: fixed !important;
  inset: 68px 0 auto 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px !important;
  width: auto !important;
  height: 52px !important;
  padding: 0 26px !important;
  background: var(--bg-elev) !important;
  border-right: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none;
  z-index: 65;
}
body.has-rail .app-rail::-webkit-scrollbar { display: none; }
body.has-rail .app-rail-brand { display: none !important; }
body.has-rail .rail-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 2px !important;
  margin: 0 !important;
  width: auto !important;
}
body.has-rail .rail-label { display: none !important; }
body.has-rail .rail-link {
  height: 36px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border-radius: 9px !important;
  white-space: nowrap;
}
body.has-rail .rail-link.active {
  background: var(--surface-2) !important;
  box-shadow: inset 0 -2px 0 var(--lime) !important;
}

/* Who is on air, as chips at the end of the bar. */
body.has-rail .rail-live {
  margin-left: auto !important;
  padding-left: 12px !important;
  min-width: 0;
}
body.has-rail .rail-live .sidebar-channels {
  flex-direction: row !important;
  gap: 6px !important;
  overflow-x: auto;
  scrollbar-width: none;
}
body.has-rail .rail-live .sidebar-channel {
  width: auto !important;
  padding: 4px 10px 4px 4px !important;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
body.has-rail .rail-live .sidebar-channel strong { font-size: 11.5px !important; }
body.has-rail .rail-live .sidebar-channel small { display: none !important; }
body.has-rail .rail-live .sidebar-empty { padding: 0 8px; white-space: nowrap; font-size: 11.5px; }

body.has-rail main { padding-top: 52px !important; }

/* --- Full-bleed page --- */
body.has-rail .home-shell,
body.has-rail .home-shell-wide,
body.has-rail .channel-shell {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 0 72px !important;
}
body.has-rail .home-main { gap: 54px; }
body.has-rail .home-main > .home-section,
body.has-rail .home-main > .hero-strip,
body.has-rail .home-main > .creator-banner { padding-inline: 26px !important; }

/* --- Full-bleed hero --- */
body.has-rail .home-hero {
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  background: var(--bg-elev) !important;
}
body.has-rail .home-hero .arc-feature-media { height: clamp(440px, 60vh, 620px) !important; }
body.has-rail .home-hero .arc-feature-info { padding: 20px 26px 22px !important; }
body.has-rail .home-hero .hero-feature-controls { top: 22px !important; left: 26px !important; right: 26px !important; }
body.has-rail .feature-layout.is-empty .arc-feature-media { min-height: 440px !important; }
body.has-rail .feature-layout.is-empty .arc-feature-placeholder { padding: 64px 26px !important; }
body.has-rail .feature-layout.is-empty .feature-title { font-size: clamp(34px, 4.2vw, 58px) !important; }

/* The strip under the hero is part of the hero band, so it keeps a tighter inset. */
body.has-rail .hero-strip {
  margin-top: 0 !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  padding: 18px 26px 20px !important;
}

/* --- Bigger editorial sections --- */
body.has-rail .home-main { counter-reset: cpsec; }
body.has-rail .home-main > .home-section { counter-increment: cpsec; }
body.has-rail .home-main > .home-section .section-heading h2::before {
  content: counter(cpsec, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--lime);
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  margin-right: 4px;
}
body.has-rail .home-main > .home-section .section-heading h2 {
  font-size: clamp(24px, 2.2vw, 32px) !important;
  letter-spacing: -.035em !important;
}
body.has-rail .home-main > .home-section .section-heading { padding-bottom: 14px !important; }
body.has-rail .home-main .stream-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 28px 18px !important;
}
body.has-rail .home-main .category-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  gap: 14px !important;
}
body.has-rail .home-main .category-card { min-height: 136px !important; }
body.has-rail .home-main .for-you-card { flex: 0 0 200px !important; width: 200px !important; }
body.has-rail .creator-banner { border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; }

/* Channel page: the player and chat now use the full window width. */
body.has-rail .channel-watch-layout,
body.has-rail .channel-layout { grid-template-columns: minmax(0, 1fr) 400px !important; gap: 18px !important; padding-inline: 26px !important; }
body.has-rail .channel-topbar { padding-inline: 26px !important; }
body.has-rail .channel-profile,
body.has-rail .channel-tabs,
body.has-rail .channel-tab-panel { margin-inline: 26px !important; }
body.has-rail .channel-tab-panel { padding-inline: 0 !important; }

@media (max-width: 1180px) {
  body.has-rail .app-rail { display: none !important; }
  body.has-rail main { padding-top: 0 !important; }
  body.has-rail .home-main > .home-section,
  body.has-rail .home-main > .hero-strip,
  body.has-rail .home-main > .creator-banner,
  body.has-rail .channel-watch-layout,
  body.has-rail .channel-layout,
  body.has-rail .channel-topbar { padding-inline: 16px !important; }
  body.has-rail .home-main .stream-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; }
}

/* The header already carries Discover/Browse/Games/Drops, so the bar under it keeps
   only what the header does not: who is live, and the creator links. */
body.has-rail .app-rail > .rail-group:first-of-type { display: none !important; }
body.has-rail .rail-live { margin-left: 0 !important; }
body.has-rail .rail-live + .rail-group { margin-left: auto !important; }
body.has-rail .arc-chat-count {
  min-width: 0 !important;
  padding: 3px 9px !important;
  font-size: 10px !important;
  letter-spacing: .08em !important;
  text-align: center;
}

/* backdrop-filter was leaving the contents of these layers unpainted (the header, the
   hero's live pill and the chat badge came out blank). A solid surface renders reliably
   and reads the same over the dark canvas. */
.arc-header,
.hero-live-pill,
.carousel-controls button,
.arc-chat,
.arc-chat-panel,
.channel-socials-dialog,
.notif-panel {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.arc-header { background: rgba(7, 8, 10, .97) !important; }
.hero-live-pill { background: rgba(7, 8, 10, .85) !important; }
.carousel-controls button { background: rgba(7, 8, 10, .8) !important; }

/* The hero controls belong over the picture, not over the chat column beside it. */
body.has-rail .home-hero .hero-feature-controls { right: 370px !important; }
body.has-rail .home-hero:has(.feature-layout.is-empty) .hero-feature-controls { right: 26px !important; }
@media (max-width: 1180px) {
  body.has-rail .home-hero .hero-feature-controls { right: 16px !important; }
}
/* ==========================================================================
   16. THE LIGHT THEME, DESIGNED
   --------------------------------------------------------------------------
   The dark site is a midnight canvas with acid accents. The light one is not
   the same page inverted: it is a warm paper surface with ink type, black
   primary buttons and violet kept for links, so it stands on its own.
   ========================================================================== */
html[data-theme="light"] {
  --paper: #f5f4ef;
  --bg: #f5f4ef;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f1ea;
  --surface-3: #e9e7de;
  --line: #e2e0d6;
  --line-strong: #cdcabc;
  --text: #14161a;
  --muted: #5b6066;
  --dim: #82868c;
  --field: #ffffff;
  --field-focus: #fbfbf8;
  --header-bg: rgba(245, 244, 239, .97);
  --inverse: #14161a;
  --on-accent: #ffffff;
  --lime: #1f7a4d;
  --lime-bright: #17603c;
  --lime-soft: rgba(31, 122, 77, .1);
  --neon: #1f7a4d;
  --violet: #6b3fe0;
  --violet-bright: #5326c9;
  --violet-soft: rgba(107, 63, 224, .1);
  --red: #d81f3f;
}
html[data-theme="light"] body {
  background: var(--paper) !important;
  color: var(--text);
}
html[data-theme="light"] .arc-header {
  background: var(--header-bg) !important;
  border-bottom: 1px solid var(--line) !important;
}
html[data-theme="light"] body.has-rail .app-rail {
  background: #ffffff !important;
  border-bottom: 1px solid var(--line) !important;
}
html[data-theme="light"] .arc-header .main-nav a { color: var(--muted) !important; }
html[data-theme="light"] .arc-header .main-nav a.active {
  color: var(--text) !important;
  background: var(--surface-2) !important;
  box-shadow: inset 0 -2px 0 var(--inverse) !important;
}
html[data-theme="light"] .arc-header .header-search {
  background: #ffffff !important;
  border-color: var(--line) !important;
}
html[data-theme="light"] .arc-header .header-search button {
  background: var(--surface-2) !important;
  color: var(--muted) !important;
}
html[data-theme="light"] .rail-link.active {
  background: var(--surface-2) !important;
  box-shadow: inset 0 -2px 0 var(--inverse) !important;
}
html[data-theme="light"] .rail-link.active svg { stroke: var(--inverse) !important; }
html[data-theme="light"] .rail-live .sidebar-channel { background: #fff !important; border-color: var(--line) !important; }

/* Buttons: ink primary, outlined secondary. */
html[data-theme="light"] .button-primary,
html[data-theme="light"] .feature-cta,
html[data-theme="light"] .arc-chat-composer button {
  background: var(--inverse) !important;
  border-color: var(--inverse) !important;
  color: #fff !important;
}
html[data-theme="light"] .button-primary:hover,
html[data-theme="light"] .feature-cta:hover {
  background: #2a2d33 !important;
  border-color: #2a2d33 !important;
}
html[data-theme="light"] .button,
html[data-theme="light"] .button-quiet {
  background: #ffffff !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

/* Hero: the picture stays dark, the plate under it becomes paper. */
html[data-theme="light"] .home-hero { background: #ffffff !important; border-color: var(--line) !important; }
html[data-theme="light"] .arc-feature-info { background: #ffffff !important; border-top-color: var(--line) !important; }
html[data-theme="light"] .feature-copy small { color: var(--muted) !important; }
html[data-theme="light"] .hero-strip {
  background: #ffffff !important;
  border-color: var(--line) !important;
}
html[data-theme="light"] .hero-strip-head a { color: var(--violet) !important; }

/* Section numbering has to stay legible on paper. */
html[data-theme="light"] body.has-rail .home-main > .home-section .section-heading h2::before {
  color: var(--text);
  border-color: var(--line-strong);
}
html[data-theme="light"] body .section-heading { border-bottom-color: var(--line) !important; }
html[data-theme="light"] body .section-heading p { color: var(--dim) !important; }
html[data-theme="light"] body .text-link { color: var(--muted) !important; }
html[data-theme="light"] body .text-link:hover { color: var(--violet) !important; border-bottom-color: var(--violet); }
html[data-theme="light"] .filter-chip { background: #fff !important; border-color: var(--line) !important; color: var(--muted) !important; }
html[data-theme="light"] .filter-chip.active {
  background: var(--inverse) !important;
  border-color: var(--inverse) !important;
  color: #fff !important;
}

/* Cards and panels get a real edge so they are not white on white. */
html[data-theme="light"] .stream-thumb {
  background: #e8e6dd !important;
  border-color: var(--line) !important;
  box-shadow: 0 1px 2px rgba(20, 22, 26, .05) !important;
}
html[data-theme="light"] .stream-card:hover .stream-thumb {
  box-shadow: 0 14px 30px -16px rgba(20, 22, 26, .35) !important;
  border-color: var(--line-strong) !important;
}
html[data-theme="light"] .stream-avatar { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--text) !important; }
html[data-theme="light"] .stream-card-copy strong { color: var(--text) !important; }
html[data-theme="light"] .stream-card-copy small { color: var(--muted) !important; }
html[data-theme="light"] .category-card {
  background: #ffffff !important;
  border-color: var(--line) !important;
}
html[data-theme="light"] .category-card strong { color: var(--text) !important; }
html[data-theme="light"] .category-card small { color: var(--dim) !important; }
html[data-theme="light"] .category-icon { color: rgba(20, 22, 26, .28) !important; }
html[data-theme="light"] .category-search-field { background: #fff !important; border-color: var(--line) !important; }
html[data-theme="light"] .discovery-empty { background: #fff !important; border-color: var(--line-strong) !important; color: var(--dim) !important; }

/* Chat reads as a panel, not a grey well. */
html[data-theme="light"] .hero-feature .arc-chat,
html[data-theme="light"] .arc-chat {
  background: #ffffff !important;
  border-left-color: var(--line) !important;
}
html[data-theme="light"] .arc-chat-head,
html[data-theme="light"] .arc-chat-profile,
html[data-theme="light"] .arc-chat-composer { border-color: var(--line) !important; }
html[data-theme="light"] .arc-chat-messages { color: var(--text) !important; }
html[data-theme="light"] .arc-chat-empty,
html[data-theme="light"] .arc-chat-note { color: var(--dim) !important; }
html[data-theme="light"] .arc-chat-composer input {
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}
html[data-theme="light"] .arc-chat-count { background: var(--red) !important; color: #fff !important; }

/* Creator banner and footer. */
html[data-theme="light"] .creator-banner {
  background: #ffffff !important;
  border-color: var(--line) !important;
}
html[data-theme="light"] .creator-banner-side {
  background: var(--surface-2) !important;
  border-left-color: var(--line) !important;
}
html[data-theme="light"] .creator-banner-label { color: var(--dim) !important; }
html[data-theme="light"] .creator-banner-arrow { color: var(--violet) !important; }
html[data-theme="light"] .arc-footer { background: #efeee7 !important; border-top-color: var(--line) !important; }
html[data-theme="light"] .footer-col a { color: var(--muted) !important; }
html[data-theme="light"] .footer-col a:hover { color: var(--violet) !important; }
html[data-theme="light"] .footer-bottom { border-top-color: var(--line) !important; color: var(--dim) !important; }
html[data-theme="light"] .footer-badges .pill { border-color: var(--line-strong) !important; color: var(--muted) !important; }
html[data-theme="light"] .footer-build { color: var(--dim) !important; }

/* Channel page surfaces. */
html[data-theme="light"] .channel-profile,
html[data-theme="light"] .channel-goals-panel,
html[data-theme="light"] .channel-schedule-panel,
html[data-theme="light"] .channel-videos-panel {
  background: #ffffff !important;
  border-color: var(--line) !important;
}
html[data-theme="light"] .channel-tabs { border-bottom-color: var(--line) !important; }
html[data-theme="light"] .channel-tab-link { color: var(--muted) !important; }
html[data-theme="light"] .channel-tab-link.active {
  color: var(--text) !important;
  box-shadow: inset 0 -2px 0 var(--inverse) !important;
}
html[data-theme="light"] .arc-recommended-card,
html[data-theme="light"] .arc-recommended-card-body { background: #fff !important; border-color: var(--line) !important; }
html[data-theme="light"] .arc-recommended-buy { border-color: var(--inverse) !important; color: var(--text) !important; }
html[data-theme="light"] .arc-recommended-buy:hover { background: var(--inverse) !important; color: #fff !important; }
