/* ═══════════════════════════════════════════════════════════════════════
   WNCORE RADIO — mobile.css  (MERGED — only @media blocks live here)
   Loaded after style.css so mobile rules always override desktop.
   
   FORMULA for bottom spacing on mobile:
     bottom: calc(var(--player-h, 68px) + 56px + Xpx)
     56px = mobile-bottom-nav height
   
   Merge sources (in cascade priority order):
     1. style.css mobile @media blocks
     2. mobile.css (all rules)
     3. horror_upgrade.css mobile @media blocks
     4. p5-transitions.css mobile @media blocks
     5. wncore-bugfix.css mobile @media blocks
     6. wncore-mobile-fix.css (all rules — targeted fixes)
     7. wncore-mobile-breathing.css (all rules — spacing/breathing)
     8. wncore-ui-improvements.css mobile @media (minimal)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── ROOT VARS: mobile overrides ──────────────────────────────────────────── */
:root {
  --header-h: 56px;
  --player-h: 68px;
}

@media (min-width: 769px) {
  :root {
    --header-h: 64px;
    --player-h: 76px;
  }
}


/* ── FROM style.css ──────────────────────────────────────────────────── */
@media(max-width:768px) and (pointer:coarse){
  * { -webkit-tap-highlight-color:transparent; }
  /* Disable backdrop-filter on mobile — extremely expensive on most Android GPUs */
  header { backdrop-filter:none!important; -webkit-backdrop-filter:none!important; background:var(--bg)!important; }
  .player-bar { backdrop-filter:none!important; -webkit-backdrop-filter:none!important; }
  body.dark-mode .player-bar { background:rgba(26,24,20,0.99)!important; }
  body:not(.dark-mode) .player-bar { background:rgba(245,243,239,0.99)!important; }
  /* Disable grain overlay SVG filter on mobile */
  .grain-overlay { display:none!important; }
  /* Reduce ticker animation to CSS only, no JS reflow triggers */
  .ticker-inner { will-change:transform; }
}
@media(max-width:1100px){
  .page-wrap{grid-template-columns:1fr 280px;gap:24px}
  .anime-stations-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:900px){
  :root{--header-h:56px}
  .page-wrap{grid-template-columns:1fr;gap:0;padding:28px 16px}
  .sidebar{display:none}
  .globe-section{height:340px}
  .globe-overlay-left{width:280px;padding:24px 24px 24px 20px}
  .globe-title{font-size:1.8rem}
  .anime-stations-grid{grid-template-columns:1fr 1fr}
  nav{display:none}
  .mobile-menu-btn{display:flex}
  .live-dot{display:none}
  .minimal-btn{display:none}
  .pb-right{display:none}
  .pb-station{width:160px}
  .header-inner{padding:0 16px;gap:12px}
  .genre-strip{padding:0 16px}
}
@media(max-width:600px){
  :root{--player-h:68px}
  .rec-grid{grid-template-columns:1fr}
  .anime-stations-grid{grid-template-columns:1fr}
  /* Globe section smaller on mobile — JS skips WebGL entirely */
  .globe-section{height:240px}
  .globe-overlay-left{width:100%;padding:24px 20px 20px}
  .globe-title{font-size:1.5rem}
  .globe-sub{display:none}
  .globe-stats{gap:16px}
  .page-wrap{padding:28px 18px}
  .section-hd{margin-bottom:20px}
  /* Player bar — larger touch targets */
  .player-bar{padding:0 12px;gap:10px}
  .pb-station{width:120px;gap:8px}
  .pb-btn{width:38px;height:38px;min-width:38px}
  .pb-play{width:42px;height:42px;min-width:42px}
  .modal-box{padding:28px 20px}
  .anime-banner{height:160px}
  .anime-banner-title{font-size:1.5rem}
  .st-country,.st-bitrate{display:none}
  .corrupt-terminal-text{font-size:0.62rem}
  /* Hide globe hint on mobile since there's no interactive globe */
  .globe-hint { display:none!important; }
  /* Globe section on mobile — signal visualization on right, text on left */
  .globe-section { height:240px!important; }
  .globe-overlay-left {
    position:absolute;
    width:55%;
    padding:24px 18px 18px 20px;
    z-index:2;
  }
  #globe-container {
    position:absolute;
    right:0; top:0; bottom:0;
    width:45%;
    z-index:1;
  }
  .genre-strip{padding:0 16px}
  /* Ensure tables don't overflow */
  .station-table{font-size:0.75rem}
  .st-num{width:24px}
  /* Touch-friendly rec cards */
  .rec-card{min-height:60px}
  /* Reduce animation count on mobile for performance */
  .grain-overlay{display:none}
}
@media (max-width:768px) {
  .lm-hero { flex-direction:column;padding:40px 20px;min-height:auto;overflow:visible;height:auto; }
  .lm-waveform-art { display:none; }
  .lm-hero-stats { gap:20px; }
  .lm-now-playing-card { flex-direction:column;text-align:center;padding:20px; }
  .lm-np-info { display:flex;flex-direction:column;align-items:center; }
  .lm-grid { grid-template-columns:1fr 1fr;padding:0 12px 24px; }
  .wncore-footer-inner { grid-template-columns:1fr 1fr;gap:24px; }
  .footer-bottom { flex-direction:column;gap:8px;text-align:center; }
  .broadcast-status-bar { display:none; }
}
@media (max-width:480px) {
  .lm-grid { grid-template-columns:1fr; }
}
@media(max-width:768px) { .genre-az-sidebar { display:none; } }

@media (max-width:480px) {
  .country-filter-wrap { padding:8px 14px; }
  .country-filter-select { max-width:100%;width:100%; }
}
@media(max-width:600px) { .sf-row { grid-template-columns:1fr; } }

@media(max-width:768px) { .mobile-bottom-nav { display:flex; } }
.mbn-btn {
  flex:1;height:100%;border:none;background:none;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  color:var(--text3);cursor:pointer;font-size:0.58rem;font-family:'DM Sans',sans-serif;
  transition:color 0.15s;position:relative;
}
@media(max-width:768px) and (pointer:coarse) {
  .anime-banner-video,
  .globe-ambient-video { display:none!important; }
}
/* ── Header responsive rules now live in style.css (fluid adaptive system).
   Breakpoints: nav hides ≤900px, sign-in/theme-labels ≤768px,
   clock ≤600px, theme-toggle ≤480px. Mobile-menu-btn always visible. ── */
@media (max-width: 480px) {
  .ticker-label { display: none; }
  .ticker-wrap { height: 24px; }
  .ticker-inner { font-size: 0.54rem; }

}
@media (max-width: 768px) {
  .globe-section { height: 260px; }
  .globe-overlay-left {
    width: 100%;
    background: linear-gradient(to bottom, rgba(3,7,18,0.9) 60%, transparent);
    padding: 20px 16px;
    justify-content: flex-end;
  }
  .globe-title { font-size: 1.5rem; }
  .globe-sub { font-size: 0.72rem; }
  .globe-stats { gap: 14px; }
  .globe-stat-num { font-size: 1.1rem; }
}
@media (max-width: 768px) {
  .page-wrap {
    grid-template-columns: 1fr;
    padding: 16px 12px;
    gap: 20px;
  }
  .sidebar { order: -1; }
}

@media (max-width: 480px) {
  .rec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .st-country, .st-bitrate, .st-num { display: none; }
  .station-table td { padding: 10px 4px; }
  .st-name { font-size: 0.82rem; }
}
@media (max-width: 768px) {
  .player-bar { height: var(--player-h); padding: 0 12px; }
  .pb-right { display: none; }
  .pb-center { flex: 1; }
  .pb-station { max-width: 120px; }
  .pb-name { font-size: 0.72rem; }
  .pb-meta { font-size: 0.58rem; }
  .pb-controls { gap: 8px; }
  .pb-btn { width: 28px; height: 28px; }
  .pb-play { width: 36px; height: 36px; }
}
@media (max-width: 600px) {
  .search-modal-backdrop { padding: 60px 10px 10px; align-items: flex-start; }
  .search-box { border-radius: 12px; }
  .search-results { max-height: 280px; }
}
@media (max-width: 480px) {
  .modal-box { padding: 24px 18px; border-radius: 16px 16px 0 0; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-oauth { flex-direction: column; gap: 8px; }
  .oauth-btn { width: 100%; }
}
@media (max-width: 768px) {
  .genre-strip { padding: 0 12px; }
  .genre-btn { padding: 6px 12px; font-size: 0.7rem; }
}
@media (max-width: 768px) {
  .about-wrap { padding: 32px 16px 100px; }
  .about-title { font-size: 1.7rem; }
}
@media (max-width: 768px) {
  .anime-stations-grid { grid-template-columns: repeat(2,1fr); }
  .anime-banner { height: 160px; }
  .anime-banner-title { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  .anime-stations-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .lm-grid { grid-template-columns: 1fr !important; }
  .lm-hero { padding: 32px 16px; }
  .lm-hero-title { font-size: 2rem; }
  .lm-hero-stats { gap: 12px; }
  .lm-now-playing-card { flex-direction: column; align-items: flex-start; }
  .lm-np-vinyl { width: 70px; height: 70px; }
}
@media (max-width: 768px) {
  #page-charts > div, #page-genres > div, #page-podcasts > div { padding: 32px 16px 100px; }
}
@media (max-width: 768px) {
  .wncore-footer { padding-bottom: calc(var(--player-h) + 56px + 8px); }
  .wncore-footer-inner { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .wncore-footer-brand { grid-column: 1 / -1; }
  .footer-tagline { font-size: 0.72rem; }
}
@media (max-width: 400px) {
  .wncore-footer-inner { grid-template-columns: 1fr !important; }
}
@media (max-width: 768px) {
  .sidebar { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .sidebar-card { flex: 1 1 280px; }
  .arg-card { flex: 1 1 100%; }
}
@media (max-width: 768px) {
  body { padding-bottom: calc(var(--player-h) + 56px); }
  .mobile-bottom-nav {
    bottom: var(--player-h);
    border-top: 1px solid var(--border);
    z-index: 481;
  }
}
@media (max-width: 768px) {
  .anime-page-root .anime-search-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .anime-page-root .anime-action-btn {
    width: 100%;
  }
  .anime-page-root #anime-search-input {
    width: 100%;
  }
  .anime-page-root #anime-search-results,
  .anime-page-root #anime-tracker-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .anime-page-root .anime-card {
    border-radius: 18px;
  }
}
@media (max-width: 600px) {
  .legal-wrap { padding: 48px 14px 100px; }
  .legal-title { font-size: 1.5rem; }
  .legal-nav { gap: 6px; }
  .legal-nav-btn { padding: 5px 10px; font-size: 0.7rem; }
  .legal-table { font-size: 0.72rem; }
}
@media (max-width: 768px) {
  .broadcast-status-bar {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: calc(var(--player-h) + 56px + 12px);
    right: 12px;
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 480px) {
  #genre-cards-grid { grid-template-columns: repeat(2,1fr) !important; gap: 8px !important; }
}
@media (max-width: 900px) {
  .lm-grid { grid-template-columns: repeat(2,1fr) !important; }
}
@media (max-width: 480px) {
  .lm-grid { grid-template-columns: 1fr !important; }
  .lm-channel-bar { padding: 10px 12px; gap: 6px; }
  .lm-ch-btn { padding: 5px 10px; font-size: 0.7rem; }
}
@media (max-width: 600px) {
  #podcast-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .horror-terminal { font-size: 0.72rem; }
}
@media (max-width: 480px) {
  .section-hd { margin-bottom: 12px; }
  .section-title { font-size: 1.1rem; }
}
@media (max-width: 768px) {
  button, a, [role="button"] {
    min-height: 36px;
  }
  .genre-btn, .search-filter-btn, .lm-ch-btn {
    min-height: 32px;
  }
}
@media (max-width: 768px) {
  .station-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 600px) {
  .anime-img-real { width: 110px; height: 70px; }
}
@media (max-width: 768px) {
  .np-wave { gap: 2px; }
  .np-wave span { width: 2px; }
}
/* ── FROM mobile.css ─────────────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════
   WNCORE RADIO — MOBILE.css
   Mobile-first overrides, signal connection box,
   legal page integration, ARG elements
═══════════════════════════════════════════════════════ */

/* ── SIGNAL CONNECTION BOX (bottom of page, replaces header element) ── */
.signal-conn-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid rgba(200,71,42,0.2);
  border-radius: 10px;
  margin: 12px 16px;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text3);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}
.signal-conn-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(200,71,42,0.03), transparent);
  animation: conn-scan 3s linear infinite;
}
@keyframes conn-scan {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
.signal-conn-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(200,71,42,0.5);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
.signal-conn-label {
  color: rgba(200,71,42,0.7);
  font-weight: 500;
  letter-spacing: 1px;
}
.signal-conn-status {
  margin-left: auto;
  font-size: 0.58rem;
  color: rgba(200,71,42,0.4);
}
.signal-conn-freq {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
}

/* ── MOBILE FIRST CORE ── */




/* ── HEADER MOBILE ── */

/* ── TICKER MOBILE ── */

/* ── GLOBE SECTION MOBILE ── */

/* ── PAGE WRAP MOBILE ── */

/* ── FEATURED CARDS MOBILE ── */

/* ── REC GRID MOBILE ── */

/* ── STATION TABLE MOBILE ── */

/* ── PLAYER BAR MOBILE ── */

/* ── SEARCH MODAL MOBILE ── */

/* ── SIGN IN MODAL MOBILE ── */

/* ── GENRE STRIP MOBILE ── */

/* ── ABOUT PAGE MOBILE ── */

/* ── ANIME PAGE MOBILE ── */

/* ── LIVE MUSIC PAGE MOBILE ── */

/* ── CHARTS PAGE MOBILE ── */

/* ── FOOTER MOBILE ── */

/* ── SIDEBAR MOBILE ── */

/* ── NP PROGRESS BAR ── */
.np-progress { height: 3px; background: var(--surface2); border-radius: 2px; margin: 8px 0; overflow: hidden; }
.np-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  animation: np-flow 4s linear infinite;
}
@keyframes np-flow {
  from { width: 0%; margin-left: 0 }
  to   { width: 100%; }
}

/* ── MOBILE BOTTOM NAV ADJUSTMENTS ── */

/* ── LEGAL PAGE MOBILE ── */

/* ── ARG CARD RESPONSIVE ── */
.arg-card {
  background: var(--surface);
  border: 1px solid rgba(200,71,42,0.2);
  border-radius: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.arg-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,71,42,0.04), transparent);
}
.arg-card-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: rgba(200,71,42,0.5);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.arg-freq {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}
.arg-status {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  color: var(--text3);
  line-height: 1.9;
  margin-bottom: 12px;
}
.arg-broken-bar {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 4px;
  color: rgba(200,71,42,0.4);
  text-align: center;
  padding: 6px;
  border: 1px solid rgba(200,71,42,0.1);
  border-radius: 5px;
  animation: flicker-text 3s step-end infinite;
}
@keyframes flicker-text {
  0%, 90%, 100% { opacity: 1; }
  91%, 92%, 93%, 94% { opacity: 0.3; }
}
.redacted {
  background: var(--text);
  color: transparent;
  border-radius: 2px;
  transition: all 0.3s;
  cursor: default;
}
.redacted:hover {
  background: transparent;
  color: var(--accent);
}

/* ── FAVORITES PAGE ── */
#page-favorites {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}
#page-favorites h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 5px;
}

/* ── BROADCAST STATUS BAR MOBILE ── */

/* ── SCROLL TOP BUTTON MOBILE ── */

/* ── GENRE CARDS GRID MOBILE ── */

/* ── FEATURED CARD ARG VARIANT ── */
.featured-card--arg {
  border-color: rgba(200,71,42,0.2) !important;
  background: linear-gradient(135deg, var(--surface), rgba(200,71,42,0.03)) !important;
}
.featured-card--arg:hover {
  border-color: rgba(200,71,42,0.4) !important;
  box-shadow: 0 12px 32px rgba(200,71,42,0.08) !important;
}
.fc-listeners--warn { color: var(--accent) !important; opacity: 0.7; }
.fc-name--warn { color: var(--accent) !important; letter-spacing: 0.5px; }
.fc-meta--warn { color: rgba(200,71,42,0.5) !important; }
.fc-now--warn {
  background: rgba(200,71,42,0.05) !important;
  color: rgba(200,71,42,0.6) !important;
  border: 1px solid rgba(200,71,42,0.1);
}
.signal-ring { animation: signal-pulse 2s ease-in-out infinite; }
.signal-ring.r2 { animation-delay: 0.5s; }
@keyframes signal-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── LIVEMUSIC GRID MOBILE ── */

/* ── PODCAST GRID MOBILE ── */

/* ── HORROR OVERLAYS MOBILE ── */

/* ── SECTION HEADER MOBILE ── */

/* ── GLOBAL TOUCH TARGETS ── */

/* ── STATION TABLE SWIPE SCROLL ── */

/* ── ANIME IMAGE STRIP MOBILE ── */

/* ── NP WAVE MOBILE ── */

/* ── MINI-PLAYER (P2.1 — STICKY MOBILE PLAYER) ── */

/* ─── Touch target minimum sizes (48px per WCAG 2.5.5) ─────────────────── */

/* ─── CRITICAL: Prevent horizontal overflow on mobile ──────────────────── */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* ─── iOS Safari scroll fix — prevents body scroll lock after player bar appears ── */
html {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}
.page-wrap {
  -webkit-overflow-scrolling: touch;
}
/* Prevent iOS momentum scroll from getting stuck when fixed elements added/removed */
body:not(.mobile-menu-open) {
  -webkit-overflow-scrolling: touch;
}


/* Fix terminal overlays on mobile */

/* ═══════════════════════════════════════════════════════
   WNCORE MOBILE — COMPREHENSIVE FIX PASS
   Addresses layout, readability, spacing, player UX
   on all mobile screens (≤768px primary, ≤480px secondary)
═══════════════════════════════════════════════════════ */

/* ── 1. PLAYER BAR — mobile layout overhaul ── */

/* ── 2. GLOBE SECTION — better mobile hero ── */

/* ── 3. FEATURED CARDS — better proportions on mobile ── */

/* ── 4. SECTION HEADERS — tighten spacing ── */

/* ── 5. REC CARDS — properly sized on small screens ── */

/* ── 6. TRENDING ITEMS — more breathing room ── */

/* ── 7. STATION TABLE — better mobile reading ── */

/* ── 8. LIVE MUSIC PAGE — hero and channel strip ── */


/* ── 9. ANIME PAGE — hero banner and station grid ── */

/* ── 10. GENRE STRIP — horizontal scroll, no wrapping ── */

/* ── 11. SEARCH MODAL — full-screen on mobile ── */

/* ── 12. MODALS — slide up from bottom on mobile ── */

/* ── 13. FOOTER — tighter and padded for player+nav ── */

/* ── 14. BOTTOM NAV — ensure it's always above player ── */

/* ── 15. HEADER MOBILE — logo + hamburger only ── */

/* ── 16. PAGE WRAP — consistent safe area padding ── */

/* ── 17. SIDEBAR CARDS — horizontal scroll when shown ── */

/* ── 18. PODCAST GRID ── */

/* ── 19. ABOUT PAGE ── */

/* ── 20. TICKER — more legible on small screens ── */

/* ── 21. PREVENT ALL HORIZONTAL OVERFLOW ── */

/* ── 22. MOBILE MENU DRAWER — ensure full-width proper ── */

/* ── 23. SAFE AREA INSETS (notch/home indicator support) ── */

/* ═══════════════════════════════════════════════════════
   WNCORE MOBILE — UX OVERHAUL PASS
   Fixes: menu cutoff, chat widget position, overall
   breathing room / open feel (TuneIn/iHeart reference)
═══════════════════════════════════════════════════════ */

/* ── FIX: Header must never clip the hamburger button ── */

/* ── FIX: Chat widget — proper mobile positioning ── */
/* On mobile the stack from bottom is:
   safe-area → player bar (68px) → bottom nav (54px)
   Chat button should sit just above that stack        */

/* ── BREATHING ROOM: Open, spacious mobile layout ── */

/* ── Small phones (≤480px): tighter but still open ── */

/* ── Mobile nav drawer: breathe ── */
/* Header responsive rules → style.css fluid adaptive system */

@media (max-width: 768px) {
  .globe-section { height: 260px; }
  .globe-overlay-left {
    width: 100%;
    background: linear-gradient(to bottom, rgba(3,7,18,0.9) 60%, transparent);
    padding: 20px 16px;
    justify-content: flex-end;
  }
  .globe-title { font-size: 1.5rem; }
  .globe-sub { font-size: 0.72rem; }
  .globe-stats { gap: 14px; }
  .globe-stat-num { font-size: 1.1rem; }
}
@media (max-width: 768px) {
  .page-wrap {
    grid-template-columns: 1fr;
    padding: 16px 12px;
    gap: 20px;
  }
  .sidebar { order: -1; }
}

@media (max-width: 480px) {
  .rec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .st-country, .st-bitrate, .st-num { display: none; }
  .station-table td { padding: 10px 4px; }
  .st-name { font-size: 0.82rem; }
}
@media (max-width: 768px) {
  .player-bar { height: var(--player-h); padding: 0 12px; }
  .pb-right { display: none; }
  .pb-center { flex: 1; }
  .pb-station { max-width: 120px; }
  .pb-name { font-size: 0.72rem; }
  .pb-meta { font-size: 0.58rem; }
  .pb-controls { gap: 8px; }
  .pb-btn { width: 28px; height: 28px; min-height: 48px; min-width: 48px; }
  .pb-play { width: 48px; height: 48px; min-height: 48px; min-width: 48px; }
}
@media (max-width: 600px) {
  .search-modal-backdrop { padding: 60px 10px 10px; align-items: flex-start; }
  .search-box { border-radius: 12px; }
  .search-results { max-height: 280px; }
}
@media (max-width: 480px) {
  .modal-box { padding: 24px 18px; border-radius: 16px 16px 0 0; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-oauth { flex-direction: column; gap: 8px; }
  .oauth-btn { width: 100%; }
}
@media (max-width: 768px) {
  .genre-strip { padding: 0 12px; }
  .genre-btn { padding: 6px 12px; font-size: 0.7rem; }
}
@media (max-width: 768px) {
  .about-wrap { padding: 32px 16px 100px; }
  .about-title { font-size: 1.7rem; }
}
@media (max-width: 768px) {
  .anime-stations-grid { grid-template-columns: repeat(2,1fr); }
  .anime-banner { height: 160px; }
  .anime-banner-title { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  .anime-stations-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .lm-grid { grid-template-columns: 1fr !important; }
  .lm-hero {
    padding: 32px 16px;
    /* FIX: Remove overflow:hidden on mobile so stacked hero content isn't clipped.
       The decorative bg/video are position:absolute with pointer-events:none so
       they don't cause layout issues without overflow:hidden. */
    overflow: visible;
    /* Let height grow naturally to fit all stacked content */
    min-height: unset;
    height: auto;
  }
  .lm-hero-title { font-size: 2rem; }
  .lm-hero-stats { gap: 12px; }
  .lm-now-playing-card { flex-direction: column; align-items: flex-start; }
  .lm-np-vinyl { width: 70px; height: 70px; }
  /* FIX: Ensure content is not hidden behind the fixed player bar + mobile bottom nav */
  .lm-wrap { padding-bottom: calc(var(--player-h) + 56px + 24px); }
}
@media (max-width: 768px) {
  #page-charts > div, #page-genres > div, #page-podcasts > div { padding: 32px 16px 100px; }
}
@media (max-width: 768px) {
  .wncore-footer { padding-bottom: calc(var(--player-h) + 56px + 8px); }
  .wncore-footer-inner { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .wncore-footer-brand { grid-column: 1 / -1; }
  .footer-tagline { font-size: 0.72rem; }
}
@media (max-width: 400px) {
  .wncore-footer-inner { grid-template-columns: 1fr !important; }
}
@media (max-width: 768px) {
  .sidebar { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .sidebar-card { flex: 1 1 280px; }
  .arg-card { flex: 1 1 100%; }
}
@media (max-width: 768px) {
  body {  }
  .mobile-bottom-nav {
    bottom: var(--player-h);
    border-top: 1px solid var(--border);
    z-index: 481;
  }
}
@media (max-width: 600px) {
  .legal-wrap { padding: 48px 14px 100px; }
  .legal-title { font-size: 1.5rem; }
  .legal-nav { gap: 6px; }
  .legal-nav-btn { padding: 5px 10px; font-size: 0.7rem; }
  .legal-table { font-size: 0.72rem; }
}
@media (max-width: 768px) {
  .broadcast-status-bar {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: calc(var(--player-h) + 56px + 12px);
    right: 12px;
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 480px) {
  #genre-cards-grid { grid-template-columns: repeat(2,1fr) !important; gap: 8px !important; }
}
@media (max-width: 900px) {
  .lm-grid { grid-template-columns: repeat(2,1fr) !important; }
}
@media (max-width: 480px) {
  .lm-grid { grid-template-columns: 1fr !important; }
  .lm-channel-bar { padding: 10px 12px; gap: 6px; }
  .lm-ch-btn { padding: 5px 10px; font-size: 0.7rem; }
}
@media (max-width: 600px) {
  #podcast-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .horror-terminal { font-size: 0.72rem; }
  .eye-wrapper { width: 280px; height: 200px; }
}
@media (max-width: 480px) {
  .section-hd { margin-bottom: 12px; }
  .section-title { font-size: 1.1rem; }
}
@media (max-width: 768px) {
  .pb-btn, .pb-play, .mbn-btn, .fav-btn, .share-btn, .eq-btn, .scroll-top-btn, .mobile-menu-btn, .search-btn, .sign-in-btn { min-height: 44px; min-width: 44px; }
  .station-row { min-height: 48px; }
  .genre-btn, .search-filter-btn, .lm-ch-btn {
    min-height: 48px;
  }
}
@media (max-width: 768px) {
  .station-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 600px) {
  .anime-img-real { width: 110px; height: 70px; }
}
@media (max-width: 768px) {
  .np-wave { gap: 2px; }
  .np-wave span { width: 2px; }
}
@media (max-width: 768px) {
  .mini-player {
    position: fixed;
    bottom: calc(var(--player-h) + 56px);
    left: 0;
    right: 0;
    height: 48px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid rgba(200,71,42,0.1);
    display: none;
    align-items: center;
    padding: 6px 12px;
    gap: 10px;
    z-index: 480;
    transition: transform 0.2s ease;
  }

  .mini-player[data-visible="true"] {
    display: flex;
  }

  .mini-player-content {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .mini-player-art {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    flex-shrink: 0;
  }

  .mini-player-art img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
  }

  .mini-player-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
  }

  .mini-player-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mini-player-meta {
    font-size: 0.62rem;
    color: var(--text3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mini-player-btn {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    flex-shrink: 0;
    transition: opacity 0.2s;
  }

  .mini-player-btn:hover {
    opacity: 0.8;
  }

  .mini-player-btn:active {
    opacity: 0.6;
  }

  .mini-player-play {
    width: 36px;
    height: 36px;
    background: rgba(200,71,42,0.1);
    border-radius: 5px;
    color: var(--accent);
  }

  .mini-player-play:hover {
    background: rgba(200,71,42,0.15);
  }

  /* Hide mini-player when now-playing page is active */
  #page-np.active ~ .mini-player {
    display: none !important;
  }

  /* Hide broadcast status bar on mobile to save space */
  .broadcast-status-bar {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .nav-btn { min-height: 48px; min-width: 48px; }
  .fav-btn, .share-btn, .eq-btn { min-height: 48px; min-width: 48px; display: inline-flex; align-items: center; justify-content: center; }
  .station-row { min-height: 48px; }
  .genre-chip { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; }
}
@media (max-width: 768px) {
  /* Lock all major containers to viewport width */
  .page-wrap,
  .main-col,
  .sidebar,
  .section-content,
  .station-table-wrap,
  .genre-strip-wrap {
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  /* Tables scroll internally, don't push page */
  .station-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Genre strip scrolls horizontally but clips to viewport */
  .genre-strip-wrap {
    overflow-x: hidden;
  }
  .genre-strip {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .genre-strip::-webkit-scrollbar { display: none; }

  /* Player bar: prevent wide elements from overflowing */
  .player-bar {
    max-width: 100vw;
    box-sizing: border-box;
  }

  /* Header: prevent overflow */
  header, .header-inner {
    max-width: 100vw;
    box-sizing: border-box;
    /* NOTE: do NOT set overflow:hidden here — clips the mobile-menu-btn */
  }

  /* Ticker must not expand page */
  .ticker-wrap {
    max-width: 100vw;
    overflow: hidden;
  }

  /* Globe section clips properly */
  .globe-section {
    overflow: hidden;
    max-width: 100vw;
  }

  /* Any inline-block elements in flex rows that might overflow */
  .rec-grid, .anime-stations-grid {
    width: 100%;
    box-sizing: border-box;
  }
}
@media (max-width: 600px) {
  .horror-terminal {
    width: 96vw !important;
    font-size: 0.7rem !important;
  }
  .horror-terminal-body {
    padding: 14px 16px !important;
    max-height: 60vh !important;
  }
  .corrupt-terminal-box {
    width: 96vw !important;
  }
  .corrupt-terminal-text {
    font-size: 0.68rem !important;
    padding: 14px 16px !important;
    max-height: 55vh !important;
  }
  .horror-chrome-title {
    font-size: 0.4rem !important;
    letter-spacing: 1.5px !important;
  }
  #exit-btn-custom {
    font-size: 0.75rem !important;
    padding: 8px 20px !important;
  }
}
@media (max-width: 768px) {
  .player-bar {
    padding: 0 10px;
    gap: 8px;
    height: var(--player-h);
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }

  /* Station info: art + name/meta, no fixed width */
  .pb-station {
    width: auto;
    flex: 1;
    min-width: 0;
    gap: 8px;
  }

  /* Art stays square */
  .pb-art {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    flex-shrink: 0;
  }

  /* Name truncates properly */
  .pb-name {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .pb-meta {
    font-size: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Center controls — hide on mobile, use pb-controls-mobile instead */
  .pb-center {
    display: none;
  }

  /* Mobile inline player controls — prev / play / next */
  .pb-controls-mobile {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
  }

  .pb-play {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .pb-right {
    display: none;
  }
}
@media (max-width: 480px) {
  .globe-section {
    height: 200px !important;
  }

  .globe-title {
    font-size: 1.3rem !important;
    margin-bottom: 6px;
  }

  .globe-overlay-left {
    padding: 16px 14px 12px !important;
  }

  .globe-stats {
    gap: 10px !important;
    flex-wrap: nowrap;
  }

  .globe-stat-num {
    font-size: 1rem;
  }

  .globe-stat-label {
    font-size: 0.58rem;
  }
}

@media (max-width: 480px) {
  .section-hd {
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .section-title {
    font-size: 1.05rem !important;
  }
}
@media (max-width: 480px) {
  .rec-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 7px;
  }

  .rec-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 11px;
    gap: 6px;
    min-height: 0;
  }

  .rec-card-art {
    width: 32px;
    height: 32px;
  }
}
@media (max-width: 480px) {
  .trending-item {
    padding: 10px 0;
    gap: 8px;
  }

  .tr-rank {
    font-size: 0.68rem;
    min-width: 16px;
  }

  .tr-name {
    font-size: 0.75rem;
  }

  .tr-meta {
    font-size: 0.6rem;
  }

  .tr-listeners {
    font-size: 0.62rem;
  }
}
@media (max-width: 480px) {
  .station-table {
    font-size: 0.72rem;
  }

  .station-table td {
    padding: 10px 4px;
  }

  .st-tags {
    display: none;
  }

  /* Favorite button always visible and tappable */
  .fav-btn {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
@media (max-width: 768px) {
  .lm-hero {
    padding: 28px 16px 24px !important;
    min-height: unset !important;
    height: auto !important;
  }

  .lm-hero-title {
    font-size: 1.9rem !important;
    line-height: 1.1;
  }

  .lm-hero-stats {
    gap: 20px !important;
    flex-wrap: wrap;
  }

  .lm-channel-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 10px 14px;
  }

  .lm-channel-bar::-webkit-scrollbar {
    display: none;
  }

  .lm-ch-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 0.72rem;
    min-height: 38px;
    white-space: nowrap;
  }

  .lm-now-playing-card {
    flex-direction: row !important;
    gap: 14px;
  }

  .lm-np-vinyl {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0;
  }

  .lm-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }
}
@media (max-width: 480px) {
  .lm-hero-title {
    font-size: 1.6rem !important;
  }

  .lm-grid {
    grid-template-columns: 1fr !important;
  }

  .lm-card-stations-count {
    font-size: 0.65rem;
  }
}
@media (max-width: 480px) {
  .anime-banner {
    height: 140px !important;
  }

  .anime-banner-title {
    font-size: 1.3rem !important;
  }

  .anime-stations-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 7px;
  }
}
@media (max-width: 768px) {
  .genre-strip {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px 6px !important;
    scrollbar-width: none;
    gap: 6px;
  }

  .genre-strip::-webkit-scrollbar { display: none; }

  .genre-btn {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 36px;
    padding: 5px 14px;
    font-size: 0.72rem;
  }
}
@media (max-width: 480px) {
  .search-modal-backdrop {
    padding: 0 !important;
    align-items: flex-start !important;
  }

  .search-box {
    border-radius: 0 0 12px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
  }

  .search-input {
    font-size: 1rem !important;
    padding: 16px 14px !important;
  }

  .search-results {
    max-height: 60vh !important;
  }
}
@media (max-width: 480px) {
  .modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal-box {
    border-radius: 18px 18px 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 18px 32px !important;
  }
}
@media (max-width: 480px) {
  .wncore-footer {
    padding-bottom: calc(var(--player-h) + 56px + 12px) !important;
  }

  .wncore-footer-inner {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .footer-tagline {
    font-size: 0.68rem;
  }
}
@media (max-width: 768px) {
  .mobile-bottom-nav {
    bottom: var(--player-h) !important;
    height: 54px;
  }

  .mbn-btn {
    font-size: 0.55rem;
    gap: 2px;
  }

  .mbn-btn svg {
    width: 20px;
    height: 20px;
  }
}
@media (max-width: 480px) {
  .header-inner {
    padding: 0 12px;
  }

  .logo-mark {
    font-size: 1.05rem !important;
  }

  header {
    height: 52px;
  }
}
@media (max-width: 480px) {
  .page-wrap {
    padding: 16px 12px !important;
    gap: 18px !important;
  }
}
@media (max-width: 768px) {
  /* ARG card shown in main flow */
  .arg-card {
    border-radius: 12px;
    padding: 16px;
  }

  .arg-freq {
    font-size: 2rem;
  }

  .arg-status {
    font-size: 0.6rem;
  }
}
@media (max-width: 480px) {
  #podcast-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}
@media (max-width: 480px) {
  .about-wrap {
    padding: 24px 14px 100px !important;
  }

  .about-title {
    font-size: 1.5rem !important;
  }
}
@media (max-width: 360px) {
  .ticker-inner {
    font-size: 0.5rem;
  }

  .ticker-wrap {
    height: 22px;
  }
}
@media (max-width: 768px) {
  * {
    max-width: 100%;
  }

  img, video, iframe, embed, object {
    max-width: 100% !important;
    height: auto;
  }
}
@media (max-width: 768px) {
  .mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 600;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-nav-inner {
    padding: 16px 16px calc(var(--player-h) + 56px + 16px);
  }
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .player-bar {
    padding-bottom: calc(env(safe-area-inset-bottom));
    height: calc(var(--player-h) + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    bottom: calc(var(--player-h) + env(safe-area-inset-bottom)) !important;
  }

  .wncore-footer {
    padding-bottom: calc(var(--player-h) + 56px + env(safe-area-inset-bottom) + 8px) !important;
  }
}
@media (max-width: 768px) {
  header {
    overflow: visible !important;
  }
  .header-inner {
    overflow: visible !important;
    /* Give the menu button room to breathe */
    padding-right: 14px !important;
  }
  /* Ensure hamburger is always fully visible and tappable */
  .mobile-menu-btn {
    flex-shrink: 0 !important;
    margin-left: auto;
    overflow: visible !important;
    position: relative;
    z-index: 501;
  }
}
@media (max-width: 768px) {
  #wnc-chat-btn {
    bottom: calc(var(--player-h, 68px) + 54px + 14px) !important;
    right: 14px !important;
    width: 46px !important;
    height: 46px !important;
  }
  #wnc-chat-panel {
    bottom: calc(var(--player-h, 68px) + 54px + 70px) !important;
    right: 10px !important;
    width: calc(100vw - 20px) !important;
    max-width: 380px !important;
    height: min(480px, calc(100dvh - var(--player-h, 68px) - 54px - 80px)) !important;
    border-radius: 16px !important;
  }
}
@media (max-width: 768px) {
  /* Hero globe: taller, less cramped */
  .globe-section {
    height: 280px !important;
  }

  /* Stats row: generous spacing */
  .globe-stats {
    gap: 20px !important;
    margin-top: 10px;
  }

  /* Page content: more padding so content doesn't feel wall-to-wall */
  .page-wrap {
    padding: 20px 16px !important;
    gap: 28px !important;
  }

  /* Section headers: more vertical breathing */
  .section-hd {
    margin-bottom: 16px !important;
    margin-top: 8px;
  }

  /* Station table rows: taller, easier to tap */
  .station-row {
    min-height: 54px !important;
  }

  /* Trending items: cleaner spacing */
  .trending-item {
    padding: 12px 0 !important;
  }

  /* Sidebar/arg card: compact but not claustrophobic */
  .arg-card {
    padding: 20px !important;
    border-radius: 14px !important;
  }

  /* Genre strip: visible, scrollable, not wrapping */
  .genre-strip {
    padding-top: 2px !important;
    padding-bottom: 8px !important;
  }
}
@media (max-width: 480px) {
  .globe-section {
    height: 240px !important;
  }

  .globe-title {
    font-size: 1.4rem !important;
  }

  .page-wrap {
    padding: 16px 14px !important;
    gap: 22px !important;
  }

  /* Rec grid: 2-col feels open enough */
  .rec-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  /* Station table: more row padding */
  .station-table td {
    padding: 12px 6px !important;
  }
}
@media (max-width: 768px) {
  .mobile-nav {
    /* top: var(--header-h) set in style.css — nav starts below header, no overlap */
    padding-top: 12px !important;
    padding-bottom: calc(var(--player-h, 68px) + 56px + env(safe-area-inset-bottom, 0px) + 12px) !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    gap: 4px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    box-sizing: border-box !important;
  }
  .mobile-nav a,
  .mobile-nav button {
    padding: 14px 16px !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    min-height: 52px;
  }
}
/* ── FROM horror_upgrade.css (mobile) ────────────────────────────────── */
@media (max-width: 768px) {
  .globe-section {
    position: relative;
    overflow: hidden;
    min-height: 260px !important;
    max-height: 340px;
  }
  
  .globe-overlay-left {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px !important;
    background: linear-gradient(to top, rgba(3,7,18,0.92) 40%, rgba(3,7,18,0.5) 70%, transparent) !important;
    width: 100% !important;
  }
  
  .globe-title {
    font-size: 1.6rem !important;
    line-height: 1.15 !important;
    margin-bottom: 6px !important;
  }
  
  .globe-sub {
    font-size: 0.7rem !important;
    max-width: 100% !important;
    margin-bottom: 12px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .globe-stats {
    gap: 16px !important;
    flex-wrap: wrap;
    margin-bottom: 0 !important;
  }
  
  .globe-stat-num { font-size: 1.15rem !important; }
  .globe-stat-lbl { font-size: 0.58rem !important; }
  
  .globe-kicker {
    display: none;
  }

  /* Main col padding */
  .main-col {
    padding: 0 !important;
  }

  /* Sidebar comes before main content on mobile — style it better */
  .sidebar {
    order: 2 !important;
  }
  .main-col {
    order: 1 !important;
  }
  
  /* Rec grid 2 columns on mobile */
  .rec-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Section hd font size */
  .section-title {
    font-size: 1.1rem !important;
  }

  /* Hide genre strip scrollbar on mobile */
  .genre-strip-wrap {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .genre-strip-wrap::-webkit-scrollbar { display: none; }
  
  /* Horror terminal on mobile */
  .horror-terminal {
    font-size: 0.72rem !important;
  }
  .horror-terminal-body {
    padding: 16px 18px 20px !important;
  }
  
  /* Share button visible on mobile player */
  .pb-share-btn {
    display: flex !important;
  }
}
@media (max-width: 480px) {
  .globe-title { font-size: 1.3rem !important; }
  .globe-sub { display: none; }
  
  /* Rec grid single col on small phones */
  .rec-grid {
    grid-template-columns: 1fr !important;
  }

  /* Player bar name truncation */
  .pb-name {
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .horror-terminal-chrome {
    padding: 8px 12px;
  }
  .horror-chrome-title {
    display: none;
  }
}
/* ── FROM p5-transitions.css (mobile) ────────────────────────────────── */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    border-top: 1px solid rgba(200, 71, 42, 0.3) !important;
    box-shadow: 0 -1px 0 rgba(200, 71, 42, 0.08),
                0 -8px 20px rgba(0, 0, 0, 0.2);
  }

  .mbn-btn.active {
    color: var(--text);
  }

  .mbn-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) skewX(-10deg);
    width: 24px;
    height: 2px;
    background: #c8472a;
    border-radius: 0 0 2px 2px;
    animation: p5TabSlash 160ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  @keyframes p5TabSlash {
    from { width: 0; opacity: 0; }
    to   { width: 24px; opacity: 1; }
  }

  .mbn-btn {
    position: relative;
  }

  .mbn-btn::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 8px;
    background: rgba(200, 71, 42, 0.15);
    opacity: 0;
    transform: scale(0.4);
    pointer-events: none;
  }

  .mbn-btn.p5-tap::after {
    animation: p5BtnTap 260ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  @keyframes p5BtnTap {
    0%   { opacity: 1; transform: scale(0.4); }
    100% { opacity: 0; transform: scale(1.3); }
  }

  .genre-strip-wrap {
    position: sticky;
    top: var(--header-h);
    z-index: 200;
    background: var(--bg);
  }

  body.dark-mode .genre-strip-wrap {
    background: var(--bg);
  }
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    .mobile-bottom-nav {
      padding-bottom: env(safe-area-inset-bottom);
      height: calc(56px + env(safe-area-inset-bottom));
    }
  }
}
/* ── FROM wncore-bugfix.css (mobile fixes) ───────────────────────────── */
@media (max-width: 768px) {
  #wnc-chat-btn {
    bottom: calc(var(--player-h, 76px) + 56px + 12px) !important;
    right: 14px !important;
  }

  #wnc-chat-panel {
    bottom: calc(var(--player-h, 76px) + 56px + 66px) !important;
    right: 14px !important;
    /* Constrain height so it doesn't go above header */
    max-height: calc(100dvh - var(--header-h, 56px) - var(--player-h, 76px) - 56px - 80px) !important;
  }
}
@media (max-width: 768px) {
  #bgplay-banner {
    bottom: calc(var(--player-h, 76px) + 56px + 10px) !important;
  }
}
@media (max-width: 768px) {
  /* The swipe hint is appended to body with inline style — override
     via attribute selector on the style content isn't possible,
     so we target it by its unique text positioning characteristics.
     It has no class/id, so we patch it in JS (wncore-bugfix.js).  */
}
@media (max-width: 768px) {
  .wncore-toast {
    bottom: calc(var(--player-h, 76px) + 56px + 12px) !important;
  }
}
@media (max-width: 768px) {
  .toast-container {
    bottom: calc(var(--player-h, 76px) + 56px + 16px) !important;
    left: 12px !important;
  }
}
@media (max-width: 768px) {
  #globe-container {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -1 !important;
  }
}
@media (max-width: 768px) {
  #wnc-chat-panel:not(.open) {
    transform: translateY(110%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  #wnc-chat-panel.open {
    transform: translateY(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}
@media (max-width: 768px) {
  #wncore-mini-widget {
    bottom: calc(var(--player-h, 76px) + 56px + 8px) !important;
    /* Prevent it from being dragged under the bottom nav */
    max-height: calc(100dvh - var(--header-h, 56px) - var(--player-h, 76px) - 56px - 16px);
  }
}
@media (max-width: 768px) {
  .station-modal-panel,
  #station-modal {
    max-height: calc(100dvh - var(--header-h, 56px) - var(--player-h, 76px) - 56px) !important;
    bottom: calc(var(--player-h, 76px) + 56px) !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 768px) {
  #similar-panel {
    bottom: calc(var(--player-h, 76px) + 56px) !important;
    max-height: calc(60dvh) !important;
  }
}
@media (max-width: 768px) {
  #eq-panel {
    bottom: calc(var(--player-h, 76px) + 56px) !important;
  }
}
@media (max-width: 768px) {
  #ambient-panel {
    bottom: calc(var(--player-h, 76px) + 56px) !important;
  }
}
@media (max-width: 768px) {
  #theme-panel {
    bottom: calc(var(--player-h, 76px) + 56px) !important;
  }
}
@media (max-width: 768px) {
  #scrobble-panel {
    bottom: calc(var(--player-h, 76px) + 56px) !important;
  }
}
/* ── FROM wncore-mobile-fix.css ──────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════════════
   WNCORE — COMPREHENSIVE MOBILE FIX
   File: wncore-mobile-fix.css
   Load last (after p5-transitions.css)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── CONSTELLATION CANVAS ────────────────────────────────────────── */
/* Default hidden; JS creates and shows it on mobile only */
#wnc-constellation {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}


/* ── BODY: bottom clearance for player + bottom nav ─────────────── */

/* ── HEADER: full-width, no overflow ────────────────────────────── */

/* ── GENRE STRIP: horizontal scroll, no wrapping ─────────────────── */

/* ── STATION TABLE ───────────────────────────────────────────────── */

/* ── PAGE CONTENT: no horizontal overflow ────────────────────────── */

/* ── TOUCH TARGETS: 44px minimum ─────────────────────────────────── */

/* ── MOBILE NAV DRAWER: safe-area aware ──────────────────────────── */

/* ── TICKER ──────────────────────────────────────────────────────── */

/* ── FEATURED CARDS: single column on small screens ─────────────── */

/* ── RECOMMENDATIONS GRID: 2-col ─────────────────────────────────── */

/* ── SEARCH MODAL ────────────────────────────────────────────────── */

/* ── PLAYER BAR: safe area ───────────────────────────────────────── */

/* ── LIVE MUSIC + FOOTER: clear bottom controls ──────────────────── */

/* ── TYPOGRAPHY ──────────────────────────────────────────────────── */

@media (max-width: 768px) {
  #wnc-constellation {
    display: block;
  }

  /* Hide WebGL globe on mobile — replaced by constellation */
  #globe-container {
    display: none !important;
  }

  .globe-section {
    height: 300px !important;
  }

  /* Full-width overlay: text gradient from bottom */
  .globe-overlay-left {
    width: 100% !important;
    background: linear-gradient(
      to top,
      rgba(3, 7, 18, 0.97) 0%,
      rgba(3, 7, 18, 0.6) 55%,
      transparent 100%
    ) !important;
    justify-content: flex-end !important;
    padding: 16px 16px 18px !important;
    pointer-events: none;
    z-index: 5;
  }

  .globe-hint {
    display: none !important;
  }

  /* Fixed: single display value — use -webkit-box for line clamping */
  .globe-sub {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.7rem !important;
    margin-bottom: 10px !important;
  }
}
@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--player-h) + 56px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
@media (max-width: 768px) {
  header {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow: hidden;
  }

  .header-inner {
    padding: 0 14px;
    gap: 10px;
  }
}
@media (max-width: 768px) {
  .genre-strip-wrap {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow: hidden;
  }

  .genre-strip {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 6px !important;
    padding: 8px 14px !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .genre-strip::-webkit-scrollbar {
    display: none;
  }

  .genre-btn {
    flex-shrink: 0 !important;
    scroll-snap-align: start;
    white-space: nowrap;
    font-size: 0.72rem !important;
    padding: 6px 12px !important;
    min-height: 36px;
  }
}
@media (max-width: 768px) {
  .station-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100vw;
  }

  .station-table .col-country,
  .station-table .col-bitrate,
  .station-table .st-country,
  .station-table .st-bitrate,
  .station-table th:nth-child(5),
  .station-table td:nth-child(5),
  .station-table th:nth-child(6),
  .station-table td:nth-child(6) {
    display: none !important;
  }

  .station-table td {
    padding: 10px 8px !important;
    font-size: 0.78rem !important;
  }

  .station-row {
    min-height: 52px !important;
  }

  .play-btn {
    min-width: 36px;
    min-height: 36px;
  }
}
@media (max-width: 768px) {
  .page-wrap {
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
}
@media (max-width: 768px) {
  .fav-btn,
  .share-btn,
  .play-btn,
  .mobile-menu-btn,
  .scroll-top-btn,
  .mbn-btn {
    min-height: 44px;
    min-width: 44px;
  }
}
/* mobile-nav bottom removed — full-screen via top:0/bottom:0 in style.css, padding in mobile.css above */
@media (max-width: 768px) {
  .ticker-wrap {
    max-width: 100vw;
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .rec-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}
@media (max-width: 768px) {
  .search-modal {
    padding: 12px !important;
  }

  .search-box {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 12px !important;
  }

  .search-results {
    max-height: 60vh !important;
  }
}
@media (max-width: 768px) {
  .player-bar {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(var(--player-h) + env(safe-area-inset-bottom, 0px)) !important;
  }
}
@media (max-width: 768px) {
  .lm-wrap {
    padding-bottom: calc(var(--player-h) + 56px + 24px) !important;
  }

  .wncore-footer {
    padding-bottom: calc(var(--player-h) + 56px + 8px) !important;
    margin-bottom: 0 !important;
  }
}
@media (max-width: 480px) {
  .section-title,
  .page-title {
    font-size: 1.4rem !important;
  }
}
/* ── FROM wncore-mobile-breathing.css ────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════════
   WNCORE — MOBILE BREATHING ROOM
   Load LAST in <head>, after wncore-ui-improvements.css
   Inspired by iOS/Android music player spatial conventions:
   — generous thumb zones (min 48px)
   — card-based layouts with clear gutters
   — layered bottom sheet feel for the player
   — content never touches screen edges
   ═══════════════════════════════════════════════════════════════════ */

/* ─── ROOT: more comfortable baseline on small screens ──────────── */

/* ─── PAGE WRAP: more comfortable padding ────────────────────────── */

/* ─── SECTION HEADERS: more room above ──────────────────────────── */

/* ─── FEATURED CARDS: proper card height + breathing ────────────── */

/* ─── REC CARDS ──────────────────────────────────────────────────── */

/* ─── STATION TABLE: roomier rows ───────────────────────────────── */

/* ─── PLAYER BAR: iOS/Android inspired layered feel ─────────────── */

/* ─── MOBILE BOTTOM NAV: iOS home-bar safety ────────────────────── */

/* ─── SIDEBAR ON MOBILE: card grid feel ─────────────────────────── */

/* ─── GENRE STRIP: bigger pills ─────────────────────────────────── */

/* ─── SEARCH MODAL: bottom-sheet feel ───────────────────────────── */

/* ─── TRENDING ITEMS: more room ─────────────────────────────────── */

/* ─── SECTION: consistent top spacing ───────────────────────────── */

/* ─── LIVE MUSIC HERO ────────────────────────────────────────────── */

/* ─── ABOUT PAGE ─────────────────────────────────────────────────── */

/* ─── FAVORITES PAGE ─────────────────────────────────────────────── */

/* ─── CHARTS / GENRES / PODCASTS ─────────────────────────────────── */

/* ─── SIGN IN MODAL: full bottom sheet ──────────────────────────── */

/* ─── GLOBE SECTION: taller on mobile ───────────────────────────── */

/* ─── FOOTER: safe area bottom ──────────────────────────────────── */

/* ─── TOAST: safe position on all phones ────────────────────────── */

/* ─── SCROLLING: momentum + no tap delay ────────────────────────── */
* {
  -webkit-tap-highlight-color: transparent;
}
.page, .page-wrap, .search-results, .genre-strip, #fav-grid {
  -webkit-overflow-scrolling: touch;
}

/* ─── PREVENT LAYOUT SHIFT DURING FONT LOAD ─────────────────────── */

/* ─── AI CHAT WIDGET: clear player bar + bottom nav ─────────────── */
/* wncore-upgrades.js hardcodes bottom:100px (btn) and bottom:154px
   (panel) via an injected <style> tag. On mobile those values put
   both elements behind the player bar (72px) + bottom nav (56px).
   This file loads last so !important wins over everything.         */

/* ─── HEADER: prevent hamburger clipping ────────────────────────── */
/* header has fixed height + no overflow set, so flex children can
   get clipped if header-right is too wide. Fix:
   1. overflow:visible so nothing gets cut
   2. hide space-hungry items that mobile.css might miss
   3. tighten header-right gap                                      */

/* Even tighter on very small phones */

/* ─── MINI PLAYER: hide until playing ───────────────────────────── */
/* Both mini player variants start hidden. JS patch below controls
   visibility. This ensures neither shows in "standby" state.       */
.mini-player {
  display: none !important;
}
/* Block ALL show states unless .playing-visible is set by our JS */
.mini-player.visible:not(.playing-visible) {
  display: none !important;
}
.mini-player[data-visible="true"]:not(.playing-visible) {
  display: none !important;
}
.mini-player.playing-visible {
  display: flex !important;
}

/* ─── BOTTOM NAV: always pinned like YouTube ────────────────────── */

/* ─── MINI PLAYER: sits above bottom nav, below nothing ─────────── */

/* ─── HEADER: prevent backdrop-filter dark bleed in light mode ───── */
/* lm-hero and other dark sections have background:#0a0a0c which
   bleeds through the semi-transparent header backdrop-filter.
   Force solid enough background on mobile so it never looks dark
   in light mode regardless of what's scrolled behind it.           */

/* ─── PLAYER BAR: hidden until playing on mobile ────────────────── */
/* On mobile the player bar is hidden by default and slides up when
   audio starts playing. Once shown it stays until page reload —
   same pattern as Spotify/Apple Music mobile.
   JS in wncore-mobile-freeze-fix.js handles the .pb-active class. */

@media (max-width: 768px) {
  
}
@media (max-width: 400px) {
  
}
@media (max-width: 768px) {
  .page-wrap {
    padding: 20px var(--mobile-gutter) !important;
    gap: var(--mobile-section-gap) !important;
  }
}
@media (max-width: 768px) {
  .section-header {
    margin-bottom: 14px !important;
    padding: 0 2px;
  }
  .section-title {
    font-size: 1rem !important;
    letter-spacing: 0.02em;
  }
}

@media (max-width: 768px) {
  .rec-grid {
    gap: var(--mobile-card-gap) !important;
  }
  .rec-card {
    padding: 14px 14px 16px !important;
    border-radius: 12px !important;
  }
  .rc-name { font-size: 0.82rem !important; }
  .rc-meta { font-size: 0.65rem !important; }
}
@media (max-width: 768px) {
  .station-table td {
    padding: 13px 6px !important;
  }
  .station-table thead th {
    padding: 8px 6px !important;
    font-size: 0.6rem !important;
    letter-spacing: 1.2px;
  }
  .st-name {
    font-size: 0.84rem !important;
    line-height: 1.35 !important;
  }
  .st-meta {
    font-size: 0.65rem !important;
    margin-top: 2px !important;
  }
  /* Play button: full 48px touch target */
  .st-play-btn {
    min-width: 48px !important;
    min-height: 48px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}
@media (max-width: 768px) {
  .player-bar {
    /* Slightly taller for comfortable thumb reach */
    --player-h: 72px;
    padding: 0 16px !important;
    border-radius: 20px 20px 0 0 !important;
    /* Subtle top border arc effect */
    border-top: 1.5px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.25) !important;
  }
  body:not(.dark-mode) .player-bar {
    border-top: 1.5px solid rgba(0,0,0,0.07) !important;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.1) !important;
  }

  /* Drag handle pill — like iOS lock screen player */
  .player-bar::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: rgba(255,255,255,0.18);
    border-radius: 3px;
    pointer-events: none;
  }
  body:not(.dark-mode) .player-bar::before {
    background: rgba(0,0,0,0.12);
  }

  /* Art: slightly bigger on mobile */
  .pb-art {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }
  .pb-art img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 10px !important;
  }

  /* Station info: more room */
  .pb-station {
    max-width: calc(100vw - 200px) !important;
    overflow: hidden;
  }
  .pb-name {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
  }
  .pb-meta {
    font-size: 0.6rem !important;
    margin-top: 2px !important;
    opacity: 0.7;
  }

  /* Controls: comfortable spacing */
  .pb-controls {
    gap: 4px !important;
  }
  .pb-btn {
    padding: 0 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
  }
  .pb-play {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    border-radius: 50% !important;
  }

  /* Progress bar: bigger tap area with pseudo padding */
  .pb-bar-wrap {
    padding: 8px 0 !important;
    cursor: pointer;
  }
  .pb-bar {
    height: 3px !important;
  }
  .pb-bar:active { height: 5px !important; }
}
@media (max-width: 768px) {
  .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .mbn-btn {
    min-height: 48px !important;
    padding: 6px 12px !important;
  }
  /* Active state: cleaner pill indicator */
  .mbn-btn.active {
    color: var(--accent) !important;
  }
  .mbn-btn.active svg {
    filter: drop-shadow(0 0 4px rgba(200,71,42,0.4));
  }
}
@media (max-width: 768px) {
  .sidebar {
    gap: var(--mobile-card-gap) !important;
  }
  .sidebar-card {
    padding: 16px !important;
    border-radius: 14px !important;
  }
  /* NP card: horizontal layout like Spotify mini widget */
  .sidebar-card.np-card {
    display: flex;
    align-items: center;
    gap: 14px;
  }
}
@media (max-width: 768px) {
  .genre-strip {
    padding: 4px var(--mobile-gutter) 8px !important;
    gap: 8px !important;
    /* smooth horizontal scroll */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .genre-strip::-webkit-scrollbar { display: none; }
  .genre-btn {
    padding: 8px 16px !important;
    font-size: 0.72rem !important;
    border-radius: 24px !important;
    scroll-snap-align: start;
    white-space: nowrap;
    min-height: 36px;
    display: flex !important;
    align-items: center !important;
  }
}
@media (max-width: 600px) {
  .search-modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .search-box {
    border-radius: 20px 20px 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85dvh !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px) !important;
    /* drag handle */
    padding-top: 20px !important;
    position: relative;
  }
  .search-box::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
  }
  .search-input-wrap {
    margin: 0 0 12px !important;
  }
  .search-results {
    max-height: calc(85dvh - 120px) !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .search-result-item {
    padding: 14px 16px !important;
    min-height: 56px;
  }
}
@media (max-width: 768px) {
  .trending-item {
    padding: 12px 10px !important;
    border-radius: 10px;
    min-height: 52px;
  }
  .tr-name { font-size: 0.82rem !important; }
  .tr-meta { font-size: 0.65rem !important; }
}
@media (max-width: 768px) {
  .main-col > * + * {
    margin-top: var(--mobile-section-gap);
  }
}
@media (max-width: 768px) {
  .lm-hero {
    padding: 28px var(--mobile-gutter) 32px !important;
  }
  .lm-hero-title {
    font-size: 1.8rem !important;
    line-height: 1.15 !important;
  }
  .lm-ch-btn {
    min-height: 44px !important;
    padding: 10px 18px !important;
    font-size: 0.75rem !important;
  }
  .lm-channels {
    gap: 8px !important;
    flex-wrap: wrap;
  }
}
@media (max-width: 768px) {
  .about-wrap {
    padding: 28px var(--mobile-gutter) 120px !important;
  }
  .about-title {
    font-size: 1.6rem !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
  }
}
@media (max-width: 768px) {
  #page-favorites {
    padding: 24px var(--mobile-gutter) 120px !important;
  }
  #fav-grid {
    gap: var(--mobile-card-gap) !important;
  }
}
@media (max-width: 768px) {
  #page-charts > div,
  #page-genres > div,
  #page-podcasts > div {
    padding: 24px var(--mobile-gutter) 120px !important;
  }
}
@media (max-width: 480px) {
  .modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal-box {
    border-radius: 24px 24px 0 0 !important;
    padding: 28px var(--mobile-gutter) calc(28px + env(safe-area-inset-bottom, 0px)) !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
  }
  .modal-box::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
  }
  .modal-btn {
    min-height: 52px !important;
    border-radius: 14px !important;
    font-size: 0.85rem !important;
  }
  .modal-input {
    min-height: 48px !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    padding: 12px 16px !important;
  }
}
@media (max-width: 768px) {
  .globe-section {
    height: 300px !important;
  }
}
@media (max-width: 768px) {
  .wncore-footer {
    padding-bottom: calc(var(--player-h, 72px) + 56px + env(safe-area-inset-bottom, 0px) + 16px) !important;
  }
}
@media (max-width: 768px) {
  .wncore-toast {
    bottom: calc(var(--player-h, 72px) + 56px + env(safe-area-inset-bottom, 0px) + 14px) !important;
    font-size: 0.68rem !important;
    padding: 10px 20px !important;
    max-width: 85vw !important;
  }
  .toast-container {
    bottom: calc(var(--player-h, 72px) + 56px + env(safe-area-inset-bottom, 0px) + 18px) !important;
  }
}
@media (max-width: 768px) {
  body {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
  }
}
@media (max-width: 768px) {
  /* FAB button: sit above bottom nav */
  #wnc-chat-btn {
    bottom: calc(var(--player-h, 72px) + 56px + 14px) !important;
    right: 14px !important;
    width: 46px !important;
    height: 46px !important;
  }

  /* Panel: full-width bottom-sheet when open */
  #wnc-chat-panel {
    bottom: calc(var(--player-h, 72px) + 56px + env(safe-area-inset-bottom, 0px)) !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    height: calc(100dvh - var(--header-h, 56px) - var(--player-h, 72px) - 56px - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100dvh - var(--header-h, 56px) - var(--player-h, 72px) - 56px - env(safe-area-inset-bottom, 0px)) !important;
    padding-top: 20px !important;
    position: fixed !important;
  }
  /* Drag handle */
  #wnc-chat-panel::before {
    content: '' !important;
    position: absolute !important;
    top: 8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 32px !important;
    height: 3px !important;
    background: var(--border) !important;
    border-radius: 3px !important;
    pointer-events: none !important;
  }

  /* CLOSED: push fully below screen — not just opacity:0 */
  #wnc-chat-panel:not(.open) {
    transform: translateY(110%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 0.28s cubic-bezier(0.4,0,1,1),
                opacity 0.2s ease,
                visibility 0s linear 0.28s !important;
  }

  /* OPEN: slide up smoothly */
  #wnc-chat-panel.open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: transform 0.32s cubic-bezier(0.22,1,0.36,1),
                opacity 0.22s ease,
                visibility 0s linear 0s !important;
  }

  /* Input area: don't get obscured by iOS home bar */
  #wnc-chat-form {
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
}
@media (max-width: 768px) {
  header {
    overflow: visible !important;
  }
  .header-inner {
    overflow: visible !important;
    /* Ensure inner content never exceeds header width */
    min-width: 0;
  }
  .header-right {
    gap: 6px !important;
    flex-shrink: 0;
    overflow: visible !important;
    /* Prevent right side from being pushed off screen */
    min-width: 0;
  }
  /* Hide sign-in button on mobile — it's in the mobile nav drawer */
  .sign-in-btn {
    display: none !important;
  }
  /* Hide theme toggle labels (they are display:none in mobile.css
     but !important ensures nothing re-shows them)                 */
  .theme-toggle-labels {
    display: none !important;
  }
  /* Shrink theme toggle track slightly on mobile */
  .theme-toggle-track {
    width: 44px !important;
    height: 24px !important;
  }
  .theme-toggle-thumb {
    width: 18px !important;
    height: 18px !important;
  }
  body.dark-mode .theme-toggle-thumb {
    transform: translateX(20px) !important;
  }
  /* Search button: ensure it's not hidden by any other rule */
  .search-btn {
    display: flex !important;
    flex-shrink: 0;
  }
  /* Hide the top nav search icon on mobile to avoid duplicate search controls. */
  .header-right .search-btn:first-of-type {
    display: none !important;
  }
  /* Keep the constellation star button visible in the header. */
  .header-right .search-btn.nav-constellation-star {
    display: flex !important;
  }
  /* Hamburger: always visible and never clipped */
  .mobile-menu-btn {
    display: flex !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 501 !important; /* above header z-index:500 */
  }
}
@media (max-width: 360px) {
  .header-right {
    gap: 4px !important;
  }
  .theme-toggle {
    display: none !important;
  }
  .search-btn {
    width: 34px !important;
    height: 34px !important;
  }
}
@media (max-width: 768px) {
  .mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    /* Sit above player bar */
    bottom: var(--player-h, 72px) !important;
    z-index: 481 !important;
    /* Never hide, never transform away */
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
    /* Safe area for home-bar phones */
    padding-bottom: 0 !important;
    border-top: 1px solid var(--border) !important;
    background: var(--bg) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }
  body.dark-mode .mobile-bottom-nav {
    background: rgba(14,12,10,0.97) !important;
  }
  .mbn-btn {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    min-height: 52px !important;
    padding: 8px 4px !important;
    font-size: 0.58rem !important;
    letter-spacing: 0.3px !important;
    color: var(--text3) !important;
    border: none !important;
    background: none !important;
    cursor: pointer !important;
    transition: color 0.15s !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  .mbn-btn.active {
    color: var(--accent) !important;
  }
  .mbn-btn svg {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
  }
  /* Playing dot indicator */
  .mbn-playing-dot {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background: var(--accent) !important;
    position: absolute !important;
    top: 6px !important;
    right: calc(50% - 16px) !important;
  }
}
@media (max-width: 768px) {
  .mini-player {
    position: fixed !important;
    bottom: calc(var(--player-h, 72px) + 52px) !important; /* above bottom nav */
    left: 0 !important;
    right: 0 !important;
    height: 56px !important;
    z-index: 479 !important;
    /* Hidden by default — JS adds .playing-visible */
    display: none !important;
    align-items: center !important;
    padding: 0 16px !important;
    background: var(--surface) !important;
    border-top: 1px solid var(--border) !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08) !important;
  }
  .mini-player.playing-visible,
  .mini-player[data-visible="true"] {
    display: flex !important;
  }
  .mini-player-close {
    margin-left: auto !important;
    flex-shrink: 0 !important;
    color: var(--text3) !important;
    min-width: 36px !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
  }
}
@media (max-width: 768px) {
  body:not(.dark-mode) header {
    background: rgba(245, 243, 239, 0.97) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }
  body:not(.dark-mode) header.scrolled {
    background: rgba(245, 243, 239, 0.99) !important;
  }
  /* Dark mode header — also ensure consistent */
  body.dark-mode header {
    background: rgba(14, 12, 10, 0.97) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }
  /* Fix overflow hidden from wncore-mobile-fix.css clipping hamburger */
  header {
    overflow: visible !important;
  }
  .header-inner {
    overflow: visible !important;
  }
}
@media (max-width: 768px) {
  .player-bar {
    transform: translateY(100%) !important;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) !important;
    /* Keep in DOM so bottom nav bottom value still works */
    visibility: hidden;
  }
  .player-bar.pb-active {
    transform: translateY(0) !important;
    visibility: visible;
  }
  /* Bottom nav: sit at bottom when player hidden, above player when shown */
  .mobile-bottom-nav {
    bottom: 0 !important;
    transition: bottom 0.38s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }
  .mobile-bottom-nav.pb-active {
    bottom: var(--player-h, 72px) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   WNCORE — MOBILE LAYOUT DEEP FIX PATCH
   Fixes: station table overflow, player bar coverage, genre card
   sizing, search modal, and bottom nav safe area handling.
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* ── Station table: hide non-essential columns, fix width ─────── */
  .station-table .st-num,
  .station-table .st-eq,
  .station-table .st-country,
  .station-table .st-bitrate {
    display: none !important;
  }
  .station-table .st-cover-cell {
    width: 36px !important;
    padding: 0 6px 0 0 !important;
  }
  .station-table .st-name {
    font-size: 0.78rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 140px);
  }
  .station-table .st-tags {
    white-space: nowrap;
    overflow: hidden;
  }
  .station-table .st-play-btn {
    min-width: 36px !important;
    min-height: 36px !important;
    width: 36px !important;
    height: 36px !important;
  }
  .station-table-wrap {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* ── Station cover images on mobile ──────────────────────────── */
  .st-cover {
    border-radius: 6px !important;
  }

  /* ── Genre cards: 2-col grid, readable text ──────────────────── */
  #genre-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .genre-card-title {
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }
  .genre-card-desc {
    font-size: 0.7rem !important;
    -webkit-line-clamp: 2 !important;
  }

  /* ── Genre overlay on mobile ─────────────────────────────────── */
  #genre-overlay-panel {
    padding: 20px 16px 16px !important;
  }
  #genre-overlay-name {
    font-size: 1.8rem !important;
  }
  .go-station-card {
    padding: 10px 12px !important;
  }
  .go-station-img {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
  }
  .go-station-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 6px !important;
  }
  #genre-overlay-list {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 0 !important;
  }

  /* ── Search modal on mobile ───────────────────────────────────── */
  #search-modal .modal-box,
  .search-modal-box {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
  }
  .search-result-item {
    padding: 10px 12px !important;
    gap: 10px !important;
  }
  .sr-name { font-size: 0.82rem !important; }
  .sr-meta { font-size: 0.65rem !important; }

  /* ── Page content: padding-bottom clears player + bottom nav ─── */
  .page.active {
    padding-bottom: calc(var(--player-h, 72px) + 56px + 12px) !important;
  }

  /* ── Player bar info truncation ──────────────────────────────── */
  .pb-name, #pb-name {
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100vw - 200px) !important;
  }
  .pb-meta, #pb-meta {
    display: none !important;
  }

  /* ── iOS safe area bottom padding ────────────────────────────── */
  .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
  .player-bar {
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
}

@media (max-width: 480px) {
  /* ── Extra small screens: tighten genre grid ──────────────────── */
  #genre-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .genre-card-inner {
    padding: 12px 10px 10px !important;
  }
  .genre-card-title {
    font-size: 0.88rem !important;
  }

  /* ── Station name column max width ───────────────────────────── */
  .station-table .st-name {
    max-width: calc(100vw - 100px) !important;
  }
}

/* ── Station table horizontal scroll wrapper ─────────────────────────────── */
.station-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Subtle fade at right edge to hint at scrollability */
  -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, black 90%, transparent 100%);
}
@media (min-width: 769px) {
  .station-table-wrap {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ── Global overflow guard — prevents any element from blowing the page wide ── */
@media (max-width: 768px) {
  html { overflow-x: hidden; max-width: 100vw; }
  body { overflow-x: hidden; max-width: 100vw; }
  * { max-width: 100%; }
  /* Allow table cells to still be narrower than 100% */
  td, th { max-width: none; }
  /* Scrollable containers are exempt */
  .station-table-wrap, .genre-strip, .anime-img-strip,
  .lm-channels-list, .rec-grid, .featured-row { max-width: 100vw; }
  /* Player bar must not overflow */
  .player-bar { box-sizing: border-box; max-width: 100vw; }
}

/* ══════════════════════════════════════════════════════════════════════
   FEATURED CARDS — SINGLE SOURCE OF TRUTH FOR MOBILE
   Horizontal scroll strip. All prior featured-row/card rules have been
   removed from this file. Only this block governs mobile layout.
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .featured-row {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 12px !important;
    padding: 8px 16px 16px !important;
    margin-bottom: 24px !important;
    box-sizing: border-box !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
  }
  .featured-row::-webkit-scrollbar { display: none; }

  .featured-card {
    flex: 0 0 140px !important;
    width: 140px !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 132px !important;
    padding: 12px !important;
    border-radius: 12px !important;
    scroll-snap-align: start;
    /* Reset any older display/flex-direction overrides */
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
    box-sizing: border-box !important;
  }
  .featured-card--arg {
    min-height: 132px !important;
  }
  .featured-card--arg .fc-name,
  .featured-card--arg .fc-meta,
  .featured-card--arg .fc-now {
    display: block !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    overflow: visible !important;
    max-height: none !important;
    line-height: 1.2 !important;
    animation: chroma-card-text-glitch 5.2s ease-in-out infinite !important;
  }
  .featured-card--dynamic {
    display: none !important;
  }
  .featured-card--dynamic.genre-card-visible {
    display: flex !important;
  }
  .featured-card:last-child { grid-column: auto !important; }

  .rec-card,
  .anime-card,
  .anime-station-card,
  .mobile-signal-item,
  .search-result-item {
    max-width: calc(100vw - 28px) !important;
    width: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    min-height: 132px !important;
  }

  @keyframes chroma-card-text-glitch {
    0%, 90%, 100% { transform: none; text-shadow: none; }
    92% { transform: translate(0.5px, -0.5px); text-shadow: 1px 0 rgba(0,200,255,0.55), -1px 0 rgba(255,80,120,0.55); }
    94% { transform: translate(-0.5px, 0.5px); text-shadow: -1px 0 rgba(0,200,255,0.55), 1px 0 rgba(255,80,120,0.55); }
    96% { transform: none; text-shadow: 0 0 2px rgba(255,255,255,0.2); }
  }

  .fc-cover-wrap { margin-bottom: 8px !important; }
  .fc-cover-img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
  }
  .fc-name {
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    margin-bottom: 2px !important;
  }
  .featured-card--anothersky .fc-name,
  .featured-card--anothersky .fc-meta,
  .featured-card--anothersky .fc-now {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
  .fc-meta {
    font-size: 0.6rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    margin-bottom: 6px !important;
  }
  .fc-now {
    font-size: 0.6rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
  }
  .fc-listeners {
    font-size: 0.55rem !important;
    margin-bottom: 6px !important;
  }
}

/* ── MOBILE PERFORMANCE: Kill expensive backdrop-filters everywhere on mobile ── */
@media (max-width: 768px) {
  /* Modals & overlays */
  .search-modal-backdrop,
  .modal-backdrop,
  .mobile-nav-backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Misc overlaid panels */
  [style*="backdrop-filter"],
  .listeners-panel,
  .genre-overlay,
  .lm-lyrics-panel,
  .signal-cube-panel,
  .sleep-panel,
  .admin-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Reduce drop-shadow filter chains on nav elements */
  .nav-aberrant-star img.aber-img-main {
    filter: drop-shadow(0 0 4px rgba(200,71,42,0.5)) !important;
    animation: aber-drift 4.1s ease-in-out infinite !important;
    /* Drop the spin-jerk animation on mobile — saves a compositor layer repaint */
  }
  .nav-aberrant-star .aber-r,
  .nav-aberrant-star .aber-b {
    display: none !important; /* chromatic aberration layers off on mobile */
  }
}

/* ── Reduced motion: honour OS preference ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-inner { animation: none !important; }
}
