/* ═══════════════════════════════════════════════════════════════
       DESIGN SYSTEM — VISUAL INTELLIGENCE MASTERCLASS
       ═══════════════════════════════════════════════════════════════ */
    
    :root {
      /* Dark Theme — Pixel Bloom */
      --bg-base: #0f0f13;
      --bg-surface: #181822;
      --bg-card: #252532;
      --bg-card-hover: #2d2d3d;
      --text-primary: #f5f5f8;
      --text-secondary: #a0a0aa;
      --text-muted: #6b6b78;
      --accent: #ff5ac8;
      --accent-secondary: #7c3aed;
      --accent-gradient: linear-gradient(135deg, #ff5ac8 0%, #7c3aed 100%);
      --accent-gradient-reverse: linear-gradient(135deg, #7c3aed 0%, #ff5ac8 100%);
      --glow: rgba(255, 90, 200, 0.25);
      --glow-secondary: rgba(124, 58, 237, 0.25);
      --border: rgba(255, 255, 255, 0.08);
      --border-accent: rgba(255, 90, 200, 0.3);
      --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
      --shadow-glow: 0 0 60px rgba(255, 90, 200, 0.15);
      
      /* Typography */
      --font-heading: 'Montserrat', sans-serif;
      --font-body: 'Space Grotesk', sans-serif;
      --font-accent: 'Saira Condensed', sans-serif;
      
      /* Spacing */
      --space-xs: 0.5rem;
      --space-sm: 1rem;
      --space-md: 1.5rem;
      --space-lg: 2rem;
      --space-xl: 3rem;
      --space-2xl: 4rem;
      
      /* Transitions */
      --transition-fast: 150ms ease;
      --transition-base: 300ms ease;
      --transition-slow: 500ms ease;
      
      /* Border Radius */
      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 20px;
      --radius-xl: 28px;
      --radius-full: 9999px;

      --header-offset: 88px;
    }

    @media (max-width: 768px) {
      :root {
        --header-offset: 76px;
      }
    }
    
    [data-theme="light"] {
      /* Light Theme — Canvas Glow */
      --bg-base: #fefefe;
      --bg-surface: #f6f8fa;
      --bg-card: #ffffff;
      --bg-card-hover: #f0f2f5;
      --text-primary: #1a1a2e;
      --text-secondary: #4a4a5a;
      --text-muted: #8a8a9a;
      --accent: #8b5cf6;
      --accent-secondary: #f472b6;
      --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #f472b6 100%);
      --accent-gradient-reverse: linear-gradient(135deg, #f472b6 0%, #8b5cf6 100%);
      --glow: rgba(139, 92, 246, 0.15);
      --glow-secondary: rgba(244, 114, 182, 0.15);
      --border: rgba(0, 0, 0, 0.08);
      --border-accent: rgba(139, 92, 246, 0.3);
      --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
      --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.1);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       BASE STYLES
       ═══════════════════════════════════════════════════════════════ */
    
    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    html {
      scroll-behavior: smooth;
      scroll-snap-type: y mandatory;
      scroll-padding-top: 0 !important;
      overflow-x: hidden;
    }
    
    body {
      font-family: var(--font-body);
      background: var(--bg-base);
      color: var(--text-primary);
      line-height: 1.6;
      transition: background var(--transition-base), color var(--transition-base);
      overflow-x: hidden;
    }
    
    h1, h2, h3, h4, h5, h6 {
      font-family: var(--font-heading);
      font-weight: 700;
      line-height: 1.2;
      letter-spacing: -0.02em;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       PANEL SYSTEM
       ═══════════════════════════════════════════════════════════════ */
    
    .panel {
      min-height: 100dvh;
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: var(--space-lg);
      padding-top: calc(var(--header-offset) + 60px);
      padding-bottom: calc(var(--mobile-bottom-bar-height) + 40px);
      scroll-snap-align: start;
      scroll-snap-stop: always;
      position: relative;
      overflow: hidden;
    }
    
    .panel-content {
      max-width: 480px;
      width: 100%;
      z-index: 2;
    }
    
    .panel-bg {
      position: absolute;
      inset: 0;
      z-index: 0;
      overflow: hidden;
    }
    
    .panel-bg::before {
      content: '';
      position: absolute;
      inset: 0;
      background: var(--bg-base);
      opacity: 0.85;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       HERO PANELS (CH.1)
       ═══════════════════════════════════════════════════════════════ */
    
    .hero-panel {
      background: var(--bg-base);
      position: relative;
    }
    
    .hero-panel .panel-bg {
      background: 
        radial-gradient(ellipse at 20% 20%, var(--glow) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, var(--glow-secondary) 0%, transparent 50%),
        var(--bg-base);
      animation: heroGlow 8s ease-in-out infinite alternate;
    }
    
    @keyframes heroGlow {
      0% { opacity: 0.6; transform: scale(1); }
      100% { opacity: 1; transform: scale(1.1); }
    }
    
    .hero-title {
      font-size: clamp(2.5rem, 10vw, 4rem);
      font-weight: 900;
      background: var(--accent-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-align: center;
      margin-bottom: var(--space-md);
      animation: fadeInUp 1s ease-out;
    }
    
    .hero-tagline {
      font-size: clamp(1.1rem, 4vw, 1.4rem);
      color: var(--text-secondary);
      text-align: center;
      margin-bottom: var(--space-xl);
      animation: fadeInUp 1s ease-out 0.2s both;
    }
    
    .hero-cta-group {
      display: flex;
      flex-direction: column;
      gap: var(--space-sm);
      animation: fadeInUp 1s ease-out 0.4s both;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       BUTTONS
       ═══════════════════════════════════════════════════════════════ */
    
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-xs);
      padding: var(--space-sm) var(--space-lg);
      font-family: var(--font-body);
      font-size: 1rem;
      font-weight: 600;
      border: none;
      border-radius: var(--radius-full);
      cursor: pointer;
      transition: all var(--transition-base);
      text-decoration: none;
      position: relative;
      overflow: hidden;
    }
    
    .btn-primary {
      background: var(--accent-gradient);
      color: white;
      box-shadow: 0 4px 20px var(--glow);
    }
    
    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 30px var(--glow);
    }
    
    .btn-secondary {
      background: var(--bg-card);
      color: var(--text-primary);
      border: 1px solid var(--border);
    }
    
    .btn-secondary:hover {
      background: var(--bg-card-hover);
      border-color: var(--border-accent);
    }
    
    .btn-ghost {
      background: transparent;
      color: var(--accent);
      padding: var(--space-xs) var(--space-sm);
    }
    
    .btn-ghost:hover {
      background: var(--glow);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       FLOATING CONTROLS
       ═══════════════════════════════════════════════════════════════ */
    
    .floating-controls {
      position: fixed;
      right: var(--space-md);
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      flex-direction: column;
      gap: var(--space-sm);
      z-index: 900;
    }
    
    .nav-btn {
      width: 48px;
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all var(--transition-base);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    
    .nav-btn:hover {
      background: var(--accent-gradient);
      border-color: transparent;
      transform: scale(1.1);
    }
    
    .nav-btn:hover svg {
      stroke: white;
    }
    
    .nav-btn svg {
      width: 24px;
      height: 24px;
      stroke: var(--text-primary);
      stroke-width: 2;
      fill: none;
      transition: stroke var(--transition-base);
    }
    
    /* Theme & Language Toggles */
    .floating-toggles {
      position: fixed;
      left: var(--space-md);
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      flex-direction: column;
      gap: var(--space-sm);
      z-index: 100;
    }
    
    .toggle-btn {
      width: 48px;
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all var(--transition-base);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      font-size: 1.2rem;
    }
    
    .toggle-btn:hover {
      background: var(--bg-card-hover);
      border-color: var(--border-accent);
      transform: scale(1.1);
    }
    
    .toggle-btn svg {
      width: 24px;
      height: 24px;
      stroke: var(--text-primary);
      stroke-width: 2;
      fill: none;
      transition: all var(--transition-base);
    }
    
    [data-theme="light"] .theme-toggle .icon-sun { display: none; }
    [data-theme="light"] .theme-toggle .icon-moon { display: block; }
    [data-theme="dark"] .theme-toggle .icon-sun { display: block; }
    [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
    
    /* ═══════════════════════════════════════════════════════════════
       CHAPTER HEADERS
       ═══════════════════════════════════════════════════════════════ */
    
    .chapter-badge {
      display: inline-flex;
      align-items: center;
      gap: var(--space-xs);
      font-family: var(--font-accent);
      font-size: 0.9rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--accent);
      background: var(--glow);
      padding: var(--space-xs) var(--space-sm);
      border-radius: var(--radius-full);
      margin-bottom: var(--space-md);
    }
    
    .chapter-title {
      font-size: clamp(1.8rem, 7vw, 2.5rem);
      margin-bottom: var(--space-md);
      color: var(--text-primary);
    }
    
    .chapter-description {
      font-size: 1.05rem;
      color: var(--text-secondary);
      margin-bottom: var(--space-lg);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       CARDS
       ═══════════════════════════════════════════════════════════════ */
    
    .card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: var(--space-lg);
      transition: all var(--transition-base);
    }
    
    .card:hover {
      border-color: var(--border-accent);
      box-shadow: var(--shadow-glow);
      transform: translateY(-4px);
    }
    
    .card-title {
      font-size: 1.2rem;
      font-weight: 700;
      margin-bottom: var(--space-xs);
    }
    
    .card-description {
      font-size: 0.95rem;
      color: var(--text-secondary);
    }
    
    .card-grid {
      display: grid;
      gap: var(--space-md);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       TOOL CARDS
       ═══════════════════════════════════════════════════════════════ */
    
    .tool-card {
      display: flex;
      align-items: flex-start;
      gap: var(--space-md);
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: var(--space-md);
      transition: all var(--transition-base);
    }
    
    .tool-card:hover {
      border-color: var(--border-accent);
      background: var(--bg-card-hover);
    }
    
    .tool-icon {
      width: 48px;
      height: 48px;
      border-radius: var(--radius-md);
      background: var(--accent-gradient);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      flex-shrink: 0;
    }
    
    .tool-content {
      flex: 1;
      min-width: 0;
    }
    
    .tool-name {
      font-weight: 700;
      font-size: 1.1rem;
      margin-bottom: 4px;
    }
    
    .tool-tier {
      display: inline-block;
      font-size: 0.75rem;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: var(--radius-full);
      background: var(--glow);
      color: var(--accent);
      margin-bottom: var(--space-xs);
    }
    
    .tool-description {
      font-size: 0.9rem;
      color: var(--text-secondary);
    }
    
    .tool-link {
      margin-top: var(--space-sm);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       PROMPT COMPARISON
       ═══════════════════════════════════════════════════════════════ */
    
    .prompt-compare {
      display: grid;
      gap: var(--space-md);
    }
    
    .prompt-box {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: var(--space-md);
      position: relative;
    }
    
    .prompt-box.bad {
      border-color: #ef4444;
    }
    
    .prompt-box.good {
      border-color: #22c55e;
    }
    
    .prompt-label {
      position: absolute;
      top: -10px;
      left: var(--space-sm);
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      padding: 2px 10px;
      border-radius: var(--radius-full);
    }
    
    .prompt-box.bad .prompt-label {
      background: #ef4444;
      color: white;
    }
    
    .prompt-box.good .prompt-label {
      background: #22c55e;
      color: white;
    }
    
    .prompt-text {
      font-family: 'Space Grotesk', monospace;
      font-size: 0.95rem;
      color: var(--text-primary);
      line-height: 1.5;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       PLAYGROUND
       ═══════════════════════════════════════════════════════════════ */
    
    .playground {
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: var(--space-lg);
    }
    
    .playground-input {
      width: 100%;
      min-height: 100px;
      padding: var(--space-md);
      font-family: var(--font-body);
      font-size: 1rem;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-primary);
      resize: vertical;
      transition: border-color var(--transition-base);
    }
    
    .playground-input:focus {
      outline: none;
      border-color: var(--accent);
    }
    
    .playground-input::placeholder {
      color: var(--text-muted);
    }
    
    .playground-output {
      margin-top: var(--space-md);
      padding: var(--space-md);
      background: var(--bg-card);
      border: 1px dashed var(--border);
      border-radius: var(--radius-md);
      min-height: 80px;
      font-size: 0.9rem;
      color: var(--text-secondary);
    }
    
    .playground-output.has-content {
      border-style: solid;
      border-color: var(--border-accent);
      color: var(--text-primary);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       GALLERY
       ═══════════════════════════════════════════════════════════════ */
    
    .gallery {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: var(--space-sm);
    }
    
    .gallery-item {
      aspect-ratio: 1;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      overflow: hidden;
      position: relative;
      transition: all var(--transition-base);
    }
    
    .gallery-item:hover {
      border-color: var(--border-accent);
      transform: scale(1.02);
    }
    
    .gallery-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    
    .gallery-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card) 100%);
      color: var(--text-muted);
      font-size: 2rem;
    }
    
    .gallery-label {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: var(--space-xs) var(--space-sm);
      background: linear-gradient(transparent, rgba(0,0,0,0.8));
      color: white;
      font-size: 0.8rem;
      font-weight: 500;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       INTERACTIVE DIAGRAM (SVG Animation)
       ═══════════════════════════════════════════════════════════════ */
    
    .diagram-container {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: var(--space-lg);
      margin: var(--space-md) 0;
    }
    
    .diffusion-visual {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-sm);
      margin-bottom: var(--space-md);
    }
    
    .diffusion-step {
      flex: 1;
      aspect-ratio: 1;
      background: var(--bg-surface);
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
    }
    
    .diffusion-step.noise {
      background: repeating-conic-gradient(
        var(--text-muted) 0deg 90deg,
        var(--bg-surface) 90deg 180deg
      ) 0 0/8px 8px;
      animation: noiseShift 0.5s steps(3) infinite;
    }
    
    @keyframes noiseShift {
      to { background-position: 8px 8px; }
    }
    
    .diffusion-step.partial {
      background: linear-gradient(
        135deg,
        var(--glow) 0%,
        var(--bg-surface) 50%,
        var(--glow-secondary) 100%
      );
    }
    
    .diffusion-step.clear {
      background: var(--accent-gradient);
    }
    
    .diffusion-arrow {
      font-size: 1.5rem;
      color: var(--text-muted);
    }
    
    .diagram-label {
      text-align: center;
      font-size: 0.85rem;
      color: var(--text-secondary);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       CHEATSHEET
       ═══════════════════════════════════════════════════════════════ */
    
    .cheatsheet-grid {
      display: grid;
      gap: var(--space-md);
    }
    
    .cheatsheet-section {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: var(--space-md);
    }
    
    .cheatsheet-section h4 {
      font-size: 0.9rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--accent);
      margin-bottom: var(--space-sm);
    }
    
    .formula-block {
      background: var(--bg-surface);
      border-radius: var(--radius-sm);
      padding: var(--space-sm);
      font-family: 'Space Grotesk', monospace;
      font-size: 0.85rem;
      color: var(--text-primary);
      margin-bottom: var(--space-xs);
    }
    
    .glossary-item {
      display: flex;
      gap: var(--space-sm);
      padding: var(--space-xs) 0;
      border-bottom: 1px solid var(--border);
    }
    
    .glossary-item:last-child {
      border-bottom: none;
    }
    
    .glossary-term {
      font-weight: 700;
      color: var(--accent);
      min-width: 60px;
    }
    
    .glossary-def {
      font-size: 0.9rem;
      color: var(--text-secondary);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       LICENSE BADGES
       ═══════════════════════════════════════════════════════════════ */
    
    .license-badges {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-xs);
      margin-top: var(--space-md);
    }
    
    .license-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      font-size: 0.75rem;
      font-weight: 600;
      border-radius: var(--radius-full);
      background: var(--bg-surface);
      color: var(--text-secondary);
      border: 1px solid var(--border);
    }
    
    .license-badge.commercial {
      background: rgba(34, 197, 94, 0.15);
      color: #22c55e;
      border-color: rgba(34, 197, 94, 0.3);
    }
    
    .license-badge.personal {
      background: rgba(59, 130, 246, 0.15);
      color: #3b82f6;
      border-color: rgba(59, 130, 246, 0.3);
    }
    
    .license-badge.restricted {
      background: rgba(239, 68, 68, 0.15);
      color: #ef4444;
      border-color: rgba(239, 68, 68, 0.3);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       CASE STUDY CARDS
       ═══════════════════════════════════════════════════════════════ */
    
    .case-study {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      transition: all var(--transition-base);
    }
    
    .case-study:hover {
      border-color: var(--border-accent);
      transform: translateY(-2px);
    }
    
    .case-study-image {
      aspect-ratio: 16/9;
      background: linear-gradient(135deg, var(--glow) 0%, var(--glow-secondary) 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 3rem;
    }
    
    .case-study-content {
      padding: var(--space-md);
    }
    
    .case-study-title {
      font-size: 1.1rem;
      font-weight: 700;
      margin-bottom: var(--space-xs);
    }
    
    .case-study-description {
      font-size: 0.9rem;
      color: var(--text-secondary);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       RESOURCES LIST
       ═══════════════════════════════════════════════════════════════ */
    
    .resource-list {
      display: flex;
      flex-direction: column;
      gap: var(--space-sm);
    }
    
    .resource-item {
      display: flex;
      align-items: center;
      gap: var(--space-md);
      padding: var(--space-md);
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      text-decoration: none;
      color: var(--text-primary);
      transition: all var(--transition-base);
    }
    
    .resource-item:hover {
      border-color: var(--border-accent);
      background: var(--bg-card-hover);
      transform: translateX(4px);
    }
    
    .resource-icon {
      width: 40px;
      height: 40px;
      border-radius: var(--radius-sm);
      background: var(--accent-gradient);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
    }
    
    .resource-content {
      flex: 1;
    }
    
    .resource-title {
      font-weight: 600;
      font-size: 1rem;
    }
    
    .resource-subtitle {
      font-size: 0.85rem;
      color: var(--text-secondary);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       MODAL
       ═══════════════════════════════════════════════════════════════ */
    
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: var(--space-lg);
      z-index: 2000;
      opacity: 0;
      visibility: hidden;
      transition: all var(--transition-base);
    }
    
    .modal-overlay.active {
      opacity: 1;
      visibility: visible;
    }
    
    .modal {
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      max-width: 480px;
      width: 100%;
      max-height: 80vh;
      overflow-y: auto;
      transform: scale(0.9) translateY(20px);
      transition: transform var(--transition-base);
    }
    
    .modal-overlay.active .modal {
      transform: scale(1) translateY(0);
    }
    
    .modal-header {
      padding: var(--space-lg);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    
    .modal-title {
      font-size: 1.3rem;
      font-weight: 700;
    }
    
    .modal-close {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: 1.2rem;
      color: var(--text-secondary);
      transition: all var(--transition-base);
    }
    
    .modal-close:hover {
      background: var(--bg-card-hover);
      color: var(--text-primary);
    }
    
    .modal-body {
      padding: var(--space-lg);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       QUIZ
       ═══════════════════════════════════════════════════════════════ */
    
    .quiz-option {
      display: block;
      width: 100%;
      padding: var(--space-md);
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      text-align: left;
      cursor: pointer;
      font-family: var(--font-body);
      font-size: 1rem;
      color: var(--text-primary);
      margin-bottom: var(--space-sm);
      transition: all var(--transition-base);
    }
    
    .quiz-option:hover {
      border-color: var(--border-accent);
      background: var(--bg-card-hover);
    }
    
    .quiz-option.correct {
      border-color: #22c55e;
      background: rgba(34, 197, 94, 0.1);
    }
    
    .quiz-option.incorrect {
      border-color: #ef4444;
      background: rgba(239, 68, 68, 0.1);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       PROMPT BUILDER
       ═══════════════════════════════════════════════════════════════ */
    
    .prompt-builder {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: var(--space-lg);
    }
    
    .builder-field {
      margin-bottom: var(--space-md);
    }
    
    .builder-label {
      display: block;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: var(--space-xs);
    }
    
    .builder-input {
      width: 100%;
      padding: var(--space-sm);
      font-family: var(--font-body);
      font-size: 0.95rem;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--text-primary);
      transition: border-color var(--transition-base);
    }
    
    .builder-input:focus {
      outline: none;
      border-color: var(--accent);
    }
    
    .builder-select {
      width: 100%;
      padding: var(--space-sm);
      font-family: var(--font-body);
      font-size: 0.95rem;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--text-primary);
      cursor: pointer;
    }
    
    .builder-output {
      margin-top: var(--space-md);
      padding: var(--space-md);
      background: var(--bg-surface);
      border: 2px dashed var(--border-accent);
      border-radius: var(--radius-md);
      font-family: 'Space Grotesk', monospace;
      font-size: 0.9rem;
      color: var(--accent);
      word-break: break-word;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       TEMPLATE GALLERY
       ═══════════════════════════════════════════════════════════════ */
    
    .template-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: var(--space-sm);
    }
    
    .template-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: var(--space-md);
      text-align: center;
      cursor: pointer;
      transition: all var(--transition-base);
    }
    
    .template-card:hover {
      border-color: var(--border-accent);
      transform: translateY(-2px);
    }
    
    .template-card.active {
      border-color: var(--accent);
      background: var(--glow);
    }
    
    .template-icon {
      font-size: 2rem;
      margin-bottom: var(--space-xs);
    }
    
    .template-name {
      font-size: 0.9rem;
      font-weight: 600;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       COMPARISON TABLE
       ═══════════════════════════════════════════════════════════════ */
    
    .comparison-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
      padding: var(--space-sm);
      text-align: left;
      border-bottom: 1px solid var(--border);
    }
    
    .comparison-table th {
      font-weight: 700;
      color: var(--text-secondary);
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    
    .comparison-table td {
      color: var(--text-primary);
    }
    
    .comparison-table tr:hover td {
      background: var(--bg-card-hover);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       SCROLL INDICATOR
       ═══════════════════════════════════════════════════════════════ */
    
    .scroll-indicator {
      position: fixed;
      bottom: var(--space-lg);
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-xs);
      color: var(--text-muted);
      font-size: 0.8rem;
      animation: bounce 2s infinite;
      z-index: 50;
    }
    
    @keyframes bounce {
      0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
      40% { transform: translateX(-50%) translateY(-10px); }
      60% { transform: translateX(-50%) translateY(-5px); }
    }
    
    .scroll-indicator svg {
      width: 24px;
      height: 24px;
      stroke: var(--text-muted);
      stroke-width: 2;
      fill: none;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       PANEL PROGRESS
       ═══════════════════════════════════════════════════════════════ */
    
    .progress-bar {
      position: fixed;
      top: 0;
      left: 0;
      height: 3px;
      background: var(--accent-gradient);
      z-index: 150;
      transition: width var(--transition-fast);
    }
    
    .panel-counter {
      position: fixed;
      bottom: calc(var(--mobile-bottom-bar-height) + var(--space-md));
      right: var(--space-md);
      font-family: var(--font-accent);
      font-size: 0.9rem;
      color: var(--text-muted);
      z-index: 900;
    }
    
    .panel-counter span {
      color: var(--accent);
      font-weight: 700;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       ANIMATIONS
       ═══════════════════════════════════════════════════════════════ */
    
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    @keyframes slideInRight {
      from { transform: translateX(100%); }
      to { transform: translateX(0); }
    }
    
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }
    
    .animate-fade-in {
      animation: fadeIn 0.6s ease-out;
    }
    
    .animate-fade-in-up {
      animation: fadeInUp 0.6s ease-out;
    }
    
    .stagger-1 { animation-delay: 0.1s; }
    .stagger-2 { animation-delay: 0.2s; }
    .stagger-3 { animation-delay: 0.3s; }
    .stagger-4 { animation-delay: 0.4s; }
    
    /* ═══════════════════════════════════════════════════════════════
       SHARE BUTTON
       ═══════════════════════════════════════════════════════════════ */
    
    .share-btn {
      position: fixed;
      bottom: calc(var(--mobile-bottom-bar-height) + var(--space-lg));
      right: calc(var(--space-md) + 60px);
      width: 48px;
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--accent-gradient);
      border: none;
      border-radius: var(--radius-full);
      cursor: pointer;
      box-shadow: 0 4px 20px var(--glow);
      transition: all var(--transition-base);
      z-index: 900;
    }
    
    .share-btn:hover {
      transform: scale(1.1);
      box-shadow: 0 8px 30px var(--glow);
    }
    
    .share-btn svg {
      width: 22px;
      height: 22px;
      stroke: white;
      stroke-width: 2;
      fill: none;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       TOOLTIP
       ═══════════════════════════════════════════════════════════════ */
    
    .tooltip-trigger {
      position: relative;
      cursor: help;
      border-bottom: 1px dashed var(--text-muted);
    }
    
    .tooltip-content {
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%) translateY(-8px);
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: var(--space-sm);
      font-size: 0.85rem;
      color: var(--text-primary);
      min-width: 200px;
      max-width: 280px;
      opacity: 0;
      visibility: hidden;
      transition: all var(--transition-fast);
      z-index: 50;
      box-shadow: var(--shadow);
    }
    
    .tooltip-trigger:hover .tooltip-content {
      opacity: 1;
      visibility: visible;
      transform: translateX(-50%) translateY(-12px);
    }
    
    /* ═══════════════════════════════════════════════════════════════
       RESPONSIVE / DESKTOP
       ═══════════════════════════════════════════════════════════════ */
    
    @media (min-width: 768px) {
      .panel-content {
        max-width: 600px;
      }
      
      .floating-controls,
      .floating-toggles {
        right: var(--space-xl);
        left: auto;
      }
      
      .floating-toggles {
        left: var(--space-xl);
        right: auto;
      }
      
      .gallery {
        grid-template-columns: repeat(4, 1fr);
      }
      
      .template-grid {
        grid-template-columns: repeat(4, 1fr);
      }
    }
    
    @media (min-width: 1200px) {
      /* Desktop horizontal scroll mode */
      html {
        scroll-snap-type: x mandatory;
        overflow-y: hidden;
        overflow-x: auto;
      }
      
      body {
        display: flex;
        flex-direction: row;
        width: fit-content;
      }
      
      .panel {
        min-width: 100vw;
        min-height: 100dvh;
        scroll-snap-align: start;
      }
      
      .floating-controls {
        flex-direction: row;
        right: 50%;
        top: auto;
        bottom: var(--space-xl);
        transform: translateX(50%);
      }
      
      .nav-btn.prev svg {
        transform: rotate(-90deg);
      }
      
      .nav-btn.next svg {
        transform: rotate(-90deg);
      }
    }
    
    /* ═══════════════════════════════════════════════════════════════
       SAFE AREA (MOBILE NOTCH)
       ═══════════════════════════════════════════════════════════════ */
    
    @supports (padding: env(safe-area-inset-top)) {
      .floating-toggles,
      .floating-controls {
        padding-top: env(safe-area-inset-top);
      }
      
      .panel-counter,
      .share-btn {
        bottom: calc(var(--mobile-bottom-bar-height) + var(--space-lg) + env(safe-area-inset-bottom));
      }
    }
