:root {
    --sidebar-width: 0px;
    /* 🌈 Rainbow Kitty Theme (Default: Colorful, Joyful & Accessible for Kids) */
    --bg-primary: #190b2e;
    --bg-secondary: #261245;
    --bg-tertiary: #3a1b68;
    --card-bg: rgba(38, 18, 69, 0.88);
    --text-primary: #ffffff;
    --text-secondary: #f3e8ff;
    --text-muted: #d8b4fe;
    --border: #52298c;
    --accent: #be185d;
    --accent-hover: #db2777;
    --accent-light: rgba(236, 72, 153, 0.18);
    --accent-text: #f472b6;
    --accent-glow: rgba(236, 72, 153, 0.4);
    --kid-pink: #be185d;
    --kid-pink-glow: rgba(236, 72, 153, 0.4);
    --kid-purple: #8b5cf6;
    --kid-purple-glow: rgba(139, 92, 246, 0.4);
    --kid-green: #10b981;
    --kid-green-glow: rgba(16, 185, 129, 0.4);
    --kid-yellow: #f59e0b;
    --kid-cyan: #06b6d4;
    --success: #10b981;
    --error: #f43f5e;
    --warning: #fbbf24;

    /* Semantic Soundboard & TalkBack Contrast Tokens */
    --sb-amber-text: #fbbf24;
    --sb-amber-bg: rgba(245, 158, 11, 0.12);
    --sb-amber-border: rgba(245, 158, 11, 0.45);

    --sb-emerald-text: #34d399;
    --sb-emerald-bg: rgba(16, 185, 129, 0.12);
    --sb-emerald-border: rgba(16, 185, 129, 0.45);

    --sb-purple-text: #c084fc;
    --sb-purple-bg: rgba(139, 92, 246, 0.12);
    --sb-purple-border: rgba(139, 92, 246, 0.45);

    --sb-pink-text: #f472b6;
    --sb-pink-bg: rgba(236, 72, 153, 0.12);
    --sb-pink-border: rgba(236, 72, 153, 0.45);
    
    /* Safe area insets for notches */
    --safe-top: max(1rem, env(safe-area-inset-top));
    --safe-bottom: max(1rem, env(safe-area-inset-bottom));
    --safe-left: max(1rem, env(safe-area-inset-left));
    --safe-right: max(1rem, env(safe-area-inset-right));
  }

  /* 🌿 Theme 2: Jungle Safari */
  body[data-theme="jungle"] {
    --bg-primary: #062e24;
    --bg-secondary: #0b4436;
    --bg-tertiary: #135745;
    --card-bg: rgba(11, 68, 54, 0.88);
    --text-primary: #ffffff;
    --text-secondary: #d1fae5;
    --text-muted: #a7f3d0;
    --border: #16654f;
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-light: rgba(16, 185, 129, 0.18);
    --accent-text: #34d399;
    --accent-glow: rgba(16, 185, 129, 0.45);
    --success: #34d399;
    --error: #f43f5e;
    --warning: #fbbf24;

    --sb-amber-text: #fbbf24;
    --sb-amber-bg: rgba(245, 158, 11, 0.14);
    --sb-amber-border: rgba(245, 158, 11, 0.5);

    --sb-emerald-text: #34d399;
    --sb-emerald-bg: rgba(16, 185, 129, 0.14);
    --sb-emerald-border: rgba(16, 185, 129, 0.5);

    --sb-purple-text: #c084fc;
    --sb-purple-bg: rgba(139, 92, 246, 0.14);
    --sb-purple-border: rgba(139, 92, 246, 0.5);

    --sb-pink-text: #f472b6;
    --sb-pink-bg: rgba(236, 72, 153, 0.14);
    --sb-pink-border: rgba(236, 72, 153, 0.5);
  }

  /* 🍭 Theme 3: Candy Purr */
  body[data-theme="candy"] {
    --bg-primary: #280a22;
    --bg-secondary: #3b0f32;
    --bg-tertiary: #521646;
    --card-bg: rgba(59, 15, 50, 0.88);
    --text-primary: #ffffff;
    --text-secondary: #fce7f3;
    --text-muted: #f472b6;
    --border: #751a65;
    --accent: #f43f5e;
    --accent-hover: #be123c;
    --accent-light: rgba(244, 63, 94, 0.18);
    --accent-text: #fb7185;
    --accent-glow: rgba(244, 63, 94, 0.45);
    --success: #10b981;
    --error: #f43f5e;
    --warning: #fbbf24;

    --sb-amber-text: #fbbf24;
    --sb-amber-bg: rgba(245, 158, 11, 0.14);
    --sb-amber-border: rgba(245, 158, 11, 0.5);

    --sb-emerald-text: #34d399;
    --sb-emerald-bg: rgba(16, 185, 129, 0.14);
    --sb-emerald-border: rgba(16, 185, 129, 0.5);

    --sb-purple-text: #c084fc;
    --sb-purple-bg: rgba(139, 92, 246, 0.14);
    --sb-purple-border: rgba(139, 92, 246, 0.5);

    --sb-pink-text: #fb7185;
    --sb-pink-bg: rgba(244, 63, 94, 0.16);
    --sb-pink-border: rgba(244, 63, 94, 0.5);
  }

  /* ☀️ Theme 4: Sunny Classroom (High-Contrast Daylight Accessible Mode) */
  body[data-theme="sunshine"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border: #cbd5e1;
    --accent-light: #fdf2f8;
    --accent-text: #be185d;
    --accent-glow: rgba(236, 72, 153, 0.25);
    --success: #047857;
    --error: #be123c;
    --warning: #b45309;

    /* High-Contrast Soundboard & Interactive Jewel Tones */
    --sb-amber-text: #92400e; /* Amber 800: 6.84:1 on #fffbeb */
    --sb-amber-bg: #fffbeb;
    --sb-amber-border: #f59e0b;

    --sb-emerald-text: #065f46; /* Emerald 800: 7.34:1 on #f0fdf4 */
    --sb-emerald-bg: #f0fdf4;
    --sb-emerald-border: #10b981;

    --sb-purple-text: #581c87; /* Purple 900: 10.14:1 on #faf5ff */
    --sb-purple-bg: #faf5ff;
    --sb-purple-border: #8b5cf6;

    --sb-pink-text: #9f1239; /* Rose 800: 7.30:1 on #fff1f2 */
    --sb-pink-bg: #fff1f2;
    --sb-pink-border: #be185d;
  }

  /* ☀️ High-Contrast Sunshine Mode UI Overrides */
  body[data-theme="sunshine"] .hero h1 {
    background: linear-gradient(135deg, #0f172a 0%, #312e81 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  body[data-theme="sunshine"] .hero p {
    color: #334155;
  }
  body[data-theme="sunshine"] .hero-guest-pill {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  body[data-theme="sunshine"] .hero-guest-pill strong {
    color: #9a3412; /* Deep warm amber for > 7:1 contrast */
  }
  body[data-theme="sunshine"] .hero-guest-pill span {
    color: #334155;
  }



  body[data-theme="sunshine"] .logo-text,
  body[data-theme="sunshine"] header a {
    color: #0f172a;
  }
  body[data-theme="sunshine"] header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom-color: #cbd5e1;
  }
  body[data-theme="sunshine"] .empty-state-card {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  }
  body[data-theme="sunshine"] .empty-state-card h3 {
    color: #0f172a;
  }
  body[data-theme="sunshine"] .empty-state-card p {
    color: #334155;
  }
  body[data-theme="sunshine"] .empty-state-badge {
    color: #9d174d;
    background: #fce7f3;
    border-color: #f472b6;
  }
  body[data-theme="sunshine"] .soundboard-container {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  }
  body[data-theme="sunshine"] .outcome-guide-card {
    background: #ffffff;
    border-color: #cbd5e1;
  }
  body[data-theme="sunshine"] .station-accordion {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }
  body[data-theme="sunshine"] .station-accordion[open] {
    border-color: #4338ca !important;
  }
  body[data-theme="sunshine"] .station-accordion-summary {
    color: #0f172a !important;
  }
  body[data-theme="sunshine"] .station-accordion-summary:hover {
    background: #f1f5f9 !important;
  }
  body[data-theme="sunshine"] .station-accordion-body {
    background: #f8fafc !important;
    border-top-color: #e2e8f0 !important;
    color: #334155 !important;
  }
  body[data-theme="sunshine"] .feline-library-cluster {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
  }
  body[data-theme="sunshine"] .feline-library-cluster h3 {
    color: #0f172a !important;
  }
  body[data-theme="sunshine"] .feline-library-cluster p {
    color: #334155 !important;
  }
  body[data-theme="sunshine"] .guide-topic-card {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
  }
  body[data-theme="sunshine"] .guide-topic-title {
    color: #0f172a !important;
  }
  body[data-theme="sunshine"] .guide-topic-desc {
    color: #475569 !important;
  }
  body[data-theme="sunshine"] .guide-topic-card:hover {
    background: #ffffff !important;
    border-color: #4338ca !important;
    box-shadow: 0 8px 20px rgba(67, 56, 202, 0.08) !important;
  }
  body[data-theme="sunshine"] .vocal-insight-card {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }
  body[data-theme="sunshine"] .vocal-insight-card:hover {
    background: #ffffff !important;
    border-color: #4338ca !important;
    box-shadow: 0 8px 20px rgba(67, 56, 202, 0.08) !important;
  }
  body[data-theme="sunshine"] .vocal-insight-desc {
    color: #334155 !important;
  }





  body[data-theme="sunshine"] .chat-bubble {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  }
  body[data-theme="sunshine"] .chat-sender-name {
    color: #0f172a;
  }
  body[data-theme="sunshine"] .translation-what {
    color: #0f172a;
  }
  body[data-theme="sunshine"] .chat-message-text {
    color: #1e293b;
  }
  body[data-theme="sunshine"] #talkBackFeedback {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
  }
  body[data-theme="sunshine"] .promo-card {
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%) !important;
    border: 1.5px solid #fcd34d !important;
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.08) !important;
  }
  body[data-theme="sunshine"] .promo-title {
    color: #0f172a !important;
  }
  body[data-theme="sunshine"] .promo-subtext {
    color: #334155 !important;
  }
  body[data-theme="sunshine"] .promo-badge {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #f59e0b !important;
  }
  body[data-theme="sunshine"] .stripe-pack-btn {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  }
  body[data-theme="sunshine"] .stripe-pack-btn:hover {
    background: #f8fafc !important;
    border-color: #4338ca !important;
    box-shadow: 0 6px 18px rgba(67, 56, 202, 0.1) !important;
  }
  body[data-theme="sunshine"] .stripe-pack-btn.premium-highlight {
    background: #fffbeb !important;
    border: 2px solid #d97706 !important;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.18) !important;
  }
  body[data-theme="sunshine"] .stripe-pack-btn.subscription-highlight {
    background: #fdf2f8 !important;
    border: 2px solid #db2777 !important;
    box-shadow: 0 6px 20px rgba(219, 39, 119, 0.18) !important;
  }
  body[data-theme="sunshine"] .stripe-pack-title {
    color: #0f172a !important;
  }
  body[data-theme="sunshine"] .stripe-pack-desc {
    color: #475569 !important;
  }
  body[data-theme="sunshine"] .testimonials-section {
    border-top-color: #cbd5e1 !important;
  }
  body[data-theme="sunshine"] .testimonial-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  }
  body[data-theme="sunshine"] .testimonial-card p {
    color: #1e293b !important;
  }
  body[data-theme="sunshine"] .testimonial-author {
    color: #4338ca !important;
  }


  /* 🌙 Theme 5: Cosmic Midnight (Neon Space Mode) */
  body[data-theme="cosmic"] {
    --bg-primary: #0b0f19;
    --bg-secondary: #141b2d;
    --bg-tertiary: #1f2942;
    --card-bg: rgba(20, 27, 45, 0.88);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #2a3756;
    --accent: #38bdf8;
    --accent-hover: #0284c7;
    --accent-light: rgba(56, 189, 248, 0.15);
    --accent-text: #7dd3fc;
    --accent-glow: rgba(56, 189, 248, 0.45);
    --success: #34d399;
    --error: #f43f5e;
    --warning: #fbbf24;

    --sb-amber-text: #fbbf24;
    --sb-amber-bg: rgba(245, 158, 11, 0.14);
    --sb-amber-border: rgba(245, 158, 11, 0.5);

    --sb-emerald-text: #34d399;
    --sb-emerald-bg: rgba(52, 211, 153, 0.14);
    --sb-emerald-border: rgba(52, 211, 153, 0.5);

    --sb-purple-text: #c084fc;
    --sb-purple-bg: rgba(168, 85, 247, 0.14);
    --sb-purple-border: rgba(168, 85, 247, 0.5);

    --sb-pink-text: #38bdf8;
    --sb-pink-bg: rgba(56, 189, 248, 0.14);
    --sb-pink-border: rgba(56, 189, 248, 0.5);
  }

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

  html, body {
    height: 100%;
  }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    background-image: 
      radial-gradient(circle at 10% 15%, rgba(236, 72, 153, 0.22), transparent 45%),
      radial-gradient(circle at 90% 75%, rgba(16, 185, 129, 0.2), transparent 50%),
      radial-gradient(circle at 50% 10%, rgba(139, 92, 246, 0.24), transparent 55%);
    background-attachment: fixed;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  body[data-theme="jungle"] {
    background-image: 
      radial-gradient(circle at 15% 20%, rgba(52, 211, 153, 0.24), transparent 45%),
      radial-gradient(circle at 85% 80%, rgba(245, 158, 11, 0.2), transparent 50%),
      radial-gradient(circle at 50% 10%, rgba(16, 185, 129, 0.25), transparent 55%);
  }

  body[data-theme="candy"] {
    background-image: 
      radial-gradient(circle at 10% 20%, rgba(244, 63, 94, 0.25), transparent 45%),
      radial-gradient(circle at 90% 70%, rgba(192, 132, 252, 0.22), transparent 50%),
      radial-gradient(circle at 50% 10%, rgba(251, 113, 133, 0.24), transparent 55%);
  }

  body[data-theme="sunshine"] {
    background-image: 
      radial-gradient(circle at 10% 20%, rgba(244, 114, 182, 0.16), transparent 40%),
      radial-gradient(circle at 90% 80%, rgba(52, 211, 153, 0.16), transparent 45%),
      radial-gradient(circle at 50% 10%, rgba(167, 139, 250, 0.18), transparent 50%);
  }

  body[data-theme="cosmic"] {
    background-image: 
      radial-gradient(circle at 50% -10%, rgba(56, 189, 248, 0.25), transparent 50%),
      radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.18), transparent 50%);
  }

  /* Collapse unfilled AdSense slots so they leave no gap */

  /* ── ACCESSIBILITY & FOCUS STATES ──────────────────────── */
  
  /* High contrast focus indicator — accent-text (#a5b4fc) has ~8.8:1 contrast on dark bg */
  *:focus-visible {
    outline: 3px solid var(--accent-text);
    outline-offset: 2px;
  }

  /* Skip link for keyboard users */
  .skip-link {
    position: absolute;
    top: -9999px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 8px 0;
    font-weight: 600;
  }

  .skip-link:focus {
    top: 0;
  }

  /* Reduced motion support */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation: none !important;
      transition: none !important;
    }
  }

  /* High contrast mode support */
  @media (prefers-contrast: more) {
    :root {
      --text-muted: var(--text-secondary);
      --border: var(--text-secondary);
    }
  }

  /* Dark mode indicator already set via supported-color-schemes */

  /* ── APP-SHELL LAYOUT ──────────────────────────────────── */

  /* Sticky Header with Safe Area */




  /* ── UNIFIED SUB-NAVIGATION BAR ACROSS ALL PAGES ── */






















  /* ── APPLE-GRADE SUB-NAV "MORE" DROPDOWN ── */










  @keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }























































  .hero-guest-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
  }
  .hero-guest-pill strong {
    color: #fef08a;
    font-weight: 700;
  }





  /* ── THEME SELECTOR PILL & MENU (Theme choices) ── */
  .theme-selector-wrap {
    position: relative;
    display: inline-block;
  }
  .theme-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.65rem;
    border-radius: 9999px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  .theme-pill-btn:hover {
    transform: translateY(-1px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 4px 14px var(--accent-glow, rgba(236, 72, 153, 0.35));
  }
  .theme-pill-emoji {
    font-size: 0.95rem;
    line-height: 1;
  }
  .theme-pill-arrow {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
  }
  .theme-pill-btn[aria-expanded="true"] .theme-pill-arrow {
    transform: rotate(180deg);
  }
  .theme-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 235px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    z-index: 1000;
    backdrop-filter: blur(16px);
  }
  .theme-dropdown-menu.open {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    animation: menuFadeIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  @keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  .theme-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all 0.15s ease;
  }
  .theme-option:hover, .theme-option:focus-visible {
    background: var(--accent-light);
    border-color: var(--accent);
    transform: translateX(2px);
  }
  .theme-option.active {
    background: var(--accent-light);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow, rgba(236, 72, 153, 0.25));
  }
  .theme-opt-emoji {
    font-size: 1.25rem;
    flex-shrink: 0;
  }
  .theme-opt-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
  }
  .theme-opt-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
  }
  .theme-opt-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.2;
    margin-top: 0.1rem;
  }
  .theme-opt-check {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    width: 16px;
    text-align: right;
  }

  /* July Promo Aside Card Style */
  .promo-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .promo-card.hidden {
    display: none !important;
  }
  .promo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.12);
  }
  .promo-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.08);
  }
  .promo-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  .promo-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0.5rem 0 0 0;
  }
  .promo-subtext {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0 0;
  }
  .promo-btn {
    align-self: flex-start;
    animation: pulseGlow 2s infinite ease-in-out;
  }
  @keyframes pulseGlow {
    0%, 100% {
      box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    50% {
      box-shadow: 0 0 12px 4px rgba(139, 92, 246, 0.2);
    }
  }

  /* Settings Panel (Slide from Top) */
  .settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    z-index: 200;
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .settings-panel-inner {
    padding: 1.5rem calc(var(--sidebar-width) + 1rem);
    max-width: 480px;
    margin: 0 auto;
  }

  .settings-panel.open {
    transform: translateY(0);
    visibility: visible;
  }

  .settings-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-top: var(--safe-top);
  }

  .settings-panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .settings-panel-close {
    min-width: var(--target); min-height: var(--target);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-size: 1.25rem;
  }

  .settings-panel-close:hover {
    border-color: var(--accent-text);
    color: var(--accent-text);
  }

  /* API Key Form in Settings */
  .settings-form {
    max-width: 500px;
  }

  .settings-form-group {
    margin-bottom: 1.25rem;
  }

  .settings-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .settings-form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
    background: var(--bg-secondary);
    color: var(--text-primary);
  }

  .settings-form-group input:focus {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
  }

  .settings-form-group input::placeholder {
    color: var(--text-muted);
  }

  .settings-help {
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-top: 0.5rem;
    line-height: 1.6;
  }

  .settings-help a {
    color: white;
    text-decoration: none;
    font-weight: 600;
  }

  .settings-help a:hover {
    text-decoration: underline;
  }

  /* Main Scrollable Content */
  main {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    padding: 0;
  }

  /* Scrollable Container */
  .scroll-container {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem 2rem;
    padding-left: calc(1rem + var(--safe-left));
    padding-right: calc(1rem + var(--safe-right));
    padding-bottom: calc(2rem + var(--safe-bottom));
  }


  /* Centered Content Width */
  .content-width {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
  }

  /* ── HERO SECTION ──────────────────────────────────────── */

  .hero {
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .hero h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f1f5f9 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  .hero p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
  }

  /* ── RECORD BUTTON (PROMINENT CTA) ─────────────────────── */

  .record-cta-container {
    margin: 1.5rem 0;
  }

  .record-cta {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 8px 24px rgba(67, 56, 202, 0.4), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
    letter-spacing: -0.01em;
    min-height: 56px;
  }

  .record-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(67, 56, 202, 0.55);
  }

  .record-cta:active {
    transform: translateY(0);
  }

  .record-cta.recording {
    background: linear-gradient(135deg, var(--error), #dc2626);
    animation: recPulse 1s ease-in-out infinite;
  }

  @keyframes recPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
  }

  /* ── CONTEXT ACCORDION (COLLAPSED BY DEFAULT) ──────────── */

  .context-accordion {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-primary);
  }

  .context-accordion-header {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s;
  }

  .context-accordion-header:hover {
    background: var(--bg-tertiary);
  }

  .context-accordion-header.open {
    background: var(--accent-light);
    color: var(--accent-text);
  }

  .accordion-arrow {
    font-size: 1.25rem;
    transition: transform 0.2s;
    display: inline-block;
  }

  .context-accordion-header.open .accordion-arrow {
    transform: rotate(180deg);
  }

  .context-accordion-body {
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  .context-accordion-body.open {
    visibility: visible;
    max-height: 2000px;
  }

  .context-accordion-content {
    padding: 1rem;
  }

  /* ── CARDS / SECTIONS ──────────────────────────────────── */

  .card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s;
  }

  .card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.1);
  }

  .card-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
  }

  /* ── WAVEFORM VISUALIZATION ───────────────────────────── */

  .waveform-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
  }

  canvas#waveCanvas {
    width: 100%;
    height: 100%;
    display: none;
  }

  .idle-bars {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.4;
  }

  .idle-bar {
    width: 2px;
    background: var(--accent);
    border-radius: 1px;
    animation: idlePulse 1.4s ease-in-out infinite;
  }

  @keyframes idlePulse {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
  }

  /* ── CONTROLS ──────────────────────────────────────────── */

  .controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
  }

  .btn {
    flex: 1;
    min-width: 100px;
    padding: 0.9rem 1.35rem;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
  }

  .btn:hover {
    border-color: var(--accent-text);
    background: var(--accent-light);
    color: var(--accent-text);
  }

  .btn:focus-visible {
    outline: 3px solid var(--accent-text);
    outline-offset: 2px;
  }

  .btn.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 600;
  }

  .btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.35);
  }

  .btn.primary:active {
    transform: translateY(0);
  }

  .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .btn.recording {
    background: var(--error);
    border-color: var(--error);
    color: white;
    animation: recPulse 1s ease-in-out infinite;
  }

  .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* ── STATUS & TIMER ────────────────────────────────────── */

  .status-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
  }

  .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
  }

  .status-dot.active {
    background: var(--error);
    animation: recPulse 1s infinite;
  }

  .status-dot.ready {
    background: var(--success);
  }

  .timer {
    font-family: 'Inter', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-text);
    background: var(--accent-light);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-left: auto;
  }

  audio {
    width: 100%;
    height: 36px;
    margin-top: 1rem;
    border-radius: 6px;
  }

  /* ── LOADING STATE ─────────────────────────────────────── */

  .loading-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--accent-text);
    font-weight: 500;
  }

  .spinner {
    animation: spin 1s linear infinite;
    display: inline-block;
    font-size: 1.25rem;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  .spec-bars {
    display: flex;
    height: 40px;
    gap: 2px;
    margin-top: 1rem;
    align-items: flex-end;
  }

  .spec-bar {
    flex: 1;
    background: linear-gradient(to top, var(--accent), var(--accent-light));
    border-radius: 2px 2px 0 0;
    opacity: 0;
    transition: opacity 0.3s;
  }

  /* ── RESULT CARD ───────────────────────────────────────── */

  .result-card {
    border-color: var(--accent);
    background: var(--accent-light);
  }

  .result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
  }

  .confidence-badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-text);
    border: 1px solid rgba(99, 102, 241, 0.35);
    font-weight: 600;
  }

  .vocalization-type {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
  }

  .fgc-code {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    font-weight: 600;
  }

  .translation-text {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-primary);
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 7px;
    border-left: 3px solid var(--accent);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 1rem;
  }

  .tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tag {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-weight: 500;
  }

  /* ── CONTEXTUAL INTERPRETATION ─────────────────────────── */

  .interp-card {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.04);
  }

  .interp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }

  .interp-header .card-label {
    color: var(--success);
  }

  .context-boost {
    font-size: 0.7rem;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 600;
  }

  .interp-section {
    margin-bottom: 1rem;
  }

  .interp-section:last-child {
    margin-bottom: 0;
  }

  .interp-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
  }

  .interp-section-body {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-radius: 7px;
    border-left: 3px solid var(--success);
  }

  .interp-welfare-flag {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.06);
  }

  .interp-context-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
  }

  .interp-context-chip {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-weight: 500;
  }

  /* ── CONTEXT CHIP SYSTEM ───────────────────────────────── */

  .context-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    margin-top: 0.75rem;
  }

  .chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .chip {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .chip:hover {
    border-color: var(--accent-text);
    color: var(--accent-text);
  }

  .chip.selected {
    background: var(--accent-light);
    border-color: var(--accent-text);
    color: var(--accent-text);
    font-weight: 600;
  }

  .chip-remove {
    font-size: 0.7rem;
    opacity: 0.7;
    cursor: pointer;
    margin-left: 0.1rem;
  }

  .chip-remove:hover {
    opacity: 1;
  }

  /* ── MODAL (BOTTOM SHEET) ──────────────────────────────── */

  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: flex-end;
    justify-content: center;
  }

  .modal.open {
    display: flex;
  }

  .modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    max-width: 100%;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  @media (min-width: 640px) {
    .modal {
      align-items: center;
      padding: 1.5rem;
    }
    .modal-content {
      border-radius: 24px;
      max-width: 580px;
      animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    @keyframes modalPop {
      from { transform: scale(0.95); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
  }

  .modal-close {
    min-width: var(--target); min-height: var(--target);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    flex-shrink: 0;
  }

  .modal-close:hover {
    border-color: var(--accent-text);
    color: var(--accent-text);
  }

  .modal-body {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-primary);
  }

  .modal-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
  }

  .modal-body p {
    margin-bottom: 1rem;
  }

  .modal-body a {
    color: var(--accent-text);
    text-decoration: none;
    font-weight: 600;
  }

  .modal-body a:hover {
    text-decoration: underline;
  }

  .modal-body li {
    margin-bottom: 0.5rem;
    margin-left: 1.5rem;
  }

  /* ── UTILITIES & ACCESSIBILITY ─────────────────────────– */

  .hidden {
    display: none !important;
  }

  .skip-link {
    position: absolute;
    top: -9999px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 0.75rem 1rem;
    text-decoration: none;
    z-index: 10001;
    border-radius: 0 0 10px 0;
    font-weight: 600;
  }

  .skip-link:focus {
    top: 0;
  }

  button:focus-visible,
  input:focus-visible,
  a:focus-visible {
    outline: 3px solid var(--accent-text);
    outline-offset: 2px;
  }

  /* Reduced motion support */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* ── RESPONSIVE DESIGN ─────────────────────────────────── */

  @media (max-width: 768px) {
    .scroll-container {
      padding: 1.25rem 0.75rem 2rem;
      padding-left: calc(0.75rem + var(--safe-left));
      padding-right: calc(0.75rem + var(--safe-right));
    }

    .content-width, .settings-panel-inner {
      max-width: 100%;
    }

    .content-width {
      gap: 1rem;
    }

    .hero h1 {
      font-size: 1.5rem;
      letter-spacing: -0.02em;
    }

    .hero p {
      font-size: 0.9rem;
    }

    .record-cta {
      padding: 1rem 1.25rem;
      font-size: 1rem;
      min-height: 50px;
    }

    .card {
      padding: 1rem;
    }

    .btn {
      font-size: 0.8rem;
      padding: 0.75rem 1rem;
      min-height: 42px;
    }

    .vocalization-type {
      font-size: 1.1rem;
    }

    .translation-text {
      font-size: 0.85rem;
      padding: 0.75rem 0.9rem;
    }

    .modal-content {
      padding: 1.25rem;
    }

    .modal-header h2 {
      font-size: 1.1rem;
    }

    .modal-body {
      font-size: 0.85rem;
    }

    /* Age group — wrap to two per row on medium screens */
    .cat-age-radios {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.5rem;
    }

    .cat-age-radios label {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      padding: 0.5rem 0.25rem;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 8px;
      font-size: 0.8rem;
      text-align: center;
      cursor: pointer;
    }

    /* Soundboard — 2-col on all tablet sizes */
    .soundboard-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    /* Pricing cards — keep 1-col below 480, 3-col above handled separately */
    .stripe-pack-btn {
      padding: 0.9rem 0.5rem;
    }
  }

  @media (max-width: 480px) {
    /* ── Header ─────────────────────────────── */
















    /* ── Layout ──────────────────────────── */
    .scroll-container {
      padding: 1rem 0.75rem 1.5rem;
      padding-left: calc(0.75rem + var(--safe-left));
      padding-right: calc(0.75rem + var(--safe-right));
    }

    .hero h1 {
      font-size: 1.25rem;
      letter-spacing: -0.02em;
    }

    .hero p {
      font-size: 0.85rem;
    }

    .record-cta {
      padding: 0.9rem 1.1rem;
      font-size: 0.95rem;
      min-height: 48px;
      border-radius: 10px;
    }

    .record-cta svg {
      width: 18px;
      height: 18px;
    }

    .card {
      padding: 0.85rem 0.75rem;
      border-radius: 10px;
    }

    .card-label {
      font-size: 0.65rem;
      margin-bottom: 0.6rem;
    }

    .btn {
      font-size: 0.75rem;
      padding: 0.65rem 0.8rem;
      min-height: 40px;
      min-width: 80px;
    }

    .controls {
      gap: 0.5rem;
    }

    .waveform-container {
      height: 80px;
      margin-bottom: 0.75rem;
    }

    .status-line {
      font-size: 0.75rem;
    }

    .timer {
      font-size: 0.8rem;
    }

    audio {
      height: 32px;
      margin-top: 0.75rem;
    }

    /* ── Results ────────────────────────── */
    .vocalization-type {
      font-size: 0.95rem;
    }

    .confidence-badge {
      font-size: 0.65rem;
      padding: 0.3rem 0.6rem;
    }

    .fgc-code {
      font-size: 0.7rem;
    }

    .translation-text {
      font-size: 0.8rem;
      padding: 0.75rem 0.85rem;
    }

    .tag {
      font-size: 0.7rem;
      padding: 0.3rem 0.6rem;
    }

    .chip {
      padding: 0.3rem 0.6rem;
      font-size: 0.75rem;
    }

    .context-section-label {
      font-size: 0.65rem;
      margin-top: 0.6rem;
    }

    .interp-section-body {
      font-size: 0.8rem;
      padding: 0.65rem 0.85rem;
    }

    /* ── Age Group Radios — stack to pill buttons ─ */
    .cat-age-radios {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.4rem;
    }

    .cat-age-radios label {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.25rem;
      padding: 0.55rem 0.25rem;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 8px;
      font-size: 0.72rem;
      line-height: 1.3;
      text-align: center;
      cursor: pointer;
      color: var(--text-secondary);
    }

    .cat-age-radios input[type="radio"] {
      width: 14px;
      height: 14px;
      margin: 0;
    }

    /* ── Soundboard — compact single column on very small screens ── */
    .soundboard-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 0.5rem;
    }

    .soundboard-btn {
      padding: 0.85rem 0.5rem;
    }

    .soundboard-emoji {
      font-size: 1.5rem;
    }

    /* ── Pricing Cards — always single column on small phones ── */
    .stripe-pack-container {
      grid-template-columns: 1fr !important;
      gap: 0.6rem;
    }

    .stripe-pack-btn {
      padding: 0.85rem 1rem;
      flex-direction: row;
      justify-content: space-between;
      gap: 0.5rem;
    }

    .stripe-pack-btn.premium-highlight {
      transform: none; /* remove scale on mobile, use border only */
    }

    /* ── Modal ──────────────────────────── */
    .modal-content {
      padding: 1.1rem;
      border-radius: 12px 12px 0 0;
    }

    .modal-header {
      margin-bottom: 0.75rem;
      padding-bottom: 0.75rem;
    }

    .modal-header h2 {
      font-size: 1rem;
    }

    .modal-body {
      font-size: 0.8rem;
    }

    .modal-body h3 {
      font-size: 0.9rem;
      margin-top: 1rem;
      margin-bottom: 0.6rem;
    }

    /* ── Testimonials — tighten on small screens ── */
    .testimonials-section {
      margin-top: 1rem;
      padding-top: 1rem;
    }

    .testimonial-card {
      padding: 0.65rem 0.75rem;
      font-size: 0.82rem;
    }
  }

  /* ── CAT PROFILE ────────────────────────────────────────── */
  .cat-profile-section {
    overflow-wrap: anywhere;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
  }

  .cat-profile-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .cat-age-radios {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
  }

  .cat-age-radios label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    color: var(--text-secondary);
  }

  /* ── WELFARE BADGE ──────────────────────────────────────── */
  .welfare-btn {
    background: transparent;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    display: none; /* Hidden unless active welfare alerts exist */
    align-items: center;
    gap: 0.35rem;
    color: var(--warning);
    font-size: 0.72rem;
    font-weight: 700;
    transition: all 0.2s;
    white-space: nowrap;
  }

  .welfare-btn.visible {
    display: inline-flex !important;
    border-color: var(--warning);
    color: var(--warning);
  }

  .welfare-btn:hover {
    background: rgba(251, 191, 36, 0.12);
  }

  .welfare-badge {
    background: var(--warning);
    color: #0f172a;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.1rem 0.38rem;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
  }

  /* ── SHARE BUTTON ───────────────────────────────────────── */
  .share-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.65rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }

  .share-btn:hover {
    border-color: var(--accent-text);
    color: var(--accent-text);
    background: var(--accent-light);
  }

  /* ── HISTORY SECTION ────────────────────────────────────── */
  .history-section {
    display: none;
  }

  .history-section.visible,
  .history-details-accordion[open] .history-section {
    display: block;
  }

  .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
  }

  .history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .history-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .history-item:hover {
    border-color: var(--accent-text);
    background: var(--accent-light);
  }

  .history-item.welfare {
    border-left: 3px solid var(--warning);
  }

  .history-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.35rem;
  }

  .history-item-body {
    flex: 1;
    min-width: 0;
  }

  .history-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .history-item-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
  }

  .history-item-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    flex-shrink: 0;
  }

  .history-clear {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: color 0.2s;
  }

  .history-clear:hover {
    color: var(--error);
  }

  .export-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.25rem 0.6rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }

  .export-btn:hover {
    border-color: var(--accent-text);
    color: var(--accent-text);
  }

  /* ── TREND CHART ────────────────────────────────────────── */
  .trend-chart {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
  }

  .trend-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
  }

  .trend-dots {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
  }

  .trend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: default;
    transition: transform 0.15s;
  }

  .trend-dot:hover, .trend-dot:focus-visible {
    transform: scale(1.6);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .trend-connector {
    width: 14px;
    height: 1px;
    background: var(--border);
    flex-shrink: 0;
  }

  @media (min-width: 768px) {
    .scroll-container {
      padding: 2rem 1.5rem 3rem;
    }

    .settings-panel-inner {
      max-width: 680px;
    }

    .content-width{
      max-width: 720px;
    }

    .content-width {
      gap: 1.5rem;
    }

    .hero h1 {
      font-size: 2rem;
    }

    .card {
      padding: 1.5rem;
    }

    .record-cta {
      padding: 1.5rem 2rem;
      font-size: 1.15rem;
      min-height: 60px;
    }
  }

  /* ── DESKTOP DUAL-PANE COMMAND STATION (AQ-KIT CUBE 08 & CUBE 05) ── */
  .desktop-station-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
  }

  .station-rail-left {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
  }

  .station-rail-right {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    min-width: 0;
  }

  .station-full-width {
    width: 100%;
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
  }

  .privacy-guarantee-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
  }
  .privacy-guarantee-pill strong {
    color: var(--text-secondary);
  }

  .empty-state-card {
    text-align: center;
    padding: 2.25rem 1.5rem;
    border: 1.5px dashed var(--border);
    background: var(--card-bg);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: background-color 0.3s ease, border-color 0.3s ease;
  }
  .empty-state-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-text);
    background: var(--accent-light);
    border: 1px solid var(--accent);
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    margin-bottom: 0.25rem;
  }
  .empty-state-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
  }
  .empty-state-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    max-width: 440px;
    line-height: 1.5;
    margin: 0;
  }

  /* 3-Step Scannable Outcome Guide */
  .outcome-guide-card {
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  }
  .outcome-guide-header {
    margin-bottom: 1rem;
    text-align: left;
  }
  .guide-tag {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent-text);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.2rem;
  }
  .outcome-guide-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
  }
  .outcome-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
  .outcome-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 0.65rem;
    text-align: left;
  }
  .outcome-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
  }
  .outcome-step-text strong {
    display: block;
    font-size: 0.82rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
  }
  .outcome-step-text span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
  }
  @media (max-width: 640px) {
    .outcome-steps-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (min-width: 1024px) {
    .content-width{
      max-width: 1220px;
    }
    .desktop-station-grid {
      display: grid;
      grid-template-columns: 440px minmax(0, 1fr);
      grid-template-areas: "profile recorder";
      gap: 2.25rem;
      align-items: start;
    }
    .station-rail-left {
      grid-area: profile;
      position: sticky;
      top: 5rem;
    }
    .station-rail-right { grid-area: recorder; }
    .hero {
      text-align: left;
    }
    .hero h1 {
      font-size: 2.25rem;
    }
    .hero-guest-pill {
      margin-top: 0.5rem;
    }
    .capture-hub-container {
      margin: 0;
      padding: 1.5rem;
    }
  }

  @media (min-width: 1400px) {
    .content-width{
      max-width: 1280px;
    }
    .desktop-station-grid {
      grid-template-columns: 460px minmax(0, 1fr);
      gap: 2.75rem;
    }
  }

    
    /* --- Conversational Chat UI --- */
    .chat-timeline {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
      margin-top: 2rem;
      margin-bottom: 2rem;
      width: 100%;
    }
    .chat-bubble {
      display: flex;
      gap: 1rem;
      padding: 1.25rem;
      border-radius: var(--radius-md);
      border: 1px solid rgba(255,255,255,0.08);
      position: relative;
      box-shadow: 0 4px 15px rgba(0,0,0,0.15);
      animation: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
      max-width: 100%;
      box-sizing: border-box;
    }
    .chat-avatar {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--bg-tertiary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      flex-shrink: 0;
      border: 1.5px solid var(--border);
    }
    .chat-bubble-body {
      flex: 1;
      min-width: 0;
    }
    .chat-sender-name {
      font-weight: 700;
      font-size: 1rem;
      margin-bottom: 0.35rem;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 0.5rem;
    }
    .chat-bubble-meta {
      font-size: 0.75rem;
      color: var(--text-muted);
      font-weight: 400;
    }
    .chat-message-text {
      font-size: 0.95rem;
      line-height: 1.6;
      color: var(--text-secondary);
    }

    /* Category Specific Themes */
    .theme-social {
      background: rgba(52, 211, 153, 0.04);
      border-color: rgba(52, 211, 153, 0.2);
    }
    .theme-social .chat-avatar {
      border-color: #34d399;
      box-shadow: 0 0 10px rgba(52, 211, 153, 0.15);
    }
    .theme-feeding {
      background: rgba(165, 180, 252, 0.04);
      border-color: rgba(165, 180, 252, 0.2);
    }
    .theme-feeding .chat-avatar {
      border-color: #a5b4fc;
      box-shadow: 0 0 10px rgba(165, 180, 252, 0.15);
    }
    .theme-defensive {
      background: rgba(248, 113, 113, 0.04);
      border-color: rgba(248, 113, 113, 0.2);
    }
    .theme-defensive .chat-avatar {
      border-color: #f87171;
      box-shadow: 0 0 10px rgba(248, 113, 113, 0.15);
    }
    .theme-distress {
      background: rgba(251, 191, 36, 0.04);
      border-color: rgba(251, 191, 36, 0.2);
    }
    .theme-distress .chat-avatar {
      border-color: #fbbf24;
      box-shadow: 0 0 10px rgba(251, 191, 36, 0.15);
    }
    .theme-reproductive {
      background: rgba(244, 114, 182, 0.04);
      border-color: rgba(244, 114, 182, 0.2);
    }
    .theme-reproductive .chat-avatar {
      border-color: #f472b6;
      box-shadow: 0 0 10px rgba(244, 114, 182, 0.15);
    }
    .theme-general {
      background: var(--bg-secondary);
      border-color: var(--border);
    }
    .user-bubble {
      background: rgba(99, 102, 241, 0.04);
      border-color: rgba(99, 102, 241, 0.2);
    }
    .user-bubble .chat-avatar {
      border-color: #6366f1;
      box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
    }

    .system-error {
      background: rgba(239, 68, 68, 0.05);
      border-color: rgba(239, 68, 68, 0.25);
      color: var(--error);
      padding: 1rem;
    }

    /* Chat Details Accordion */
    .chat-details-accordion {
      margin-top: 1rem;
      border-top: 1px solid rgba(255,255,255,0.05);
      padding-top: 0.75rem;
    }
    .chat-details-summary {
      font-size: 0.8rem;
      color: var(--accent-text);
      cursor: pointer;
      user-select: none;
      font-weight: 500;
      outline: none;
    }
    .chat-details-summary:hover {
      text-decoration: underline;
    }
    .chat-details-content {
      margin-top: 0.6rem;
      font-size: 0.82rem;
      color: var(--text-muted);
      line-height: 1.5;
      background: rgba(0, 0, 0, 0.12);
      padding: 0.75rem 1rem;
      border-radius: var(--radius-sm);
    }
    .chat-details-content p {
      margin: 0 0 0.5rem 0;
    }
    .chat-details-content p:last-child {
      margin-bottom: 0;
    }

    /* Suggested Replies Container */
    .chat-replies-container {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      margin-top: 0.5rem;
      align-self: flex-end;
      width: 100%;
      max-width: 90%;
      animation: slide-up-reply 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .chat-replies-label {
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      align-self: flex-end;
      margin-right: 0.5rem;
    }
    .chat-replies-chips {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      align-items: flex-end;
    }
    .chat-reply-chip {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: var(--text-secondary);
      border-radius: 99px;
      padding: 0.5rem 1rem;
      font-size: 0.85rem;
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-weight: 500;
      outline: none;
    }
    .chat-reply-chip:hover, .chat-reply-chip.active {
      border-color: var(--accent);
      color: var(--accent-text);
      background: rgba(99, 102, 241, 0.08);
      transform: translateY(-1px);
    }
    .chat-reply-drawer {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: var(--radius-md);
      padding: 1rem;
      width: 100%;
      box-sizing: border-box;
      animation: fade-in 0.3s ease;
      position: relative;
      text-align: left;
    }
    .chat-demo-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      background: rgba(99, 102, 241, 0.12);
      border: 1px solid rgba(99, 102, 241, 0.25);
      color: #a5b4fc;
      padding: 0.2rem 0.55rem;
      border-radius: 20px;
      margin-bottom: 0.6rem;
      width: fit-content;
    }

    /* 3-section translation output */
    .translation-section { margin-bottom: 0.85rem; }
    .translation-section:last-child { margin-bottom: 0; }
    .translation-section-label {
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 0.09em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 0.3rem;
      display: flex;
      align-items: center;
      gap: 0.3rem;
    }
    .translation-what {
      font-size: 1.05rem;
      font-weight: 600;
      line-height: 1.5;
      color: var(--text-primary);
      font-style: italic;
    }
    .translation-feel {
      font-size: 0.88rem;
      line-height: 1.5;
      color: var(--text-secondary);
    }
    .translation-do {
      font-size: 0.88rem;
      line-height: 1.5;
      color: var(--text-primary);
      background: rgba(99,102,241,0.06);
      border-left: 3px solid #6366f1;
      padding: 0.4rem 0.65rem;
      border-radius: 0 6px 6px 0;
    }
    .welfare-row {
      display: flex;
      align-items: flex-start;
      gap: 0.4rem;
      margin-top: 0.6rem;
      padding: 0.45rem 0.65rem;
      background: rgba(239,68,68,0.06);
      border-left: 3px solid var(--error);
      border-radius: 0 6px 6px 0;
      font-size: 0.82rem;
      color: var(--error);
      font-weight: 600;
    }

    /* Meow Capture Hub Styling */
    .capture-hub-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: 1.5rem auto 2rem auto;
      position: relative;
      width: 100%;
      background: rgba(255, 255, 255, 0.015);
      border: 1px solid rgba(255, 255, 255, 0.04);
      border-radius: 24px;
      padding: 1.5rem;
      box-sizing: border-box;
    }
    .capture-hub-controls {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1.25rem;
      width: 100%;
    }
    .capture-hub-actions {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.75rem;
      width: 100%;
    }
    .continuous-translator-wrap {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      background: rgba(99, 102, 241, 0.05);
      border: 1px solid rgba(99, 102, 241, 0.15);
      padding: 0.5rem 0.85rem;
      border-radius: 14px;
      box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .continuous-translator-label {
      font-size: 0.825rem;
      color: var(--text-primary);
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
    }
    .capture-hub-btn {
      width: 128px;
      height: 128px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 30%, #ff529a 0%, #cf0f5c 55%, #be123c 100%);
      border: 3.5px solid #0f172a;
      position: relative;
      cursor: pointer;
      outline: none;
      transition: transform 0.12s ease, box-shadow 0.12s ease;
      box-shadow: 0 0 24px rgba(255, 42, 133, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.5), 5px 5px 0px #0f172a;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
    }
    .capture-hub-btn:hover {
      transform: translate(-2px, -2px) scale(1.03);
      box-shadow: 0 0 36px rgba(255, 42, 133, 0.65), inset 0 2px 4px rgba(255, 255, 255, 0.6), 7px 7px 0px #0f172a;
    }
    .capture-hub-btn:active {
      transform: translate(3px, 3px) scale(0.97);
      box-shadow: 0 0 16px rgba(255, 42, 133, 0.35), 2px 2px 0px #0f172a;
    }
    .capture-hub-btn.recording {
      border-color: #0f172a;
      animation: anime-record-pulse 1.4s infinite ease-in-out;
      background: radial-gradient(circle at 35% 30%, #f43f5e 0%, #be123c 55%, #9f1239 100%);
    }
    body[data-theme="cosmic"] .capture-hub-btn {
      background: radial-gradient(circle at 35% 30%, #38bdf8 0%, #0284c7 55%, #0369a1 100%);
      border-color: #38bdf8;
      box-shadow: 0 0 25px rgba(56, 189, 248, 0.45), 6px 6px 0px #38bdf8;
    }
    .capture-hub-inner {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 78px;
      height: 78px;
      border-radius: 50%;
      background: radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.20) 60%, rgba(255, 255, 255, 0.08) 100%);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      border: 2px solid rgba(255, 255, 255, 0.65);
      z-index: 2;
      transition: all 0.2s ease;
      box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.7), inset 0 -2px 6px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2);
      color: #ffffff;
    }
    .capture-hub-btn:hover .capture-hub-inner {
      transform: scale(1.05);
      background: radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.28) 60%, rgba(255, 255, 255, 0.14) 100%);
      border-color: rgba(255, 255, 255, 0.9);
    }
    .capture-hub-inner svg,
    .capture-hub-inner .paw-svg {
      fill: #ffffff !important;
      color: #ffffff !important;
      filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.45));
      transition: transform 0.2s ease;
    }
    .capture-hub-btn:hover .capture-hub-inner svg {
      transform: scale(1.08);
    }
    .capture-hub-btn.recording .capture-hub-icon {
      transform: scale(0.95);
    }
    @keyframes anime-record-pulse {
      0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(244, 63, 94, 0.6), 5px 5px 0px #0f172a; }
      50% { transform: scale(1.05); box-shadow: 0 0 45px rgba(255, 42, 133, 0.85), 7px 7px 0px #0f172a; }
    }
    .capture-hub-canvas {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      pointer-events: none;
      z-index: 1;
      opacity: 0.6;
    }
    .capture-status-container {
      text-align: center;
      margin-top: 1rem;
    }
    .capture-timer {
      font-size: 1.5rem;
      font-weight: 700;
      font-family: monospace;
      color: var(--accent-text);
      height: 1.8rem;
      margin-bottom: 0.25rem;
    }
    .btn-link {
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      text-decoration: underline;
      font-size: 0.82rem;
      padding: 0.25rem 0.5rem;
      transition: color 0.2s ease;
      outline: none;
    }
    #chatTimeline .btn-link, #discardStatus .btn-link {
      min-height: 44px;
      min-width: 44px;
    }
    .btn-link:hover {
      color: var(--text-secondary);
    }

    /* History Collapsible Styles */
    .history-details-accordion {
      width: 100%;
    }
    .history-details-summary {
      list-style: none;
      font-size: 0.85rem;
      color: var(--text-muted);
      cursor: pointer;
      text-align: center;
      padding: 0.6rem;
      border-radius: var(--radius-sm);
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.05);
      font-weight: 500;
      transition: all 0.2s ease;
      user-select: none;
      outline: none;
    }
    .history-details-summary::-webkit-details-marker {
      display: none;
    }
    .history-details-summary:hover {
      background: rgba(255,255,255,0.04);
      color: var(--text-primary);
    }

    @keyframes pulse-halo {
      0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.45), 0 8px 24px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.05);
      }
      70% {
        box-shadow: 0 0 0 14px rgba(99, 102, 241, 0), 0 8px 24px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.05);
      }
      100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0), 0 8px 24px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.05);
      }
    }

    @keyframes pulse-red {
      0% { transform: scale(1); }
      50% { transform: scale(1.05); }
      100% { transform: scale(1); }
    }
    @keyframes slide-up {
      from { opacity: 0; transform: translateY(15px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes slide-up-reply {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes fade-in {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    /* --- Low credit banner --- */
    .low-credits-banner {
      background: rgba(251, 191, 36, 0.08);
      color: var(--warning);
      border: 1px solid rgba(251, 191, 36, 0.25);
      padding: 0.75rem 1rem;
      border-radius: var(--radius-md);
      margin-bottom: 1.5rem;
      font-weight: 500;
      display: none;
      align-items: center;
      justify-content: space-between;
      box-shadow: 0 4px 12px rgba(251, 191, 36, 0.06);
    }
    .low-credits-banner-btn {
      background: var(--warning);
      color: #0f172a;
      border: none;
      padding: 0.4rem 0.8rem;
      border-radius: 4px;
      font-weight: 600;
      cursor: pointer;
      font-size: 0.85rem;
      transition: all 0.2s ease;
    }
    .low-credits-banner-btn:hover {
      background: #fcd34d;
      transform: translateY(-1px);
    }

    /* --- Stripe Credits Pack UI --- */
    .stripe-pack-container {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0.75rem;
      margin-top: 0.75rem;
    }
    @media (min-width: 480px) {
      .stripe-pack-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem; /* Spacious gap to prevent elements from hugging */
      }
    }
    .stripe-pack-btn {
      background: var(--card-bg);
      border: 1.5px solid var(--border);
      border-radius: var(--radius-md);
      padding: 1.15rem 0.75rem;
      text-align: center;
      cursor: pointer;
      transition: all 0.25s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    .stripe-pack-btn:hover {
      background: var(--bg-secondary);
      border-color: var(--accent);
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    }
    .stripe-pack-price {
      font-size: 1.45rem;
      font-weight: 700;
      color: var(--accent-text);
      margin-bottom: 0.25rem;
    }
    .stripe-pack-title {
      font-size: 1rem;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 0.25rem;
    }
    .stripe-pack-desc {
      font-size: 0.8rem;
      color: var(--text-muted);
    }
    .unit-tag {
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 0.03em;
      color: var(--text-muted);
      margin-top: 0.2rem;
    }
    .pricing-trust-strip {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.85rem;
      margin-top: 0.85rem;
      padding-top: 0.75rem;
      font-size: 0.75rem;
      color: var(--text-muted);
      border-top: 1px dashed var(--border);
    }

    /* --- Talk Back Card --- */
    .talkback-card {
      margin-top: 1.5rem;
      border: 1px solid rgba(52, 211, 153, 0.2);
    }
    .talkback-header {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--success);
      margin-bottom: 1rem;
    }
    .talkback-list {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }
    .talkback-item {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: var(--radius-md);
      padding: 1rem;
      position: relative;
    }
    .talkback-badge {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: rgba(165, 180, 252, 0.15);
      color: #a5b4fc;
      font-size: 0.75rem;
      padding: 0.2rem 0.5rem;
      border-radius: 99px;
      font-weight: 500;
    }
    .talkback-badge.gesture {
      background: rgba(52, 211, 153, 0.15);
      color: #34d399;
    }
    .talkback-title {
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: 0.25rem;
      color: var(--text-primary);
      max-width: 70%;
    }
    .talkback-desc {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-bottom: 0.75rem;
    }
    .talkback-instructions {
      font-size: 0.9rem;
      background: rgba(255, 255, 255, 0.04);
      padding: 0.6rem 0.75rem;
      border-radius: 6px;
      border-left: 3px solid var(--accent);
      color: var(--text-secondary);
      margin-bottom: 0.75rem;
    }
    .talkback-science-btn {
      background: none;
      border: none;
      color: var(--accent-text);
      font-size: 0.8rem;
      padding: 0;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.25rem;
      font-weight: 500;
    }
    .talkback-science-btn:hover {
      text-decoration: underline;
    }
    .talkback-science-content {
      margin-top: 0.5rem;
      font-size: 0.8rem;
      color: var(--text-muted);
      line-height: 1.4;
      padding: 0.5rem 0.75rem;
      background: rgba(0, 0, 0, 0.15);
      border-radius: 4px;
    }

    /* ── INTERACTIVE DEMO SOUNDBOARD ─────────────────────── */
    .soundboard-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 0.75rem;
      margin-top: 1rem;
    }
    .soundboard-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      padding: 1.15rem 0.75rem;
      background: var(--bg-tertiary);
      border: 2px solid var(--border);
      border-radius: 18px;
      cursor: pointer;
      color: var(--text-primary);
      transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
      outline: none;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
    .soundboard-btn:hover, .soundboard-btn:focus-visible {
      background: var(--accent-light);
      border-color: var(--accent);
      transform: translateY(-3px) scale(1.02);
      box-shadow: 0 8px 24px var(--accent-glow, rgba(236, 72, 153, 0.3));
    }
    .soundboard-btn:active {
      transform: translateY(0) scale(0.98);
    }
    .soundboard-emoji {
      font-size: 1.75rem;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
      transition: transform 0.2s ease;
    }
    .soundboard-btn:hover .soundboard-emoji {
      transform: scale(1.18) rotate(6deg);
    }
    .talkback-sound-btn {
      transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }
    .talkback-sound-btn:hover, .talkback-sound-btn:focus-visible {
      transform: translateY(-3px) scale(1.02) !important;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
    }
    .talkback-sound-btn:active {
      transform: translateY(0) scale(0.98) !important;
    }
    .tb-icon-circle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.08);
      margin: 0 auto 0.35rem auto;
      font-size: 1.25rem;
      box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 2px 6px rgba(0, 0, 0, 0.12);
      transition: transform 0.25s ease;
    }
    .talkback-sound-btn:hover .tb-icon-circle,
    .talkback-sound-btn:focus-visible .tb-icon-circle {
      transform: scale(1.15) rotate(5deg);
    }

    /* Semantic Color Variants for Soundboard & TalkBack */
    .sb-btn-amber {
      background: var(--sb-amber-bg) !important;
      border: 2px solid var(--sb-amber-border) !important;
    }
    .sb-btn-amber .sb-label {
      color: var(--sb-amber-text) !important;
    }
    .sb-btn-amber:hover, .sb-btn-amber:focus-visible {
      border-color: var(--sb-amber-text) !important;
      box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3) !important;
    }

    .sb-btn-emerald {
      background: var(--sb-emerald-bg) !important;
      border: 2px solid var(--sb-emerald-border) !important;
    }
    .sb-btn-emerald .sb-label {
      color: var(--sb-emerald-text) !important;
    }
    .sb-btn-emerald:hover, .sb-btn-emerald:focus-visible {
      border-color: var(--sb-emerald-text) !important;
      box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3) !important;
    }

    .sb-btn-purple {
      background: var(--sb-purple-bg) !important;
      border: 2px solid var(--sb-purple-border) !important;
    }
    .sb-btn-purple .sb-label {
      color: var(--sb-purple-text) !important;
    }
    .sb-btn-purple:hover, .sb-btn-purple:focus-visible {
      border-color: var(--sb-purple-text) !important;
      box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3) !important;
    }

    .sb-btn-pink {
      background: var(--sb-pink-bg) !important;
      border: 2px solid var(--sb-pink-border) !important;
    }
    .sb-btn-pink .sb-label {
      color: var(--sb-pink-text) !important;
    }
    .sb-btn-pink:hover, .sb-btn-pink:focus-visible {
      border-color: var(--sb-pink-text) !important;
      box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3) !important;
    }

    /* TalkBack Color Variants */
    .tb-btn-purple {
      background: var(--sb-purple-bg) !important;
      border: 2px solid var(--sb-purple-border) !important;
    }
    .tb-btn-purple strong {
      color: var(--sb-purple-text) !important;
    }
    .tb-btn-emerald {
      background: var(--sb-emerald-bg) !important;
      border: 2px solid var(--sb-emerald-border) !important;
    }
    .tb-btn-emerald strong {
      color: var(--sb-emerald-text) !important;
    }
    .tb-btn-amber {
      background: var(--sb-amber-bg) !important;
      border: 2px solid var(--sb-amber-border) !important;
    }
    .tb-btn-amber strong {
      color: var(--sb-amber-text) !important;
    }
    .tb-btn-pink {
      background: var(--sb-pink-bg) !important;
      border: 2px solid var(--sb-pink-border) !important;
    }
    .tb-btn-pink strong {
      color: var(--sb-pink-text) !important;
    }

    .sb-label {
      font-size: 0.92rem;
      font-weight: 700;
      display: block;
      line-height: 1.25;
    }
    .sb-tag {
      font-size: 0.75rem;
      color: var(--text-muted);
      display: block;
    }
    .talkback-sound-btn span.tb-desc {
      font-size: 0.72rem;
      color: var(--text-muted);
      display: block;
      margin-top: 0.15rem;
    }
    body[data-theme="sunshine"] .sb-tag,
    body[data-theme="sunshine"] .talkback-sound-btn span.tb-desc {
      color: #475569 !important; /* Slate 600 - passes 5.6:1 AA */
    }

    /* Semantic Text Utility Classes */
    .sb-amber-text { color: var(--sb-amber-text) !important; }
    .sb-emerald-text { color: var(--sb-emerald-text) !important; }
    .sb-purple-text { color: var(--sb-purple-text) !important; }
    .sb-pink-text { color: var(--sb-pink-text) !important; }

    /* Modern Station Accordions */
    .station-accordion {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    }
    .station-accordion[open] {
      border-color: var(--accent);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    }
    .station-accordion-summary {
      padding: 0.95rem 1.25rem;
      font-size: 0.92rem;
      font-weight: 600;
      color: var(--text-primary);
      cursor: pointer;
      user-select: none;
      display: flex;
      justify-content: space-between;
      align-items: center;
      list-style: none;
      transition: background-color 0.15s ease;
    }
    .station-accordion-summary::-webkit-details-marker {
      display: none;
    }
    .station-accordion-summary:hover, .station-accordion-summary:focus-visible {
      background: var(--accent-light);
    }
    .station-accordion .accordion-chevron {
      font-size: 0.85rem;
      color: var(--text-muted);
      transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .station-accordion[open] .accordion-chevron {
      transform: rotate(180deg);
      color: var(--accent);
    }
    .station-accordion-body {
      padding: 1.25rem;
      font-size: 0.85rem;
      color: var(--text-secondary);
      line-height: 1.6;
      border-top: 1px solid var(--border);
      background: var(--bg-secondary);
    }

    /* Feline Bioacoustics Library & Guide Topic Cards */
    .feline-library-cluster {
      margin-top: 2rem;
      padding: 1.5rem;
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 16px;
      text-align: left;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
      transition: background-color 0.3s ease, border-color 0.3s ease;
    }
    .guide-topic-card {
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 0.85rem 1rem;
      text-decoration: none;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .guide-topic-card:hover, .guide-topic-card:focus-visible {
      border-color: var(--accent);
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }
    .guide-topic-title {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text-primary);
      line-height: 1.35;
      display: block;
    }
    .guide-topic-desc {
      font-size: 0.78rem;
      color: var(--text-muted);
      line-height: 1.45;
      display: block;
    }

    /* Vocal Insight Cards (Understanding Cat Vocalizations) */
    .vocal-insight-card {
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1rem;
      text-decoration: none;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .vocal-insight-card:hover, .vocal-insight-card:focus-visible {
      border-color: var(--accent);
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }
    .vocal-insight-title {
      font-size: 0.92rem;
      font-weight: 700;
      line-height: 1.3;
    }
    .vocal-insight-desc {
      font-size: 0.85rem;
      color: var(--text-secondary);
      line-height: 1.55;
    }

    /* ── PREMIUM PRICING ELEVATION ──────────────────────── */
    .stripe-pack-btn.premium-highlight {
      border: 2px solid var(--warning) !important;
      background: rgba(245, 158, 11, 0.08) !important;
      box-shadow: 0 8px 24px rgba(245, 158, 11, 0.18) !important;
      transform: scale(1.03);
      position: relative;
      z-index: 2;
    }
    .stripe-pack-btn.premium-highlight:hover {
      box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28) !important;
      transform: scale(1.05) translateY(-2px) !important;
    }
    .stripe-pack-btn.subscription-highlight {
      border: 2px solid var(--accent) !important;
      background: var(--accent-light) !important;
      box-shadow: 0 8px 24px var(--accent-glow) !important;
      transform: scale(1.02);
      position: relative;
      z-index: 2;
    }
    .stripe-pack-btn.subscription-highlight:hover {
      box-shadow: 0 12px 28px var(--accent-glow) !important;
      transform: scale(1.04) translateY(-2px) !important;
    }
    .stripe-pack-btn.dimmed {
      opacity: 0.95;
    }
    .stripe-pack-btn.dimmed:hover {
      opacity: 1;
    }

    /* Testimonials styles */
    .testimonials-section {
      margin-top: 1.5rem;
      border-top: 1px dashed var(--border);
      padding-top: 1.25rem;
      text-align: left;
    }
    .testimonials-title {
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 0.75rem;
      text-align: center;
    }
    .testimonial-card {
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0.85rem 1.1rem;
      margin-bottom: 0.75rem;
      font-size: 0.875rem;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    }
    .testimonial-author {
      font-size: 0.75rem;
      color: var(--accent-text);
      font-weight: 600;
      margin-top: 0.25rem;
    }
    /* Switch Toggle Styles */
    .switch {
      position: relative;
      display: inline-block;
      width: 40px;
      height: 22px;
    }
    .switch input { 
      opacity: 0;
      width: 0;
      height: 0;
    }
    .slider {
      position: absolute;
      cursor: pointer;
      top: 0; left: 0; right: 0; bottom: 0;
      background-color: rgba(255,255,255,0.15);
      transition: .3s;
      border-radius: 34px;
    }
    .slider:before {
      position: absolute;
      content: "";
      height: 16px;
      width: 16px;
      left: 3px;
      bottom: 3px;
      background-color: white;
      transition: .3s;
      border-radius: 50%;
    }
    input:checked + .slider {
      background-color: var(--accent);
    }
    input:checked + .slider:before {
      transform: translateX(18px);
    }

    /* Universal Card & Component Width Control */
    .card, 
    .soundboard-container, 
    .promo-card, 
    .sound-guides-container, 
    .capture-hub-container,
    .history-section,
    .fun-scenarios-card {
      width: 100% !important;
      max-width: 100% !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      box-sizing: border-box !important;
    }

    /* Layout Stack Wrapper */
    .app-layout-grid {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
      width: 100%;
    }

#mainRecordBtn[aria-disabled="true"], #mobileQuickPawBtn[aria-disabled="true"] { background: var(--disabled-bg); color: var(--disabled-text); animation: none; box-shadow: none; cursor: not-allowed; }
#mainRecordBtn[aria-disabled="true"] .capture-hub-inner, #mobileQuickPawBtn[aria-disabled="true"] .mobile-quick-paw-icon-inner { animation: none; }

/* WO-030: existing design tokens for the lead and four-part supporting section. */
.hero-top-banner .lead { font: var(--fw-regular) var(--fs-lg)/var(--lh-lg) var(--font); }
.home-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--s-4); }
.home-areas > h2 { grid-column: 1 / -1; }


/* Keep the native listening checkbox reachable while showing focus on its visible switch. */
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.switch .slider { pointer-events: none; }
.switch:has(input:focus-visible) { outline: var(--border-w) solid var(--focus); outline-offset: var(--border-w); }

/* Reserve the floating record action area when native keyboard focus scrolls a phone page. */
@media (max-width: 768px) { html { scroll-padding-bottom: calc(var(--target) + var(--s-12)); } }

:root {
  color-scheme: light dark;

  /* Color: light. Pairs and ratios are listed in the table below. */
  --ink: #0f172a;          /* text, outlines */
  --surface: #ffffff;      /* cards, inputs, dialogs */
  --canvas: #f8fafc;       /* page background */
  --sunken: #f1f5f9;       /* code, table stripe, skeleton */
  --text: var(--ink);
  --text-2: #334155;       /* secondary text */
  --muted: #475569;        /* hints, captions; never lighter */
  --border: #64748b;       /* passive container edge, 4.76:1 */
  --divider: #cbd5e1;      /* decorative rules only; carries no meaning */
  --accent: #cf0f5c;
  --accent-hover: #a90b48;
  --accent-soft: #fff1f5;
  --on-accent: #ffffff;
  --highlight: #fef08a;    /* selected chip, tier, "you are here" */
  --success: #047857;  --success-soft: #ecfdf5;
  --warning: #92400e;  --warning-soft: #fef3c7;
  --danger:  #b91c1c;  --danger-soft:  #fef2f2;
  --info:    #1d4ed8;  --info-soft:    #eff6ff;
  --focus: #1d4ed8;
  --disabled-bg: #e2e8f0;  --disabled-text: #64748b; /* exempt from contrast (WCAG 1.4.3) */
  --scrim: rgba(15, 23, 42, 0.6);

  /* Type: Inter only */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-sm: 0.875rem;  --lh-sm: 1.5;    /* 14 */
  --fs-md: 1rem;      --lh-md: 1.5;    /* 16 body */
  --fs-lg: 1.125rem;  --lh-lg: 1.5;    /* 18 lead */
  --fs-h3: 1.5rem;    --lh-h3: 1.25;   /* 24 */
  --fs-h2: 2rem;      --lh-h2: 1.2;    /* 32 */
  --fs-h1: clamp(2rem, 1.4rem + 2.6vw, 2.75rem); --lh-h1: 1.15; /* 32-44 */
  --fw-regular: 400;  --fw-strong: 700;  --fw-heavy: 800;
  --measure: 65ch;

  /* Spacing: 4px scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px;

  /* Radius */
  --r-sm: 6px;     /* inputs, chips, table, tags */
  --r-md: 12px;    /* buttons, cards, dialogs, banners */
  --r-pill: 9999px;/* badges, switch only */

  /* Elevation */
  --border-w: 2px;
  --lift-1: 2px 2px 0 var(--ink);  /* buttons, chips */
  --lift-2: 4px 4px 0 var(--ink);  /* cards, dialog, popover */

  /* Motion */
  --dur-1: 120ms; --dur-2: 200ms;  /* nothing above 300ms */
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* z-index */
  --z-base: 0; --z-sticky: 100; --z-popover: 200;
  --z-dialog: 300; --z-toast: 400; --z-skip: 500;

  /* Layout */
  --w-read: 45rem;   /* 720px */
  --w-app: 75rem;    /* 1200px */
  --gutter: 16px;
  --target: 44px;
  --header-h: 56px;
  /* Breakpoints (media queries cannot use var(); write literally): 640px, 1024px, min-width, mobile first */
  --on-highlight: #0f172a;
}
@media (min-width: 640px) { :root { --gutter: 24px; } }

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f8fafc; --surface: #141b2d; --canvas: #0b1020; --sunken: #1f2942;
  --text-2: #cbd5e1; --muted: #cbd5e1; --border: #7b8aa5; --divider: #2a3756;
  --accent: #ff6b9d; --accent-hover: #ff8fb5; --accent-soft: #3a1426; --on-accent: #0b1020;
  --highlight: #fde047;
  --success: #34d399; --success-soft: #0c2a22; --warning: #fbbf24; --warning-soft: #33260a;
  --danger: #ff8a8a; --danger-soft: #3a1414; --info: #7cb2ff; --info-soft: #0f2347;
  --focus: #93c5fd; --disabled-bg: #1f2942; --disabled-text: #94a3b8;
  --scrim: rgba(0, 0, 0, 0.7);
  --on-highlight: #0f172a;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
  color-scheme: dark;
  --ink: #f8fafc; --surface: #141b2d; --canvas: #0b1020; --sunken: #1f2942;
  --text-2: #cbd5e1; --muted: #cbd5e1; --border: #7b8aa5; --divider: #2a3756;
  --accent: #ff6b9d; --accent-hover: #ff8fb5; --accent-soft: #3a1426; --on-accent: #0b1020;
  --highlight: #fde047;
  --success: #34d399; --success-soft: #0c2a22; --warning: #fbbf24; --warning-soft: #33260a;
  --danger: #ff8a8a; --danger-soft: #3a1414; --info: #7cb2ff; --info-soft: #0f2347;
  --focus: #93c5fd; --disabled-bg: #1f2942; --disabled-text: #94a3b8;
  --scrim: rgba(0, 0, 0, 0.7);
  --on-highlight: #0f172a;
  }
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-variable-latin-v5.3.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* Metric compensation for the measured heavy-heading font swap. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  size-adjust: 96.434%;
  src: url('/fonts/inter-variable-latin-v5.3.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* Shared base rules; component classes are added in WO-020b/c. */
html { font-family: var(--font); }
body { margin: 0; background: var(--canvas); color: var(--text); font-size: var(--fs-md); line-height: var(--lh-md); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
main a:not([class]) { color: var(--accent); text-decoration: underline; }
main a:not([class]):hover { color: var(--accent-hover); }
button, [role="button"], input, select, textarea, summary { min-height: var(--target); }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
.container { box-sizing: border-box; width: 100%; max-width: var(--w-app); margin-inline: auto; padding-inline: var(--gutter); }
.container--read { max-width: var(--w-read); }
main, main h1, main h2, main h3, main [id] { scroll-margin-top: calc(var(--header-h) + var(--border-w) + var(--s-2)); }
/* removed with theme-system.css in WO-026 */
/* Layered important declarations outrank legacy unlayered important motion. */
@layer accessibility {
 @media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
 }
}
@media (prefers-contrast: more) {
  :root, :root[data-theme] { --border: var(--ink); --divider: transparent; }
}

/* 4.1 Button */
.btn, .chip {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--target); min-width: var(--target); box-sizing: border-box;
  font: inherit; font-weight: var(--fw-heavy); padding: 0 var(--s-4);
  border: var(--border-w) solid var(--ink); border-radius: var(--r-md);
  box-shadow: var(--lift-1); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none;
  transition: background-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.btn:hover, .chip:hover { background: var(--sunken); color: var(--ink); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn--link { border: 0; box-shadow: none; background: transparent; color: var(--accent); text-decoration: underline; }
.btn--link:hover { background: transparent; color: var(--accent-hover); }
.btn:active, .chip:active { transform: translate(2px, 2px); box-shadow: none; }
.btn--link:active { transform: none; }
.btn:disabled, .btn[aria-disabled="true"], .chip:disabled, .chip[aria-disabled="true"] {
  background: var(--disabled-bg); color: var(--disabled-text); border-color: var(--border); box-shadow: none; transform: none; cursor: not-allowed;
}
.btn[aria-busy="true"] { background: var(--disabled-bg); color: var(--disabled-text); border-color: var(--border); box-shadow: none; transform: none; cursor: progress; }
.btn__spinner { width: var(--s-6); height: var(--s-6); flex-shrink: 0; animation: btn-spin var(--dur-2) linear infinite; }
@keyframes btn-spin { to { transform: rotate(1turn); } }

/* 4.2 Field and 4.7 Form errors */
.field { display: grid; gap: var(--s-2); border: 0; padding: 0; margin: var(--s-4) 0; min-width: 0; }
.field__label { display: block; font-weight: var(--fw-strong); }
.field__control {
  box-sizing: border-box; min-height: var(--target); width: 100%; min-width: 0;
  font-family: var(--font); font-size: var(--fs-md); line-height: var(--lh-md);
  border: var(--border-w) solid var(--ink); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); padding: var(--s-2) var(--s-3);
}
.field__control::placeholder { color: var(--muted); opacity: 1; }
textarea.field__control { min-height: 6rem; resize: vertical; }
select.field__control { appearance: auto; }
.field__control[aria-invalid="true"] { border-color: var(--danger); }
.field__control:disabled { background: var(--disabled-bg); color: var(--disabled-text); border-color: var(--border); }
.field__control[readonly][aria-busy="true"] { cursor: progress; }
.field__hint { margin: 0; color: var(--muted); font: var(--fw-regular) var(--fs-sm)/var(--lh-sm) var(--font); }
.field__error { display: flex; align-items: center; gap: var(--s-2); margin: 0; color: var(--danger); font: var(--fw-strong) var(--fs-sm)/var(--lh-sm) var(--font); }
.field__error > svg { width: var(--s-6); height: var(--s-6); flex-shrink: 0; }

/* 4.3 Choice and switch */
.choice { display: flex; align-items: center; gap: var(--s-2); min-height: var(--target); padding: var(--s-2); cursor: pointer; }
.choice:where(:hover):not(:has(:disabled)) { background: var(--sunken); }
.choice input { width: var(--s-6); height: var(--s-6); min-width: var(--s-6); min-height: var(--s-6); accent-color: var(--accent); flex-shrink: 0; }
.choice:has(:disabled) { color: var(--disabled-text); cursor: not-allowed; }
.switch { position: relative; width: var(--s-12); height: var(--target); min-width: var(--target); min-height: var(--target); padding: 0; border: 0; border-radius: var(--r-pill); background: transparent; font: inherit; cursor: pointer; flex-shrink: 0; }
.switch::before { content: ""; position: absolute; inset-inline-start: 0; top: calc((var(--target) - var(--s-6) - var(--s-1)) / 2); width: var(--s-12); height: calc(var(--s-6) + var(--s-1)); border-radius: var(--r-pill); background: var(--border); transition: background-color var(--dur-1) var(--ease); }
.switch__thumb { position: absolute; inset-inline-start: var(--border-w); top: calc((var(--target) - var(--s-6)) / 2); width: var(--s-6); height: var(--s-6); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); display: flex; align-items: center; justify-content: center; transition: transform var(--dur-1) var(--ease); }
.switch__thumb svg { width: var(--s-6); height: var(--s-6); opacity: 0; }
.switch[aria-checked="true"]::before { background: var(--accent); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(calc(var(--s-6) - var(--s-1))); }
.switch[aria-checked="true"] .switch__thumb svg { opacity: 1; }
.switch:active { transform: translate(2px, 2px); }
.switch:disabled, .switch[aria-disabled="true"] { cursor: not-allowed; }
.switch:disabled::before, .switch[aria-disabled="true"]::before { background: var(--disabled-bg); }

/* 4.4 Card */
.card { box-sizing: border-box; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-4); box-shadow: none; }
.card__title { margin: 0; font: var(--fw-heavy) var(--fs-h3)/var(--lh-h3) var(--font); }
.card--link { position: relative; display: block; padding-inline-end: var(--s-12); border: var(--border-w) solid var(--ink); box-shadow: var(--lift-2); color: inherit; text-decoration: none; }
.card--link::after { content: ""; position: absolute; inset: 0; }
.card--link > svg { position: absolute; inset-inline-end: var(--s-4); top: 50%; width: var(--s-6); height: var(--s-6); transform: translateY(-50%); }
.card--link:hover { background: var(--sunken); }
.card--link:active { transform: translate(2px, 2px); box-shadow: none; }
@media (min-width: 640px) { .card { padding: var(--s-6); } .card--link { padding-inline-end: var(--s-12); } }

/* 4.5 Badge and chip */
.badge { display: inline-flex; align-items: center; gap: var(--s-1); font: var(--fw-heavy) var(--fs-sm)/var(--lh-sm) var(--font); padding: var(--border-w) calc(var(--s-2) + var(--border-w)); border-radius: var(--r-pill); border: 1px solid currentColor; }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--neutral { background: var(--sunken); color: var(--muted); }
.chip { border-radius: var(--r-sm); }
.chip > svg { width: var(--s-6); height: var(--s-6); opacity: 0; }
.chip[aria-checked="true"], .chip[aria-pressed="true"] { background: var(--highlight); color: var(--on-highlight); }
.chip[aria-checked="true"] > svg, .chip[aria-pressed="true"] > svg { opacity: 1; }
.chip:disabled, .chip[aria-disabled="true"] { background: var(--disabled-bg); color: var(--disabled-text); }

/* 4.11 Notice */
.notice { display: flex; align-items: flex-start; gap: var(--s-3); border: var(--border-w) solid var(--ink); border-radius: var(--r-md); padding: var(--s-4); background: var(--info-soft); color: var(--text); }
.notice__icon { width: var(--s-6); height: var(--s-6); flex-shrink: 0; }
.notice__title { margin: 0; font: inherit; font-weight: var(--fw-heavy); }
.notice--info { background: var(--info-soft); }
.notice--success { background: var(--success-soft); }
.notice--warning { background: var(--warning-soft); }
.notice--danger { background: var(--danger-soft); }
.notice--info .notice__icon { color: var(--info); }
.notice--success .notice__icon { color: var(--success); }
.notice--warning .notice__icon { color: var(--warning); }
.notice--danger .notice__icon { color: var(--danger); }

/* 4.6 Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tab { min-height: var(--target); padding: var(--s-2) var(--s-4); border: 0; border-bottom: var(--s-1) solid transparent; background: var(--surface); color: var(--ink); font: inherit; font-weight: var(--fw-heavy); cursor: pointer; }
.tab[aria-selected="true"] { border-bottom-color: var(--accent); }
.tab:hover { background: var(--sunken); }
.tabpanel { padding-block: var(--s-4); }

/* 4.9 Toast / status region; behavior belongs to WO-022. */
.toast-region { position: fixed; bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); left: var(--s-4); right: var(--s-4); z-index: var(--z-toast); display: grid; gap: var(--s-2); pointer-events: none; }
.toast { pointer-events: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); border: var(--border-w) solid var(--ink); border-radius: var(--r-md); background: var(--surface); color: var(--text); box-shadow: var(--lift-1); animation: toast-in var(--dur-2) var(--ease); overflow-wrap: anywhere; }
.toast > span { flex: 1 1 8rem; }
.toast .btn { flex-shrink: 0; }
.toast > svg { width: var(--s-6); height: var(--s-6); flex-shrink: 0; }
.toast__close { margin-inline-start: auto; min-width: var(--target); min-height: var(--target); padding: var(--s-2); border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; flex-shrink: 0; }
.toast__close:hover { background: var(--sunken); }
@keyframes toast-in { from { opacity: 0; transform: translateY(var(--s-2)); } to { opacity: 1; transform: translateY(0); } }

/* 4.10 Table: wide tables stack first, preserving the column labels. */
.table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font: var(--fw-regular) var(--fs-sm)/var(--lh-sm) var(--font); }
.table caption { text-align: start; font-weight: var(--fw-heavy); padding-block: var(--s-2); }
.table th, .table td { border: 1px solid var(--border); padding: var(--s-2) var(--s-3); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.table th { background: var(--sunken); font-weight: var(--fw-heavy); }
.table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; }
.table--stack caption { display: block; }
.table--stack thead { display: none; }
.table--stack tr { margin-block: var(--s-3); }
.table--stack td::before { content: attr(data-label); display: block; font-weight: var(--fw-heavy); }
@media (min-width: 640px) {
  .table-wrap { overflow-x: visible; }
  .table--stack { display: table; }
  .table--stack caption { display: table-caption; }
  .table--stack thead { display: table-header-group; }
  .table--stack tbody { display: table-row-group; }
  .table--stack tr { display: table-row; margin: 0; }
  .table--stack td { display: table-cell; }
  .table--stack td::before { display: none; }
}

/* 4.14 Empty state */
.empty { padding: var(--s-8); text-align: center; border: 1px dashed var(--border); border-radius: var(--r-md); }
.empty > svg { width: 40px; height: 40px; }

/* 4.15 Skeleton and inline loading spinner */
.skeleton { display: block; min-height: 1rem; margin-block: var(--s-2); background: var(--sunken); border-radius: var(--r-sm); animation: skeleton-pulse 1.2s ease-in-out infinite alternate; }
.spinner { width: 20px; height: 20px; flex-shrink: 0; animation: component-spin 1s linear infinite; }
@keyframes skeleton-pulse { from { opacity: 1; } to { opacity: 0.6; } }
@keyframes component-spin { to { transform: rotate(1turn); } }

/* 4.16 Native audio player */
.player { min-width: 0; max-width: 100%; margin: 0; }
.player audio { width: 100%; max-width: 100%; display: block; }
.player figcaption { font: var(--fw-strong) var(--fs-sm)/var(--lh-sm) var(--font); }
.player__transcript { margin-block: var(--s-3); }

/* 4.17 Evidence-grade badge: each grade also prints its letter and word. */
.badge--grade[data-grade="A"] { background: var(--success-soft); color: var(--success); }
.badge--grade[data-grade="B"] { background: var(--info-soft); color: var(--info); }
.badge--grade[data-grade="C"] { background: var(--sunken); color: var(--ink); }
.badge--grade[data-grade="D"] { background: var(--sunken); color: var(--muted); }
.badge--grade[data-grade="H"] { background: var(--warning-soft); color: var(--warning); }
.badge__k { font-weight: var(--fw-heavy); }

/* Guide attribution uses the existing small-text token font. */
.byline { font: var(--fw-regular) var(--fs-sm)/var(--lh-sm) var(--font); color: var(--muted); margin-block: var(--s-1); }

/* Reading pages: one rhythm for company, policy, support and service information.
   Opt-in keeps workspace controls and existing guide migrations independent. */
.reading-page { padding-block: var(--s-8) var(--s-16); overflow-wrap: anywhere; }
.reading-page h1 { font: var(--fw-heavy) var(--fs-h1)/var(--lh-h1) var(--font); margin: 0 0 var(--s-6); }
.reading-page h2 { font: var(--fw-heavy) var(--fs-h3)/var(--lh-h3) var(--font); margin: var(--s-8) 0 var(--s-4); }
.reading-page h3 { font: var(--fw-strong) var(--fs-lg)/var(--lh-lg) var(--font); margin: 0 0 var(--s-2); }
.reading-page p { margin: 0 0 var(--s-4); }
.reading-page > section + section { margin-block-start: var(--s-8); }
.reading-page > .card + .card { margin-block-start: var(--s-4); }
.reading-page .empty { text-align: start; }
.reading-page .empty ul { list-style: none; padding: 0; display: grid; gap: var(--s-4); }
.reading-page .empty h1 { margin-block-start: 0; }

/**
 * Hello & Meow — Unified Accessible Theme System
 * Shared across Main Landing App and all 8 Guide / Scientific Reference Pages.
 */

/* ☀️ 1. Sunny Day (Default Daylight Theme) */
:root,
body[data-theme="sunshine"],
body:not([data-theme]),
body[data-theme="rainbow"],
body[data-theme="candy"],
body[data-theme="jungle"] {
  --bg-primary: var(--canvas);
  --bg-secondary: var(--surface);
  --bg-tertiary: var(--sunken);
  --card-bg: var(--surface);
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --text-muted: var(--muted);
  --border-subtle: var(--divider);
  --accent-light: var(--accent-soft);
  --accent-text: var(--accent);
  --accent-glow: transparent;
  --error: var(--danger);
  --safe-top: max(1rem, env(safe-area-inset-top));
  --safe-bottom: max(1rem, env(safe-area-inset-bottom));
}

.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  background: #cf0f5c;
  color: #ffffff !important;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 9999;
  border-radius: 0 0 8px 0;
  font-weight: 700;
  border: 2px solid #0f172a;
}

.skip-link:focus {
  top: 0;
}

body[data-theme="sunshine"],
body:not([data-theme]) {
  background: var(--canvas);
  color: var(--text);
}

/* ✨ 2. Cosmic Star (Deep Space Obsidian Theme) */
body[data-theme="cosmic"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #141b2d;
  --bg-tertiary: #1f2942;
  --card-bg: rgba(20, 27, 45, 0.92);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #2a3756;
  --border-subtle: #1e293b;
  --accent: #38bdf8;
  --accent-hover: #0284c7;
  --accent-light: rgba(56, 189, 248, 0.16);
  --accent-text: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.40);
  --success: #34d399;
  --error: #f43f5e;
  --warning: #fbbf24;
  background-color: #0b0f19;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.20), transparent),
    radial-gradient(circle at 80% 85%, rgba(168, 85, 247, 0.15), transparent 50%),
    radial-gradient(circle at 20% 70%, rgba(56, 189, 248, 0.12), transparent 45%);
  background-attachment: fixed;
  color: #f8fafc;
}

/* ── ACCESSIBLE HYPERLINK & INTERACTION TOKENS (WCAG 2.2 AA) ── */
a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Card wrappers: links wrapping cards MUST NOT inherit blue browser text */
a:has(> .feature-card),
a:has(> .stat-card),
a:has(> .category-block),
a:has(> .pipeline-step),
a:has(> .cat-sound-card),
a:has(> .sound-card),
a:has(> .sound-box),
a:has(> .card),
a:has(> .cat-profile-card),
a .feature-card,
a .stat-card,
a.card-link,
a.card-wrapper {
  color: inherit !important;
  text-decoration: none !important;
}

/* ── HEADER STYLING ACROSS ALL PAGES ── */
















/* ── UNIFIED SUB-NAVIGATION BAR ACROSS ALL PAGES ── */


























/* ── APPLE-GRADE SUB-NAV "MORE" DROPDOWN ── */










@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}






















/* ── CAPTURE HUB ── (Styled in tactical anime arcade section) */

/* ── ACOUSTIC FINGERPRINT INSPECTION MODAL ── */
.fingerprint-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 26, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.fingerprint-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.fingerprint-modal-card {
  width: 100%;
  max-width: 640px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.fingerprint-modal.open .fingerprint-modal-card {
  transform: translateY(0) scale(1);
}





/* ── FELINE LIBRARY & RELATED GUIDES SECTION ── */
.feline-library-cluster {
  margin-top: 3rem;
  padding: 1.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: left;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.guide-topic-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-primary);
}

.guide-topic-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.guide-topic-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.guide-topic-desc {
  font-size: 0.775rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

body[data-theme="sunshine"] .guide-topic-card {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}
body[data-theme="sunshine"] .guide-topic-card:hover {
  background: #fdf2f8 !important;
  border-color: #be185d !important;
}

/* Theme Selector Pill & Menu */
.theme-selector-wrap {
  position: relative;
  display: inline-block;
}

.theme-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.775rem;
  font-weight: 600;
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.theme-pill-btn:hover {
  border-color: var(--accent) !important;
}

.theme-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 10000;
}
.theme-dropdown-menu.open {
  display: flex !important;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-primary) !important;
  cursor: pointer;
  text-align: left;
  font-size: 0.8rem;
  width: 100%;
  transition: background 0.15s;
}
.theme-option:hover {
  background: var(--bg-tertiary) !important;
}
.theme-option.active {
  background: var(--accent-light) !important;
  color: var(--accent-text) !important;
  font-weight: 700;
}
.theme-opt-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.theme-opt-name {
  font-weight: 600;
}
.theme-opt-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.theme-opt-check {
  font-weight: 700;
  color: var(--accent-text);
}

/* ── HERO & TYPOGRAPHY CONSISTENCY ── */
.page .hero {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-text) !important;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  background: none !important;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary) !important;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 2rem;
}


/* ── CARD & CONTAINER HARMONIZATION ── */
.card,
.sound-box,
.guide-card,
.callout-box,
.pipeline-step,
.feature-card,
.category-card,
.vocal-type-card,
.compare-card,
.stat-card,
.faq-item {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover,
.sound-box:hover,
.guide-card:hover {
  border-color: var(--accent) !important;
}

.card-label,
.section-number {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-text) !important;
  margin-bottom: 0.5rem;
}

.page h1, .page h2, .page h3, .page h4,
.section h2, .section h3 {
  color: var(--text-primary) !important;
}

.page p, .page li,
.section p, .section li {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Scientific Notes & Callouts */
.key-takeaway,
.science-box,
.acoustic-card,
.vet-warning-box {
  background: var(--accent-light) !important;
  border: 1.5px solid var(--accent) !important;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-primary);
}

.key-takeaway h3, .key-takeaway h4,
.science-box h3, .science-box h4,
.vet-warning-box h3, .vet-warning-box h4 {
  color: var(--accent-text) !important;
  margin-bottom: 0.5rem;
}

/* Tables */
table, .heuristic-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  overflow: hidden;
  margin: 1.5rem 0;
}
th {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border) !important;
  font-weight: 700;
}
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
}
tr:last-child td {
  border-bottom: none !important;
}

/* ── APPLE-GRADE MULTI-COLUMN FOOTER SYSTEM ── */
footer[role="contentinfo"]{
  background: #ffffff !important;
  border-top: 1px solid #cbd5e1 !important;
  color: #64748b !important;
  padding: 3.5rem 1.5rem 2.25rem !important;
  margin-top: 4rem;
  width: 100%;
  box-sizing: border-box;
}



































/* ☀️ SUNSHINE (HIGH-CONTRAST LIGHT MODE) SPECIFIC OVERRIDES */




body[data-theme="sunshine"] .hero h1,
body[data-theme="sunshine"] h1 {
  background: none !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
}
body[data-theme="sunshine"] .hero p {
  color: #334155 !important;
}
body[data-theme="sunshine"] .card,
body[data-theme="sunshine"] .empty-state-card,
body[data-theme="sunshine"] .soundboard-container,
body[data-theme="sunshine"] .gamification-card,
body[data-theme="sunshine"] .sound-box,
body[data-theme="sunshine"] .guide-card,
body[data-theme="sunshine"] .callout-box,
body[data-theme="sunshine"] .pipeline-step,
body[data-theme="sunshine"] .feature-card,
body[data-theme="sunshine"] .faq-item,
body[data-theme="sunshine"] .cat-profile-card,
body[data-theme="sunshine"] .manga-speech-card,
body[data-theme="sunshine"] .chat-bubble,
body[data-theme="sunshine"] .timeline-item {
  background: #ffffff !important;
  border: 2.5px solid #0f172a !important;
  box-shadow: 4px 4px 0px #0f172a !important;
  color: #0f172a !important;
}
body[data-theme="sunshine"] .page h1,
body[data-theme="sunshine"] .page h2,
body[data-theme="sunshine"] .page h3,
body[data-theme="sunshine"] .page h4,
body[data-theme="sunshine"] .section h2,
body[data-theme="sunshine"] .section h3 {
  color: #0f172a !important;
}
body[data-theme="sunshine"] .page p,
body[data-theme="sunshine"] .page li,
body[data-theme="sunshine"] .section p,
body[data-theme="sunshine"] .section li {
  color: #334155 !important;
}
body[data-theme="sunshine"] th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-bottom: 2px solid #cbd5e1 !important;
}
body[data-theme="sunshine"] td {
  color: #1e293b !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
body[data-theme="sunshine"] .key-takeaway,
body[data-theme="sunshine"] .science-box,
body[data-theme="sunshine"] .acoustic-card {
  background: #fdf2f8 !important;
  border-color: #f472b6 !important;
  color: #0f172a !important;
}
body[data-theme="sunshine"] .key-takeaway h3,
body[data-theme="sunshine"] .key-takeaway h4,
body[data-theme="sunshine"] .science-box h3,
body[data-theme="sunshine"] .science-box h4 {
  color: #be185d !important;
}
body[data-theme="sunshine"] footer[role="contentinfo"]{
  background: #ffffff !important;
  border-top-color: #cbd5e1 !important;
  color: #64748b !important;
}
body[data-theme="sunshine"] footer[role="contentinfo"] a{
  color: #be185d !important;
}

/* ── UNIVERSAL MODAL SYSTEM ── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20000;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal.open {
  display: flex !important;
}

.modal-content {
  background: var(--card-bg, #1e293b);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
  max-width: 580px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.75rem;
  color: var(--text-primary);
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary) !important;
  margin: 0;
}

.modal-close {
  background: var(--bg-tertiary, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

body[data-theme="sunshine"] .modal-content,
.modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 2.5px solid #0f172a !important;
  box-shadow: 6px 6px 0px #0f172a !important;
}

body[data-theme="sunshine"] .modal-header h2,
.modal-header h2 {
  color: #0f172a !important;
  font-weight: 900 !important;
}

body[data-theme="sunshine"] .modal-close,
.modal-close {
  background: #ffffff !important;
  border: 2px solid #0f172a !important;
  box-shadow: 2px 2px 0px #0f172a !important;
  color: #0f172a !important;
  font-weight: 900 !important;
}

body[data-theme="sunshine"] .modal-close:hover,
.modal-close:hover {
  background: #cf0f5c !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}

/* ═════════════════════════════════════════════════════════════════
   UNIFIED APP TEMPLATE UI & WIREFRAME SYSTEM
   Sets symmetrical alignment, modern card geometry,
   and visual parity between Main App and Guide Pages.
   ═════════════════════════════════════════════════════════════════ */

/* Symmetrical Centered Viewport Shell & Natural Scrolling */
html {
  height: auto !important;
  min-height: 100% !important;
}

body {
  height: auto !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

main:not(.intent-lab) {
  width: 100% !important;
  flex: 1 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  overflow: visible !important;
  height: auto !important;
}

main:has(.scroll-container) {
  flex-direction: row !important;
  justify-content: center !important;
  align-items: flex-start !important;
}

.scroll-container {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.page-outer {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: flex-start !important;
  width: 100% !important;
  max-width: 1320px !important;
  margin: 0 auto !important;
  padding: 0 1.25rem !important;
  box-sizing: border-box !important;
}

/* Primary Content Column: Always Perfectly Symmetrically Centered */
.page {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 960px !important;
  margin: 0 auto !important;
  padding: 2.5rem 1rem 5rem !important;
  box-sizing: border-box !important;
}

/* Symmetrical Sidebar Ads: ONLY shown on >=1600px screens to prevent layout skew */
.page-sidebar {
  display: none !important;
  width: 160px !important;
  flex-shrink: 0 !important;
  padding: 2.5rem 0.5rem !important;
  position: sticky !important;
  top: 80px !important;
  align-self: flex-start !important;
}

@media (min-width: 1600px) {
  .page-sidebar {
    display: block !important;
  }
}

/* ── UNIFIED HERO WIREFRAME (Guide pages only) ── */
.page .hero {
  text-align: center !important;
  margin-bottom: 2rem !important;
  padding: 2rem 1.5rem 2rem !important;
  border: 2.5px solid #0f172a !important;
  background: #ffffff !important;
  border-radius: 20px !important;
  box-shadow: 4px 4px 0px #0f172a !important;
}

.station-rail-left .hero {
  text-align: center !important;
  margin-bottom: 0.75rem !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.hero-label,
.hero .hero-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  padding: 0.35rem 0.95rem !important;
  border-radius: 9999px !important;
  background: var(--accent-light) !important;
  border: 1px solid var(--accent) !important;
  color: var(--accent-text) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  margin-bottom: 1.25rem !important;
  box-shadow: 0 2px 10px var(--accent-glow) !important;
}

.hero h1,
.page .hero h1 {
  font-size: clamp(2rem, 3.8vw, 2.75rem) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.03em !important;
  margin-bottom: 1.25rem !important;
  color: var(--text-primary) !important;
}

.hero p,
.page .hero p {
  font-size: 1.1rem !important;
  color: var(--text-secondary) !important;
  line-height: 1.7 !important;
  max-width: 660px !important;
  margin: 0 auto 2rem !important;
}



/* ── UNIFIED CARDS & WIREFRAME PANELS ── */
.feature-card,
.stat-card,
.category-block,
.pipeline-step,
.cat-sound-card,
.sound-card,
.sound-box,
.card {
  background: var(--card-bg) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  color: var(--text-primary) !important;
}

.feature-card {
  padding: 1.5rem !important;
  display: block !important;
  text-align: left !important;
}

.feature-card:hover,
.stat-card:hover,
.sound-card:hover,
.cat-sound-card:hover {
  transform: translateY(-2px) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), 0 0 14px var(--accent-glow) !important;
}

.feature-card .feature-name,
.feature-name {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin-bottom: 0.4rem !important;
  line-height: 1.35 !important;
  display: block !important;
}

.feature-card:hover .feature-name {
  color: var(--accent-text) !important;
}

.feature-card .feature-desc,
.feature-desc {
  font-size: 0.9rem !important;
  color: var(--text-secondary) !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  display: block !important;
}

/* Stat row cards & Stat values */
.stat-row,
.stat-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 1.25rem !important;
  margin: 2rem 0 !important;
}

.stat-card {
  padding: 1.5rem 1.25rem !important;
  text-align: center !important;
}

.stat-number,
.stat-value,
.stat-card .stat-number,
.stat-card .stat-value {
  font-size: 2rem !important;
  font-weight: 800 !important;
  color: var(--accent-text) !important;
  letter-spacing: -0.03em !important;
  line-height: 1.15 !important;
  margin-bottom: 0.4rem !important;
}

.stat-label,
.stat-card .stat-label {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  line-height: 1.5 !important;
}

/* Section styling */
.section {
  margin-bottom: 4rem !important;
}

.section-number {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  font-size: 0.725rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: var(--accent-text) !important;
  margin-bottom: 0.65rem !important;
}

.section h2 {
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.025em !important;
  margin-bottom: 0.85rem !important;
  line-height: 1.25 !important;
}

/* Callout styling */
.callout {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  border-left: 4px solid var(--accent) !important;
  border-radius: 4px 16px 16px 4px !important;
  padding: 1.25rem 1.5rem !important;
  margin: 1.75rem 0 !important;
  font-size: 0.925rem !important;
  color: var(--text-secondary) !important;
  line-height: 1.7 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}
.callout.warning {
  border-left-color: var(--warning) !important;
}
.callout strong {
  color: var(--accent-text) !important;
}
.callout.warning strong {
  color: var(--warning) !important;
}

/* Light Mode Overrides for Unified Wireframe */
body[data-theme="sunshine"] .page .hero {
  background: #ffffff !important;
  border: 2.5px solid #0f172a !important;
  box-shadow: 4px 4px 0px #0f172a !important;
}

body[data-theme="sunshine"] .station-rail-left .hero {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 0.75rem !important;
}
body[data-theme="sunshine"] .callout {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  border-left-color: #be185d !important;
  color: #334155 !important;
}
body[data-theme="sunshine"] .callout.warning {
  border-left-color: #d97706 !important;
}

/* ── 🎮 VOCAL DNA STUDIO & PITCH MATCHER GAME ── */
.btn-tune-dna {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent-light);
  color: var(--accent-text);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.btn-tune-dna:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2);
}

/* ── 🎮 90s ANIME PUNK ROCK & MANGA UI SYSTEM ── */
.btn-tune-dna {
  background: linear-gradient(135deg, #f43f5e 0%, #06b6d4 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.78rem !important;
  padding: 0.4rem 0.85rem !important;
  border-radius: 9999px !important;
  border: 2px solid #0f172a !important;
  box-shadow: 2.5px 2.5px 0px #0f172a !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  min-height: 40px !important;
}
.btn-tune-dna:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3.5px 3.5px 0px #0f172a !important;
}
.btn-tune-dna:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #0f172a !important;
}

/* ==========================================================================
   ⚡ 90s ANIME PUNK ROCK & DAYLIGHT MANGA DESIGN SYSTEM
   Authentic TRIGGER Anime Style • Neo-Brutalist Comic Ink
   ========================================================================== */

/* ── Global Manga Wireframe Foundations ── */


/* ── Daylight Manga Cards & Panels ── */
.card,
.empty-state-card,
.soundboard-container,
.gamification-card,
.feature-card,
.stat-card,
.category-block,
.pipeline-step,
.cat-sound-card,
.sound-card,
.sound-box,
.cat-profile-card,
.settings-panel-inner {
  background: #ffffff !important;
  border: 2.5px solid #0f172a !important;
  border-radius: 16px !important;
  box-shadow: 4px 4px 0px #0f172a !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

body[data-theme="cosmic"] .card,
body[data-theme="cosmic"] .empty-state-card,
body[data-theme="cosmic"] .soundboard-container,
body[data-theme="cosmic"] .gamification-card,
body[data-theme="cosmic"] .feature-card,
body[data-theme="cosmic"] .stat-card {
  background: #141b2d !important;
  border-color: #38bdf8 !important;
  box-shadow: 4px 4px 0px #38bdf8 !important;
}

/* ── Manga Badges & Sound Effect Pills ── */
.manga-hud-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  background: #fff1f2 !important;
  color: #be123c !important;
  border: 2px solid #0f172a !important;
  border-radius: 6px !important;
  padding: 0.2rem 0.55rem !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  box-shadow: 2px 2px 0px #0f172a !important;
}

.manga-sound-fx {
  display: inline-block !important;
  background: #fef08a !important;
  color: #0f172a !important;
  border: 1.5px solid #0f172a !important;
  padding: 0.1rem 0.45rem !important;
  border-radius: 4px !important;
  font-weight: 900 !important;
  font-size: 0.72rem !important;
  box-shadow: 1.5px 1.5px 0px #0f172a !important;
  transform: rotate(-2deg);
}

/* ── Tactical Anime Arcade Record Trigger Button ── */
.capture-hub-btn {
  width: 128px !important;
  height: 128px !important;
  border: 3.5px solid #0f172a !important;
  border-radius: 50% !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}
.capture-hub-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.capture-hub-btn:not([aria-disabled="true"]) {
  box-shadow: 0 0 24px rgba(255, 42, 133, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.5), 5px 5px 0px #0f172a !important;
  background: radial-gradient(circle at 35% 30%, #ff529a 0%, #cf0f5c 55%, #be123c 100%) !important;
  cursor: pointer !important;
}

.capture-hub-btn:hover:not([aria-disabled="true"]) {
  transform: translate(-2px, -2px) scale(1.03) !important;
  box-shadow: 0 0 36px rgba(255, 42, 133, 0.65), inset 0 2px 4px rgba(255, 255, 255, 0.6), 7px 7px 0px #0f172a !important;
}

.capture-hub-btn:active:not([aria-disabled="true"]) {
  transform: translate(3px, 3px) scale(0.97) !important;
  box-shadow: 0 0 16px rgba(255, 42, 133, 0.35), 2px 2px 0px #0f172a !important;
}

.capture-hub-btn.recording {
  border-color: #0f172a !important;
  animation: anime-record-pulse 1.4s infinite ease-in-out !important;
  background: radial-gradient(circle at 35% 30%, #f43f5e 0%, #be123c 55%, #9f1239 100%) !important;
}

@keyframes anime-record-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(244, 63, 94, 0.6), 5px 5px 0px #0f172a;
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 45px rgba(255, 42, 133, 0.85), 7px 7px 0px #0f172a;
  }
}

.capture-hub-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 78px !important;
  height: 78px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.20) 60%, rgba(255, 255, 255, 0.08) 100%) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  border: 2px solid rgba(255, 255, 255, 0.65) !important;
  z-index: 2 !important;
  transition: all 0.2s ease !important;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.7), inset 0 -2px 6px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  color: #ffffff !important;
}

.capture-hub-btn:hover .capture-hub-inner {
  transform: scale(1.05) !important;
  background: radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.28) 60%, rgba(255, 255, 255, 0.14) 100%) !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
}

.capture-hub-inner svg,
.capture-hub-inner .paw-svg {
  fill: #ffffff !important;
  color: #ffffff !important;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.45)) !important;
  transition: transform 0.2s ease !important;
}

.capture-hub-btn:hover .capture-hub-inner svg {
  transform: scale(1.08) !important;
}

body[data-theme="cosmic"] .capture-hub-btn:not([aria-disabled="true"]) {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.45), 6px 6px 0px #38bdf8 !important;
  background: radial-gradient(circle at 35% 30%, #38bdf8 0%, #0284c7 55%, #0369a1 100%) !important;
}

/* ── Manga Action Soundboard Buttons ── */
.soundboard-btn,
.talkback-sound-btn {
  background: #ffffff !important;
  border: 2.5px solid #0f172a !important;
  border-radius: 14px !important;
  box-shadow: 3.5px 3.5px 0px #0f172a !important;
  padding: 0.85rem 0.65rem !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 60px !important;
}

.soundboard-btn:hover,
.talkback-sound-btn:hover {
  transform: translate(-2px, -2px) !important;
  box-shadow: 5.5px 5.5px 0px #0f172a !important;
  background: #fff5f5 !important;
}

.soundboard-btn:active,
.talkback-sound-btn:active {
  transform: translate(2px, 2px) !important;
  box-shadow: 1px 1px 0px #0f172a !important;
}

.soundboard-btn .sb-label {
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  color: #0f172a !important;
  margin-top: 0.25rem !important;
}

.soundboard-btn .sb-tag {
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.1rem 0.4rem !important;
  border-radius: 4px !important;
  border: 1px solid #0f172a !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;
  margin-top: 0.25rem !important;
}

/* ── Manga Speech Bubble Showcase ── */
.manga-speech-card {
  position: relative !important;
  background: #ffffff !important;
  border: 2.5px solid #0f172a !important;
  border-radius: 16px !important;
  padding: 1.15rem !important;
  box-shadow: 4px 4px 0px #0f172a !important;
  margin-bottom: 1.25rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.85rem !important;
}

.manga-speech-avatar {
  width: 58px !important;
  height: 58px !important;
  border-radius: 50% !important;
  border: 2.5px solid #0f172a !important;
  box-shadow: 2px 2px 0px #0f172a !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  background: #fed7aa !important;
}

.manga-speech-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.manga-speech-content {
  flex: 1 !important;
}

.manga-speech-title {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-wrap: wrap !important;
  margin-bottom: 0.25rem !important;
}

.manga-speech-body {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.3 !important;
}

/* ── Vocal DNA Studio Modal Framing ── */
#vocalStudioModal .modal-content {
  border: 3px solid #0f172a !important;
  box-shadow: 8px 8px 0px #0f172a !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  max-width: 640px !important;
}

body[data-theme="cosmic"] #vocalStudioModal .modal-content {
  border-color: #38bdf8 !important;
  box-shadow: 8px 8px 0px rgba(56, 189, 248, 0.5) !important;
  background: #141b2d !important;
}

/* ── Retro 90s Cyber-Anime Oscilloscope CRT Display ── */
.vocal-scope-bezel {
  background: #0b0f19 !important;
  border: 2.5px solid #0f172a !important;
  border-radius: 16px !important;
  padding: 0.9rem !important;
  box-shadow: 4px 4px 0px #0f172a, inset 0 2px 6px rgba(0, 0, 0, 0.6) !important;
  color: #f8fafc !important;
  position: relative !important;
  overflow: hidden !important;
}

.vocal-scope-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 0.6rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

.vocal-scope-telemetry {
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  color: #00f0ff !important;
  letter-spacing: 0.05em !important;
}

.vocal-scope-screen {
  height: 110px !important;
  width: 100% !important;
  position: relative !important;
  background: #030712 !important;
  border: 2px solid #1e293b !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.09) 1px, transparent 1px) !important;
  background-size: 20px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* CRT Scanline Overlay */
.vocal-scope-screen::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.18),
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 2px
  ) !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

/* Real-Time Equalizer Spectrum Bars (Anime Style) */
.vocal-spectrum-rack {
  position: absolute !important;
  bottom: 6px !important;
  left: 12px !important;
  right: 80px !important;
  height: 36px !important;
  display: flex !important;
  align-items: flex-end !important;
  gap: 6px !important;
  z-index: 2 !important;
  opacity: 0.75 !important;
}

.vocal-spectrum-bar {
  flex: 1 !important;
  background: linear-gradient(180deg, #cf0f5c 0%, #00f0ff 60%, #10b981 100%) !important;
  border-radius: 2px 2px 0 0 !important;
  min-height: 4px !important;
  transition: height 0.15s ease-out !important;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.4) !important;
}

/* Anime Cat HUD Targeting Reticle */
.vocal-pilot-reticle {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  border: 2px solid #00f0ff !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.6) !important;
  overflow: hidden !important;
  background: #0b0f19 !important;
  z-index: 6 !important;
}

.vocal-pilot-reticle img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.vocal-target-badge {
  position: absolute !important;
  bottom: 6px !important;
  right: 8px !important;
  font-family: ui-monospace, monospace !important;
  font-size: 0.6rem !important;
  font-weight: 800 !important;
  color: #00f0ff !important;
  background: rgba(0, 0, 0, 0.75) !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
  border: 1px solid #00f0ff !important;
  z-index: 6 !important;
}

/* ── Arcade Style Game Tab Bar ── */
.game-tab-bar {
  display: flex !important;
  background: #f1f5f9 !important;
  border: 2.5px solid #0f172a !important;
  border-radius: 14px !important;
  padding: 5px !important;
  gap: 8px !important;
  margin-bottom: 1rem !important;
  box-shadow: 3px 3px 0px #0f172a !important;
}

.game-tab-btn {
  flex: 1 !important;
  padding: 0.65rem 0.85rem !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  border-radius: 9px !important;
  border: 2px solid transparent !important;
  background: transparent !important;
  color: #475569 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  min-height: 44px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  transition: all 0.12s ease !important;
}

.game-tab-btn.active {
  background: #cf0f5c !important;
  color: #ffffff !important;
  border: 2.5px solid #0f172a !important;
  box-shadow: 3px 3px 0px #0f172a !important;
  transform: translate(-1px, -1px);
}

.game-tab-btn:hover:not(.active) {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* ── Cyber-Punk VU Meter ── */
.vu-meter-container {
  background: #ffffff !important;
  border: 2.5px solid #0f172a !important;
  border-radius: 12px !important;
  padding: 0.85rem !important;
  margin-top: 0.65rem !important;
  box-shadow: 3.5px 3.5px 0px #0f172a !important;
}

.vu-meter-track {
  height: 18px !important;
  background: #0b0f19 !important;
  border: 2px solid #0f172a !important;
  border-radius: 8px !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7) !important;
}

.vu-meter-fill {
  height: 100% !important;
  border-radius: 6px !important;
  background: linear-gradient(to right, #10b981 0%, #06b6d4 40%, #facc15 75%, #cf0f5c 100%) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5) !important;
  transition: width 0.15s ease-out !important;
}

.vu-meter-scale {
  display: flex !important;
  justify-content: space-between !important;
  font-size: 0.68rem !important;
  font-family: ui-monospace, monospace !important;
  font-weight: 800 !important;
  color: #475569 !important;
  margin-top: 0.35rem !important;
}

/* ── Analog Synthesizer Sliders ── */
.vocal-slider-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.4rem !important;
  background: #ffffff !important;
  border: 2.5px solid #0f172a !important;
  border-radius: 14px !important;
  padding: 0.85rem !important;
  box-shadow: 3.5px 3.5px 0px #0f172a !important;
}

.vocal-slider-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  text-transform: uppercase !important;
}

.vocal-slider-val {
  font-family: ui-monospace, monospace !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  background: #cf0f5c !important;
  border: 2px solid #0f172a !important;
  padding: 0.18rem 0.6rem !important;
  border-radius: 6px !important;
  font-size: 0.78rem !important;
  box-shadow: 2px 2px 0px #0f172a !important;
}

.vocal-range-slider {
  width: 100% !important;
  height: 14px !important;
  border-radius: 999px !important;
  background: #e2e8f0 !important;
  border: 2.5px solid #0f172a !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  cursor: pointer !important;
  margin: 0.5rem 0 !important;
}

.vocal-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: #cf0f5c !important;
  border: 2.5px solid #0f172a !important;
  box-shadow: 2.5px 2.5px 0px #0f172a !important;
  cursor: grab !important;
  transition: transform 0.1s !important;
}

.vocal-range-slider::-webkit-slider-thumb:active {
  cursor: grabbing !important;
  transform: scale(1.2) !important;
  background: #00f0ff !important;
}

/* ── Challenge Mini-Game Target Bracket ── */
.challenge-target-zone {
  border: 3px dashed #f59e0b !important;
  background: #fffbeb !important;
  border-radius: 16px !important;
  padding: 1.1rem !important;
  text-align: center !important;
  box-shadow: 4px 4px 0px #0f172a !important;
}

.challenge-score-pill {
  font-size: 1.45rem !important;
  font-weight: 900 !important;
  color: #047857 !important;
}

/* ── Calibration Pill on Translation Cards ── */
.vocal-calibration-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  padding: 0.35rem 0.85rem !important;
  background: #ecfdf5 !important;
  border: 2.5px solid #0f172a !important;
  color: #065f46 !important;
  border-radius: 999px !important;
  margin-top: 0.65rem !important;
  box-shadow: 2.5px 2.5px 0px #0f172a !important;
}

/* ── Manga Cyber Bioacoustic Fingerprint & Formants HUD ── */
#fingerprintModal .modal-content {
  border: 3px solid #0f172a !important;
  box-shadow: 8px 8px 0px #0f172a !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  max-width: 620px !important;
}

#fingerprintCurveContainer {
  background: #030712 !important;
  border: 2px solid #1e293b !important;
  border-radius: 12px !important;
  position: relative !important;
  overflow: hidden !important;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.08) 1px, transparent 1px) !important;
  background-size: 20px 20px !important;
}

#fingerprintCurveContainer::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.25) 0px,
    rgba(0, 0, 0, 0.25) 2px,
    transparent 2px,
    transparent 4px
  ) !important;
}

#fingerprintModal .modal-body > div {
  border: 2.5px solid #0f172a !important;
  border-radius: 14px !important;
  box-shadow: 3.5px 3.5px 0px #0f172a !important;
  background: #ffffff !important;
  padding: 0.95rem !important;
}

#fingerprintFormantsList > div > div:last-child {
  height: 10px !important;
  border: 2px solid #0f172a !important;
  background: #f1f5f9 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
}

#fingerprintFormantsList > div:nth-child(1) #fpF0Bar {
  background: linear-gradient(90deg, #cf0f5c, #be123c) !important;
}

#fingerprintFormantsList > div:nth-child(2) #fpF1Bar {
  background: linear-gradient(90deg, #00f0ff, #0284c7) !important;
}

#fingerprintFormantsList > div:nth-child(3) #fpF2Bar {
  background: linear-gradient(90deg, #facc15, #ea580c) !important;
}

/* ── Tactile Neo-Brutalist Arcade Action Buttons ── */
.btn-cat-chip { min-height: var(--target); min-width: var(--target); }
.modal-content .btn,
.btn-cat-chip,
.modal-close,
.btn.primary {
  border: 2.5px solid #0f172a !important;
  border-radius: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  box-shadow: 3.5px 3.5px 0px #0f172a !important;
  transition: all 0.12s ease !important;
  cursor: pointer !important;
}

.btn.primary {
  background: #cf0f5c !important;
  color: #ffffff !important;
}

.modal-content .btn:hover,
.btn-cat-chip:hover,
.modal-close:hover,
.btn.primary:hover {
  transform: translate(-1.5px, -1.5px) !important;
  box-shadow: 5px 5px 0px #0f172a !important;
}

.modal-content .btn:active,
.btn-cat-chip:active,
.modal-close:active,
.btn.primary:active {
  transform: translate(2.5px, 2.5px) !important;
  box-shadow: 1px 1px 0px #0f172a !important;
}

/* Modal Close Button */
.modal-close {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  color: #0f172a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

/* ── Apple HIG Touch Target Floor (44x44pt) ── */
.btn-tune-dna,
.btn-cat-chip,
.game-tab-btn,
.modal-close,
.soundboard-btn,
.talkback-sound-btn,
.theme-pill-btn {
  min-height: 44px;
  box-sizing: border-box;
}

/* ── Apple HIG Accessibility: Strict Reduced Motion Support ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Daylight Anime Hero & Video Banner Architecture ── */
.hero-top-banner {
  text-align: center;
  margin-bottom: 1.25rem;
  width: 100%;
}

.hero-video-banner {
  width: 100%;
  margin-bottom: 2rem;
  position: relative;
}

.hero-video-banner .home-commercial-viewport {
  position: relative;
  width: 100%;
  border-radius: 16px !important;
  overflow: hidden;
  background: #000000;
  border: 2.5px solid #0f172a !important;
  box-shadow: 4.5px 4.5px 0px #0f172a !important;
  aspect-ratio: 16 / 9;
  max-height: 480px;
}

.home-commercial-controls {
  background: var(--on-highlight);
}

.cat-select-overlay {
  display: none;
  background: #ffffff !important;
  border: 2.5px solid #0f172a !important;
  box-shadow: 4px 4px 0px #0f172a !important;
  border-radius: 16px !important;
  padding: 1.25rem !important;
  margin-bottom: 1.15rem;
  width: 100%;
  box-sizing: border-box;
}

.cat-record-option-btn {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #ffffff !important;
  border: 2px solid #0f172a !important;
  box-shadow: 2.5px 2.5px 0px #0f172a !important;
  border-radius: 12px !important;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.cat-record-option-btn:hover,
.cat-record-option-btn:focus-visible {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 4px 4px 0px #0f172a !important;
  background: #fff1f2 !important;
}

.cat-record-option-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #0f172a !important;
}

.cat-target-locked-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ecfdf5 !important;
  border: 2px solid #0f172a !important;
  box-shadow: 2.5px 2.5px 0px #0f172a !important;
  border-radius: 10px !important;
  padding: 0.65rem 0.95rem;
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   📱 MOBILE QUICK-CAPTURE OVERLAY & BOTTOM SHEET
   ═══════════════════════════════════════════════════════════════ */
.mobile-quick-capture-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: auto;
  transition: opacity 0.25s ease-out;
}

.mobile-quick-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mobile-quick-sheet {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border-top: 3.5px solid #0f172a;
  border-left: 3.5px solid #0f172a;
  border-right: 3.5px solid #0f172a;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.4);
  padding: 1.15rem 1.25rem 2rem;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transform: translateY(0);
  animation: slideUpQuickSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpQuickSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mobile-quick-handle {
  width: 44px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 999px;
  margin: 0 auto 0.4rem;
}

.mobile-quick-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-quick-close-btn {
  background: #f8fafc;
  border: 2px solid #0f172a;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #0f172a;
  box-shadow: 2px 2px 0px #0f172a;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.mobile-quick-close-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #0f172a;
}

.mobile-quick-heading {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.mobile-quick-subheading {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  margin: 0;
  line-height: 1.35;
}

.mobile-quick-cat-section {
  background: #f8fafc;
  border: 2px solid #0f172a;
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  box-shadow: 2px 2px 0px #0f172a;
}

.mobile-quick-section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.mobile-quick-cats-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.mobile-quick-cat-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 999px;
  box-shadow: 1.5px 1.5px 0px #0f172a;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  transition: all 0.15s;
}
.mobile-quick-cat-pill.active {
  background: #fff1f2;
  border-color: #cf0f5c;
  color: #be123c;
  box-shadow: 2px 2px 0px #0f172a;
}
.mobile-quick-cat-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #0f172a;
  object-fit: cover;
  display: block;
}

/* Quick Record Paw Hub */
.mobile-quick-paw-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0 0.25rem;
}

.mobile-paw-button-container {
  position: relative;
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-quick-paw-btn {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cf0f5c 0%, #be123c 100%);
  border: 3.5px solid #0f172a;
  box-shadow: 4px 4px 0px #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: transform 0.1s, box-shadow 0.1s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-quick-paw-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #0f172a;
}
.mobile-quick-paw-btn.recording {
  background: #dc2626 !important;
  animation: pulseRecording 1.2s infinite;
}

.mobile-paw-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed #cf0f5c;
  opacity: 0.6;
  pointer-events: none;
  animation: spinSlow 12s linear infinite;
}

.mobile-quick-timer-wrap {
  min-height: 1.25rem;
}
.mobile-quick-timer {
  font-size: 1.1rem;
  font-weight: 900;
  font-family: ui-monospace, monospace;
  color: #cf0f5c;
}

.mobile-quick-canvas-container {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-idle-bars {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
}
.mobile-idle-bars .bar {
  width: 4px;
  height: 8px;
  background: #94a3b8;
  border-radius: 2px;
  animation: idleBarWave 1.4s ease-in-out infinite;
}
.mobile-idle-bars .bar:nth-child(2) { animation-delay: 0.2s; height: 14px; }
.mobile-idle-bars .bar:nth-child(3) { animation-delay: 0.4s; height: 18px; background: #cf0f5c; }
.mobile-idle-bars .bar:nth-child(4) { animation-delay: 0.6s; height: 14px; }
.mobile-idle-bars .bar:nth-child(5) { animation-delay: 0.8s; height: 8px; }

@keyframes idleBarWave {
  0%, 100% { transform: scaleY(0.6); }
  50% { transform: scaleY(1.4); }
}

.mobile-quick-status-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  text-align: center;
}

/* Quick Translation Result Box */
.mobile-quick-result-box {
  background: #ecfdf5;
  border: 2.5px solid #0f172a;
  box-shadow: 3px 3px 0px #0f172a;
  border-radius: 16px;
  padding: 0.85rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  animation: fadeInQuickResult 0.3s ease-out;
}
@keyframes fadeInQuickResult {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-quick-result-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  overflow: hidden;
  flex-shrink: 0;
  background: #fed7aa;
}
.mobile-quick-result-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mobile-quick-result-content {
  flex: 1;
  min-width: 0;
}
.mobile-quick-result-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: #065f46;
  text-transform: uppercase;
}
.mobile-quick-result-quote {
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.3;
  margin: 0.2rem 0 0.35rem;
}
.mobile-quick-result-meta {
  font-size: 0.7rem;
  font-weight: 700;
  color: #047857;
  font-family: ui-monospace, monospace;
}
.mobile-quick-result-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}
.btn-quick-replay {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1.5px solid #0f172a;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 1.5px 1.5px 0px #0f172a;
  cursor: pointer;
}
.btn-quick-details {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1.5px solid #0f172a;
  background: #cf0f5c;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 1.5px 1.5px 0px #0f172a;
  cursor: pointer;
}

/* Footer Dismiss */
.mobile-quick-footer {
  border-top: 1.5px dashed #cbd5e1;
  padding-top: 0.65rem;
  text-align: center;
}
.mobile-quick-dismiss-link {
  background: none;
  border: none;
  font-size: 0.8rem;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  transition: all 0.15s;
}
.mobile-quick-dismiss-link:hover, .mobile-quick-dismiss-link:active {
  color: #0f172a;
  background: #f1f5f9;
}

/* 🐾 Mobile Sticky FAB Button */
.mobile-sticky-record-fab {
  display: none;
}
@media (max-width: 768px) {
  .mobile-sticky-record-fab {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9990;
    align-items: center;
    gap: 0.45rem;
    background: #cf0f5c;
    color: #ffffff;
    border: 2.5px solid #0f172a;
    border-radius: 999px;
    padding: 0.65rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 900;
    box-shadow: 3.5px 3.5px 0px #0f172a;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-sticky-record-fab:active {
    transform: translate(2px, 2px);
    box-shadow: 1.5px 1.5px 0px #0f172a;
  }
}
@media (min-width: 769px) {
  .mobile-quick-capture-overlay {
    display: none !important;
  }
  .mobile-sticky-record-fab {
    display: none !important;
  }
}

/* ── UNIFIED RESPONSIVE CONTENT GRIDS & HERO CENTERING ── */
.pricing-hero,
.soundboard-hero {
  width: 100% !important;
  max-width: 840px !important;
  margin: 0 auto !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.pricing-container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto 4rem !important;
  padding: 0 1.5rem !important;
  box-sizing: border-box !important;
}

.pricing-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.5rem !important;
  margin-top: 2rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1024px) {
  .pricing-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .pricing-cards-grid {
    grid-template-columns: 1fr !important;
  }
}

.soundboard-main-container {
  width: 100% !important;
  max-width: 1100px !important;
  margin: 0 auto 4rem !important;
  padding: 0 1.5rem !important;
  box-sizing: border-box !important;
}

/* 4.12 Skip link */
.skip-link { position: absolute; top: var(--s-2); left: var(--s-2); transform: translateY(-200%); background: var(--accent); color: var(--on-accent); z-index: var(--z-skip); padding: 0 var(--s-4); min-height: var(--target); display: inline-flex; align-items: center; border-radius: var(--r-md); border: var(--border-w) solid var(--ink); }
.skip-link:focus { transform: translateY(0); }

/* 4.12 Header, navigation and progressive disclosure */
.site-header { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--surface); border-bottom: var(--border-w) solid var(--ink); }
.site-header__bar { box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding-inline: var(--gutter); max-width: var(--w-app); margin-inline: auto; min-height: var(--header-h); }
.brand { font: var(--fw-heavy) var(--fs-lg)/var(--lh-lg) var(--font); color: var(--ink); text-decoration: none; min-height: var(--target); display: inline-flex; align-items: center; white-space: nowrap; }
.site-nav { width: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { box-sizing: border-box; display: flex; align-items: center; min-height: var(--target); padding: 0 var(--gutter); color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; font-weight: var(--fw-strong); }
.site-nav a:hover { background: var(--sunken); }
.site-nav [aria-current="page"] { border-bottom-color: var(--accent); font-weight: var(--fw-heavy); }
html[data-js] .site-header__bar { flex-wrap: nowrap; }
html[data-js] .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: var(--border-w) solid var(--ink); }
html[data-js] .site-header[data-menu="open"] .site-nav { display: block; }
.site-header__tools { margin-left: auto; display: flex; align-items: center; gap: var(--s-1); }
.site-header__account, .site-header__icon-btn, .site-header__allowance { display: inline-flex; align-items: center; justify-content: center; min-height: var(--target); min-width: var(--target); color: var(--ink); background: transparent; border: 0; padding: 0; font: inherit; text-decoration: none; }
.site-header__account:hover, .site-header__icon-btn:hover, .site-header__allowance:hover { background: var(--sunken); }
.site-header__icon-btn { cursor: pointer; }
.site-header__allowance { display: none; }
.site-header__menu { display: none; flex: 0 1 auto; }
html[data-js] .site-header__menu { display: inline-flex; }
.icon { width: 20px; height: 20px; stroke: currentColor; }

/* 4.13 Footer */
.site-footer { background: var(--surface); border-top: var(--border-w) solid var(--ink); padding: var(--s-8) var(--gutter); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); max-width: var(--w-app); margin-inline: auto; }
.site-footer__col { min-width: 0; }
.site-footer__col ul { list-style: none; padding: 0; margin: 0; }
.site-footer__title { font: var(--fw-heavy) var(--fs-md)/var(--lh-md) var(--font); margin: 0 0 var(--s-2); }
.site-footer a { min-width: var(--target); display: inline-flex; align-items: center; min-height: var(--target); color: var(--accent); text-decoration: underline; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--accent-hover); }
.site-footer__bottom { font: var(--fw-regular) var(--fs-sm)/var(--lh-sm) var(--font); color: var(--muted); max-width: var(--w-app); margin-inline: auto; padding-top: var(--s-6); border-top: 1px solid var(--divider); }
@media (min-width: 640px) {
  .site-header__bar { flex-wrap: nowrap; }
  .site-nav { width: auto; }
  .site-nav ul { display: flex; gap: var(--s-1); }
  .site-nav a { display: inline-flex; padding: 0 var(--s-1); }
  html[data-js] .site-nav { display: block; position: static; border: 0; background: transparent; }
  html[data-js] .site-header__menu { display: none; }
  .site-header__allowance { display: inline-flex; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) { .site-nav a { padding: 0 var(--s-3); } .site-footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Preserve the approved ring above the retiring legacy theme rules. */
.site-header a:focus-visible, .site-header button:focus-visible, .site-footer a:focus-visible, .skip-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }

.site-header__menu:hover { background: var(--sunken); color: var(--ink); border-color: var(--ink); }

/* Expanded text spacing can require a second header row on narrow screens. */
@media (max-width: 639px) { html[data-js] .site-header__bar { flex-wrap: wrap; } }
@media (max-width: 359px) { .site-header__bar { gap: var(--s-1); } .site-header__menu { flex-shrink: 0; padding-inline: var(--s-1); } }

/* Shared dialog; consumer pages migrate in the following work orders. */
.dialog-backdrop, .dialog { box-sizing: border-box; }
.dialog-backdrop { position: fixed; inset: 0; z-index: var(--z-dialog); background: var(--scrim); display: flex; align-items: flex-start; justify-content: center; padding: var(--s-4); overflow-y: auto; }
.dialog { width: 100%; max-width: 32rem; max-height: calc(100dvh - 2 * var(--s-4)); overflow-y: auto; overflow-wrap: anywhere; background: var(--surface); color: var(--text); border: var(--border-w) solid var(--ink); border-radius: var(--r-md); box-shadow: var(--lift-2); padding: var(--s-6); margin: auto; animation: dialog-in var(--dur-2) var(--ease); }
.dialog__title { font: var(--fw-heavy) var(--fs-h3)/var(--lh-h3) var(--font); margin: 0 0 var(--s-3); }
.dialog__body { white-space: pre-wrap; }
.dialog__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.dialog__actions .btn { white-space: normal; max-width: 100%; }
.dialog__error { color: var(--danger); font-weight: var(--fw-strong); }
.dialog__error:empty, .dialog .field__error:empty { display: none; }
html.has-dialog { overflow: hidden; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .dialog { animation: none; } }
.dialog fieldset { border: 0; padding: 0; margin: 0 0 var(--s-4); }
.dialog legend { font-weight: var(--fw-heavy); padding: 0; margin-bottom: var(--s-2); }
.dialog .choice { display: inline-flex; margin-right: var(--s-2); }
.avatar-choices { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.avatar { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-pill); border: var(--border-w) solid var(--ink); }
.choice input:checked + .avatar { outline: 3px solid var(--accent); outline-offset: 2px; }
.dialog__actions .btn--danger { margin-left: auto; }
.cat-switcher { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-4); }
.cat-switcher .field__control { width: auto; min-width: 10rem; max-width: 100%; }
.dialog__actions:empty { display: none; }
