/*
 * mindbreakz Mastering — Exact Vorlage Style System
 * Author: Lars Henning Zahl
 *
 * Color Palette (Directly sampled from Vorlage konzept_startseite_desktop_1791041304050.jpg):
 * - Page Canvas: #F4F1EA (Warm Linen / Cream)
 * - Header & Mega-Menu: #121417 (Dark Slate)
 * - Hero & Body Ink: #121417 (Deep Charcoal Ink)
 * - Cards: #FFFFFF with warm subtle borders #E5E1D8
 * - Player Container: #15181D (Dark Charcoal Slate)
 * - Player Amber Waveform & Badge: #DAA03D (Golden Studio Amber)
 * - Player Pill Badge: #F3F0E9 (Crisp White/Cream Pill)
 *
 * Typography: Roboto
 * - Regular: 400
 * - ExtraBold: 900 (for chosen / active / hovered navigation and emphasis)
 */

:root,
html[data-theme="dark"] {
  --bg-page: #F4F1EA;
  --bg-header: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-muted: #EAE6DD;
  --bg-card-hover: #FDFBF7;

  --ink-primary: #000000;
  --ink-soft: #000000;
  --ink-muted: rgba(0, 0, 0, 0.60);
  --ink-faint: rgba(0, 0, 0, 0.40);
  --ink-60: rgba(0, 0, 0, 0.60);

  --border-light: rgba(0, 0, 0, 0.08);
  --border-card: #E5E1D8;
  --border-strong: rgba(0, 0, 0, 0.16);
  --border-dark: rgba(255, 255, 255, 0.08);

  --nav-text-muted: rgba(255, 255, 255, 0.70);
  --nav-text-bright: #FFFFFF;
  --nav-cat-label: rgba(255, 255, 255, 0.60);

  /* Default Theme: Dark Mode with Frosted Glass (#121417 / White Nav Text) */
  --header-bg: rgba(18, 20, 23, 0.70);
  --header-border: rgba(255, 255, 255, 0.12);
  --header-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --nav-item-color: #FFFFFF;
  --nav-item-muted: rgba(255, 255, 255, 0.70);
  --nav-item-active-color: #FFFFFF;

  --mega-bg: #121417;
  --mega-border: rgba(255, 255, 255, 0.10);
  --mega-shadow: 0 24px 50px rgba(0, 0, 0, 0.50);
  --mega-cat-color: rgba(255, 255, 255, 0.60);
  --mega-item-color: #E5E7EB;
  --mega-item-hover-color: #FFFFFF;
  --mega-account-bg: #181B20;
  --mega-account-border: rgba(255, 255, 255, 0.12);
  --mega-account-strong: #FFFFFF;
  --mega-account-sub: #9CA3AF;

  --mobile-drawer-bg: #121417;
  --mobile-drawer-border: rgba(255, 255, 255, 0.08);
  --mobile-item-color: #FFFFFF;
  --mobile-item-border: rgba(255, 255, 255, 0.08);
  --mobile-chevron: #6B7280;
  --mobile-back-color: rgba(255, 255, 255, 0.70);
  --mobile-back-hover: #FFFFFF;
  --mobile-toggle-bar: #FFFFFF;
  --mobile-brand-color: #FFFFFF;
  --hero-bg: #242424;
  --hero-display-color: #FFFFFF;
  --hero-lead-color: #D1D5DB;
  --hero-features-color: #D1D5DB;
  --hero-specs-color: #9CA3AF;
  --hero-eyebrow-color: #9CA3AF;
  --hero-note-color: #9CA3AF;
  --hero-btn-sec-bg: rgba(255, 255, 255, 0.08);
  --hero-btn-sec-border: 1.5px solid rgba(255, 255, 255, 0.28);
  --hero-btn-sec-color: #FFFFFF;
  --hero-btn-sec-hover-bg: rgba(255, 255, 255, 0.20);
  --hero-btn-sec-hover-border: 1.5px solid #FFFFFF;
  --hero-btn-sec-hover-color: #FFFFFF;
  --hero-btn-link-color: #FFFFFF;

  --theme-toggle-bg: rgba(0, 0, 0, 0.04);
  --theme-toggle-border: rgba(0, 0, 0, 0.12);
  --theme-toggle-color: #000000;
  --theme-toggle-hover-bg: rgba(0, 0, 0, 0.08);
  --theme-toggle-hover-border: rgba(0, 0, 0, 0.24);
  --theme-toggle-hover-color: #000000;

  --player-bg: #15181D;
  --player-inner: #101216;
  --player-border: rgba(255, 255, 255, 0.08);
  --player-pink: #FF00F6;
  --player-pink-soft: rgba(255, 0, 246, 0.16);
  --player-pink-glow: rgba(255, 0, 246, 0.35);
  --player-amber: var(--player-pink);
  --player-amber-soft: var(--player-pink-soft);
  --player-grey: #6B7280;

  --lime-neon: #CCFF00;
  --lime-neon-text: #121417;
  --lime-neon-glow: rgba(204, 255, 0, 0.4);

  --pass: #CCFF00;
  --pass-soft: #CCFF00;
  --fail: #DC2626;
  --fail-soft: #FEE2E2;
  --warn: #D97706;
  --warn-soft: #FEF3C7;

  /* Typography: Roboto */
  --font-sans: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-display: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono: "Roboto Mono", "Cascadia Mono", Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Grid Alignment: Content aligns exactly with Nav */
  --wrap: 1360px;
  --wrap-pad: 48px;
  --home-offset: 108px; /* Offset from Mindbreakz (78px width + 30px gap) to Home */

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.08);
  --shadow-mega: 0 24px 50px rgba(0, 0, 0, 0.50);
}

/* Light Mode: Header text must be BLACK (#000000), Light Hero #F4F1EA */
html[data-theme="light"] {
  --header-bg: rgba(255, 255, 255, 0.76);
  --header-border: rgba(0, 0, 0, 0.08);
  --header-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --nav-item-color: #000000;
  --nav-item-muted: rgba(0, 0, 0, 0.65);
  --nav-item-active-color: #000000;
  --nav-text-muted: rgba(0, 0, 0, 0.65);
  --nav-text-bright: #000000;
  --nav-cat-label: rgba(0, 0, 0, 0.60);

  --mega-bg: #FFFFFF;
  --mega-border: #E5E7EB;
  --mega-shadow: 0 20px 35px rgba(0, 0, 0, 0.10);
  --mega-cat-color: rgba(0, 0, 0, 0.60);
  --mega-item-color: #000000;
  --mega-item-hover-color: #000000;
  --mega-account-bg: #F9FAFB;
  --mega-account-border: #E5E7EB;
  --mega-account-strong: #111827;
  --mega-account-sub: #6B7280;

  --mobile-drawer-bg: #FFFFFF;
  --mobile-drawer-border: #E5E7EB;
  --mobile-item-color: #000000;
  --mobile-item-border: rgba(0, 0, 0, 0.08);
  --mobile-chevron: #9CA3AF;
  --mobile-back-color: rgba(0, 0, 0, 0.60);
  --mobile-back-hover: #000000;
  --mobile-toggle-bar: #000000;
  --mobile-brand-color: #000000;

  --hero-bg: #F4F1EA;
  --hero-display-color: #121417;
  --hero-lead-color: #4B5563;
  --hero-features-color: #4B5563;
  --hero-specs-color: #6B7280;
  --hero-eyebrow-color: rgba(0, 0, 0, 0.60);
  --hero-note-color: #6B7280;
  --hero-btn-sec-bg: transparent;
  --hero-btn-sec-border: 1.5px solid #121417;
  --hero-btn-sec-color: #121417;
  --hero-btn-sec-hover-bg: #121417;
  --hero-btn-sec-hover-border: 1.5px solid #121417;
  --hero-btn-sec-hover-color: #FFFFFF;
  --hero-btn-link-color: #121417;

  --theme-toggle-bg: rgba(0, 0, 0, 0.04);
  --theme-toggle-border: rgba(0, 0, 0, 0.12);
  --theme-toggle-color: #000000;
  --theme-toggle-hover-bg: rgba(0, 0, 0, 0.08);
  --theme-toggle-hover-border: rgba(0, 0, 0, 0.24);
  --theme-toggle-hover-color: #000000;
}

/* Dark Mode: Header text must be WHITE (#FFFFFF), Dark Hero #242424 */
html[data-theme="dark"] {
  --header-bg: rgba(18, 20, 23, 0.70);
  --header-border: rgba(255, 255, 255, 0.12);
  --header-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --nav-item-color: #FFFFFF;
  --nav-item-muted: rgba(255, 255, 255, 0.70);
  --nav-item-active-color: #FFFFFF;
  --nav-text-muted: rgba(255, 255, 255, 0.70);
  --nav-text-bright: #FFFFFF;
  --nav-cat-label: rgba(255, 255, 255, 0.60);

  --mega-bg: #121417;
  --mega-border: rgba(255, 255, 255, 0.10);
  --mega-shadow: 0 24px 50px rgba(0, 0, 0, 0.50);
  --mega-cat-color: rgba(255, 255, 255, 0.60);
  --mega-item-color: #E5E7EB;
  --mega-item-hover-color: #FFFFFF;
  --mega-account-bg: #181B20;
  --mega-account-border: rgba(255, 255, 255, 0.12);
  --mega-account-strong: #FFFFFF;
  --mega-account-sub: #9CA3AF;

  --mobile-drawer-bg: #121417;
  --mobile-drawer-border: rgba(255, 255, 255, 0.08);
  --mobile-item-color: #FFFFFF;
  --mobile-item-border: rgba(255, 255, 255, 0.08);
  --mobile-chevron: #6B7280;
  --mobile-back-color: rgba(255, 255, 255, 0.70);
  --mobile-back-hover: #FFFFFF;
  --mobile-toggle-bar: #FFFFFF;
  --mobile-brand-color: #FFFFFF;

  --hero-bg: #242424;
  --hero-display-color: #FFFFFF;
  --hero-lead-color: #D1D5DB;
  --hero-features-color: #D1D5DB;
  --hero-specs-color: #9CA3AF;
  --hero-eyebrow-color: #9CA3AF;
  --hero-note-color: #9CA3AF;
  --hero-btn-sec-bg: rgba(255, 255, 255, 0.08);
  --hero-btn-sec-border: 1.5px solid rgba(255, 255, 255, 0.28);
  --hero-btn-sec-color: #FFFFFF;
  --hero-btn-sec-hover-bg: rgba(255, 255, 255, 0.20);
  --hero-btn-sec-hover-border: 1.5px solid #FFFFFF;
  --hero-btn-sec-hover-color: #FFFFFF;
  --hero-btn-link-color: #FFFFFF;

  --theme-toggle-bg: rgba(255, 255, 255, 0.08);
  --theme-toggle-border: rgba(255, 255, 255, 0.18);
  --theme-toggle-color: #FFFFFF;
  --theme-toggle-hover-bg: rgba(255, 255, 255, 0.16);
  --theme-toggle-hover-border: rgba(255, 255, 255, 0.35);
  --theme-toggle-hover-color: #FFFFFF;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) {
    --header-bg: #121417;
    --header-border: rgba(255, 255, 255, 0.08);
    --header-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    --nav-item-color: #FFFFFF;
    --nav-item-muted: rgba(255, 255, 255, 0.70);
    --nav-item-active-color: #FFFFFF;

    --mega-bg: #121417;
    --mega-border: rgba(255, 255, 255, 0.08);
    --mega-shadow: 0 24px 50px rgba(0, 0, 0, 0.50);
    --mega-cat-color: rgba(255, 255, 255, 0.60);
    --mega-item-color: #E5E7EB;
    --mega-item-hover-color: #FFFFFF;
    --mega-account-bg: #181B20;
    --mega-account-border: rgba(255, 255, 255, 0.12);
    --mega-account-strong: #FFFFFF;
    --mega-account-sub: #9CA3AF;

    --mobile-drawer-bg: #121417;
    --mobile-drawer-border: rgba(255, 255, 255, 0.08);
    --mobile-item-color: #FFFFFF;
    --mobile-item-border: rgba(255, 255, 255, 0.08);
    --mobile-chevron: #6B7280;
    --mobile-back-color: rgba(255, 255, 255, 0.70);
    --mobile-back-hover: #FFFFFF;
    --mobile-toggle-bar: #FFFFFF;
    --mobile-brand-color: #FFFFFF;

    --hero-bg: #F4F1EA;
    --hero-display-color: #121417;
    --hero-lead-color: #4B5563;
    --hero-features-color: #4B5563;
    --hero-specs-color: #6B7280;
    --hero-eyebrow-color: rgba(0, 0, 0, 0.60);
    --hero-note-color: #6B7280;
    --hero-btn-sec-bg: transparent;
    --hero-btn-sec-border: 1.5px solid #121417;
    --hero-btn-sec-color: #121417;
    --hero-btn-sec-hover-bg: #121417;
    --hero-btn-sec-hover-border: 1.5px solid #121417;
    --hero-btn-sec-hover-color: #FFFFFF;
    --hero-btn-link-color: #121417;

    --theme-toggle-bg: rgba(255, 255, 255, 0.08);
    --theme-toggle-border: rgba(255, 255, 255, 0.18);
    --theme-toggle-color: #FFFFFF;
    --theme-toggle-hover-bg: rgba(255, 255, 255, 0.16);
    --theme-toggle-hover-border: rgba(255, 255, 255, 0.35);
    --theme-toggle-hover-color: #FFFFFF;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--ink-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* --------------------------------- Accessibility */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--ink-primary);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  text-decoration: none;
  font-weight: 500;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 20px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

[hidden] { display: none !important; }

/* --------------------------------- Universal High-Contrast Focus Visible (WCAG 2.4.7 / DIN EN ISO 9241-112) */
:focus-visible {
  outline: 2px solid var(--player-pink) !important;
  outline-offset: 3px !important;
}

/* --------------------------------- Motion Reduction (WCAG 2.3.3 / ISO 9241-110) */
@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;
  }
}

/* --------------------------------- Touch Target Minimum Size (WCAG 2.5.5 / 2.5.8 & ISO 9241-110) */
.btn, .modal-close, .kippschalter-opt, .nav-trigger-wrap, .nav-link-item {
  min-height: 44px;
}
.modal-close {
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------- Unified Layout & Grid Alignment */
.wrap,
.header-inner,
.mega-menu-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--wrap-pad);
  padding-right: var(--wrap-pad);
  box-sizing: border-box;
}

@media (min-width: 961px) {
  /* Spalten unterhalb des Headers (Mega-Menu Panels, Hero, Discover, Pricing, B2B, etc.) fangen auf gleicher Breite wie HOME an */
  .wrap:not(.header-inner):not(.page),
  .mega-menu-inner {
    padding-left: calc(var(--wrap-pad) + var(--home-offset)) !important;
  }
  .wrap.page {
    padding-left: var(--wrap-pad) !important;
    padding-right: var(--wrap-pad) !important;
  }
}

.page {
  padding-top: 48px;
  padding-bottom: 80px;
}
.page.narrow {
  max-width: 880px !important;
}

/* --------------------------------- Header & 1:1 Navigation */
/* --------------------------------- Liquid Glass Top Navigation Bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 900;
  width: 100%;
  /* Liquid Glass: Frosted translucent base */
  background: rgba(18, 20, 23, 0.70) !important;
  backdrop-filter: blur(24px) saturate(190%) contrast(92%);
  -webkit-backdrop-filter: blur(24px) saturate(190%) contrast(92%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.28),
              inset 0 1px 0 rgba(255, 255, 255, 0.14),
              inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light theme adaptation while preserving the liquid glass aesthetic */
html[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.76) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.8),
              inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}

/* Specular liquid sheen overlay */
.app-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.15) 15%, 
    rgba(255, 255, 255, 0.65) 50%, 
    rgba(255, 0, 246, 0.50) 75%, 
    transparent 100%);
  opacity: 0.65;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

/* Liquid Glass on Mouse-Over: Dynamic specular brilliance and glass refraction */
.app-header:hover {
  background: rgba(22, 25, 30, 0.82) !important;
  backdrop-filter: blur(28px) saturate(210%) contrast(96%);
  -webkit-backdrop-filter: blur(28px) saturate(210%) contrast(96%);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.42),
              inset 0 1px 0 rgba(255, 255, 255, 0.24),
              inset 0 -1px 0 rgba(255, 255, 255, 0.08),
              0 0 24px rgba(255, 0, 246, 0.08);
}

html[data-theme="light"] .app-header:hover {
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10),
              inset 0 1px 0 rgba(255, 255, 255, 0.95),
              inset 0 -1px 0 rgba(0, 0, 0, 0.05),
              0 0 20px rgba(255, 0, 246, 0.08);
}

.app-header:hover::before {
  opacity: 1;
}

/* Liquid Glass on Scroll (.is-scrolled): Condensed high-density glass with deep reflection */
.app-header.is-scrolled {
  background: rgba(14, 16, 20, 0.88) !important;
  backdrop-filter: blur(32px) saturate(220%) contrast(98%);
  -webkit-backdrop-filter: blur(32px) saturate(220%) contrast(98%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.60),
              inset 0 1px 0 rgba(255, 255, 255, 0.20),
              inset 0 -1px 0 rgba(255, 255, 255, 0.06),
              0 0 30px rgba(255, 0, 246, 0.10);
}

html[data-theme="light"] .app-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 1.0),
              inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.app-header.is-scrolled:hover {
  background: rgba(18, 21, 26, 0.92) !important;
  backdrop-filter: blur(36px) saturate(230%);
  -webkit-backdrop-filter: blur(36px) saturate(230%);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.68),
              inset 0 1px 0 rgba(255, 255, 255, 0.28),
              0 0 36px rgba(255, 0, 246, 0.14);
}

.header-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
}

#trigger-mindbreakz {
  min-width: 78px;
}

/* Navigation items: Regular 400 by default, ExtraBold 900 when active/hovered/chosen */
.nav-item {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400 !important;
  color: var(--nav-item-color) !important;
  text-decoration: none;
  cursor: pointer;
  transition: font-weight 0.1s ease, color 0.2s ease;
  padding: 14px 0;
  display: inline-block;
  user-select: none;
}

.nav-link-item:hover,
.nav-trigger-wrap:hover .nav-item,
.nav-link-item.is-active,
.nav-trigger-wrap.is-active .nav-item,
.nav-item.is-active,
.nav-trigger-wrap[aria-expanded="true"] .nav-item,
.nav-link-item[aria-current="page"] {
  color: var(--nav-item-active-color) !important;
  font-weight: 900 !important;
}

/* When a mega-menu is open, only that open menu trigger is bold; Home and idle links remain regular 400 */
.app-header.menu-open .nav-link-item:not(:hover),
.app-header.menu-open .nav-trigger-wrap:not(.is-active):not(:hover) .nav-item {
  color: var(--nav-item-muted) !important;
  font-weight: 400 !important;
}

.app-header.menu-open .nav-trigger-wrap.is-active .nav-item,
.app-header.menu-open .nav-trigger-wrap:hover .nav-item,
.app-header.menu-open .nav-link-item:hover {
  color: var(--nav-item-active-color) !important;
  font-weight: 900 !important;
}

.nav-trigger-wrap {
  position: relative;
  display: flex;
  align-items: center;
  outline: none;
  cursor: pointer;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-user-name {
  font-weight: 400 !important;
  color: var(--nav-item-color) !important;
}

.user-trigger-wrap:hover .nav-user-name,
.user-trigger-wrap.is-active .nav-user-name,
.user-trigger-wrap[aria-expanded="true"] .nav-user-name {
  color: var(--nav-item-active-color) !important;
  font-weight: 900 !important;
}

.header-inner .nav-toggle {
  display: none;
  margin-left: auto;
}

/* Theme Mode Switcher Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--theme-toggle-bg);
  border: 1px solid var(--theme-toggle-border);
  color: var(--theme-toggle-color);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  padding: 0;
  margin-left: 6px;
}

.theme-toggle-btn:hover {
  background: var(--theme-toggle-hover-bg);
  color: var(--theme-toggle-hover-color);
  border-color: var(--theme-toggle-hover-border);
  transform: scale(1.05);
}

.theme-toggle-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--player-pink);
}

.theme-icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.theme-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* --------------------------------- Animated Mega-Menu Panel */
.mega-menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--mega-bg) !important;
  border-bottom: 1px solid var(--mega-border) !important;
  box-shadow: var(--mega-shadow) !important;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.20s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.20s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.20s,
              background-color 0.25s ease,
              border-color 0.25s ease;
  pointer-events: none;
  z-index: 1000;
}

.app-header.menu-open .mega-menu-panel,
.mega-menu-panel.is-open {
  max-height: 320px !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.mega-menu-inner {
  padding-top: 24px !important;
  padding-bottom: 32px !important;
}

.mega-content-grid {
  display: grid;
  grid-template-columns: 280px 280px 1fr;
  gap: 48px;
  align-items: flex-start;
}

.mega-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mega-right-col {
  align-items: flex-end;
  text-align: right;
}

.mega-category {
  font-size: 11px;
  color: var(--mega-cat-color) !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ALL items in mega-menu are strictly normal font-weight: 400.
   ONLY hovered/rollover or active/selected items get font-weight: 900 */
.mega-item {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--mega-item-color) !important;
  text-decoration: none;
  font-weight: 400 !important;
  transition: font-weight 0.1s ease, color 0.15s ease;
  cursor: pointer;
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  line-height: 1.4;
}
.mega-right-col .mega-item {
  text-align: right;
}

/* Rollover & Selection: ONLY the hovered or selected item is bold */
.mega-item:hover,
.mega-item:focus-visible,
.mega-item.is-active,
.mega-item[aria-current="page"] {
  color: var(--mega-item-hover-color) !important;
  font-weight: 900 !important;
}

/* Safety override: neutralize any accidental mega-bold */
.mega-item.mega-bold {
  font-weight: 400 !important;
  color: var(--mega-item-color) !important;
}
.mega-item.mega-bold:hover {
  font-weight: 900 !important;
  color: var(--mega-item-hover-color) !important;
}

.mega-account-box {
  background: var(--mega-account-bg) !important;
  border: 1px solid var(--mega-account-border) !important;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 4px;
}
.mega-account-box strong { color: var(--mega-account-strong) !important; font-size: 0.95rem; font-weight: 600 !important; display: block; }
.mega-account-box p { color: var(--mega-account-sub) !important; font-size: 0.85rem; font-weight: 400 !important; margin-top: 4px; }

/* --------------------------------- Hero & Layout Alignment */
.hero {
  background: var(--hero-bg) !important;
  color: var(--hero-display-color) !important;
  padding-top: 56px;
  padding-bottom: 64px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.hero .eyebrow {
  color: var(--hero-eyebrow-color) !important;
}

.hero .display {
  color: var(--hero-display-color) !important;
}

.hero .lead {
  color: var(--hero-lead-color) !important;
  margin-bottom: 14px;
}

.hero .hero-features {
  color: var(--hero-features-color) !important;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-top: -4px;
  margin-bottom: 22px;
  max-width: 58ch;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.hero .hero-features .bullet {
  color: var(--player-pink);
  margin: 0 6px;
  font-weight: 700;
}

.hero .hero-specs {
  font-size: 0.82rem;
  color: var(--hero-specs-color) !important;
  margin-top: 10px;
  max-width: 54ch;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero .hero-specs .bullet {
  color: var(--player-pink);
  margin: 0 6px;
}

.hero .btn-secondary {
  background: var(--hero-btn-sec-bg) !important;
  color: var(--hero-btn-sec-color) !important;
  border: var(--hero-btn-sec-border) !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
  backdrop-filter: blur(8px);
  padding: 12px 26px !important;
  font-size: 1rem;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hero .btn-secondary:hover {
  background: var(--hero-btn-sec-hover-bg) !important;
  border: var(--hero-btn-sec-hover-border) !important;
  color: var(--hero-btn-sec-hover-color) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.hero .hero-note {
  color: var(--hero-note-color) !important;
}

.hero .btn-primary {
  background: var(--player-pink) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  border: 1.5px solid var(--player-pink) !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 20px rgba(255, 0, 246, 0.40) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.hero .btn-primary:hover {
  background: #E600DE !important;
  border-color: #E600DE !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 24px rgba(255, 0, 246, 0.60) !important;
  transform: translateY(-1px);
}

.hero .btn-link {
  color: var(--hero-btn-link-color) !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero .btn-link:hover {
  color: var(--player-pink) !important;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.60) !important; /* Zwischenüberschriften: 60% schwarz */
  margin-bottom: 12px;
}

/* General Typography: Strictly black (#000000) for all headings, text, cards */
body {
  color: #000000 !important;
}

.section-title,
.card h3,
.card h4,
.faq summary,
.tier-card h3,
.tier-card-header h3 {
  color: #000000 !important;
}

.section .lead,
.card p,
.card .meta,
.card .text-muted,
.tier-card p,
.tier-card .meta,
.tier-card ul.tier li,
.spec-list dd,
.spec-list dt,
.table th,
.table td {
  color: #000000 !important;
}

.display {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.2vw, 3.8rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  margin-bottom: 18px;
}

.lead {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 54ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--ink-muted);
  max-width: 52ch;
  line-height: 1.5;
}

/* --------------------------------- Studio Player 1:1 Vorlage Design */
.studio {
  background: var(--player-bg);
  border: 1px solid var(--player-border);
  border-radius: var(--radius-xl);
  padding: 26px 24px 22px 24px;
  box-shadow: var(--shadow-mega);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.studio-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 16px;
}

.studio-channel-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.player-controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-track-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-track-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.player-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px !important;
  background: var(--player-pink) !important;
  color: #FFFFFF !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 16px var(--player-pink-glow);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.player-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 24px var(--player-pink-glow);
  filter: brightness(1.1);
}

.player-play-btn:active {
  transform: scale(0.95);
}

.player-time-display {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: #E5E7EB;
  letter-spacing: 0.04em;
  user-select: none;
  min-width: 80px;
}

.player-format-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-vol-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vol-btn {
  background: transparent;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.vol-btn:hover {
  color: #FFFFFF;
}

.player-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 58px;
  height: 4px;
  background: #374151;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.player-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FF00F6;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(255, 0, 246, 0.6);
}

.ab-switch-group {
  display: inline-flex;
  background: var(--player-inner);
  border: 1px solid var(--player-border);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.ab-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #9CA3AF;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ab-key-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border-radius: 6px;
  background: #22262E;
  color: #E5E7EB;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  vertical-align: middle;
}

.ab-switch-btn[aria-pressed="true"] {
  background: #22262E;
  color: #FFFFFF;
}

.ab-switch-btn#ab-btn-b[aria-pressed="true"],
.ab-switch-btn[data-demo="B"][aria-pressed="true"] {
  background: var(--player-pink-soft);
  color: var(--player-pink);
}

.ab-switch-btn#ab-btn-b[aria-pressed="true"] .ab-key-badge,
.ab-switch-btn[data-demo="B"][aria-pressed="true"] .ab-key-badge {
  background: var(--player-pink);
  color: #FFFFFF;
}

.ab-switch-btn#ab-btn-a[aria-pressed="true"] .ab-key-badge,
.ab-switch-btn[data-demo="A"][aria-pressed="true"] .ab-key-badge {
  background: #FFFFFF;
  color: #111317;
}

/* Organic Waveform */
.wave-container {
  position: relative;
  width: 100%;
  padding: 8px 0 4px 0;
  cursor: pointer;
}

.wave-container:hover .wave-playhead-line {
  box-shadow: 0 0 14px rgba(255, 255, 255, 1);
}

.wave-bars-flex {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 96px;
  position: relative;
}

.wave-bars-flex span {
  flex: 1;
  min-width: 2px;
  background: var(--player-grey);
  border-radius: 2px;
  transition: height 0.2s ease, background 0.2s ease;
}

.wave-bars-flex.is-master span {
  background: var(--player-pink) !important;
}

.wave-playhead-line {
  position: absolute;
  left: 0%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #FFFFFF;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
  pointer-events: none;
  transition: left 0.06s linear;
}

@keyframes wavePulse {
  0% { transform: scaleY(0.88); }
  50% { transform: scaleY(1.12); }
  100% { transform: scaleY(0.88); }
}

.wave-bars-flex.is-playing span:nth-child(3n) {
  animation: wavePulse 0.45s ease-in-out infinite;
}

.wave-bars-flex.is-playing span:nth-child(3n+1) {
  animation: wavePulse 0.55s ease-in-out infinite 0.1s;
}

.wave-bars-flex.is-playing span:nth-child(3n+2) {
  animation: wavePulse 0.50s ease-in-out infinite 0.2s;
}

/* Centered level-matched pill badge (Vorlage 1:1) */
.wave-sub-badge-wrap {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.level-match-pill-white {
  background: #F3F0E9;
  color: #121417;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
}

/* Player Loudness Hint & Direct Link */
.player-loudness-hint {
  font-size: 11px;
  color: #8E95A2;
  margin-top: 6px;
  text-align: center;
  font-family: var(--font-sans);
  line-height: 1.4;
}

.player-loudness-hint a.loudness-faq-link {
  color: var(--player-pink);
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.player-loudness-hint a.loudness-faq-link:hover {
  opacity: 0.85;
}

/* FAQ Content Block & Sources Box */
.faq-content-block {
  margin-top: 10px;
}

.faq-content-block h4 {
  color: #000000;
  font-weight: 700;
}

.faq-content-block ul {
  padding-left: 20px;
}

.faq-sources-box {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 14px;
}

.faq-sources-box a {
  color: #121417;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.15s ease;
}

.faq-sources-box a:hover {
  color: #FF00F6;
}

.level-match-pill-toggle {
  background: #F3F0E9;
  color: #121417;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.level-match-pill-toggle:hover {
  transform: scale(1.03);
}

.level-match-pill-toggle.active-power {
  background: #1C1F26;
  color: #FF00F6;
  border: 1px solid rgba(255, 0, 246, 0.4);
  box-shadow: 0 0 12px rgba(255, 0, 246, 0.25);
}

.level-match-pill-toggle.active-matched {
  background: #F3F0E9;
  color: #121417;
  border: 1px solid #D1D5DB;
}

.match-mode-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* 4 Metric Display Boxes (Vorlage 1:1) */
.metrics-quad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.metric-quad-box {
  background: var(--player-inner);
  border: 1px solid var(--player-border);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
}

.metric-quad-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.metric-quad-lbl {
  font-size: 0.72rem;
  font-weight: 500;
  color: #8E95A2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --------------------------------- Sections & Cards */
.section {
  padding-top: 72px;
  padding-bottom: 72px;
  border-top: 1px solid var(--border-light);
}

.section-head {
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-top: 4px;
  letter-spacing: -0.02em;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
/* All boxes/cards in horizontal rows: equal height & bottom button alignment */
.grid-2,
.grid-3,
.grid-4 {
  align-items: stretch !important;
}

.grid-2.top,
.grid-3.top,
.grid-4.top {
  align-items: stretch !important;
}

.grid-2 > .card,
.grid-3 > .card,
.grid-4 > .card,
.grid-2 > div.card,
.grid-3 > div.card,
.grid-4 > div.card,
.card,
.tier-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.card > p.text-muted,
.card > p.meta,
.card > p.lead {
  flex-grow: 1;
}

.tier-card ul.tier {
  flex-grow: 1 !important;
  margin-top: 12px;
  margin-bottom: 24px;
}

.card > .btn,
.card > button,
.card > .btn-block,
.card > a.btn,
.tier-card > .btn,
.tier-card > a.btn,
.tier-card > .btn-block {
  margin-top: auto !important;
}

.tier-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  min-height: 28px;
  margin-bottom: 4px;
}

.tier-card-header .eyebrow {
  margin-bottom: 0 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

.tier-featured .eyebrow,
.eyebrow-pink {
  color: var(--player-pink) !important;
  font-weight: 700 !important;
}

/* --------------------------------- Pricing Tier Cards */
.tier-card ul.tier li {
  padding: 6px 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.tier-card.tier-highlight {
  outline: 3px solid #2563EB !important;
  outline-offset: 4px;
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25) !important;
  transition: all 0.3s ease;
}

/* --------------------------------- Buttons & Controls (Apple.de Style: volle Rundung) */
.btn,
button.btn,
a.btn,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 9999px !important; /* volle Rundung wie bei apple.de */
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.25;
}

.btn-primary {
  background: #000000 !important;
  color: #FFFFFF !important;
  border: 1.5px solid #000000 !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
}
.btn-primary:hover {
  background: #222222 !important;
  border-color: #222222 !important;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 1.5px solid #000000 !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
}
.btn-secondary:hover {
  background: #000000 !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 30px !important;
  font-size: 1.05rem !important;
  border-radius: 9999px !important;
}
.btn-sm {
  padding: 7px 18px !important;
  font-size: 0.85rem !important;
  border-radius: 9999px !important;
}
.btn-block {
  width: 100% !important;
  border-radius: 9999px !important;
}

.btn-link {
  color: var(--ink-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.btn-link:hover {
  color: #000000;
}

/* --------------------------------- Modals */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(18, 20, 23, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
}
.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  position: relative;
  box-shadow: var(--shadow-mega);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-card-lg {
  max-width: 760px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--ink-muted);
  cursor: pointer;
}
.modal-close:hover { color: var(--ink-primary); }

.info-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (max-width: 680px) {
  .info-content-grid {
    grid-template-columns: 1fr;
  }
}

/* Numbered Step Cards in Info Modals */
.modal-step-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 16px !important;
}

.modal-step-card .step-num-cell {
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink-strong);
  min-width: 24px;
}

.modal-step-card .step-content-cell {
  flex: 1;
  min-width: 0;
}

.modal-step-card .step-content-cell h3 {
  margin: 0 0 8px 0;
  font-size: 1.15rem;
  line-height: 1.35;
}

.modal-step-card .step-content-cell p {
  margin: 0;
  line-height: 1.55;
}

.spec-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 18px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.spec-list dt { font-weight: 700; color: var(--ink-primary); }
.spec-list dd { color: var(--ink-soft); margin-inline-start: 0; }

/* --------------------------------- Tables & Forms */
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.report-table th, .report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}
.report-table th.num, .report-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink-primary);
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink-primary);
}
.form-control:focus {
  outline: 2px solid var(--ink-primary);
  border-color: transparent;
}

.form-status {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin: 12px 0;
  display: none;
}
.form-status.busy {
  display: block;
  position: relative;
  padding-left: 46px;
  background: #FEF3C7;
  color: #92400E;
}
/* Continuous activity, independent of network polling or estimated duration. */
.form-status.busy::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: processing-spin 0.9s linear infinite;
}
@keyframes processing-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .form-status.busy::before { animation: none; }
}
.form-status.ok { display: block; background: var(--pass-soft); color: #166534; }
.form-status.err { display: block; background: var(--fail-soft); color: #991B1B; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid transparent;
  padding: 2.5px 9px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  line-height: 1.15;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: baseline;
}
.pill-pass,
.pill-beliebt {
  background: var(--lime-neon) !important;
  color: var(--lime-neon-text) !important;
  font-weight: 800 !important;
  border: 1px solid rgba(18, 20, 23, 0.20);
  box-shadow: 0 0 10px rgba(204, 255, 0, 0.35);
}
.pill-warn {
  background: var(--warn-soft);
  color: #92400E;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
.pill-fail {
  background: var(--fail-soft);
  color: #991B1B;
  border: 1px solid rgba(220, 38, 38, 0.25);
}
.pill-info {
  background: rgba(255, 0, 246, 0.12) !important;
  color: var(--player-pink) !important;
  border: 1px solid rgba(255, 0, 246, 0.28);
}
.pill-pink {
  background: var(--player-pink) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--player-pink);
  box-shadow: 0 0 10px rgba(255, 0, 246, 0.35);
}

/* --------------------------------- FAQ & Footer */
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  padding: 16px 20px;
}
.faq summary {
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink-primary);
}
.faq p {
  margin-top: 10px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.app-footer {
  background: #121417;
  color: #9CA3AF;
  padding: 56px var(--wrap-pad) 36px var(--wrap-pad);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-grid {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}
.footer-brand b { color: #FFFFFF; font-size: 1.15rem; }
.footer-grid h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #FFFFFF;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a {
  color: #9CA3AF;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.footer-grid a:hover { color: #FFFFFF; }
.footer-base {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------- Apple-Style Responsive Mobile Navigation */
.header-brand-mobile {
  display: none;
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 900;
  color: var(--mobile-brand-color);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  position: relative;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 5px;
}

.toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--mobile-toggle-bar);
  border-radius: 1px;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease, background-color 0.25s ease;
}

/* Apple X morph on open */
.app-header.nav-mobile-open .bar-top {
  transform: translateY(3.5px) rotate(45deg);
}

.app-header.nav-mobile-open .bar-bottom {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-nav-drawer {
  display: none;
}

@media (max-width: 960px) {
  :root { --wrap-pad: 20px; }
  .hero-grid, .grid-2, .grid-3, .footer-grid, .mega-content-grid { grid-template-columns: 1fr; }
  .display { font-size: clamp(2rem, 7.2vw, 2.6rem); }
  
  .header-brand-mobile {
    display: inline-flex;
    align-items: center;
  }

  .header-inner .nav-toggle {
    display: flex;
    margin-left: 6px;
  }

  .nav-main,
  .nav-trigger-wrap.user-trigger-wrap {
    display: none !important;
  }

  .metrics-quad-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mega-menu-panel {
    display: none !important;
  }

  /* Full-bleed Apple mobile navigation drawer */
  .mobile-nav-drawer {
    display: block;
    /* The filtered sticky header contains fixed descendants. Size the drawer
       explicitly against the viewport so it cannot collapse to header height. */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    bottom: auto;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    background: var(--mobile-drawer-bg);
    z-index: 995;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease, background-color 0.25s ease, visibility 0s linear 0.35s;
    border-top: 1px solid var(--mobile-drawer-border);
  }

  .app-header.nav-mobile-open .mobile-nav-drawer {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
    pointer-events: auto;
  }

  body.nav-mobile-locked {
    overflow: hidden !important;
  }

  .mobile-nav-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
  }

  /* Apple-Style 2-Slide Horizontal Track */
  .mobile-nav-slider {
    display: flex;
    width: 200%;
    transform: translateX(0%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .mobile-nav-viewport.show-subpage .mobile-nav-slider {
    transform: translateX(-50%);
  }

  .mobile-nav-level {
    width: 50%;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 20px 24px 60px;
  }

  .mobile-nav-level-1 {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease;
  }

  .mobile-nav-viewport.show-subpage .mobile-nav-level-1 {
    opacity: 0.3;
    pointer-events: none;
  }

  .mobile-nav-level-2 {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .mobile-nav-viewport.show-subpage .mobile-nav-level-2 {
    opacity: 1;
    pointer-events: auto;
  }

  /* Menu lists */
  .mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--mobile-item-border);
    padding: 18px 0;
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 700;
    color: var(--mobile-item-color);
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
  }

  .mobile-menu-item:hover,
  .mobile-menu-item:active {
    color: var(--player-pink);
  }

  .mobile-chevron {
    font-size: 26px;
    color: var(--mobile-chevron);
    font-weight: 300;
    line-height: 1;
  }

  .mobile-nav-cta {
    margin-top: 28px;
  }

  /* Subpage Navigation */
  .mobile-subpage-header {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--mobile-item-border);
    padding-bottom: 12px;
  }

  .mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--mobile-back-color);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.15s ease;
  }

  .mobile-back-btn:hover,
  .mobile-back-btn:active {
    color: var(--mobile-back-hover);
  }

  .mobile-back-arrow {
    font-size: 22px;
    line-height: 1;
  }

  .mobile-subpage-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--mobile-item-color);
    margin: 8px 0 16px 0;
    letter-spacing: -0.02em;
  }

  .mobile-category-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mobile-back-color);
    margin-bottom: 8px;
  }

  .mobile-sub-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--mobile-item-border);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--mobile-item-color);
    text-decoration: none;
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: none;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease;
  }

  .mobile-sub-link:hover,
  .mobile-sub-link:active {
    color: var(--player-pink);
  }

  .mobile-icon {
    font-size: 18px;
    line-height: 1;
    width: 22px;
    text-align: center;
  }

  .mobile-sub-note {
    font-size: 13px;
    color: var(--mobile-back-color);
    padding: 10px 0;
    border-bottom: 1px solid var(--mobile-item-border);
  }

  .mobile-theme-row {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--mobile-item-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-theme-label {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    color: var(--mobile-back-color);
  }

  .mobile-theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--theme-toggle-bg);
    border: 1px solid var(--theme-toggle-border);
    color: var(--theme-toggle-color);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-theme-btn:hover {
    background: var(--theme-toggle-hover-bg);
    border-color: var(--theme-toggle-hover-border);
  }
}

/* ==========================================================================
   Mastering Studio: Mode Switcher & STEM Multi-Track Console
   ========================================================================== */
.studio-mode-switcher-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .studio-mode-switcher-bar {
    grid-template-columns: 1fr;
  }
}

.studio-mode-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans);
}

.studio-mode-btn:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.studio-mode-btn.is-active {
  border-color: var(--player-pink) !important;
  background: var(--bg-card) !important;
  box-shadow: 0 0 0 1px var(--player-pink), 0 8px 24px rgba(255, 0, 246, 0.12);
}

.studio-mode-btn .mode-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.studio-mode-btn .mode-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-mode-btn .mode-text strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.studio-mode-btn .mode-text small {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  line-height: 1.4;
}

/* Quick Demo Bar */
.studio-demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg-card-muted);
  border-radius: 12px;
  margin-top: 14px;
  font-size: 0.9rem;
}

.studio-demo-bar .demo-hint {
  color: var(--ink-secondary);
  font-size: 0.85rem;
}

/* Stem Cards Grid */
.stem-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1140px) {
  .stem-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stem-grid {
    grid-template-columns: 1fr;
  }
}

.stem-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 14px;
  padding: 18px;
  transition: all 0.2s ease;
  position: relative;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.stem-card.is-loaded {
  border-color: rgba(255, 0, 246, 0.4);
}

.stem-card.is-muted {
  opacity: 0.55;
  filter: grayscale(40%);
}

.stem-card.is-soloed {
  border-color: #CCFF00 !important;
  box-shadow: 0 0 16px rgba(204, 255, 0, 0.25);
}

.stem-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  height: 26px;
}

.stem-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.stem-icon {
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.stem-name {
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 800;
  color: var(--ink-primary);
}

.stem-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid transparent;
  font-size: 0.70rem;
  line-height: 1;
  font-weight: 700;
  padding: 3.5px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.stem-dsp-badge {
  font-size: 0.72rem;
  line-height: 1.15;
  color: var(--player-pink);
  font-weight: 600;
  background: rgba(255, 0, 246, 0.08);
  border: 1px solid rgba(255, 0, 246, 0.20);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  vertical-align: baseline;
}

.stem-fader-wrap {
  margin: 10px 0 6px;
}

.stem-fader-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.stem-fader-val {
  font-weight: 800;
  color: var(--ink-primary);
}

.stem-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.stem-toggle-btn {
  flex: 1;
  height: 32px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 1px solid var(--border-card);
  background: var(--bg-card-muted);
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}

.stem-toggle-btn.btn-mute.is-active {
  background: #E11D48 !important;
  color: #FFFFFF !important;
  border-color: #E11D48 !important;
}

.stem-toggle-btn.btn-solo.is-active {
  background: #CCFF00 !important;
  color: #121417 !important;
  border-color: #CCFF00 !important;
}

.stem-meter-box {
  background: var(--bg-card-muted);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.stem-meter-item {
  display: flex;
  flex-direction: column;
}

.stem-meter-lbl {
  color: var(--ink-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.stem-meter-val {
  font-weight: 700;
  color: var(--ink-primary);
}

/* Summing Bus Diagnostic Panel */
.stem-sum-card {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: 16px;
  padding: 24px;
  margin-top: 24px;
  width: 100%;
  box-sizing: border-box;
}

.stem-sum-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.stem-sum-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .stem-sum-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Verification Banner */
.verification-banner {
  background: var(--bg-card-muted);
  border-bottom: 1px solid var(--border-card);
  padding: 10px 16px;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-primary);
}

.verification-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.verification-banner-actions {
  display: flex;
  gap: 8px;
}

/* Cohesion- & Glue-Matrix Controls */
.glue-matrix-card {
  background: var(--bg-card-muted);
  border: 1px solid var(--player-pink-soft);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 18px 0;
  transition: border-color 0.2s ease;
}

.glue-matrix-card:hover {
  border-color: var(--player-pink);
}

.glue-matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.glue-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

/* Cohesion Receipt Card */
.cohesion-receipt-card {
  background: var(--bg-card-muted);
  border: 1.5px solid var(--player-pink);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 20px 0;
}

.cohesion-receipt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.cohesion-receipt-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 10px 14px;
}

.cohesion-receipt-item .lbl {
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  display: block;
}

.cohesion-receipt-item .val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-top: 2px;
}

/* --------------------------------- Stereo Original Mix & 16 Stems Architecture */
.original-mix-card {
  border: 1.5px solid var(--border-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.original-dropzone {
  border: 2px dashed rgba(255, 0, 246, 0.35);
  background: var(--bg-card-muted);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.original-dropzone:hover,
.original-dropzone.dragover {
  border-color: var(--player-pink);
  background: rgba(255, 0, 246, 0.05);
}

.orig-loaded-details {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 16px 20px;
  text-align: left;
}

.orig-loaded-details .metric-quad-box {
  padding: 10px 14px;
}


/* Currency Mode Switcher Button (EUR / USD) */
.currency-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 34px;
  padding: 0 10px;
  border-radius: 17px;
  background: var(--theme-toggle-bg);
  border: 1px solid var(--theme-toggle-border);
  color: var(--theme-toggle-color);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  margin-left: 6px;
}

.currency-toggle-btn:hover {
  background: var(--theme-toggle-hover-bg);
  color: var(--theme-toggle-hover-color);
  border-color: var(--theme-toggle-hover-border);
  transform: scale(1.03);
}

.currency-toggle-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--player-pink);
}

.currency-pill.is-active {
  background: var(--player-pink) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(230, 0, 102, 0.35);
}

/* Region, Language & Currency Hub Button (Liquid Glass Pill) */
.region-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  margin-left: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.region-lang-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border-color: rgba(255, 0, 246, 0.45);
  box-shadow: 0 4px 16px rgba(255, 0, 246, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

html[data-theme="light"] .region-lang-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: #121417;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

html[data-theme="light"] .region-lang-btn:hover {
  background: rgba(0, 0, 0, 0.09);
  border-color: var(--player-pink);
  box-shadow: 0 4px 14px rgba(255, 0, 246, 0.15);
}

.region-lang-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--player-pink);
}

.region-lang-btn .rl-display {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --------------------------------- Kippschalter (Segmented Sliding Toggle Switch) */
.kippschalter-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.kippschalter {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
  user-select: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] .kippschalter {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.10);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.kippschalter-opt {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-radius: 9999px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.kippschalter-opt:hover:not(:disabled):not(.is-disabled) {
  color: var(--ink-primary);
}

.kippschalter-opt.active {
  color: #FFFFFF !important;
  font-weight: 700;
  background: linear-gradient(135deg, var(--player-pink), #D000C8) !important;
  box-shadow: 0 4px 16px rgba(255, 0, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.kippschalter-opt:disabled,
.kippschalter-opt.is-disabled {
  opacity: 0.38 !important;
  cursor: not-allowed !important;
  pointer-events: none;
  background: transparent !important;
  box-shadow: none !important;
}

.kipp-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.kipp-code {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.kipp-label {
  font-size: 0.85rem;
  opacity: 0.88;
}

.curr-locked-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.15);
  color: #EF4444;
  border: 1px solid rgba(220, 38, 38, 0.25);
  letter-spacing: 0.02em;
}

.currency-pill.is-disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* Region, Language & Currency Modal Components */
.lang-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.lang-opt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card-muted);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  user-select: none;
  width: 100%;
}

.lang-opt-card:hover {
  border-color: var(--border-focus);
  background: var(--bg-card);
}

.lang-opt-card.is-active {
  border-color: var(--player-pink);
  background: var(--bg-card);
  box-shadow: 0 0 0 1px var(--player-pink);
}

.lang-opt-card .lang-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.lang-opt-card .lang-flag {
  font-size: 1.25rem;
  line-height: 1;
}

.lang-opt-card .lang-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-primary);
}

.lang-opt-card .lang-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.lang-detected-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(230, 0, 102, 0.12);
  color: var(--player-pink);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.country-select-wrap {
  margin-top: 8px;
}

.country-select-wrap select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--theme-toggle-border);
  background: var(--bg-card-muted);
  color: var(--ink-primary);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.country-select-wrap select:focus {
  border-color: var(--player-pink);
  box-shadow: 0 0 0 2px rgba(230, 0, 102, 0.2);
}

.currency-opt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.currency-card-opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card-muted);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.currency-card-opt:hover:not(.is-disabled) {
  border-color: var(--border-focus);
  background: var(--bg-card);
}

.currency-card-opt.is-active {
  border-color: var(--player-pink);
  background: var(--bg-card);
  box-shadow: 0 0 0 1px var(--player-pink);
}

.currency-card-opt.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.5);
  background: var(--bg-card-muted) !important;
  border-color: transparent !important;
}

.currency-card-opt input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--player-pink);
}

.currency-card-opt .curr-body {
  display: flex;
  flex-direction: column;
}

.currency-card-opt .curr-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-primary);
}

.currency-card-opt .curr-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.currency-card-opt .curr-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #DC2626;
  background: rgba(220, 38, 38, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}


/* ==========================================================================
   Header Navigation Text Color Contract:
   - Light Mode: Text MUST BE BLACK (#000000)
   - Dark Mode:  Text MUST BE WHITE (#FFFFFF)
   ========================================================================== */
html[data-theme="light"] .app-header,
html[data-theme="light"] .app-header .nav-item,
html[data-theme="light"] .app-header .nav-link-item,
html[data-theme="light"] .app-header .nav-user-name,
html[data-theme="light"] .app-header .header-brand-mobile,
html[data-theme="light"] .app-header .theme-toggle-btn,
html[data-theme="light"] .app-header .region-lang-btn,
html[data-theme="light"] .app-header .rl-display {
  color: #000000 !important;
}

html[data-theme="light"] .app-header .nav-link-item:hover,
html[data-theme="light"] .app-header .nav-trigger-wrap:hover .nav-item,
html[data-theme="light"] .app-header .nav-item.is-active,
html[data-theme="light"] .app-header .user-trigger-wrap:hover .nav-user-name,
html[data-theme="light"] .app-header .user-trigger-wrap.is-active .nav-user-name {
  color: #000000 !important;
  font-weight: 900 !important;
}

html[data-theme="light"] .app-header .toggle-bar {
  background-color: #000000 !important;
}

html[data-theme="dark"] .app-header,
html[data-theme="dark"] .app-header .nav-item,
html[data-theme="dark"] .app-header .nav-link-item,
html[data-theme="dark"] .app-header .nav-user-name,
html[data-theme="dark"] .app-header .header-brand-mobile,
html[data-theme="dark"] .app-header .theme-toggle-btn,
html[data-theme="dark"] .app-header .region-lang-btn,
html[data-theme="dark"] .app-header .rl-display {
  color: #FFFFFF !important;
}

html[data-theme="dark"] .app-header .nav-link-item:hover,
html[data-theme="dark"] .app-header .nav-trigger-wrap:hover .nav-item,
html[data-theme="dark"] .app-header .nav-item.is-active,
html[data-theme="dark"] .app-header .user-trigger-wrap:hover .nav-user-name,
html[data-theme="dark"] .app-header .user-trigger-wrap.is-active .nav-user-name {
  color: #FFFFFF !important;
  font-weight: 900 !important;
}

html[data-theme="dark"] .app-header .toggle-bar {
  background-color: #FFFFFF !important;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .app-header,
  html:not([data-theme="dark"]) .app-header .nav-item,
  html:not([data-theme="dark"]) .app-header .nav-link-item,
  html:not([data-theme="dark"]) .app-header .nav-user-name,
  html:not([data-theme="dark"]) .app-header .header-brand-mobile,
  html:not([data-theme="dark"]) .app-header .theme-toggle-btn,
  html:not([data-theme="dark"]) .app-header .region-lang-btn,
  html:not([data-theme="dark"]) .app-header .rl-display {
    color: #000000 !important;
  }
  html:not([data-theme="dark"]) .app-header .toggle-bar {
    background-color: #000000 !important;
  }
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .app-header,
  html:not([data-theme="light"]) .app-header .nav-item,
  html:not([data-theme="light"]) .app-header .nav-link-item,
  html:not([data-theme="light"]) .app-header .nav-user-name,
  html:not([data-theme="light"]) .app-header .header-brand-mobile,
  html:not([data-theme="light"]) .app-header .theme-toggle-btn,
  html:not([data-theme="light"]) .app-header .region-lang-btn,
  html:not([data-theme="light"]) .app-header .rl-display {
    color: #FFFFFF !important;
  }
  html:not([data-theme="light"]) .app-header .toggle-bar {
    background-color: #FFFFFF !important;
  }
}


/* ==========================================================================
   EU GDPR & ePrivacy Compliance Styles (Liquid Glass Aesthetic)
   Author: Lars Henning Zahl
   ========================================================================== */

/* Fixed Bottom Liquid Glass Cookie Banner */
.gdpr-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 980px;
  z-index: 9999;
  animation: gdprBannerSlideUp 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gdprBannerSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 40px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.gdpr-banner-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  background: rgba(18, 20, 24, 0.88) !important;
  backdrop-filter: blur(28px) saturate(210%) contrast(96%);
  -webkit-backdrop-filter: blur(28px) saturate(210%) contrast(96%);
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

html[data-theme="light"] .gdpr-banner-card {
  background: rgba(255, 255, 255, 0.90) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.gdpr-banner-content {
  flex: 1;
  min-width: 0;
}

.gdpr-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.gdpr-shield-icon {
  font-size: 1.2rem;
}

.gdpr-banner-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink-primary);
  letter-spacing: -0.01em;
}

.gdpr-banner-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-secondary);
  margin: 0;
}

.gdpr-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.gdpr-banner-actions .btn {
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 9999px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .gdpr-banner {
    bottom: 12px;
    width: calc(100% - 20px);
  }
  .gdpr-banner-card {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 20px;
    gap: 16px;
  }
  .gdpr-banner-actions {
    justify-content: stretch;
  }
  .gdpr-banner-actions .btn {
    flex: 1;
    text-align: center;
  }
}

/* Cookie Settings Modal Elements */
.cookie-group-card {
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  transition: border-color 0.2s ease;
}

.cookie-group-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.cookie-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

/* Switch styling for opt-in checkboxes */
.cookie-toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.cookie-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(120, 120, 128, 0.35);
  border-radius: 26px;
  transition: all 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  border-radius: 50%;
  transition: all 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.cookie-toggle-switch input:checked + .toggle-slider {
  background: var(--player-pink);
}

.cookie-toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.cookie-toggle-switch input:focus-visible + .toggle-slider {
  box-shadow: 0 0 0 2px var(--player-pink);
}

/* GDPR Data Hub in Profile */
.gdpr-profile-card {
  margin-top: 24px;
  border-left: 4px solid var(--player-pink) !important;
}

.gdpr-profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn-danger-outline {
  background: transparent !important;
  color: #EF4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  font-weight: 700;
  border-radius: 8px;
  padding: 10px 18px;
  transition: all 0.2s ease;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: #EF4444 !important;
}

/* --------------------------------- Social 1-Click Authentication (Google & Apple) */
.social-auth-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 16px 0;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  user-select: none;
  text-decoration: none;
}
.btn-social:active {
  transform: scale(0.99);
}

.social-icon {
  flex-shrink: 0;
}

/* Google Sign-In */
.modal-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid #E5E7EB;
  margin-bottom: 20px;
}
.modal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: -1px;
}
.modal-tab:hover {
  color: #111827;
}
.modal-tab.active {
  color: #111827;
  border-bottom-color: #111827;
}

.btn-social-google {
  background: #FFFFFF;
  color: #1F2937;
  border: 1px solid #D1D5DB;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-weight: 600;
}
.btn-social-google:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Apple Sign-In */
.btn-social-apple {
  background: #000000;
  color: #FFFFFF;
  border: 1px solid #000000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  font-weight: 600;
}
.btn-social-apple:hover {
  background: #1A1A1A;
  border-color: #1A1A1A;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: #6B7280;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #E5E7EB;
}
.auth-divider span {
  padding: 0 14px;
  font-weight: 500;
}

/* Studio purchases preserve the active upload. */
.studio-purchase-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 0;margin-bottom:12px}
.studio-purchase-bar>span{flex:1;min-width:180px}
.package-dialog{width:min(980px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--border,#555);border-radius:18px;background:var(--bg-page,#F4F1EA);color:var(--ink-primary,#121417);overflow:auto}
.package-dialog::backdrop{background:rgba(0,0,0,.7)}
.package-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.package-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px;margin:20px 0}
.package-card{display:flex;flex-direction:column;margin:0}
.package-card>button{margin-top:auto}
.package-price{font-size:1.5rem;font-weight:700}
@media(max-width:480px){.package-dialog{padding:16px}.package-dialog-head{align-items:flex-start}.studio-purchase-bar>button{width:100%}}

/* Legal declaration dialogs. Author: Lars Henning Zahl */
.legal-dialog{box-sizing:border-box;width:min(620px,calc(100% - 24px));max-height:90dvh;overflow:auto;background:#151522;color:white;border:1px solid #9494aa;border-radius:14px;padding:24px}.legal-dialog::backdrop{background:#000b}.legal-dialog label{display:flex;align-items:flex-start;gap:10px;margin:20px 0}.legal-dialog input{flex:0 0 22px;width:22px;height:22px}.legal-dialog a{color:#a7d5ff}.legal-dialog button{min-height:44px;margin:12px 10px 0 0}.legal-dialog :focus-visible{outline:3px solid #91d6ff;outline-offset:4px}

/* Mobile viewport containment. Author: Lars Henning Zahl.
   Reflow content first; clip only the document's horizontal overscroll.
   Do not lock vertical scrolling, pinch zoom or native range gestures. */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}
.source-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.glue-matrix-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.cohesion-receipt-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.hero-grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *,
.source-metrics-grid > *, .glue-matrix-grid > *, .cohesion-receipt-grid > *,
.studio, .studio > *, .form-group, .mode-text, .player-track-info-wrap {
  min-width: 0;
}

@media (max-width: 960px) {
  #app, #main-view, .wrap, .card, .studio, .modal-card, .package-dialog {
    max-width: 100%;
    min-width: 0;
  }
  #main-view, .modal-card, .package-dialog, .legal-dialog, .footer {
    overflow-wrap: anywhere;
  }
  .hero-grid, .grid-2, .grid-3, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-top-row, .player-format-wrap, .player-transport-row, .project-head {
    flex-wrap: wrap;
    gap: 12px;
  }
  .player-controls-left { min-width: 0; max-width: 100%; }
  .player-track-title { white-space: normal; overflow-wrap: anywhere; }
  .ab-switch-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
  }
  .ab-switch-btn { min-width: 0; padding: 8px; min-height: 44px; }
  .ab-switch-btn > span:last-child { min-width: 0; overflow-wrap: anywhere; }
  .ab-key-badge, .match-mode-dot { flex-shrink: 0; }
  .wave-bars-flex { gap: 2px; }
  .wave-bars-flex span { min-width: 0; }
  .metrics-quad-grid, .stem-sum-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-quad-box, .metric-quad-val, .metric-quad-lbl { min-width: 0; overflow-wrap: anywhere; }
  .btn, button[type="submit"], .form-control, .level-match-pill-toggle, .level-match-pill-white {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .player-keyboard-hint { display: none; }
  .tier-card-header h3 { white-space: normal !important; }
  .spec-list { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .spec-list dd { margin-bottom: 12px; }
  .report-table { table-layout: fixed; width: 100%; overflow-wrap: anywhere; }
  .report-table th, .report-table td { padding: 8px 5px; }
  .modal-backdrop { padding: 12px; }
  .modal-card { max-height: calc(100dvh - 24px); overscroll-behavior: contain; }
  .package-dialog, .legal-dialog, .mobile-nav-drawer { overscroll-behavior: contain; }
}
@media (max-width: 640px) {
  .source-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card, .modal-card { padding: 18px; }
  .modal-card h2 { padding-right: 32px; }
  .glue-matrix-card, .cohesion-receipt-card { padding: 16px; }
  .currency-opt-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-mode-btn { padding: 16px; gap: 12px; }
  .studio-purchase-bar > span { min-width: 0; flex-basis: 100%; }
}

/* Studio source choices. The black panels give the two mastering modes and
   their upload decisions a calm, high-contrast hierarchy in either theme. */
.studio-mode-btn {
  background: #050506;
  border-color: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
}
.studio-mode-btn:hover {
  border-color: #FFFFFF;
  background: #101014;
}
.studio-mode-btn.is-active {
  background: #000000 !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 0 0 2px #000000, 0 0 0 4px var(--player-pink), 0 12px 28px rgba(0, 0, 0, 0.34);
}
.studio-mode-btn .mode-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}
.studio-mode-btn .mode-text strong,
.studio-mode-btn .mode-text small {
  color: #FFFFFF;
}
.studio-mode-btn .mode-text small { color: rgba(255, 255, 255, 0.72); }
.studio-icon {
  width: 1em;
  height: 1em;
  display: block;
  flex: 0 0 auto;
}
.studio-mode-btn .studio-icon { width: 32px; height: 32px; }
.studio-upload-intro { margin-bottom: 16px; }
.studio-upload-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}
.studio-upload-choice {
  display: flex;
  min-width: 0;
  min-height: 268px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  background: var(--bg-card-muted);
  color: var(--ink-primary);
}
.studio-upload-choice h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--ink-primary);
}
.original-dropzone #orig-mix-empty-view {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.studio-upload-choice > p { margin: 0; color: var(--ink-secondary); line-height: 1.5; }
.studio-upload-choice .meta { margin-top: 0; color: var(--ink-muted); line-height: 1.45; }
.studio-choice-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--ink-primary);
}
.studio-choice-icon .studio-icon { width: 22px; height: 22px; }
.studio-upload-choice-primary {
  border: 1.5px dashed var(--player-pink);
  background: color-mix(in srgb, var(--bg-card-muted) 88%, var(--player-pink));
  cursor: pointer;
}
.studio-upload-choice-primary:hover,
.studio-upload-choice-primary.dragover {
  border-style: solid;
  border-color: var(--ink-primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 246, 0.16);
}
.studio-upload-choice-primary:focus-visible,
.studio-upload-choice .btn:focus-visible {
  outline: 3px solid var(--player-pink);
  outline-offset: 3px;
}
.studio-demo-choice { border-color: var(--border-card); }
.studio-fadr-choice { border-color: rgba(255, 0, 246, 0.42); }
.studio-fadr-choice .studio-choice-icon { color: var(--player-pink); }
.studio-upload-action {
  width: 100%;
  min-height: 52px;
  margin-top: auto;
}
.studio-upload-choice .btn-ghost {
  display: inline;
  min-height: auto;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.studio-fadr-disclosure {
  margin: 12px 0 0;
  color: var(--ink-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
}
.studio-fadr-disclosure .btn-ghost {
  display: inline;
  min-height: auto;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.original-dropzone { margin: 0; line-height: normal; }
.orig-loaded-details { width: 100%; }
.stem-icon {
  width: 22px;
  height: 22px;
  color: var(--ink-primary);
}
.stem-icon .studio-icon { width: 22px; height: 22px; }

/* Account package availability: compact enough for the purchase dialog while
   retaining an immediately scannable remaining-credit figure. */
.package-balance {
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: var(--bg-card-muted);
}
.package-balance > strong {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  background: #000000;
  color: #FFFFFF;
  font-size: 0.95rem;
  line-height: 1.2;
}
.package-balance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 0;
}
.package-balance-grid > div {
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-card);
}
.package-balance-grid > div:last-child,
.package-balance-grid > div:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.package-balance-grid dt {
  color: var(--ink-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}
.package-balance-grid dd {
  margin: 4px 0 0;
  color: var(--ink-primary);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.1;
}
.package-balance-note { margin: 10px 0 0; color: var(--ink-secondary); font-size: 0.82rem; line-height: 1.45; }

@media (max-width: 760px) {
  .studio-upload-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .studio-upload-choice { min-height: 0; padding: 16px; }
  .studio-upload-action { margin-top: 6px; min-height: 48px; }
}
@media (max-width: 640px) {
  .studio-page { padding: 24px 16px 48px; }
  .studio-upload-choice { align-items: center; gap: 8px; padding: 14px 10px; text-align: center; }
  .original-dropzone #orig-mix-empty-view { align-items: center; gap: 8px; }
  .studio-choice-icon { width: 34px; height: 34px; }
  .studio-choice-icon .studio-icon { width: 18px; height: 18px; }
  .studio-upload-choice h3 { font-size: 0.9rem; line-height: 1.2; }
  .studio-upload-choice > p,
  .studio-upload-choice .meta,
  .original-dropzone #orig-mix-empty-view > p { display: none; }
  .studio-upload-action { min-height: 46px; padding: 9px 6px !important; font-size: 0.78rem !important; }
  .studio-fadr-disclosure { font-size: 0.78rem; }
}
@media (max-width: 440px) {
  .studio-mode-btn .mode-icon { width: 34px; height: 34px; }
  .studio-mode-btn .studio-icon { width: 27px; height: 27px; }
  .package-balance-grid { grid-template-columns: minmax(0, 1fr); }
  .package-balance-grid > div:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--border-card); }
}

/* Contact readability; Author: Lars Henning Zahl */
#mega-mindbreakz .mega-col > div,
#mega-mindbreakz .mega-col > div span { color: var(--mega-item-color) !important; }
#mob-sub-mindbreakz .mobile-sub-note { color: var(--mobile-item-color) !important; }
#mega-mindbreakz .mega-item span,
#mob-sub-mindbreakz .mobile-icon { color: currentColor !important; }
#modal-contact .contact-email-card { padding: 16px; margin-bottom: 20px; background: #fff; color: #121417; }
#modal-contact .contact-email-card a { display: block; margin-top: 8px; color: #121417; font-weight: 700; text-decoration: underline; overflow-wrap: anywhere; }
#modal-contact .eyebrow, #modal-contact .lead, #modal-contact label { color: #242830; }
#modal-contact .form-control { background: #fff; color: #121417; border-color: #767676; }
#modal-contact .form-control::placeholder { color: #595959; opacity: 1; }

/* Author: Lars Henning Zahl — FAQ and source quality notice */
.faq-item { background:#050506 !important; color:#fff !important; border-color:#444 !important; }
.faq-item summary, .faq-item p, .faq-item .text-muted { color:#f5f5f5 !important; }
.faq-item a { color:#fff; text-decoration:underline; }
.audio-source-warning { padding:12px 14px; border:1px solid #8b6500; border-radius:10px; background:#fff4d6; color:#352600; font-size:0.88rem; line-height:1.5; }

/* Author: Lars Henning Zahl — keep Pricing account column aligned with other menus. */
@media (min-width: 961px) {
  #mega-store > .mega-right-col { grid-column: 3; }
}
