/* ==================================================
   base.css — Design tokens, resets, top dock, mobile nav
   Split from index.html lines 34–654 on 2026-04-23
   ================================================== */

  :root {
    /* ─── ALIEXPRESS-STYLE THEME TEST ───
       Palette adapted from the reference screenshot:
         • pure-white bg
         • brand red (#E62E04) as the dominant accent — replaces the old yellow --cyan
         • black (#111) for strong CTAs — replaces the old electric --blue
         • soft peach (#ffe5d9) for secondary tags/chips
         • neutral gray borders, very faint halos (AliExpress is clean, not neon)
       To revert, restore the old values listed in /* was … */ comments below. */
    --bg: #ffffff;              /* page background */
    --bg-card: #ffffff;         /* pure white — cards now contrast via shadow, not shade */
    --bg-elevated: #ffffff;
    --border: rgba(0, 0, 0, 0.12);       /* stronger so text-only cards (Music/Agents) are visible */
    --border-glow: rgba(0, 0, 0, 0.22);  /* emphasized edge */
    --neon-halo: 0 2px 8px rgba(0, 0, 0, 0.08), 0 10px 28px -12px rgba(0, 0, 0, 0.12);
    --neon-halo-strong: 0 4px 14px rgba(0, 0, 0, 0.14), 0 20px 40px -14px rgba(0, 0, 0, 0.22);
    --neon-cyan: rgba(230, 46, 4, 0.22); /* brand-red tint for accent surfaces */
    --text: #111111;            /* was #e8eaed — primary text, near-black */
    --text-dim: #606060;        /* was #8b8f99 — secondary text */
    --text-faint: #909090;      /* was #5a5e68 — captions / meta */
    --cyan: #E62E04;            /* was #FFFC03 (brand yellow) — AliExpress-style red, now the dominant accent */
    --cyan-dim: #B01A41;        /* was #b0ad00 — hover state for red accents */
    --amber: #ff9d4a;           /* kept — warm accent, still useful on white */
    --magenta: #ff4a8a;         /* kept */
    --success: #E62E04;         /* was #FFFC03 — match the new accent */
    --danger:  #E62E04;         /* was #ff5a6a — unified red */
    --blue: #111111;            /* was #1449FC — black CTAs like AliExpress */
    --blue-hover: #333333;      /* was #3d63fc */
    --blue-glow: rgba(0, 0, 0, 0.18); /* was rgba(20,73,252,0.4) — subtle black shadow, no blue glow */
    --peach: #ffe5d9;           /* NEW — AliExpress-style peach for chips/tags */
    /* Site-wide font: Roboto everywhere. The --mono/--serif/--code names
     * are kept for backward compat — every element that referenced them
     * now resolves to Roboto, with system fallbacks for offline use. */
    --mono:  'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --serif: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --code:  'Roboto Mono', 'SF Mono', Menlo, Consolas, monospace;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    /* Page background: dark comic superhero halftone pattern, tiled.
     * Set with !important so the legacy per-section gradient JS (app.js
     * applySectionGradient) can't override it.
     * NO background-attachment:fixed — known iOS Safari rendering hazard
     * with tiled backgrounds on long pages. The tiled pattern looks
     * identical scrolling or fixed, so this costs nothing visually. */
    background-color: #0a0a0c !important;
    background-image: url("../../assets/comic-bg.jpg?v=2") !important;
    background-repeat: repeat !important;
    background-size: 1024px auto !important;
    color: var(--text);
    /* Global readability tracking — 2px letter-spacing applied site-wide
       per user request 2026-05-08. Improves legibility of the comic-pop
       display fonts (Bangers etc.) at small sizes. Tightened back to
       normal further below for typed input and monospace medical content
       (transcripts, ICD-10 codes) where character alignment matters. */
    letter-spacing: 2px;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: clip;
    position: relative;
  }

  /* Letter-spacing exemptions — these elements need exact character
     alignment or contain user-typed content that shouldn't be re-spaced.
     NOTE: <button> intentionally NOT exempted — buttons inherit body's
     2px so labels like "DOWNLOAD AS WORD", "COPY NOTE", "SEND FEEDBACK"
     read consistently with the rest of the site. */
  input, textarea, select {
    letter-spacing: normal;
  }
  /* Belt-and-braces explicit 2px on every button so any descendant CSS
     that previously fell back to 'normal' (a few persona/legacy buttons
     do) ends up tracked too. Specific classes that already set their
     own letter-spacing keep theirs (more-specific selector wins). */
  button {
    letter-spacing: 2px;
  }
  /* Buttons that contain only an icon/emoji (no readable label) benefit
     from no extra spacing — keeps the icon centered visually. */
  .sr-floating-mic,
  .me-modal-close,
  .header-cart,
  .header-account,
  .sr-icd-copy,
  .sr-ff-refresh {
    letter-spacing: normal;
  }

  /* ─── Paragraph text — LEFT-ALIGNED, site-wide ───
     The earlier site-wide justify experiment was reverted 2026-05-08
     after multiple "huge word-gap" reports. Cause: 2px global letter-
     spacing combined with justify in narrow columns (feed posts, hero
     callouts, ICD notes, persona bios, banner captions, etc.) creates
     stretched word-rivers. Justify works for wide newspaper-column
     content; lookymart's cards are too narrow. Left-align reads cleaner.
     hyphens:none stays — keeps medical terms from breaking awkwardly. */
  p,
  .sr-hero-bio,
  .sr-hero-privacy,
  .sr-hero-disclaimer,
  .sr-icd-note,
  .sr-paste-hint,
  .sr-ff-msg,
  .sr-fb-hint,
  .sr-feedback-thanks,
  .auth-context-sub,
  .fp-text,
  .post-text,
  .bm-banner-caption,
  .home-card-body,
  .news-card-body,
  .agent-bio,
  .profile-bio,
  .cap-hero-bio,
  .cap-content,
  .cap-lock-footnote,
  .cm-hero-bio,
  .nw-hero-bio,
  .chat-autoshare-note,
  .welcome-note,
  .inspect-footnote,
  .am-edit-section-hint,
  .listing-description,
  .modal-body p,
  .recipe-instructions p {
    text-align: left;
    hyphens: none;
    -webkit-hyphens: none;
  }

  /* <pre>/<code>/transcript content already left-aligned above; these
     also need normal letter-spacing for character alignment. */
  pre, code, kbd, samp, tt,
  .sr-pane-body,
  .form-label,
  .form-hint,
  .sr-intake-hint,
  .ms-hint {
    text-align: left;
  }

  /* Compact-paragraph tracking — for body text in narrow columns,
     2px letter-spacing creates oversized inter-word gaps. These blocks
     get a tighter letter-spacing (0.4px — still tracked for readability,
     not stretched) and a negative word-spacing to pull words closer.
     Applied broadly to feed posts, banners, persona cards, AND every
     scribe-side paragraph (hero, ICD note, paste hint, rating prompt,
     feedback hint, comments). The display fonts on titles/buttons keep
     their full 2px tracking elsewhere. */
  .sr-hero-bio,
  .sr-hero-privacy,
  .sr-hero-disclaimer,
  .sr-hero-tagline,
  .sr-icd-note,
  .sr-paste-hint,
  .sr-rate-prompt,
  .sr-rate-thanks,
  .sr-rate-why-label,
  .sr-fb-hint,
  .sr-feedback-thanks,
  .auth-context-sub,
  .fp-text,
  .post-text,
  .bm-banner-caption,
  .home-card-body,
  .news-card-body,
  .agent-bio,
  .profile-bio,
  .sr-ff-msg,
  .listing-description,
  .modal-body p,
  .nw-hero-bio,
  .cap-hero-bio,
  .cm-hero-bio {
    letter-spacing: 0.4px;
    word-spacing: -1px;
  }
  pre, code, kbd, samp, tt {
    letter-spacing: normal;
  }
  /* Medical content where character spacing matters for accuracy/readability */
  .sr-pane-body,
  .sr-icd-code,
  .sr-icd-conf,
  .sr-icd-kw,
  .sr-ff-time,
  .fp-count,
  time, .timestamp,
  .qr-code, .qr-payload {
    letter-spacing: normal;
  }
  /* User-typed feedback content displayed back to the public */
  .sr-ff-msg, .sr-ff-name {
    letter-spacing: 1px;
  }

  .container { position: relative; z-index: 2; }

  /* ---------- Top dock — Apple-style centered dock ----------
     The section-switch buttons were removed 2026-04-29 (the persistent
     left rail handles navigation now), so the dock now centers the
     remaining action buttons (geo / account / cart / music / phone) as
     a single floating glass pill — like a macOS dock. */
  nav.top-dock {
    /* Original grass + sky brand chrome — DO NOT replace with comic-bg or
     * make translucent. The header is brand chrome, not page background.
     * See feedback_lookymart_background_tiers.md for the three-tier rule. */
    background-color: #87ceeb;
    background-image: url("../../assets/header-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 24px;
    /* No overflow:hidden — would clip dropdowns/menus opened from header
     * buttons. border-radius alone still clips the bg-image. */
    margin-top: 12px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    /* Header scrolls away with the page (non-sticky) — user
       preference 2026-04-30. */
    position: relative;
    /* Sit above the section banner (z:4), persistent rails (z:20), and
     * everything else on the page so the geo + account dropdowns
     * launched from the dock open IN FRONT of content, not behind. */
    z-index: 50;
  }
  /* 3-zone layout: logo (auto) | search (1fr, centered) | dock (auto). */
  nav.top-dock > .header-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
  }
  nav.top-dock > .header-logo img {
    height: 84px;
    width: auto;
    display: block;
  }
  nav.top-dock > .header-search-wrap {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
  }
  .header-search {
    width: 100%;
    max-width: 540px;
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.06),
      0 6px 16px -8px rgba(15, 23, 42, 0.14);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
  }
  .header-search:focus-within {
    border-color: rgba(0, 122, 255, 0.55);
    box-shadow:
      0 0 0 3px rgba(0, 122, 255, 0.14),
      0 1px 2px rgba(15, 23, 42, 0.08);
  }
  .header-search-input {
    flex: 1 1 auto;
    border: 0;
    background: transparent;
    color: #111;
    font-family: var(--mono);
    font-size: 13px;
    padding: 12px 18px;
    min-width: 0;
  }
  .header-search-input:focus { outline: none; }
  .header-search-input::placeholder { color: rgba(60, 60, 67, 0.55); }
  .header-search-btn {
    border: 0;
    background: #111;
    color: #fff;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0 22px;
    cursor: pointer;
    transition: background 0.15s ease;
  }
  .header-search-btn:hover { background: #2563eb; }
  /* Search-clear (×) override for the header pill — anchor to right edge of input */
  .header-search .search-clear {
    right: 110px;
  }
  /* Mobile menu toggle stays right of the search on phones. */
  nav.top-dock > .mobile-menu-toggle {
    position: static;
    flex: 0 0 auto;
  }
  @media (max-width: 720px) {
    /* Stack the header vertically on phones with everything
       horizontally centered: logo row, search row, dock row. */
    nav.top-dock {
      flex-direction: column;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
    }
    nav.top-dock > .header-logo {
      margin: 0 auto;
      justify-content: center;
    }
    nav.top-dock > .header-logo img { height: 65px; }
    nav.top-dock > .header-search-wrap {
      width: 100%;
      max-width: 420px;
      margin: 0 auto;
    }
    nav.top-dock > .nav-actions {
      margin: 0 auto;
      justify-content: center;
    }
    nav.top-dock > .mobile-menu-toggle {
      position: absolute;
      top: 12px;
      right: 12px;
    }
    .header-search-input { font-size: 12px; padding: 10px 14px; }
    .header-search-btn { padding: 0 14px; }
    .header-search .search-clear { right: 78px; }
  }
  /* The dock pill itself — glass surface, rounded, hover-friendly. */
  nav.top-dock > .nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.05),
      0 12px 32px -16px rgba(15, 23, 42, 0.22);
  }
  /* Each dock item is a 48x48 rounded square with hover lift like macOS. */
  nav.top-dock .nav-actions > .geo-wrap > .geo-pill,
  nav.top-dock .nav-actions > .account-wrap > .header-account,
  nav.top-dock .nav-actions > .header-cart,
  nav.top-dock .nav-actions > .header-music,
  nav.top-dock .nav-actions > .header-phone-preview,
  nav.top-dock .nav-actions > .wallet-btn {
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #ffffff;
    box-shadow: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
  }
  nav.top-dock .nav-actions > .account-wrap > .header-account,
  nav.top-dock .nav-actions > .header-cart,
  nav.top-dock .nav-actions > .header-music,
  nav.top-dock .nav-actions > .header-phone-preview,
  nav.top-dock .nav-actions > .wallet-btn {
    width: 48px;
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* Geo stays a horizontal pill (label + caret) but matches dock height. */
  nav.top-dock .nav-actions > .geo-wrap > .geo-pill {
    padding: 0 14px;
  }
  /* Music gets a yellow gradient like the reference dock — flat, no shadow. */
  nav.top-dock .nav-actions > .header-music {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    border-color: rgba(202, 138, 4, 0.2);
    box-shadow: none;
  }
  /* Hover lift — subtle translate only, no shadow. */
  nav.top-dock .nav-actions > .geo-wrap > .geo-pill:hover,
  nav.top-dock .nav-actions > .account-wrap > .header-account:hover,
  nav.top-dock .nav-actions > .header-cart:hover,
  nav.top-dock .nav-actions > .header-music:hover,
  nav.top-dock .nav-actions > .header-phone-preview:hover,
  nav.top-dock .nav-actions > .wallet-btn:hover {
    transform: translateY(-3px);
    box-shadow: none;
  }
  nav.top-dock .nav-actions > .header-phone-preview[aria-pressed="true"] {
    background: #111;
    color: #fff;
  }

  /* Hamburger — hidden on desktop, shown on phones */
  .mobile-menu-toggle {
    display: none;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    font-size: 22px;
    color: #111;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    flex: 0 0 auto;
  }
  .mobile-menu-toggle:hover { background: rgba(0, 0, 0, 0.08); }
  .mobile-menu-toggle[aria-expanded="true"] { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.35); color: #ef4444; }

  /* ----- Phone layout ----- */
  @media (max-width: 720px) {
    nav.top-dock {
      position: relative;  /* anchors the mobile drawer */
      padding: 6px 14px;
    }
    /* Hide the inline 14-tab grid on phones */
    nav.top-dock > .section-switch { display: none; }
    /* Show the hamburger */
    .mobile-menu-toggle { display: inline-flex; }

    /* When toggled open, section-switch slides down as a drawer */
    nav.top-dock > .section-switch.mobile-open {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 2px 6px;
      max-width: none;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      margin: 0;
      padding: 10px 14px 14px;
      background: rgba(255, 255, 255, 0.97);
      backdrop-filter: blur(22px) saturate(160%);
      -webkit-backdrop-filter: blur(22px) saturate(160%);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
      z-index: 200;
    }
    /* Larger tap targets inside the drawer */
    nav.top-dock > .section-switch.mobile-open .sect-btn {
      padding: 12px 8px;
      font-size: 14px;
      border-bottom: 1px solid rgba(0, 0, 0, 0.06);
      border-radius: 0;
      justify-content: flex-start;
    }
    nav.top-dock > .section-switch.mobile-open .sect-btn .sect-icon {
      font-size: 18px;
    }
    /* Trim non-essential right actions on phone — keep account + cart */
    .geo-wrap, .header-music, .wallet-btn { display: none; }
    /* Compact action gap + tighter flex gaps so everything fits */
    .nav-actions { gap: 6px; }
    nav.top-dock { gap: 10px; }
  }

  /* Very narrow (≤ 400px, iPhone SE / small Androids) — shrink more */
  @media (max-width: 400px) {
    nav.top-dock { padding: 5px 10px; gap: 8px; }
    .logo-img { height: 42px; }
    .mobile-menu-toggle { width: 38px; height: 38px; font-size: 20px; }
    .header-account, .header-cart { width: 38px; height: 38px; }
  }
  nav.top-dock::after {
    /* Replaces the old children layout — use the inline inner wrapper instead.
       Keeping a ::after stub here so old pseudo-rule selectors don't clobber anything. */
    content: none;
  }
  nav.top-dock > .logo,
  nav.top-dock > .top-search,
  nav.top-dock > .nav-actions {
    /* flex children of the inner wrapper set up by the new flex context below */
  }
  nav.top-dock {
    padding: 10px 28px;
  }
  @media (min-width: 1440px) {
    nav.top-dock { padding: 10px max(28px, calc((100vw - 1400px) / 2)); }
  }
  nav.top-dock { gap: 16px; align-items: center; }

  /* Search bar in the middle of the top dock */
  .top-search {
    flex: 1;
    max-width: 820px;
    display: flex;
    align-items: center;
    background: #f5f6f8;
    border-radius: 999px;
    border: 1.5px solid transparent;
    overflow: hidden;
    padding: 3px 3px 3px 0;
    transition: border-color 0.15s, background 0.15s;
  }
  .top-search:focus-within {
    background: #ffffff;
    border-color: #111111;
  }
  .top-search-input {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    color: #111111;
    min-width: 0;
  }
  .top-search-input::placeholder { color: #9a9a9a; font-family: var(--mono); }
  .top-search-camera {
    background: transparent;
    border: none;
    padding: 0 12px;
    font-size: 18px;
    cursor: pointer;
    color: #6a6a6a;
    transition: color 0.15s;
  }
  .top-search-camera:hover { color: #111; }
  .top-search-btn {
    padding: 10px 28px;
    background: #111111;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
  }
  .top-search-btn:hover { background: #333333; }

  .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
  }

  .logo:hover { opacity: 0.85; }

  .logo-img {
    height: 68px;
    width: auto;
    max-width: 100%;
    display: block;
  }
  /* Shrink logo on narrower viewports so it never steals space from the nav */
  @media (max-width: 1200px) {
    .logo-img { height: 58px; }
  }
  @media (max-width: 900px) {
    .logo-img { height: 50px; }
  }
  @media (max-width: 600px) {
    .logo-img { height: 42px; }
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
  }

  .nav-center {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-glow);
    padding: 2px;
  }

  .mode-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 8px 20px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
  }

  .mode-btn.active {
    background: var(--cyan);
    color: #0a0b0f;
  }

  .mode-btn:hover:not(.active) { color: var(--text); }

  .wallet-btn {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    padding: 10px 18px;
    background: var(--blue);
    color: #ffffff;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .wallet-btn:hover { background: var(--blue-hover); box-shadow: 0 0 24px var(--blue-glow); }

  .wallet-btn.connected {
    background: var(--bg-elevated);
    color: var(--cyan);
    border: 1px solid var(--cyan-dim);
  }

  .wallet-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
  }

  .view { display: none; }
  .view.active { display: block; }

  /* Compact horizontal hero banner — label · headline · subtext on one row */
  .hero {
    padding: 14px 28px;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
  }
  .hero > div {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1 1 auto;
  }

  .hero-label {
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #ef4444;
    text-transform: uppercase;
    font-weight: 600;
    flex: 0 0 auto;
    margin: 0;
  }
  .hero-label::before { content: '◆ '; }

  /* Music section — dark synthwave backdrop behind the three hero boxes
   * so the neon magenta / indigo / cyan actually pop. Deep indigo→near-black
   * gradient with a soft magenta glow at top-right and cyan glow bottom-left. */
  body[data-section="sounds"] .hero {
    background:
      radial-gradient(circle at 90% 10%, rgba(255, 46, 196, 0.28), transparent 55%),
      radial-gradient(circle at 10% 95%, rgba(0, 229, 255, 0.22), transparent 55%),
      linear-gradient(180deg, #160A33 0%, #0B0420 100%);
    border-radius: 14px;
    padding: 22px;
  }

  /* Music section — Synthwave palette (Miami Vice / retrowave).
   * Label = magenta pill, Headline = indigo box, Sub = cyan box w/ Bangers. */
  body[data-section="sounds"] .hero-label {
    display: inline-block;
    background: #FF2EC4;
    color: #0B0F2C;
    padding: 6px 12px;
    border-radius: 6px;
    align-self: flex-start;
  }
  body[data-section="sounds"] .hero h1 {
    display: inline-block;
    background: #2A1A6E;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
  }
  body[data-section="sounds"] .hero h1 em { color: #ffffff; }
  /* Sub-tagline: cyan box / indigo Bangers, no shadow.
   * !important needed to beat home.css comic-pop white+outline rule. */
  body[data-section="sounds"] .hero-sub {
    display: inline-block;
    background: #00E5FF;
    color: #0B0F2C !important;
    padding: 10px 14px;
    border-radius: 6px;
    font-family: var(--font-display), 'Bangers', 'Impact', sans-serif;
    font-size: clamp(16px, 1.6vw, 22px);
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-shadow: none !important;
    box-shadow: none;
  }

  h1 {
    font-family: var(--serif);
    font-size: clamp(16px, 1.8vw, 22px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  h1 br { display: none; }
  h1 em { font-style: italic; color: #2563eb; font-weight: 500; }
  h1 .amber { color: var(--amber); font-style: italic; font-weight: 500; }

  .hero-sub {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.4;
    margin: 0 !important;
    flex: 1 1 240px;
    min-width: 0;
  }

  .hero-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 2px solid var(--cyan);
  }

  .stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }

  .stat:last-child { border-bottom: none; padding-bottom: 0; }

  .stat-label {
    font-size: 10px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  .stat-value {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.02em;
  }

  .stat-value .unit {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    margin-left: 4px;
  }

  .filter-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 48px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: transparent;
    border: 0;
  }

  .filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }

  .tag {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 9px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;           /* pill shape */
    background: rgba(255, 255, 255, 0.85);
    color: #3a3a3a;
    cursor: pointer;
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease,
                background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }

  .tag:hover {
    color: #111;
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.22);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
  }

  .tag:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

  .tag.active {
    background: var(--cyan);          /* brand red */
    color: #fff;
    border-color: var(--cyan);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.25) inset,
      0 6px 14px -4px rgba(230, 46, 4, 0.45);
    transform: translateY(-1px);
  }
  .tag.active:hover {
    background: var(--cyan-dim);
    border-color: var(--cyan-dim);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.25) inset,
      0 8px 18px -4px rgba(230, 46, 4, 0.55);
  }

  .sort {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }

  .grid-empty {
    grid-column: 1 / -1;
    padding: 80px 20px;
    text-align: center;
    color: var(--text-faint);
    font-size: 13px;
    border: 1px dashed var(--border-glow);
  }

  .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: var(--neon-halo);
  }

  .card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: var(--neon-halo-strong), 0 20px 40px -20px rgba(83, 58, 254, 0.35);
  }

  .card-preview {
    aspect-ratio: 1;
    background: var(--bg-elevated);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
      linear-gradient(45deg, #1a1c22 25%, transparent 25%),
      linear-gradient(-45deg, #1a1c22 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #1a1c22 75%),
      linear-gradient(-45deg, transparent 75%, #1a1c22 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #0f1115;
  }

  .card-preview svg,
  .card-preview img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    transition: transform 0.4s;
  }

  .card:hover .card-preview svg,
  .card:hover .card-preview img {
    transform: scale(1.08) rotate(-2deg);
  }

  .card-watermark {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-family: var(--mono);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    mix-blend-mode: difference;
  }

  .card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }

  .card-title {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.01em;
  }

  .card-creator {
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .creator-avatar {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--magenta));
  }

  .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    margin-top: 4px;
  }

  .price { display: flex; align-items: baseline; gap: 6px; }

  .price-value {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--cyan);
  }

  .price-unit { font-size: 10px; color: var(--text-dim); letter-spacing: 0.1em; }

  .card-meta { font-size: 10px; color: var(--text-faint); text-align: right; }

  /* ====================================================================
   * Phone preview mode — toggled by 📱 in the top dock.
   * Wraps the whole .container in a phone bezel so you can eyeball
   * mobile proportions. Width is fixed to ~390px (iPhone-class) and the
   * page sits centered on a darkened backdrop. Note: this is a visual
   * frame, not a viewport simulator — true mobile media queries still
   * use the actual viewport width. Use Chrome DevTools for that.
   * ==================================================================== */
  body.mobile-preview {
    /* Keep the plaza background visible behind the phone bezel — just
     * darken it slightly with the ::before overlay so the white phone
     * pops against it. Don't replace the body background. */
    overflow-x: auto;
  }
  body.mobile-preview::before {
    background: rgba(0, 0, 0, 0.35) !important;
  }
  body.mobile-preview::after { display: none; }
  body.mobile-preview .container {
    width: 390px;
    max-width: 390px;
    margin: 32px auto 64px;
    background: #fff;
    border: 12px solid #0c0d10;
    border-radius: 44px;
    overflow: hidden;
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.04),
      0 40px 100px rgba(0, 0, 0, 0.55);
    position: relative;
  }
  /* iPhone-style notch on top */
  body.mobile-preview .container::before {
    content: '';
    position: absolute;
    top: -1px; left: 50%;
    transform: translateX(-50%);
    width: 130px; height: 22px;
    background: #0c0d10;
    border-radius: 0 0 18px 18px;
    z-index: 1000;
  }
  /* Hide the desktop nav switch and force the hamburger menu visible
   * inside the phone frame so the dock fits the narrow width. */
  body.mobile-preview .section-switch { display: none; }
  body.mobile-preview .mobile-menu-toggle { display: flex !important; }
  body.mobile-preview .geo-wrap,
  body.mobile-preview .header-music { display: none; }
  body.mobile-preview .top-dock {
    flex-wrap: nowrap;
    padding: 8px 12px;
  }
  body.mobile-preview .logo-img { max-height: 28px; width: auto; }
  /* Tighten the home view inside the phone frame */
  body.mobile-preview #homeView .home-wrap { padding-left: 18px; padding-right: 18px; }
  body.mobile-preview #homeView .home-hero { margin-top: 1vh; padding-bottom: 16px; }
  body.mobile-preview #homeView .home-tiles {
    margin-top: 4vh;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  body.mobile-preview #homeView .home-tiles + .home-row { margin-top: 6vh; }
  body.mobile-preview .home-search { max-width: 100%; }

