/* ══════════════════════════════════════════════════════════════════════
   AURELIAN DESIGN SYSTEM
   A premium UI/UX system in Gold, White and Blue for Presentation Agent
   ══════════════════════════════════════════════════════════════════════ */

:root {
  /* ── 1. Color System ── */
  /* Blue (structure and text) */
  --blue-950: #050B1F; /* Midnight */
  --blue-900: #0A1633; /* Navy */
  --blue-800: #0F2150; /* Elevated dark surfaces, headers */
  --blue-600: #1F46C8; /* Royal: links, secondary buttons, selected states */
  --blue-500: #3563E9; /* Interactive hover, charts */
  --blue-100: #E6ECFD; /* Tinted backgrounds, chips */
  --blue-50:  #F3F6FE; /* Subtle section backgrounds */

  /* Gold (accent and reward - the jewel) */
  --gold-700: #8A6A12; /* Gold text on white (safe contrast) */
  --gold-600: #B38A1D; /* Pressed state, borders, warnings */
  --gold-500: #D4A937; /* Signature primary accent, fills, icons */
  --gold-400: #E4C468; /* Highlights, hover */
  --gold-200: #F3E3B0; /* Soft fills, focus halo */
  --gold-100: #FAF2D8; /* Tinted backgrounds */
  --gold-gradient: linear-gradient(135deg, #F3E3B0 0%, #D4A937 55%, #B38A1D 100%);
  --gold-hairline: rgba(212, 169, 55, 0.5);

  /* White and neutrals */
  --white:     #FFFFFF;
  --ivory:     #FBFAF7; /* Light-mode page background */
  --slate-100: #EEF1F7; /* Dividers, input fills */
  --slate-200: #DDE3EE; /* Borders */
  --slate-400: #8B96AD; /* Placeholder, disabled */
  --slate-600: #4A5671; /* Secondary text */
  --slate-800: #1E2740; /* Strong secondary text */

  /* Semantic */
  --success: #1F9D6B;
  --error:   #D64545;
  --warning: #B38A1D; /* gold-600 */
  --info:    #1F46C8; /* blue-600 */

  /* ── 2. Shape, Radius & Rhythm ── */
  --r-sm: 8px;   /* inputs */
  --r-md: 12px;  /* buttons, chips */
  --r-lg: 16px;  /* cards */
  --r-xl: 24px;  /* sheets, hero cards */
  --r-full: 9999px;

  /* Elevation (blue-tinted shadows, never harsh black) */
  --e1: 0 1px 2px rgba(10, 22, 51, 0.06);
  --e2: 0 6px 16px rgba(10, 22, 51, 0.08);
  --e3: 0 16px 40px rgba(10, 22, 51, 0.12);
  --gold-glow: 0 0 0 4px rgba(212, 169, 55, 0.25);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 150ms;
  --t-base: 250ms;
  --t-slow: 400ms;

  /* Typography Fonts: Playfair for Headings, Montserrat Normal for Body */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Theme Defaults (Light / Ivory Theme) */
  --bg: var(--ivory);
  --bg-secondary: var(--white);
  --surface: var(--white);
  --surface-raised: var(--white);
  --surface-glass: rgba(255, 255, 255, 0.85);
  --text-primary: var(--blue-900);
  --text-secondary: var(--slate-600);
  --border: var(--slate-200);
  --accent: var(--gold-500);
  --chip-bg: var(--white);
  --chip-border: var(--slate-200);
  --chip-text: var(--blue-900);
  --input-bg: var(--slate-100);
}

/* ── Dark Theme (“Midnight”) ── */
[data-theme="dark"] {
  --bg: var(--blue-950);
  --bg-secondary: var(--blue-900);
  --surface: var(--blue-900);
  --surface-raised: var(--blue-800);
  --surface-glass: rgba(15, 33, 80, 0.65);
  --text-primary: #FFFFFF;
  --text-secondary: var(--slate-400);
  --border: rgba(255, 255, 255, 0.10);
  --accent: var(--gold-400);
  --chip-bg: var(--blue-900);
  --chip-border: rgba(255, 255, 255, 0.12);
  --chip-text: #FFFFFF;
  --input-bg: rgba(5, 11, 31, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--blue-950);
    --bg-secondary: var(--blue-900);
    --surface: var(--blue-900);
    --surface-raised: var(--blue-800);
    --surface-glass: rgba(15, 33, 80, 0.65);
    --text-primary: #FFFFFF;
    --text-secondary: var(--slate-400);
    --border: rgba(255, 255, 255, 0.10);
    --accent: var(--gold-400);
    --chip-bg: var(--blue-900);
    --chip-border: rgba(255, 255, 255, 0.12);
    --chip-text: #FFFFFF;
    --input-bg: rgba(5, 11, 31, 0.6);
  }
}

/* ── Reset & Global Base ── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400; /* Montserrat normal for body text */
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: color var(--t-base) var(--ease);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: var(--font-body);
}

/* Subtle grain overlay on dark surfaces */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
}

/* ── Typography Tokens ── */
.display-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.gold-word {
  color: var(--gold-500);
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .gold-word {
  color: var(--gold-700);
  background: none;
  -webkit-text-fill-color: var(--gold-700);
}

h1, .h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h2, .h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

h3, .h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.body-lg {
  font-size: 18px;
  line-height: 1.5;
}

.body-text {
  font-size: 16px;
  line-height: 1.5;
}

.caption-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.overline {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-500);
}

.tabular-numbers {
  font-variant-numeric: tabular-nums;
}

/* ── Offline Banner ── */
.offline-banner {
  display: none;
  background: var(--blue-900);
  color: var(--white);
  padding: 8px 16px;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid var(--gold-hairline);
  position: sticky;
  top: 0;
  z-index: 200;
  animation: slideDown 250ms var(--ease);
}

.offline-banner.visible {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

/* ── Top Header Navigation ── */
header.app-header {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--t-base) var(--ease);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-jewel {
  width: 38px;
  height: 38px;
  background: var(--blue-900);
  border: 1px solid var(--gold-hairline);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(10, 22, 51, 0.15);
  position: relative;
}

.brand-jewel::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  background: var(--gold-500);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--gold-500);
}

.brand-jewel svg {
  width: 20px;
  height: 20px;
  stroke: var(--gold-500);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Top bar controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Nav tabs in top bar */
.top-nav-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border);
}

.top-tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 200ms var(--ease), 
              color 200ms var(--ease),
              box-shadow 200ms var(--ease);
}

.top-tab-btn:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.top-tab-btn:active {
  transform: scale(0.96);
}

.top-tab-btn.active {
  background: var(--blue-900);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(10, 22, 51, 0.25);
}

[data-theme="light"] .top-tab-btn.active {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(31, 70, 200, 0.28);
}

/* Theme Switcher Toggle */
.theme-toggle-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.theme-toggle-btn:hover {
  border-color: var(--gold-500);
  box-shadow: var(--gold-glow);
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: rgba(31, 157, 107, 0.12);
  color: var(--success);
  border: 1px solid rgba(31, 157, 107, 0.25);
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.7;
  animation: beaconPulse 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes beaconPulse {
  0% { transform: scale(1); opacity: 0.8; }
  70% { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ── App Layout & Viewport ── */
.app-layout {
  display: flex;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
  gap: 32px;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeRise var(--t-base) var(--ease);
}

@keyframes fadeRise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Cards & Surfaces ── */
.aurelian-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--e1);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 260ms var(--ease), 
              border-color 260ms var(--ease);
  position: relative;
}

.aurelian-card:hover {
  box-shadow: var(--e2);
  transform: translateY(-2px);
}

/* Featured Card Signature: Gold Hairline & Jewel Corner */
.aurelian-card.featured-card {
  border: 1px solid var(--gold-hairline);
  box-shadow: 0 10px 30px rgba(10, 22, 51, 0.12);
  position: relative;
  animation: featuredGlowPulse 6s ease-in-out infinite;
}

@keyframes featuredGlowPulse {
  0%, 100% {
    border-color: rgba(212, 169, 55, 0.4);
    box-shadow: 0 10px 30px rgba(10, 22, 51, 0.12), 0 0 0 1px rgba(212, 169, 55, 0.15);
  }
  50% {
    border-color: rgba(212, 169, 55, 0.7);
    box-shadow: 0 14px 38px rgba(10, 22, 51, 0.18), 0 0 14px rgba(212, 169, 55, 0.3);
  }
}

.aurelian-card.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  background: radial-gradient(circle at top right, rgba(212, 169, 55, 0.45) 0%, transparent 70%);
  border-top-right-radius: var(--r-lg);
  pointer-events: none;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* ── Midnight Mesh Canvas (Intake & Progress Screens) ── */
.midnight-mesh-bg {
  background-color: var(--blue-950);
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(31, 70, 200, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(31, 70, 200, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 90% 10%, rgba(212, 169, 55, 0.15) 0%, transparent 35%);
  border-radius: var(--r-xl);
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--e3);
  color: #FFFFFF;
}

/* ── Buttons (48px Min Touch Target) ── */
.btn {
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
  border: none;
  user-select: none;
}

/* Hero Action Button: The Single Jewel (Gold Gradient) */
.btn-hero-gold {
  background: var(--gold-gradient);
  color: var(--blue-900) !important; /* Navy text on gold - strictly never white */
  box-shadow: 0 4px 16px rgba(212, 169, 55, 0.28), var(--e2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 700;
  position: relative;
  overflow: hidden;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 250ms var(--ease), filter 250ms var(--ease);
}

/* Subtle continuous metallic shimmer beam */
.btn-hero-gold::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -80%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  transform: rotate(25deg);
  animation: heroShimmerSweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroShimmerSweep {
  0% {
    left: -80%;
  }
  30%, 100% {
    left: 150%;
  }
}

.btn-hero-gold:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 10px 32px rgba(212, 169, 55, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.6);
  filter: brightness(1.06);
}

.btn-hero-gold:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 8px rgba(212, 169, 55, 0.3);
  filter: brightness(0.96);
}

.btn-hero-gold:focus-visible {
  outline: none;
  box-shadow: var(--gold-glow);
}

/* Secondary Button (Blue-600) */
.btn-secondary-blue {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: var(--e1);
}

.btn-secondary-blue:hover {
  background: var(--blue-500);
  transform: translateY(-1px);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  border: 1px solid var(--blue-600);
  color: var(--blue-600);
}

[data-theme="dark"] .btn-outline {
  border-color: var(--gold-400);
  color: var(--gold-400);
}

.btn-outline:hover {
  background: rgba(31, 70, 200, 0.08);
}

/* ── Form Inputs ── */
.aurelian-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.aurelian-input, .aurelian-textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  transition: all var(--t-fast) var(--ease);
}

[data-theme="dark"] .aurelian-input, 
[data-theme="dark"] .aurelian-textarea {
  border-color: rgba(255, 255, 255, 0.12);
}

.aurelian-input:focus, .aurelian-textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: var(--gold-glow);
}

.aurelian-textarea {
  min-height: 240px;
  resize: vertical;
}

/* File Dropzone */
.aurelian-dropzone {
  border: 1.5px dashed var(--slate-200);
  border-radius: var(--r-md);
  padding: 24px 20px;
  text-align: center;
  background: var(--blue-50);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 200ms var(--ease), 
              background-color 200ms var(--ease),
              box-shadow 250ms var(--ease);
}

[data-theme="dark"] .aurelian-dropzone {
  background: rgba(15, 33, 80, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

.aurelian-dropzone:hover, .aurelian-dropzone.drag-active {
  transform: translateY(-2px);
  border-color: var(--gold-500);
  background: rgba(212, 169, 55, 0.06);
  box-shadow: 0 8px 24px rgba(212, 169, 55, 0.15);
}

.aurelian-dropzone.drag-active {
  transform: scale(1.02);
  border-style: solid;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(212, 169, 55, 0.25), 0 12px 30px rgba(10, 22, 51, 0.15);
  animation: dropzonePulse 1.8s ease-in-out infinite alternate;
}

@keyframes dropzonePulse {
  0% { box-shadow: 0 0 0 3px rgba(212, 169, 55, 0.2); }
  100% { box-shadow: 0 0 0 8px rgba(212, 169, 55, 0.45); }
}

.aurelian-dropzone .dropzone-icon {
  display: inline-block;
  font-size: 26px;
  margin-bottom: 6px;
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.aurelian-dropzone:hover .dropzone-icon,
.aurelian-dropzone.drag-active .dropzone-icon {
  transform: translateY(-4px) scale(1.18);
}

/* ── Selection Chips (Phase -1 Intake) ── */
.chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.aurelian-chip {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--r-full);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), 
              border-color 200ms var(--ease), 
              box-shadow 220ms var(--ease), 
              background-color 200ms var(--ease);
}

.aurelian-chip:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--blue-500);
  box-shadow: 0 4px 14px rgba(10, 22, 51, 0.12);
}

.aurelian-chip:active {
  transform: scale(0.96);
}

/* Selected state: Blue-900 fill + small gold check + spring pop */
.aurelian-chip.selected {
  background: var(--blue-900) !important;
  color: var(--white) !important;
  border-color: var(--gold-hairline) !important;
  box-shadow: 0 4px 16px rgba(10, 22, 51, 0.25), 0 0 0 1px var(--gold-hairline);
  animation: chipSelectedBounce 320ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes chipSelectedBounce {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.aurelian-chip .chip-check {
  display: none;
  color: var(--gold-500);
  font-weight: bold;
}

.aurelian-chip.selected .chip-check {
  display: inline-block;
  animation: checkmarkPop 260ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes checkmarkPop {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-45deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.3) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* ── Progress Tracker (Key Screen) ── */
.progress-screen-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
}

.phases-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.phase-node {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-400);
  transition: all var(--t-base) var(--ease);
}

.phase-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  color: var(--slate-400);
}

/* Active phase: Gold shimmer ring & radar ping */
.phase-node.active {
  color: #FFFFFF;
  font-weight: 600;
}

.phase-node.active .phase-icon-circle {
  position: relative;
  background: var(--blue-800);
  border-color: var(--gold-500);
  color: var(--gold-500);
  box-shadow: 0 0 14px rgba(212, 169, 55, 0.5);
  animation: pulseShimmer 2.2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

.phase-node.active .phase-icon-circle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-500);
  opacity: 0.8;
  animation: phaseRadar 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes phaseRadar {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes pulseShimmer {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 169, 55, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(212, 169, 55, 0); }
}

/* Completed phase: Gold check with celebratory pop */
.phase-node.done {
  color: var(--gold-400);
}

.phase-node.done .phase-icon-circle {
  background: rgba(212, 169, 55, 0.18);
  border-color: var(--gold-500);
  color: var(--gold-500);
  animation: phaseDonePop 340ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes phaseDonePop {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Gold Shimmer Progress Bar */
.gold-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--r-full);
  overflow: hidden;
  position: relative;
  margin: 16px 0;
}

.gold-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold-gradient);
  border-radius: var(--r-full);
  position: relative;
  transition: width 350ms var(--ease);
  overflow: hidden;
}

/* Sweeping gold shimmer loop at 2.4s */
.gold-progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: goldSweep 2.4s infinite linear;
}

@keyframes goldSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Quota Meters */
.quota-meter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.meter-track {
  height: 6px;
  background: var(--blue-100);
  border-radius: var(--r-full);
  overflow: hidden;
}

[data-theme="dark"] .meter-track {
  background: rgba(255, 255, 255, 0.1);
}

.meter-fill {
  height: 100%;
  background: var(--blue-600);
  border-radius: var(--r-full);
  transition: width var(--t-base) var(--ease);
}

.meter-fill.low {
  background: var(--gold-600);
}

/* ── 16:9 Presentation Stage (Result Screen) ── */
.presentation-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--blue-950);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--e3);
  border: 1px solid var(--gold-hairline);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 80px;
  background-size: cover;
  background-position: center;
}

.stage-gradient-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 11, 31, 0.94) 0%, rgba(5, 11, 31, 0.70) 65%, rgba(5, 11, 31, 0.25) 100%);
  pointer-events: none;
}

.stage-top-meta {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.stage-content-box {
  position: relative;
  z-index: 2;
  max-width: 86%;
  animation: slideContentEntrance 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stage-content-box.slide-animating {
  animation: slideContentEntrance 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideContentEntrance {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stage-title {
  font-family: var(--font-heading);
  font-size: 3.8rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.stage-subtitle {
  font-size: 2.1rem;
  color: var(--gold-400);
  font-weight: 600;
  margin-bottom: 28px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.stage-bullets-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stage-bullet, .slide-bullet-item {
  font-size: 2.15rem; /* 40pt Body Text Projection Standard */
  font-weight: 500;
  color: #FFFFFF;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.stage-bullet-dot, .slide-bullet-dot {
  color: var(--gold-500);
  font-weight: 900;
}

/* Carousel Control Buttons */
.stage-controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 18px;
}

.stage-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), 
              border-color 200ms var(--ease), 
              color 200ms var(--ease), 
              box-shadow 220ms var(--ease);
}

.stage-nav-btn:hover {
  transform: translateY(-2px) scale(1.08);
  border-color: var(--gold-500);
  color: var(--gold-500);
  box-shadow: 0 4px 14px rgba(212, 169, 55, 0.28);
}

.stage-nav-btn:active {
  transform: translateY(0) scale(0.92);
}

#btn-prev-slide:hover span, #prev-slide-btn:hover span {
  transform: translateX(-3px);
  display: inline-block;
  transition: transform 200ms var(--ease);
}

#btn-next-slide:hover span, #next-slide-btn:hover span {
  transform: translateX(3px);
  display: inline-block;
  transition: transform 200ms var(--ease);
}

/* ── Live Thumbnail Strip ── */
.thumbnail-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 4px;
  scrollbar-width: thin;
}

.strip-item {
  width: 140px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-sm);
  background: var(--blue-900);
  border: 1.5px solid var(--border);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 200ms var(--ease), 
              box-shadow 240ms var(--ease);
}

.strip-item:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 8px 22px rgba(10, 22, 51, 0.25);
  border-color: rgba(212, 169, 55, 0.6);
}

.strip-item.active {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 2px var(--gold-500), 0 8px 24px rgba(212, 169, 55, 0.35);
  transform: translateY(-2px);
}

/* ── Mobile Navigation Bar (Bottom) ── */
.mobile-nav-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.mobile-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.mobile-nav-btn.active {
  color: var(--blue-600);
}

[data-theme="dark"] .mobile-nav-btn.active {
  color: var(--gold-400);
}

.floating-hero-action {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--blue-900);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--e3);
  margin-top: -24px;
  border: 2px solid var(--white);
  cursor: pointer;
}

/* ── Refinements Panel (Liquid Smooth Accordion) ── */
.refinements-panel {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  background: var(--input-bg);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 0 16px;
  margin-top: 0;
  transform: translateY(-6px);
  transition: max-height 350ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 280ms var(--ease),
              transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
              padding 350ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 280ms var(--ease),
              margin-top 350ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.refinements-panel.open {
  max-height: 500px;
  opacity: 1;
  padding: 16px;
  margin-top: 12px;
  transform: translateY(0);
  border-color: var(--border);
  pointer-events: auto;
}

/* ── Live Log Stream ── */
.live-log-box {
  font-family: 'SF Mono', Monaco, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
}

.log-entry {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  align-items: flex-start;
}

.log-entry .time {
  color: var(--slate-400);
  flex-shrink: 0;
}

.log-entry .msg {
  color: #E2E8F0;
  word-break: break-word;
}

.log-entry.info .msg {
  color: #93C5FD;
}

.log-entry.success .msg {
  color: #6EE7B7;
}

.log-entry.warning .msg {
  color: var(--gold-400);
}

.log-entry.error .msg {
  color: #FCA5A5;
}

.log-entry.system .msg {
  color: #C4B5FD;
}

/* ── Detail Tabs & Deliverables Panes (Result Screen) ── */
.detail-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  overflow-x: auto;
}

.detail-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}

.detail-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(31, 70, 200, 0.08);
}

.detail-tab-btn.active {
  color: var(--text-primary);
  background: var(--surface-raised);
  box-shadow: var(--e1);
  border-bottom: 2px solid var(--gold-500);
}

[data-theme="dark"] .detail-tab-btn.active {
  color: #FFFFFF;
  background: var(--blue-800);
  border-bottom: 2px solid var(--gold-400);
}

.detail-pane {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin-top: 16px;
  box-shadow: var(--e1);
  min-height: 240px;
}

.detail-pane.active {
  display: block;
}

/* ── Markdown Rendered Documentation ── */
.markdown-rendered h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.markdown-rendered h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 20px 0 10px;
  color: var(--text-primary);
}

.markdown-rendered h3 {
  font-size: 1.05rem;
  margin: 16px 0 8px;
  color: var(--gold-600);
}

[data-theme="dark"] .markdown-rendered h3 {
  color: var(--gold-400);
}

.markdown-rendered p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.markdown-rendered ul, .markdown-rendered ol {
  margin-left: 20px;
  margin-bottom: 14px;
}

.markdown-rendered li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.markdown-rendered blockquote {
  border-left: 3px solid var(--gold-500);
  padding-left: 14px;
  margin: 14px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.markdown-rendered table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}

.markdown-rendered th, .markdown-rendered td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.markdown-rendered th {
  background: var(--input-bg);
  font-weight: 600;
}

/* ── Library Decks Grid ── */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.deck-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--e1);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.deck-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--e2);
  border-color: rgba(212, 169, 55, 0.4);
}

.deck-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--blue-900);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
}

.deck-card-body {
  padding: 16px;
}

.deck-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deck-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.deck-card-meta span {
  background: var(--input-bg);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ── Print / PDF Generation Styles ── */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .app-header, .top-nav-tabs, .mobile-nav-bar, .stage-controls-bar, .header-controls, .detail-tabs-bar {
    display: none !important;
  }
  .presentation-stage {
    box-shadow: none !important;
    border: none !important;
    page-break-after: always;
  }
}

/* ── Brand Logo Styling ── */
.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: transform var(--t-fast) var(--ease);
}

.brand-logo-img:hover {
  transform: scale(1.04);
}

.brand-logo-icon-only {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-hairline);
  box-shadow: 0 0 12px rgba(212, 169, 55, 0.35);
}

/* ── Dynamic Logo Theming (Dark vs Light Mode) ── */
.logo-for-dark {
  display: block;
}
.logo-for-light {
  display: none !important;
}

[data-theme="light"] .logo-for-dark {
  display: none !important;
}
[data-theme="light"] .logo-for-light {
  display: block !important;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-for-dark {
    display: none !important;
  }
  :root:not([data-theme="dark"]) .logo-for-light {
    display: block !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   MODERN LUXURY OPENING SCREEN (AURELIAN SPLASH WITH AUDITORIUM BACKGROUND)
   Desktop & Tablet: Landscape 16:9 Auditorium
   Mobile: Portrait 9:16 Auditorium
   Dark Mode: Very Faint Navy Blue Overlay with Frosted Glass Feel
   Light Mode: Clean Pure Auditorium (Zero Overlay)
   Modal Card: Minimalist White Frosted Glass with Full Color Logo
   ══════════════════════════════════════════════════════════════════════ */
.luxury-welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background-color: var(--blue-950);
  /* Desktop & Tablet: Landscape auditorium with very faint navy blue overlay */
  background-image: 
    linear-gradient(180deg, rgba(5, 11, 31, 0.28) 0%, rgba(10, 22, 51, 0.32) 50%, rgba(5, 11, 31, 0.40) 100%),
    radial-gradient(circle at 50% 18%, rgba(212, 169, 55, 0.12) 0%, transparent 60%),
    url('../assets/branding/auditorium-stage-desktop.jpg');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity 500ms var(--ease), visibility 500ms var(--ease), transform 500ms var(--ease);
}

/* Light / White Mode: Zero overlay - clean auditorium stage background */
[data-theme="light"] .luxury-welcome-screen {
  background-color: #0b1329;
  background-image: url('../assets/branding/auditorium-stage-desktop.jpg');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

/* Mobile version: Portrait 9:16 auditorium (max-width: 640px) */
@media (max-width: 640px) {
  .luxury-welcome-screen {
    /* Very faint navy blue overlay on mobile */
    background-image: 
      linear-gradient(180deg, rgba(5, 11, 31, 0.28) 0%, rgba(10, 22, 51, 0.32) 50%, rgba(5, 11, 31, 0.40) 100%),
      radial-gradient(circle at 50% 14%, rgba(212, 169, 55, 0.12) 0%, transparent 55%),
      url('../assets/branding/auditorium-stage-mobile.jpg');
    background-position: center top;
  }

  [data-theme="light"] .luxury-welcome-screen {
    /* Mobile Light Mode: Zero overlay - clean portrait auditorium */
    background-image: url('../assets/branding/auditorium-stage-mobile.jpg');
    background-position: center top;
  }
}

.luxury-welcome-screen.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  pointer-events: none;
}

/* Glassy Modal Card: Luxury Frosted White Glass with Dark Navy Typography */
.welcome-modal-card {
  position: relative;
  max-width: 620px;
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 32px;
  box-shadow: 
    0 32px 84px rgba(0, 0, 0, 0.42),
    0 12px 32px rgba(0, 0, 0, 0.22),
    inset 0 1px 2px rgba(255, 255, 255, 0.95),
    inset 0 -1px 2px rgba(0, 0, 0, 0.05);
  padding: clamp(36px, 5vw, 48px) clamp(24px, 4vw, 44px) 36px;
  text-align: center;
  color: var(--blue-950);
  animation: welcomeCardEntrance 550ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

[data-theme="light"] .welcome-modal-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: 
    0 32px 84px rgba(0, 0, 0, 0.35),
    0 12px 32px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 1);
}

.welcome-modal-card h1,
.welcome-modal-card h2,
.welcome-modal-card h3,
.welcome-modal-card h4 {
  color: var(--blue-950);
}

.welcome-modal-card .display-title {
  color: var(--blue-950);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  line-height: 1.15;
}

.welcome-modal-card .gold-word {
  color: var(--gold-600);
  background: linear-gradient(135deg, #b8860b 0%, #d4a937 50%, #996515 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-modal-card .caption-text {
  color: #475569;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.welcome-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-600);
  background: rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.welcome-close-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--blue-950);
  border-color: rgba(0, 0, 0, 0.15);
}

.welcome-modal-card .chk-label {
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@keyframes welcomeCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ══════════════════════════════════════════════════════════════════════
   VERY BIG RESPONSIVE WELCOME LOGO WITH FROSTED GLASS & ANIMATED GRADIENT
   ══════════════════════════════════════════════════════════════════════ */
.luxury-loader-wrap {
  position: relative;
  width: clamp(160px, 24vw, 220px);
  height: clamp(160px, 24vw, 220px);
  margin: 0 auto 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .luxury-loader-wrap {
    width: clamp(130px, 36vw, 175px);
    height: clamp(130px, 36vw, 175px);
    margin: 0 auto 20px;
  }
}

.luxury-loader-wrap::before {
  content: '';
  position: absolute;
  inset: -14%;
  background: radial-gradient(circle, rgba(212, 169, 55, 0.32) 0%, rgba(59, 130, 246, 0.16) 48%, transparent 72%);
  filter: blur(20px);
  border-radius: 50%;
  animation: logoGlowPulse 5s ease-in-out infinite alternate;
  pointer-events: none;
}

.loader-ring-outer {
  position: absolute;
  inset: -16px;
  border-radius: clamp(34px, 5.5vw, 50px);
  border: 2px dashed rgba(212, 169, 55, 0.40);
  animation: luxurySpinClockwise 24s linear infinite;
  box-shadow: 0 0 28px rgba(212, 169, 55, 0.20);
  pointer-events: none;
}

.loader-ring-middle {
  position: absolute;
  inset: -7px;
  border-radius: clamp(30px, 4.8vw, 44px);
  border: 2.5px solid transparent;
  border-top-color: var(--gold-500);
  border-right-color: rgba(59, 130, 246, 0.7);
  border-bottom-color: #f3d078;
  border-left-color: rgba(212, 169, 55, 0.35);
  animation: luxurySpinCounter 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  filter: drop-shadow(0 0 10px rgba(212, 169, 55, 0.5));
  pointer-events: none;
}

.loader-emblem-core {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: clamp(28px, 4.2vw, 40px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 24px 56px rgba(10, 22, 51, 0.22),
    0 8px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 3px rgba(255, 255, 255, 0.95),
    inset 0 -1px 2px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.5vw, 28px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s var(--ease);
}

.loader-emblem-core:hover {
  transform: scale(1.04);
  box-shadow: 
    0 28px 64px rgba(10, 22, 51, 0.28),
    0 0 32px rgba(212, 169, 55, 0.40);
}

.loader-emblem-core img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(10, 22, 51, 0.18));
  z-index: 1;
}

/* Little Animated Gradient Overlay over the Frosted Glass Logo */
.logo-gradient-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(212, 169, 55, 0.22) 0%,
    rgba(255, 255, 255, 0.40) 25%,
    rgba(59, 130, 246, 0.18) 50%,
    rgba(212, 169, 55, 0.26) 75%,
    rgba(255, 255, 255, 0.35) 100%
  );
  background-size: 260% 260%;
  mix-blend-mode: overlay;
  animation: logoGradientShift 7s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 2;
}

@keyframes logoGradientShift {
  0% {
    background-position: 0% 15%;
  }
  50% {
    background-position: 100% 85%;
  }
  100% {
    background-position: 15% 100%;
  }
}

@keyframes logoGlowPulse {
  0% {
    opacity: 0.6;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes luxurySpinClockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes luxurySpinCounter {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

/* Feature Pillars Grid on Welcome Screen */
.welcome-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 36px;
  text-align: left;
}

.welcome-pillar-card {
  background: rgba(15, 33, 80, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 18px 20px;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.welcome-pillar-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-hairline);
}

.welcome-pillar-icon {
  font-size: 22px;
  margin-bottom: 8px;
}

.welcome-pillar-card h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.welcome-pillar-card p {
  font-size: 12px;
  color: var(--slate-400);
  line-height: 1.45;
}

/* Preset Quick Bar on Welcome Screen */
.welcome-preset-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════════════
   INTERACTIVE INSTRUCTION GUIDE MODAL
   ══════════════════════════════════════════════════════════════════════ */
.interactive-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(5, 11, 31, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms var(--ease), visibility 300ms var(--ease);
}

.interactive-guide-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.guide-card {
  position: relative;
  max-width: 820px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--gold-hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--e3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: guideEntrance 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

[data-theme="dark"] .guide-card {
  background: var(--blue-900);
}

@keyframes guideEntrance {
  0% { opacity: 0; transform: scale(0.96) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

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

.guide-step-indicators {
  display: flex;
  gap: 8px;
}

.guide-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--input-bg);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.guide-step-dot.active {
  background: var(--gold-gradient);
  color: var(--blue-900);
  border-color: var(--gold-500);
  box-shadow: 0 0 10px rgba(212, 169, 55, 0.4);
}

.guide-step-dot.completed {
  background: var(--blue-600);
  color: #FFFFFF;
  border-color: var(--blue-500);
}

.guide-body {
  padding: 32px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.guide-slide {
  display: none;
}

.guide-slide.active {
  display: block;
  animation: guideSlideFadeIn 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes guideSlideFadeIn {
  0% {
    opacity: 0;
    transform: translateX(14px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Micro-Interaction Touch Ripple ── */
.micro-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: scale(0);
  animation: microRippleAnim 550ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  z-index: 100;
}

@keyframes microRippleAnim {
  0% {
    transform: scale(0);
    opacity: 0.85;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.guide-slide-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.guide-slide-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.guide-interactive-box {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  margin-bottom: 20px;
}

.guide-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsive adjustments for Welcome and Guide */
@media (max-width: 768px) {
  .welcome-modal-card {
    padding: 32px 20px;
  }
  .welcome-pillars-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .guide-header, .guide-body, .guide-footer {
    padding: 20px;
  }
}

/* ── Responsive Breakpoints ── */
@media (max-width: 900px) {
  .app-layout {
    padding: 16px;
  }
  .progress-screen-grid {
    grid-template-columns: 1fr;
  }
  .top-nav-tabs {
    display: none;
  }
  .mobile-nav-bar {
    display: flex;
  }
  .stage-title {
    font-size: 2.4rem;
  }
  .stage-bullet {
    font-size: 1.5rem;
  }
}

/* ── Reduced Motion Preference ── */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   DASHBOARD PAGE BACKDROP: FROSTED GLASS BLUR & ANIMATED GRADIENT OVERLAY
   Desktop & Tablet: Landscape sunlit window skyline scene
   Mobile: Portrait sunlit window skyline scene
   Both Modes: Smooth animated breathing gradient + frosted glass blur
   ══════════════════════════════════════════════════════════════════════ */
.dashboard-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.dashboard-backdrop-image {
  position: absolute;
  inset: -24px;
  background-image: url('../assets/branding/dashboard-bg-desktop.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  filter: blur(14px);
  transform: scale(1.05);
}

@media (max-width: 640px) {
  .dashboard-backdrop-image {
    background-image: url('../assets/branding/dashboard-bg-mobile.jpg');
    background-position: center top;
  }
}

/* Animated Gradient Overlay for Dark Mode */
.dashboard-backdrop-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(135deg, rgba(5, 11, 31, 0.78) 0%, rgba(10, 22, 51, 0.68) 35%, rgba(26, 42, 92, 0.60) 65%, rgba(5, 11, 31, 0.82) 100%),
    radial-gradient(circle at 18% 28%, rgba(212, 169, 55, 0.16) 0%, transparent 48%),
    radial-gradient(circle at 82% 72%, rgba(31, 70, 200, 0.20) 0%, transparent 52%);
  background-size: 220% 220%;
  animation: dashboardGradientShift 18s ease-in-out infinite alternate;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Animated Gradient Overlay for Light Mode */
[data-theme="light"] .dashboard-backdrop-overlay {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(248, 250, 252, 0.70) 35%, rgba(241, 245, 249, 0.65) 65%, rgba(255, 255, 255, 0.82) 100%),
    radial-gradient(circle at 20% 25%, rgba(212, 169, 55, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 80% 75%, rgba(59, 130, 246, 0.10) 0%, transparent 55%);
  background-size: 220% 220%;
  animation: dashboardGradientShift 18s ease-in-out infinite alternate;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@keyframes dashboardGradientShift {
  0% {
    background-position: 0% 18%;
  }
  50% {
    background-position: 100% 82%;
  }
  100% {
    background-position: 22% 96%;
  }
}

/* Hero Composer Glass Card */
.hero-composer-card {
  position: relative;
  width: 100%;
  background: rgba(15, 33, 80, 0.65);
  backdrop-filter: blur(28px) saturate(120%);
  -webkit-backdrop-filter: blur(28px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(5, 11, 31, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  padding: 24px 28px 18px;
  margin-bottom: 24px;
  transition: all 0.3s var(--ease);
}

[data-theme="light"] .hero-composer-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.hero-composer-card:focus-within {
  border-color: rgba(212, 169, 55, 0.6);
  box-shadow: 0 24px 60px rgba(5, 11, 31, 0.4), 0 0 0 2px rgba(212, 169, 55, 0.35);
}

.composer-textarea {
  width: 100%;
  min-height: 140px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
}

.composer-textarea::placeholder {
  color: var(--slate-400);
}

/* Toolbar Strip */
.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

[data-theme="light"] .composer-toolbar {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.composer-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-chip {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s var(--ease);
}

[data-theme="light"] .composer-chip {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(203, 213, 225, 0.85);
  color: #334155;
}

.composer-chip:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

[data-theme="light"] .composer-chip:hover {
  background: #FFFFFF;
  color: #0F172A;
}

/* Right Cluster */
.composer-right-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.composer-model-tag {
  font-size: 12px;
  color: var(--slate-400);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.composer-attach-btn {
  color: var(--slate-400);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.composer-attach-btn:hover {
  color: var(--gold-400);
  transform: translateY(-1px);
}

.composer-attach-btn svg {
  width: 20px;
  height: 20px;
}

.composer-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--blue-900);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(212, 169, 55, 0.38);
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
  overflow: hidden;
}

.composer-send-btn:hover {
  transform: translateY(-2px) scale(1.06);
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(212, 169, 55, 0.55);
}

.composer-send-btn:active {
  transform: scale(0.95);
}

.composer-send-btn svg {
  width: 14px;
  height: 14px;
}

/* ══════════════════════════════════════════════════════════════════════
   ADOBE FIREFLY DASHBOARD ARCHITECTURE & STYLING
   ══════════════════════════════════════════════════════════════════════ */

/* Firefly Hero Header */
.firefly-hero-header {
  text-align: center;
  max-width: 820px;
  margin: 16px auto 32px;
  padding: 0 16px;
}

.firefly-main-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 10px;
}

.firefly-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 14px auto 0;
  line-height: 1.6;
}

/* Firefly Floating Prompt Card */
.firefly-prompt-card {
  position: relative;
  background: rgba(10, 22, 51, 0.72);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(5, 11, 31, 0.45), 0 0 40px rgba(31, 70, 200, 0.12);
  padding: 24px 28px 18px;
  margin: 0 auto 16px;
  max-width: 1080px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .firefly-prompt-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12), 0 0 30px rgba(212, 169, 55, 0.15);
}

.firefly-prompt-card:focus-within {
  border-color: rgba(212, 169, 55, 0.75);
  box-shadow: 0 24px 60px rgba(5, 11, 31, 0.5), 0 0 0 3px rgba(212, 169, 55, 0.35);
}

.firefly-prompt-input {
  min-height: 130px;
  font-size: 16px;
  line-height: 1.6;
}

/* Bottom Toolbar Strip */
.firefly-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

[data-theme="light"] .firefly-toolbar {
  border-top-color: rgba(15, 23, 42, 0.08);
}

/* ══════════════════════════════════════════════════════════════════════
   COLLAPSIBLE INTERACTIVE PANELS (BUTTON-DRIVEN, ZERO JANK)
   ══════════════════════════════════════════════════════════════════════ */

.collapsible-panel {
  max-width: 1080px;
  margin: 12px auto;
  background: rgba(10, 22, 51, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.22s var(--ease);
}

[data-theme="light"] .collapsible-panel {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(203, 213, 225, 0.7);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

/* Primary category styling: Audience, Reach & Mode */
.collapsible-panel.primary-panel {
  border-color: rgba(212, 169, 55, 0.35);
  background: rgba(10, 22, 51, 0.6);
  box-shadow: 0 4px 20px rgba(5, 11, 31, 0.3);
}

[data-theme="light"] .collapsible-panel.primary-panel {
  border-color: rgba(212, 169, 55, 0.5);
  background: #FFFFFF;
  box-shadow: 0 4px 20px rgba(212, 169, 55, 0.08);
}

.collapsible-header {
  width: 100%;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s var(--ease);
}

.collapsible-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .collapsible-header:hover {
  background: rgba(15, 23, 42, 0.02);
}

.collapsible-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.collapsible-label {
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.collapsible-panel.primary-panel .collapsible-label {
  color: var(--gold-400);
}

[data-theme="light"] .collapsible-panel.primary-panel .collapsible-label {
  color: var(--gold-700);
}

.collapsible-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  text-transform: uppercase;
}

.badge-primary-tag {
  background: rgba(212, 169, 55, 0.2);
  color: var(--gold-400);
  border: 1px solid rgba(212, 169, 55, 0.35);
}

[data-theme="light"] .badge-primary-tag {
  background: rgba(212, 169, 55, 0.15);
  color: var(--gold-700);
}

.badge-optional-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--slate-400);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .badge-optional-tag {
  background: rgba(203, 213, 225, 0.4);
  color: var(--slate-600);
}

.collapsible-chevron {
  font-size: 10px;
  color: var(--slate-400);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.collapsible-panel.open .collapsible-chevron {
  transform: rotate(180deg);
  color: var(--gold-400);
}

/* Butter-smooth grid height expand/collapse */
.collapsible-content-grid {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.collapsible-panel.open .collapsible-content-grid {
  grid-template-rows: 1fr;
}

.collapsible-inner {
  overflow: hidden;
  padding: 0 20px;
}

.collapsible-panel.open .collapsible-inner {
  padding-bottom: 18px;
}

.sub-header-minimal {
  display: flex;
  align-items: center;
}

.control-strip-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--gold-400);
  text-transform: uppercase;
}

[data-theme="light"] .control-strip-label {
  color: var(--gold-700);
}

/* Interactive Button Row */
.interactive-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-interactive-pill {
  min-height: 42px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1), 
              border-color 180ms var(--ease), 
              box-shadow 180ms var(--ease), 
              background-color 180ms var(--ease);
}

.btn-interactive-pill:hover {
  transform: translateY(-2px);
  border-color: var(--gold-hairline);
  box-shadow: 0 6px 18px rgba(10, 22, 51, 0.2);
}

.btn-interactive-pill:active {
  transform: scale(0.96);
}

/* Selected state: Deep royal/navy + Gold accent halo */
.btn-interactive-pill.selected,
.btn-interactive-pill.active {
  background: var(--blue-900) !important;
  color: #FFFFFF !important;
  border-color: var(--gold-hairline) !important;
  box-shadow: 0 4px 16px rgba(10, 22, 51, 0.3), 0 0 0 1px var(--gold-hairline);
}

[data-theme="light"] .btn-interactive-pill.selected,
[data-theme="light"] .btn-interactive-pill.active {
  background: var(--blue-900) !important;
  color: #FFFFFF !important;
}

.theme-pill-btn.selected {
  border-color: var(--gold-500) !important;
  box-shadow: 0 0 16px rgba(212, 169, 55, 0.35), 0 0 0 1px var(--gold-500);
}

.btn-icon {
  font-size: 16px;
}

/* Interactive Recent Generations Button Strip */
.interactive-recent-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recent-deck-btn {
  background: rgba(15, 33, 80, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .recent-deck-btn {
  background: #FFFFFF;
  border-color: rgba(203, 213, 225, 0.8);
}

.recent-deck-name {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-deck-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: rgba(212, 169, 55, 0.18);
  color: var(--gold-400);
}

[data-theme="light"] .recent-deck-pill {
  background: rgba(212, 169, 55, 0.2);
  color: var(--gold-700);
}

/* ── Firefly Floating Toast Notification ── */
.firefly-toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--blue-900);
  color: #FFFFFF;
  border: 1px solid var(--gold-hairline);
  box-shadow: 0 12px 32px rgba(5, 11, 31, 0.5), 0 0 20px rgba(212, 169, 55, 0.3);
  padding: 12px 20px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.firefly-toast-notification.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .collapsible-panel {
    margin: 8px auto;
  }
  .collapsible-header {
    padding: 12px 16px;
  }
  .collapsible-inner {
    padding: 0 16px;
  }
  .collapsible-panel.open .collapsible-inner {
    padding-bottom: 14px;
  }
  .firefly-prompt-card {
    padding: 16px 14px 12px;
  }
  .composer-right-cluster {
    width: 100%;
    justify-content: space-between;
    margin-top: 8px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   WEB LINK & FREE TEMPLATE CLONER STYLES
   ══════════════════════════════════════════════════════════════════════ */
.clone-template-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  color: inherit;
  font-family: inherit;
}

.clone-template-card:hover {
  border-color: var(--gold-400);
  background: rgba(212, 169, 55, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.clone-template-card.active {
  border-color: var(--gold-400);
  background: rgba(212, 169, 55, 0.12);
  box-shadow: 0 4px 18px rgba(212, 169, 55, 0.18);
  position: relative;
}

.clone-template-card.active::after {
  content: "✓ ACTIVE";
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-400);
  letter-spacing: 0.05em;
}

.clone-card-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-400);
  margin-bottom: 4px;
}

.clone-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.clone-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.weblink-url-input:focus {
  outline: none;
  border-color: var(--gold-400) !important;
  box-shadow: 0 0 0 2px rgba(212, 169, 55, 0.2);
}

/* ══════════════════════════════════════════════════════════════════════
   SCALABLE TYPOGRAPHY CONTROLS
   ══════════════════════════════════════════════ */
.font-scale-pill {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.font-scale-pill:hover {
  border-color: var(--gold-400);
  background: rgba(212, 169, 55, 0.08);
}

.font-scale-pill.selected {
  border-color: var(--gold-400);
  background: rgba(212, 169, 55, 0.15);
  box-shadow: 0 0 12px rgba(212, 169, 55, 0.2);
  color: #FFFFFF;
}

.res-font-pill {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.res-font-pill:hover {
  border-color: var(--gold-400);
  color: var(--text-primary);
}

.res-font-pill.selected {
  border-color: var(--gold-400);
  background: var(--gold-gradient);
  color: #050B1F;
  font-weight: 700;
}
