/* ==========================================================================
   DermoAI Bahamas - Tropical Clinical Design System & Stylesheet
   Benchmark: Haut.ai Skin SaaS / Caribbean Diagnostic Consumer Experience
   ========================================================================== */

:root {
  /* Caribbean Maritime Color Palette */
  --bg-primary: #070D1E;
  --bg-secondary: #0D172F;
  --bg-card: rgba(16, 28, 56, 0.7);
  --bg-card-hover: rgba(23, 40, 78, 0.85);
  --bg-glass: rgba(14, 26, 52, 0.65);
  --bg-glass-border: rgba(0, 240, 255, 0.18);
  
  /* Vibrant Clinical & Tropical Accents */
  --aqua-primary: #00F0FF;
  --aqua-glow: rgba(0, 240, 255, 0.35);
  --teal-accent: #00C2CB;
  --reef-emerald: #00E599;
  --reef-glow: rgba(0, 229, 153, 0.3);
  --sun-gold: #FFB26B;
  --coral-accent: #FF5E7E;
  --coral-glow: rgba(255, 94, 126, 0.3);
  
  /* Text & Neutral Hierarchy */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-bright: #FFFFFF;
  
  /* Status Colors */
  --status-optimal: #00E599;
  --status-moderate: #FFB26B;
  --status-focus: #FF5E7E;
  --status-info: #00F0FF;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Shadows & Glassmorphism */
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.2);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --backdrop-blur: blur(16px);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(0, 229, 153, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(13, 23, 47, 0.5) 0%, transparent 100%);
  background-attachment: fixed;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.25;
}

a {
  color: var(--aqua-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover {
  text-decoration: underline;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-smooth);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 13, 30, 0.88);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--bg-glass-border);
  padding: 0.85rem 2rem;
}

.header-container {
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(0, 229, 153, 0.18));
  border: 1.5px solid rgba(0, 240, 255, 0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo-brand:hover .logo-icon {
  transform: scale(1.06);
  border-color: var(--aqua-primary);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.5);
}

.brand-text h1 {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  color: #FFFFFF;
}

.brand-badge {
  font-size: 0.68rem;
  font-family: var(--font-body);
  font-weight: 600;
  background: rgba(0, 240, 255, 0.15);
  color: var(--aqua-primary);
  border: 1px solid var(--aqua-primary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* OpenRouter Key Navbar Button */
.btn-api-key {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--text-bright);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}
.btn-api-key:hover {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--aqua-primary);
  box-shadow: 0 0 12px var(--aqua-glow);
}
.key-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.key-status-dot.active {
  background: var(--reef-emerald);
  box-shadow: 0 0 8px var(--reef-emerald);
}

.climate-widget-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
}

.climate-pill-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
}
.climate-pill-item strong {
  color: var(--sun-gold);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
}
.btn-ghost:hover {
  border-color: var(--aqua-primary);
  color: var(--aqua-primary);
}

.btn-primary {
  background: linear-gradient(135deg, var(--aqua-primary), var(--teal-accent));
  color: #070D1E;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 18px var(--aqua-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 240, 255, 0.45);
}

/* ==========================================================================
   Climate Notification Ribbon
   ========================================================================== */
.climate-ribbon {
  background: linear-gradient(90deg, #0A1E3D, #112B50, #0A1E3D);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  padding: 0.5rem 1.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
}
.climate-ribbon-content {
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  box-sizing: border-box;
}
.ribbon-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--text-bright);
}
.ribbon-tag.uv { color: #FF7B54; }
.ribbon-tag.reef { color: var(--reef-emerald); }

/* ==========================================================================
   Main Application View Switcher
   ========================================================================== */
.app-viewport {
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 2rem 3.5rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

.screen-view {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
  width: 100%;
  box-sizing: border-box;
}
.screen-view.active {
  display: block;
}

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

/* ==========================================================================
   Screen 0: Hero Landing
   ========================================================================== */
.hero-section {
  padding: 2.5rem 0 3.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h2 {
  font-size: 3.1rem;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--aqua-primary), var(--reef-emerald), var(--sun-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 620px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat-card {
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  padding: 1rem;
  border-radius: var(--radius-md);
}
.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--aqua-primary);
  font-family: var(--font-heading);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: block;
}

.hero-visual-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-card);
}

.visual-mockup-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.visual-mockup-frame img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  filter: brightness(0.95);
}

.floating-hud-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  background: rgba(7, 13, 30, 0.88);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--aqua-primary);
  padding: 1rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hud-badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--aqua-primary);
  margin-bottom: 0.4rem;
}

.hud-badge-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Preset Picker Section */
.presets-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.section-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.preset-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
}
.preset-card:hover {
  transform: translateY(-4px);
  border-color: var(--aqua-primary);
  box-shadow: var(--shadow-glow);
}
.preset-img-wrap {
  height: 180px;
  position: relative;
  overflow: hidden;
}
.preset-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.preset-card:hover .preset-img-wrap img {
  transform: scale(1.05);
}
.preset-phototype-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(7, 13, 30, 0.85);
  color: var(--aqua-primary);
  border: 1px solid var(--aqua-primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}
.preset-body {
  padding: 1rem 1.2rem;
}
.preset-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.preset-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.preset-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--reef-emerald);
  font-weight: 600;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Screen 1: Image Acquisition & Environmental Quality Gate
   ========================================================================== */
.modal-container {
  max-width: 900px;
  margin: 1rem auto;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.modal-header {
  padding: 1.2rem 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  padding: 1.8rem;
}

/* Intake OpenRouter Key Banner */
.intake-key-banner {
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Input Mode Toggle */
.intake-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}
.intake-tab-btn {
  flex: 1;
  background: transparent;
  color: var(--text-secondary);
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.intake-tab-btn.active {
  background: rgba(0, 240, 255, 0.15);
  color: var(--aqua-primary);
  border: 1px solid var(--aqua-primary);
}

/* Live Camera & Canvas Workspace */
.camera-stage {
  position: relative;
  width: 100%;
  height: 440px;
  background: #020612;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#camera-video, #preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Haut.ai Face Alignment Oval Guide */
.face-guide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.face-oval {
  width: 250px;
  height: 330px;
  border: 2px dashed rgba(0, 240, 255, 0.45);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 0 0 9999px rgba(7, 13, 30, 0.62);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.face-oval.aligned {
  border: 2.5px solid var(--reef-emerald);
  box-shadow: 0 0 0 9999px rgba(7, 13, 30, 0.55), 0 0 24px var(--reef-glow);
}

.face-oval.adjusting {
  border: 2px dashed var(--sun-gold);
  box-shadow: 0 0 0 9999px rgba(7, 13, 30, 0.58), 0 0 16px rgba(255, 178, 107, 0.3);
}

.face-oval.error {
  border: 2px dashed var(--coral-accent);
  box-shadow: 0 0 0 9999px rgba(7, 13, 30, 0.58), 0 0 16px rgba(255, 94, 126, 0.3);
}

.face-oval.searching {
  border: 2px dashed rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 0 9999px rgba(7, 13, 30, 0.62);
}

.face-oval-prompt {
  position: absolute;
  bottom: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 13, 30, 0.92);
  backdrop-filter: var(--backdrop-blur);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-bright);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.face-oval.aligned .face-oval-prompt {
  border-color: var(--reef-emerald);
  color: var(--reef-emerald);
  background: rgba(7, 13, 30, 0.96);
  box-shadow: 0 0 14px var(--reef-glow);
}

.face-oval.adjusting .face-oval-prompt {
  border-color: var(--sun-gold);
  color: var(--sun-gold);
  background: rgba(7, 13, 30, 0.96);
}

.face-oval.error .face-oval-prompt {
  border-color: var(--coral-accent);
  color: var(--coral-accent);
  background: rgba(7, 13, 30, 0.96);
}

.face-oval.searching .face-oval-prompt {
  border-color: rgba(0, 240, 255, 0.4);
  color: var(--text-secondary);
}

/* Upload Drop Zone */
.dropzone-container {
  display: none;
  border: 2px dashed rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 3.5rem 2rem;
  text-align: center;
  background: rgba(0, 240, 255, 0.02);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.dropzone-container:hover {
  border-color: var(--aqua-primary);
  background: rgba(0, 240, 255, 0.05);
}
.dropzone-container.active {
  display: block;
}
.dropzone-container.dragover {
  border-color: var(--reef-emerald);
  background: rgba(0, 229, 153, 0.1);
  transform: scale(1.01);
}
.dropzone-icon {
  font-size: 3rem;
  color: var(--aqua-primary);
  margin-bottom: 1rem;
}

.change-uploaded-photo-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(7, 13, 30, 0.9);
  border: 1px solid var(--aqua-primary);
  color: var(--aqua-primary);
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}
.change-uploaded-photo-btn:hover {
  background: var(--aqua-primary);
  color: #030712;
}

/* Quality Gating Indicators (PRD FR-1) */
.quality-gate-panel {
  margin-top: 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.quality-gate-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quality-chips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.quality-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
}
.quality-chip.pass {
  border-color: var(--reef-emerald);
  background: rgba(0, 229, 153, 0.08);
}
.quality-chip.pass .chip-status { color: var(--reef-emerald); font-weight: 700; }
.quality-chip.warn {
  border-color: var(--sun-gold);
  background: rgba(255, 178, 107, 0.08);
}
.quality-chip.warn .chip-status { color: var(--sun-gold); font-weight: 700; }
.quality-chip.fail {
  border-color: var(--coral-accent);
  background: rgba(255, 94, 126, 0.08);
}
.quality-chip.fail .chip-status { color: var(--coral-accent); font-weight: 700; }

.chip-label {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* DP(PPI)A Ephemeral Consent Box */
.dpia-consent-card {
  margin-top: 1.25rem;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.dpia-consent-card input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--aqua-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.intake-cta-row {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* ==========================================================================
   Screen 2: Multi-Tier AI Diagnostic Processing State
   ========================================================================== */
.processing-container {
  max-width: 800px;
  margin: 2rem auto;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.radar-scanner-stage {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 2rem;
}

.radar-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.1);
  overflow: hidden;
}

.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 110px;
  transform-origin: top left;
  background: conic-gradient(from 0deg, rgba(0, 240, 255, 0.5) 0%, transparent 60%);
  animation: radarRotate 2s linear infinite;
}

@keyframes radarRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-face-thumb {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(40%) contrast(120%);
  opacity: 0.7;
}

.radar-laser-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--aqua-primary), transparent);
  box-shadow: 0 0 10px var(--aqua-primary);
  animation: laserScan 2.2s ease-in-out infinite alternate;
}

@keyframes laserScan {
  from { top: 10%; }
  to { top: 90%; }
}

/* 4-Tier Step Progression */
.pipeline-steps-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.pipeline-step-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.pipeline-step-item.active {
  border-color: var(--aqua-primary);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.15);
}

.pipeline-step-item.completed {
  border-color: var(--reef-emerald);
  background: rgba(0, 229, 153, 0.05);
}

.step-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.pipeline-step-item.active .step-icon-wrap {
  background: var(--aqua-primary);
  color: #070D1E;
}
.pipeline-step-item.completed .step-icon-wrap {
  background: var(--reef-emerald);
  color: #070D1E;
}

.step-content {
  flex: 1;
}
.step-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}
.step-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-bright);
}
.step-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}
.pipeline-step-item.active .step-badge {
  background: rgba(0, 240, 255, 0.2);
  color: var(--aqua-primary);
}
.pipeline-step-item.completed .step-badge {
  background: rgba(0, 229, 153, 0.2);
  color: var(--reef-emerald);
}
.pipeline-step-item.pending .step-badge {
  color: var(--text-muted);
}
.step-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Screen 3: Interactive Haut.ai-Style Skin Health Dashboard
   ========================================================================== */

/* Skin Portrait Top Header */
.skin-portrait-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.25rem 0;
  width: 100%;
  box-sizing: border-box;
}

.portrait-meta-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.portrait-badge-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.portrait-tag-main {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--aqua-primary);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid var(--aqua-primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portrait-id-badge {
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: #CBD5E1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-copy-id {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 0.15rem;
  font-size: 0.72rem;
  transition: color 0.2s ease;
}
.btn-copy-id:hover {
  color: var(--aqua-primary);
}

.portrait-timestamp-tag {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.portrait-headline {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-bright);
  margin: 0;
}

.portrait-actions-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-skinchat-action {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(0, 229, 153, 0.15));
  border: 1.5px solid var(--aqua-primary);
  color: var(--text-bright);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-skinchat-action:hover {
  background: var(--aqua-primary);
  color: #070D1E;
  box-shadow: 0 0 20px var(--aqua-glow);
}

.dashboard-top-bar {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.4rem;
  margin-bottom: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-score-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 1rem;
}

.score-circle-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.score-badge-huge {
  font-size: 2rem;
  font-weight: 800;
  color: var(--aqua-primary);
  font-family: var(--font-heading);
  background: rgba(0, 240, 255, 0.1);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--aqua-primary);
  line-height: 1;
}

.phototype-indicator {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.phototype-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sun-gold);
  background: rgba(255, 178, 107, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 178, 107, 0.4);
  width: fit-content;
}

.barrier-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--coral-accent);
  background: rgba(255, 94, 126, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 94, 126, 0.4);
  width: fit-content;
}

/* Split View Grid - Perfectly balanced to fit screen width */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: minmax(310px, 370px) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

/* Left Panel: Interactive Visualizer */
.visualizer-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
}

.visualizer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.layer-toggle-group {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  gap: 0.15rem;
  flex-wrap: wrap;
}
.layer-btn {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.layer-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}
.layer-btn.active {
  background: var(--aqua-primary);
  color: #070D1E;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.face-interactive-stage {
  position: relative;
  width: 100%;
  height: 350px;
  background: #020612;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.face-display-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.4s ease;
}

/* Layer Overlays (Heatmaps) */
.layer-overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.layer-overlay-canvas.visible {
  opacity: 0.75;
}

/* Anatomical Zone Pins */
.zone-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
}
.zone-pin:hover {
  transform: translate(-50%, -50%) scale(1.18);
}
.zone-pin-core {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  color: #070D1E;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
  position: relative;
}
.zone-pin.healthy .zone-pin-core {
  background: var(--reef-emerald);
  box-shadow: 0 0 16px var(--reef-glow);
}
.zone-pin.focus .zone-pin-core {
  background: var(--coral-accent);
  box-shadow: 0 0 16px var(--coral-glow);
}
.zone-pin.moderate .zone-pin-core {
  background: var(--sun-gold);
  box-shadow: 0 0 16px rgba(255, 178, 107, 0.4);
}

.zone-sonar-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--aqua-primary);
  animation: sonarPulse 2s cubic-bezier(0.1, 0.5, 0.8, 1) infinite;
}
@keyframes sonarPulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.zone-pin-tooltip {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 13, 30, 0.92);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--aqua-primary);
  color: var(--text-bright);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.zone-pin:hover .zone-pin-tooltip,
.zone-pin.active .zone-pin-tooltip {
  opacity: 1;
}

/* Right Panel: Balanced Clinical Breakdown */
.clinical-report-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Haut.ai Benchmark Biometric Metric Cards (Compact 3-Column Header) */
.haut-metrics-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.haut-metric-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 68px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.haut-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.08);
}

.skin-type-card .haut-card-col {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.haut-card-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #6B7280;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.haut-card-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
  font-family: var(--font-heading);
  white-space: nowrap;
}

.age-combined-card {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.age-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.age-col .big-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}
.age-divider {
  width: 1px;
  height: 24px;
  background: #E5E7EB;
  flex-shrink: 0;
}

.skin-tone-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.haut-tone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.15rem;
  min-width: 0;
}

.haut-tone-name {
  font-size: 0.86rem;
  font-weight: 800;
  color: #111827;
  font-family: var(--font-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.haut-phototype-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: #6B7280;
  white-space: nowrap;
}

.haut-tone-slider-track {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #FDF3EB 0%,
    #F8E0CD 15%,
    #E8B896 35%,
    #C48358 55%,
    #7B4322 75%,
    #3D1E0E 90%,
    #1E0F07 100%
  );
  margin: 0.2rem 0 0.15rem;
}

.haut-tone-thumb {
  position: absolute;
  top: 50%;
  width: 3px;
  height: 12px;
  background: #000000;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  outline: 1.5px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.haut-tone-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
}

/* ==========================================================================
   Haut.ai Feature Analysis Carousel (Compact High-Density Sizing)
   ========================================================================== */
.haut-features-section {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 0.85rem 0.95rem 0.75rem;
  margin-top: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
}

.haut-features-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.haut-features-title-group h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 0.1rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.haut-features-subtitle {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin: 0;
}

.haut-filter-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.2rem;
  border-radius: var(--radius-full);
  gap: 0.2rem;
}

.haut-filter-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}
.haut-filter-btn.active {
  background: var(--aqua-primary);
  color: #070D1E;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

/* Carousel Container with smooth scrolling and prominent navigation buttons */
.haut-carousel-wrapper {
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: visible;
  border-radius: 12px;
}

.haut-carousel-track {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.25rem 0.2rem 0.35rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  scrollbar-width: none; /* Firefox - No scrollbar */
  -ms-overflow-style: none; /* IE and Edge - No scrollbar */
}
.haut-carousel-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera - No scrollbar */
}

/* Floating High-Visibility Navigation Buttons */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid var(--aqua-primary);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  color: #070D1E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  z-index: 25;
  cursor: pointer;
  transition: all 0.2s ease;
}
.carousel-nav-btn:hover {
  background: var(--aqua-primary);
  color: #070D1E;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 16px var(--aqua-glow);
}
.carousel-nav-btn.prev {
  left: 2px;
}
.carousel-nav-btn.next {
  right: 2px;
}

/* Feature Metric Card (Matching Video Benchmark) */
.haut-feature-card {
  width: 138px;
  min-width: 138px;
  max-width: 138px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.haut-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.feature-card-media {
  position: relative;
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: #020612;
}

.feature-base-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.feature-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 2px 3px;
}

.feature-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.feature-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  font-family: var(--font-heading);
}

.feature-status-tag {
  font-size: 0.66rem;
  font-weight: 600;
}
.feature-status-tag.average {
  color: #D97706; /* Amber */
}
.feature-status-tag.good {
  color: #0284C7; /* Cyan / Blue */
}
.feature-status-tag.great {
  color: #059669; /* Emerald Green */
}
.feature-status-tag.priority {
  color: #E11D48; /* Coral Red */
}

/* Circular Score Badge (Matching Video) */
.feature-score-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #FAFAFA;
  border: 1.5px solid #059669;
  flex-shrink: 0;
}
.feature-score-circle.great {
  border-color: #059669;
}
.feature-score-circle.good {
  border-color: #0284C7;
}
.feature-score-circle.average {
  border-color: #D97706;
}
.feature-score-circle.priority {
  border-color: #E11D48;
}

.score-num {
  font-size: 0.62rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}
.score-den {
  font-size: 0.4rem;
  font-weight: 700;
  color: #6B7280;
  line-height: 1;
}

/* Black Pill "Show more" Button */
.feature-show-more-btn {
  background: #000000;
  color: #FFFFFF;
  border-radius: 999px;
  padding: 4px 0;
  font-weight: 600;
  font-size: 0.68rem;
  width: 100%;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.feature-show-more-btn:hover {
  background: #27272A;
  transform: translateY(-1px);
}

/* ==========================================================================
   Feature Detail Modal Drawer
   ========================================================================== */
.feature-detail-dialog {
  max-width: 600px;
  background: #FFFFFF;
  color: #111827;
}

.modal-feature-score-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #059669;
  background: #F8FAFC;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.modal-feature-score-circle.great { border-color: #059669; }
.modal-feature-score-circle.good { border-color: #0284C7; }
.modal-feature-score-circle.average { border-color: #D97706; }
.modal-feature-score-circle.priority { border-color: #E11D48; }

#modal-score-num {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1;
  font-family: var(--font-heading);
}

#modal-score-den {
  font-size: 0.55rem;
  font-weight: 700;
  color: #64748B;
  line-height: 1;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

#close-feature-modal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
#close-feature-modal:hover {
  background: #E2E8F0;
  color: #000000;
  transform: scale(1.08);
}

.modal-media-stage {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 1.25rem;
}
#modal-feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#modal-feature-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.feature-detail-content {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.modal-detail-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.modal-detail-card h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.modal-detail-card p {
  font-size: 0.85rem;
  color: #4B5563;
  margin: 0;
  line-height: 1.45;
}

.balanced-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}

.balanced-card.strengths-card {
  border-left: 4px solid var(--reef-emerald);
}
.balanced-card.focus-card {
  border-left: 4px solid var(--coral-accent);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.card-title-row h4 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clinical-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.clinical-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  transition: var(--transition-fast);
}
.clinical-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}
.item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-bright);
}
.severity-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}
.severity-pill.moderate {
  background: rgba(255, 178, 107, 0.15);
  color: var(--sun-gold);
  border: 1px solid rgba(255, 178, 107, 0.4);
}
.severity-pill.prominent {
  background: rgba(255, 94, 126, 0.15);
  color: var(--coral-accent);
  border: 1px solid rgba(255, 94, 126, 0.4);
}
.severity-pill.optimal {
  background: rgba(0, 229, 153, 0.15);
  color: var(--reef-emerald);
  border: 1px solid rgba(0, 229, 153, 0.4);
}

.item-obs {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 0.35rem;
}
.item-bahamas-cause {
  font-size: 0.78rem;
  color: var(--sun-gold);
  background: rgba(255, 178, 107, 0.06);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  display: block;
}

.dashboard-cta-bar {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   Screen 4: Tropical Regimen & Amazon.com US Grounding
   ========================================================================== */
.regimen-header-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.regimen-title-group h3 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}
.regimen-focus-target {
  font-size: 0.88rem;
  color: var(--aqua-primary);
  font-weight: 600;
}

/* AM / PM Tabs */
.routine-timing-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.timing-tab-btn {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}
.timing-tab-btn.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--aqua-primary);
  color: var(--text-bright);
  box-shadow: var(--shadow-glow);
}
.timing-tab-btn.active.pm {
  background: rgba(147, 51, 234, 0.12);
  border-color: #A855F7;
}

/* Product Routine Step Cards */
.routine-steps-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.product-step-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 140px 1fr 240px;
  gap: 1.5rem;
  align-items: center;
  transition: var(--transition-smooth);
}
.product-step-card:hover {
  border-color: var(--aqua-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.product-thumb-wrap {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #020612;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.step-number-tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  background: rgba(7, 13, 30, 0.92);
  color: var(--aqua-primary);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--aqua-primary);
}

.product-info-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.product-badge-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reef-safe-badge {
  background: rgba(0, 229, 153, 0.15);
  color: var(--reef-emerald);
  border: 1px solid var(--reef-emerald);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.product-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
}
.product-brand {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.actives-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.3rem 0;
}
.active-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.product-why-it-works {
  font-size: 0.82rem;
  color: var(--sun-gold);
  line-height: 1.4;
}

/* Purchase & Logistics Column */
.product-purchase-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 1.5rem;
}

.price-box {
  display: flex;
  flex-direction: column;
}
.price-primary {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-bright);
  font-family: var(--font-heading);
}
.price-parity-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.stock-status {
  font-size: 0.75rem;
  color: var(--reef-emerald);
  font-weight: 600;
}

.btn-amazon {
  background: #FF9900;
  color: #111;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-amazon:hover {
  background: #FFA724;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.freight-helper-link {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
}
.freight-helper-link:hover {
  color: var(--aqua-primary);
  text-decoration: underline;
}

/* Tropical Usage Tips Card */
.tropical-tips-card {
  margin-top: 2rem;
  background: linear-gradient(135deg, rgba(16, 28, 56, 0.8), rgba(0, 240, 255, 0.05));
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
}
.tips-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--aqua-primary);
  margin-bottom: 0.85rem;
}
.tips-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
.tips-list li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.25rem;
}
.tips-list li::before {
  content: "•";
  color: var(--aqua-primary);
  font-size: 1.2rem;
  position: absolute;
  left: 0;
  top: -2px;
}

/* Statutory Medical Disclaimer (PRD 5.2) */
.statutory-disclaimer-box {
  margin-top: 2rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.statutory-disclaimer-box strong {
  color: var(--text-secondary);
}

/* ==========================================================================
   Modals & Drawers (Freight Forwarders & OpenRouter Settings)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: var(--backdrop-blur);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.drawer-backdrop.active {
  display: flex;
}
.drawer-modal {
  background: var(--bg-card);
  border: 1px solid var(--aqua-primary);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 0 35px var(--aqua-glow);
  max-height: 90vh;
  overflow-y: auto;
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.forwarder-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.forwarder-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: var(--radius-md);
}
.forwarder-name {
  font-weight: 700;
  color: var(--aqua-primary);
  font-size: 0.95rem;
}
.forwarder-rate {
  font-size: 0.8rem;
  color: var(--reef-emerald);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* Forms & OpenRouter Settings Components */
.form-control {
  width: 100%;
  background: rgba(7, 13, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-bright);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}
.form-control:focus {
  border-color: var(--aqua-primary);
  box-shadow: 0 0 12px var(--aqua-glow);
  outline: none;
}
select.form-control {
  cursor: pointer;
}
select.form-control option {
  background: #0D172F;
  color: #FFF;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-action .form-control {
  padding-right: 2.8rem;
}
.btn-toggle-visibility {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.3rem;
}
.btn-toggle-visibility:hover {
  color: var(--aqua-primary);
}

.connection-status-box {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.connection-status-box.success {
  background: rgba(0, 229, 153, 0.1);
  border: 1px solid var(--reef-emerald);
  color: var(--reef-emerald);
}
.connection-status-box.error {
  background: rgba(255, 94, 126, 0.1);
  border: 1px solid var(--coral-accent);
  color: var(--coral-accent);
}
.connection-status-box.info {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--aqua-primary);
  color: var(--aqua-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: rgba(7, 13, 30, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.5rem 2rem;
  margin-top: 4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-container {
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--text-secondary);
}

/* ==========================================================================
   Skin.Chat by Haut.AI Design System & Skin Portrait Styling
   ========================================================================== */
.brand-badge-haut {
  background: rgba(0, 240, 255, 0.15);
  color: var(--aqua-primary);
  border: 1px solid rgba(0, 240, 255, 0.4);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  display: inline-block;
}

.btn-skinchat-nav, .btn-skinchat-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(0, 210, 196, 0.25));
  border: 1px solid rgba(0, 240, 255, 0.45);
  color: var(--text-bright);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
  transition: all 0.25s ease;
}
.btn-skinchat-nav:hover, .btn-skinchat-action:hover {
  background: linear-gradient(135deg, var(--aqua-primary), #00d2c4);
  color: #070D1E;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  transform: translateY(-2px);
}
.ai-sparkle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua-primary);
  box-shadow: 0 0 8px var(--aqua-primary);
  animation: pulseGlow 1.5s infinite alternate;
}

/* Skin Portrait Top Header (skin.chat/skin-portrait/...) */
.skin-portrait-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.25rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.portrait-badge-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}
.portrait-tag-main {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--aqua-primary);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.portrait-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: #E2E8F0;
}
.btn-copy-id {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0;
  transition: color 0.2s ease;
}
.btn-copy-id:hover {
  color: var(--aqua-primary);
}
.portrait-timestamp-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.portrait-headline {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-bright);
  margin: 0;
}
.portrait-actions-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Skin.Chat Conversational AI Advisor Dialog */
.skinchat-dialog {
  max-width: 580px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0A0F1D;
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 240, 255, 0.15);
}
.skinchat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(14, 22, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.skinchat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.skinchat-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aqua-primary), #00D2C4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #070D1E;
  font-size: 1rem;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}
.online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--reef-emerald);
  border: 2px solid #0A0F1D;
}
.skinchat-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.skinchat-title-row h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-bright);
}
.skinchat-brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--aqua-primary);
  background: rgba(0, 240, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.skinchat-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin: 0.15rem 0 0;
}
.skinchat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 280px;
  max-height: 400px;
  background: #080D1A;
}
.chat-message {
  display: flex;
  gap: 0.75rem;
  max-width: 92%;
}
.chat-message.assistant {
  align-self: flex-start;
}
.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.2);
  border: 1px solid var(--aqua-primary);
  color: var(--aqua-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.chat-message.user .chat-avatar {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #FFF;
}
.chat-bubble {
  background: #131D33;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-bright);
}
.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 210, 196, 0.15));
  border-color: rgba(0, 240, 255, 0.35);
}
.chat-bubble p {
  margin: 0 0 0.5rem 0;
}
.chat-bubble p:last-child {
  margin-bottom: 0;
}
.skinchat-chips-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.6rem 1.25rem;
  background: rgba(10, 16, 32, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: none;
}
.skinchat-chips-row::-webkit-scrollbar {
  display: none;
}
.skinchat-chip {
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.skinchat-chip:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--aqua-primary);
  color: var(--aqua-primary);
}
.skinchat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.4rem 1.25rem;
  background: #080D1A;
}
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aqua-primary);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}
.skinchat-input-bar {
  display: flex;
  padding: 0.75rem 1.25rem;
  background: rgba(14, 22, 42, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 0.5rem;
}
.skinchat-text-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.1rem;
  color: var(--text-bright);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.skinchat-text-input:focus {
  border-color: var(--aqua-primary);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}
.skinchat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--aqua-primary);
  border: none;
  color: #070D1E;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.skinchat-send-btn:hover {
  transform: scale(1.08);
  background: #00D2C4;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
  }
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }
  .visualizer-card {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
  .product-step-card {
    grid-template-columns: 120px 1fr;
  }
  .product-purchase-col {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 0;
    padding-top: 1rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .quality-chips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tips-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .haut-metrics-container {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  .header-container {
    flex-direction: column;
    gap: 0.8rem;
  }
  .hero-content h2 {
    font-size: 2.2rem;
  }
  .product-step-card {
    grid-template-columns: 1fr;
  }
  .product-purchase-col {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   PDF Export Mode (Clinical Light Theme - High-Contrast & Vivid Highlights)
   ========================================================================== */
.pdf-export-mode {
  width: 1280px !important;
  max-width: 1280px !important;
  min-width: 1280px !important;
  padding: 1.5rem !important;
  background-color: #F1F5F9 !important;
  background-image: none !important;
  color: #0F172A !important;
  box-sizing: border-box !important;
  border-radius: 12px !important;
  border: 2px solid #94A3B8 !important;
  box-shadow: none !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.pdf-export-mode * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

/* 1. Hide interactive elements, buttons, and bottom regimen CTA completely */
.pdf-export-mode .portrait-actions-row,
.pdf-export-mode .carousel-nav-btn,
.pdf-export-mode .layer-toggle-group,
.pdf-export-mode .zone-pin-tooltip,
.pdf-export-mode .zone-sonar-ring,
.pdf-export-mode .feature-show-more-btn,
.pdf-export-mode .haut-filter-tabs,
.pdf-export-mode .dashboard-cta-bar,
.pdf-export-mode #dash-bottom-regimen-btn {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* 2. Top Header - Crisp Highlighted Box */
.pdf-export-mode .skin-portrait-top-header {
  background-color: #FFFFFF !important;
  border: 2px solid #94A3B8 !important;
  border-left: 6px solid #0284C7 !important;
  border-radius: 10px !important;
  padding: 1rem 1.25rem !important;
  margin-bottom: 0.85rem !important;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08) !important;
}

.pdf-export-mode .portrait-id-badge {
  background-color: #0284C7 !important;
  color: #FFFFFF !important;
  border: 1.5px solid #0284C7 !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  padding: 3px 10px !important;
  border-radius: 6px !important;
}

.pdf-export-mode .portrait-timestamp-tag {
  background-color: #E2E8F0 !important;
  color: #0F172A !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  border: 1px solid #94A3B8 !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
}

.pdf-export-mode .portrait-headline {
  color: #090D16 !important;
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  margin: 0.35rem 0 0 0 !important;
}

/* 3. Skin Health Index & Phototype Bar - High Contrast */
.pdf-export-mode .dashboard-top-bar {
  background-color: #FFFFFF !important;
  border: 2px solid #94A3B8 !important;
  border-left: 6px solid #059669 !important;
  border-radius: 10px !important;
  padding: 0.75rem 1.25rem !important;
  margin-bottom: 1rem !important;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08) !important;
}

.pdf-export-mode .score-badge-huge {
  background-color: #ECFDF5 !important;
  color: #059669 !important;
  border: 2.5px solid #059669 !important;
  font-weight: 900 !important;
  font-size: 1.6rem !important;
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
}

.pdf-export-mode .score-circle-widget strong {
  color: #065F46 !important;
  background-color: #DCFCE7 !important;
  border: 1.5px solid #059669 !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  display: inline-block !important;
}

.pdf-export-mode .score-circle-widget div div {
  color: #475569 !important;
  font-weight: 800 !important;
  font-size: 0.72rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.pdf-export-mode .phototype-indicator span {
  color: #475569 !important;
  font-weight: 800 !important;
  font-size: 0.72rem !important;
}

.pdf-export-mode .phototype-pill {
  background-color: #0F172A !important;
  color: #FFFFFF !important;
  border: 2px solid #0F172A !important;
  font-weight: 800 !important;
  font-size: 0.88rem !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
}

/* 4. Layout Grid */
.pdf-export-mode .dashboard-split-grid {
  display: grid !important;
  grid-template-columns: 360px 1fr !important;
  gap: 1.15rem !important;
}

/* 5. Left Panel: Visualizer Card */
.pdf-export-mode .visualizer-card {
  background-color: #FFFFFF !important;
  border: 2px solid #94A3B8 !important;
  border-top: 4px solid #0284C7 !important;
  border-radius: 10px !important;
  padding: 1rem !important;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08) !important;
}

.pdf-export-mode .visualizer-toolbar div {
  color: #090D16 !important;
  font-weight: 900 !important;
  font-size: 0.9rem !important;
}

.pdf-export-mode .visualizer-toolbar i {
  color: #0284C7 !important;
}

.pdf-export-mode .face-interactive-stage {
  background-color: #0F172A !important;
  border: 2px solid #334155 !important;
  border-radius: 8px !important;
  height: 350px !important;
}

.pdf-export-mode .face-display-img {
  filter: none !important;
}

.pdf-export-mode .zone-pin {
  opacity: 1 !important;
  visibility: visible !important;
}

.pdf-export-mode .zone-pin-core {
  width: 28px !important;
  height: 28px !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  border: 2.5px solid #FFFFFF !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6) !important;
}

.pdf-export-mode .zone-pin.healthy .zone-pin-core {
  background: #059669 !important;
  color: #FFFFFF !important;
}

.pdf-export-mode .zone-pin.moderate .zone-pin-core {
  background: #D97706 !important;
  color: #FFFFFF !important;
}

.pdf-export-mode .zone-pin.focus .zone-pin-core {
  background: #DC2626 !important;
  color: #FFFFFF !important;
}

.pdf-export-mode .visualizer-card span {
  color: #1E293B !important;
  font-weight: 700 !important;
}

/* 6. Right Panel: Clinical Biometric Breakdown */
.pdf-export-mode .clinical-report-panel {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.85rem !important;
}

/* 3 Biometric Cards */
.pdf-export-mode .haut-metrics-container {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0.75rem !important;
}

.pdf-export-mode .haut-metric-card {
  background-color: #FFFFFF !important;
  border: 2px solid #94A3B8 !important;
  border-top: 4px solid #0284C7 !important;
  border-radius: 8px !important;
  padding: 0.65rem 0.85rem !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
}

.pdf-export-mode .haut-card-label {
  color: #475569 !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

.pdf-export-mode .haut-card-value,
.pdf-export-mode .big-num {
  color: #090D16 !important;
  font-size: 1.3rem !important;
  font-weight: 900 !important;
}

.pdf-export-mode .age-divider {
  background: #94A3B8 !important;
  width: 2px !important;
}

.pdf-export-mode .haut-tone-name {
  color: #090D16 !important;
  font-weight: 900 !important;
}

.pdf-export-mode .haut-phototype-sub {
  color: #0284C7 !important;
  font-weight: 800 !important;
}

.pdf-export-mode .haut-tone-slider-track {
  border: 2px solid #64748B !important;
}

.pdf-export-mode .haut-tone-thumb {
  background: #FFFFFF !important;
  border: 3px solid #0F172A !important;
}

/* 7. Focus Areas & Features Section */
.pdf-export-mode .haut-features-section {
  background-color: #FFFFFF !important;
  border: 2px solid #94A3B8 !important;
  border-top: 4px solid #0284C7 !important;
  border-radius: 10px !important;
  padding: 0.85rem !important;
  margin: 0 !important;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08) !important;
}

.pdf-export-mode .haut-features-title-group h4 {
  color: #090D16 !important;
  font-size: 0.98rem !important;
  font-weight: 900 !important;
}

.pdf-export-mode .haut-features-title-group i {
  color: #0284C7 !important;
}

.pdf-export-mode .haut-features-subtitle {
  color: #475569 !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
}

/* 4x2 Clean Grid for 8 Feature Cards */
.pdf-export-mode .haut-carousel-wrapper {
  overflow: visible !important;
  padding: 0 !important;
}

.pdf-export-mode .haut-carousel-track {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0.65rem !important;
  overflow: visible !important;
  width: 100% !important;
  padding: 0.25rem 0 !important;
  transform: none !important;
}

.pdf-export-mode .haut-feature-card {
  width: 100% !important;
  min-width: unset !important;
  max-width: 100% !important;
  background-color: #FFFFFF !important;
  border: 2px solid #94A3B8 !important;
  border-radius: 8px !important;
  padding: 6px !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}

.pdf-export-mode .feature-card-media {
  height: 95px !important;
  border-radius: 6px !important;
  border: 1.5px solid #94A3B8 !important;
  background-color: #0F172A !important;
  overflow: hidden !important;
}

.pdf-export-mode .feature-title {
  color: #090D16 !important;
  font-size: 0.8rem !important;
  font-weight: 900 !important;
}

.pdf-export-mode .feature-status-tag {
  font-size: 0.64rem !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

.pdf-export-mode .feature-status-tag.good,
.pdf-export-mode .feature-status-tag.great {
  background-color: #059669 !important;
  color: #FFFFFF !important;
}

.pdf-export-mode .feature-status-tag.average {
  background-color: #D97706 !important;
  color: #FFFFFF !important;
}

.pdf-export-mode .feature-status-tag.needs_focus {
  background-color: #DC2626 !important;
  color: #FFFFFF !important;
}

.pdf-export-mode .feature-score-circle {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pdf-export-mode .feature-score-circle.good,
.pdf-export-mode .feature-score-circle.great {
  background-color: #ECFDF5 !important;
  border: 2.5px solid #059669 !important;
  color: #059669 !important;
}

.pdf-export-mode .feature-score-circle.average {
  background-color: #FFFBEB !important;
  border: 2.5px solid #D97706 !important;
  color: #D97706 !important;
}

.pdf-export-mode .score-num {
  font-size: 0.78rem !important;
  font-weight: 900 !important;
}

.pdf-export-mode .score-den {
  display: none !important;
}

/* ==========================================================================
   Print Stylesheet for Downloadable Clinical Summary
   ========================================================================== */
@media print {
  body {
    background: #070D1E !important;
    color: #FFF !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .site-header, .btn-ghost, .carousel-nav-btn, .layer-toggle-group, .intake-cta-row {
    display: none !important;
  }
  .app-viewport {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .screen-view {
    display: block !important;
  }
  .haut-carousel-track {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.75rem !important;
    overflow: visible !important;
  }
  .haut-feature-card {
    min-width: unset !important;
    width: 100% !important;
  }
}
