/**
 * TALLER BIO LABS (키즈핏 바이오 랩)
 * Clinical Growth Trajectory, Endocrinology, Biomechanics & Cognitive Analytics
 * 
 * Master Design System:
 * 1. Dark Obsidian Glassmorphism Theme (Default):
 *    - Background: Deep Obsidian Navy (#060911)
 *    - Matte Glass Cards: rgba(15, 23, 42, 0.74) with backdrop-filter: blur(20px)
 *    - Accents: Cyan Blue (#38BDF8), Bio Emerald (#10B981), Amber (#F59E0B), Coral Rose (#F43F5E)
 * 2. Light Clinic Theme (Switchable):
 *    - Background: Warm Ivory (#FAF8F5), Surface: Pure White (#FFFFFF)
 *    - Accents: Royal Indigo (#5B4BFF), Growth Mint (#10B981), Warm Coral (#F97316), Butter Yellow (#F59E0B)
 * 3. Typography: Pretendard, Inter, JetBrains Mono, system-ui
 * 4. Zero commercial artifacts (no receipts, barcodes, prices, or CPA banners)
 */

:root {
  /* Dark Obsidian Glassmorphism Theme Tokens (Default) */
  --bg-obsidian: #060911;
  --bg-glass-card: rgba(15, 23, 42, 0.74);
  --bg-glass-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass-sub: rgba(30, 41, 59, 0.55);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-bright: rgba(56, 189, 248, 0.4);

  /* High-End Bio Accents */
  --cyan-pulse: #38BDF8;
  --cyan-pulse-glow: rgba(56, 189, 248, 0.25);
  --bio-emerald: #10B981;
  --bio-emerald-glow: rgba(16, 185, 129, 0.25);
  --amber-caution: #F59E0B;
  --amber-caution-glow: rgba(245, 158, 11, 0.25);
  --rose-alert: #F43F5E;
  --rose-alert-glow: rgba(244, 63, 94, 0.25);

  /* Light Clinic Compatibility Tokens */
  --bg-clinic-ivory: #FAF8F5;
  --bg-clinic-surface: #FFFFFF;
  --bg-sub-soft: #F4F6FB;
  --bg-sub-warm: #FFFDF9;
  --border-clinic: #E6EAF2;
  --border-clinic-subtle: #EEF2F6;
  --border-clinic-focus: #38BDF8;

  --primary-indigo: #5B4BFF;
  --primary-indigo-hover: #4F46E5;
  --primary-indigo-sub: #EEF2FF;
  --growth-mint: #10B981;
  --growth-mint-hover: #059669;
  --growth-mint-sub: #ECFDF5;
  --coral-alert: #F97316;
  --coral-alert-sub: #FFF1F2;
  --coral-rose: #F43F5E;
  --butter-yellow: #F59E0B;
  --butter-yellow-sub: #FFFBEB;

  /* Active Theme Mapping (Default: Dark Obsidian) */
  --theme-bg: var(--bg-obsidian);
  --theme-surface: var(--bg-glass-card);
  --theme-surface-solid: #0A0F1D;
  --theme-surface-sub: var(--bg-glass-sub);
  --theme-border: var(--border-glass);
  --theme-border-subtle: rgba(255, 255, 255, 0.05);
  --theme-accent: var(--cyan-pulse);
  --theme-accent-hover: #0284C7;
  --theme-accent-sub: rgba(56, 189, 248, 0.12);
  --theme-accent-glow: var(--cyan-pulse-glow);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-light: #FFFFFF;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 16px 36px rgba(0, 0, 0, 0.55);
  --shadow-glow-cyan: 0 0 25px rgba(56, 189, 248, 0.2);
  --shadow-glow-emerald: 0 0 25px rgba(16, 185, 129, 0.2);

  /* Border Radii */
  --radius-card: 24px;
  --radius-inner: 16px;
  --radius-capsule: 9999px;
  --radius-btn: 14px;

  /* Layout */
  --max-width: 1080px;
  --font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", Menlo, Consolas, Monaco, monospace;
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Clinic Alternate Theme Overrides */
[data-theme="light"],
body[data-theme="light"] {
  --theme-bg: #FAF8F5;
  --theme-surface: #FFFFFF;
  --theme-surface-solid: #FFFFFF;
  --theme-surface-sub: #F4F6FB;
  --theme-border: #E2E8F0;
  --theme-border-subtle: #EEF2F6;
  --theme-accent: #5B4BFF;
  --theme-accent-hover: #4F46E5;
  --theme-accent-sub: #EEF2FF;
  --theme-accent-glow: rgba(91, 75, 255, 0.15);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-light: #FFFFFF;

  --shadow-sm: 0 2px 8px rgba(20, 30, 55, 0.04);
  --shadow-card: 0 10px 30px rgba(20, 30, 55, 0.05);
  --shadow-card-hover: 0 16px 36px rgba(20, 30, 55, 0.08);
  --shadow-glow-cyan: 0 0 20px rgba(91, 75, 255, 0.12);
  --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.12);
}

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

.hidden {
  display: none !important;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--text-primary);
  background-color: var(--theme-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  background-color: var(--theme-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 3rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Clinic Header & Controls */
.clinic-header {
  width: 100%;
  background: rgba(6, 9, 17, 0.88);
  border-bottom: 1px solid var(--theme-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition-smooth);
}

[data-theme="light"] .clinic-header {
  background: rgba(255, 255, 255, 0.94);
}

.header-trust-bar {
  background: rgba(56, 189, 248, 0.08);
  border-bottom: 1px solid var(--theme-border-subtle);
  padding: 0.45rem 1rem;
  text-align: center;
}

[data-theme="light"] .header-trust-bar {
  background: #EEF2FF;
}

.header-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--theme-accent);
}

.trust-badge-icon {
  font-size: 0.95rem;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.brand-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
  border: 1px solid var(--border-glass-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-glow-cyan);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  background: var(--theme-accent-sub);
  color: var(--theme-accent);
  border: 1px solid var(--theme-accent);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.header-control-btn {
  background: var(--theme-surface-sub);
  color: var(--text-primary);
  border: 1px solid var(--theme-border);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-capsule);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.header-control-btn:hover {
  background: var(--theme-accent-sub);
  border-color: var(--theme-accent);
  color: var(--theme-accent);
}

/* Floating Capsule Tab Navigation (Core 1 ~ 5) */
.capsule-nav-wrapper {
  max-width: var(--max-width);
  margin: 1.25rem auto 0;
  padding: 0;
}

.capsule-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  padding: 0.45rem;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: visible;
  width: 100%;
}

/* Hide 90-Day Tracker Tab from Parent View while keeping DOM for tests */
#tab-btn-tracker {
  display: none !important;
}

.capsule-nav::-webkit-scrollbar {
  display: none;
}

.capsule-tab {
  min-width: 0;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 14px;
  padding: 0.62rem 0.35rem;
  font-size: clamp(0.74rem, 1.12vw, 0.85rem);
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.capsule-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.capsule-tab.active {
  background: linear-gradient(135deg, var(--theme-accent) 0%, #0284C7 100%);
  color: #FFFFFF;
  box-shadow: var(--shadow-glow-cyan);
}

[data-theme="light"] .capsule-tab.active {
  background: linear-gradient(135deg, #5B4BFF 0%, #4F46E5 100%);
  box-shadow: 0 4px 16px rgba(91, 75, 255, 0.28);
}

/* Main Container Layout */
.main-container {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 2.5rem 1rem 1.75rem;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--theme-accent-sub);
  border: 1px solid var(--theme-border);
  color: var(--theme-accent);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-capsule);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-headline {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.hero-headline-highlight {
  color: var(--theme-accent);
  background: linear-gradient(135deg, var(--cyan-pulse) 0%, var(--bio-emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-headline-highlight {
  background: linear-gradient(135deg, #5B4BFF 0%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.02rem;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.65;
}

.compact-hero {
  padding: 1.25rem 0 0.5rem;
  margin-bottom: 0.5rem;
}

/* Quick Presets Bar (Compact) */
.quick-presets-wrapper {
  max-width: var(--max-width);
  margin: 0 auto 1.25rem;
  padding: 0 1.25rem;
}

.quick-presets-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.35rem 0;
}

.quick-presets-inner::-webkit-scrollbar {
  display: none;
}

.quick-presets-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--theme-accent);
  white-space: nowrap;
}

.preset-chip {
  background: var(--theme-surface-sub);
  border: 1px solid var(--theme-border);
  color: var(--text-primary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-capsule);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.preset-chip:hover, .preset-chip.active {
  background: var(--theme-accent-sub);
  border-color: var(--theme-accent);
  color: var(--theme-accent);
}

/* Bento Cards (Glassmorphism & Clinic Surfaces) */
.bento-card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-card);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 2rem;
  transition: var(--transition-smooth);
}

.bento-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(56, 189, 248, 0.2);
}

/* Presets Section (5 Clinical Age-Group Presets) */
.presets-section {
  margin-bottom: 2.5rem;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-label-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-badge-pill {
  background: var(--theme-accent-sub);
  color: var(--theme-accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-capsule);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.preset-card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: 20px;
  padding: 1.25rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.preset-card:hover {
  transform: translateY(-3px);
  border-color: var(--theme-accent);
  box-shadow: var(--shadow-glow-cyan);
}

.preset-card.active {
  border-color: var(--theme-accent);
  background: rgba(56, 189, 248, 0.1);
  box-shadow: var(--shadow-glow-cyan);
}

.preset-card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  margin-bottom: 0.65rem;
  width: fit-content;
}

.preset-badge-cyan { background: rgba(56, 189, 248, 0.15); color: var(--cyan-pulse); }
.preset-badge-mint { background: rgba(16, 185, 129, 0.15); color: var(--bio-emerald); }
.preset-badge-amber { background: rgba(245, 158, 11, 0.15); color: var(--amber-caution); }
.preset-badge-rose { background: rgba(244, 63, 94, 0.15); color: var(--rose-alert); }
.preset-badge-indigo { background: rgba(91, 75, 255, 0.15); color: #818CF8; }

.preset-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.preset-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 0.85rem;
  flex: 1;
}

.preset-card-action {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--theme-accent);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* 5-Stage Guided Bio Onboarding Quiz Form */
.quiz-section {
  margin-bottom: 3rem;
}

.quiz-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--theme-border-subtle);
}

.quiz-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.quiz-step-tag {
  background: var(--theme-accent-sub);
  color: var(--theme-accent);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-capsule);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quiz-progress-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--theme-accent);
}

.quiz-step-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.quiz-step-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.quiz-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-capsule);
  overflow: hidden;
}

[data-theme="light"] .quiz-progress-track {
  background: #E2E8F0;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-pulse) 0%, var(--bio-emerald) 100%);
  border-radius: var(--radius-capsule);
  transition: width 0.4s ease;
}

/* Form Elements & Slide Funnel Track (Horizontal translateX transitions) */
.slide-funnel-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-inner);
}

.slide-funnel-track {
  display: flex;
  align-items: flex-start;
  width: 100%;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.slide-funnel-card {
  min-width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
  box-sizing: border-box;
  padding: 0.35rem 0.2rem;
  display: block !important;
}

.slide-funnel-card:not(.active) {
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  pointer-events: none;
}

.quiz-step-content {
  animation: fadeInStep 0.3s ease-out;
}

/* Fallback for steps without slide track */
.quiz-step-content:not(.slide-funnel-card) {
  display: none;
}
.quiz-step-content:not(.slide-funnel-card).active {
  display: block;
}

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

/* Realtime MPH Preview Badge */
.mph-preview-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--theme-surface-sub);
  border: 1px solid var(--theme-border);
  border-left: 4px solid var(--theme-accent);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-inner);
  margin-top: 0.75rem;
}

.mph-badge-icon {
  font-size: 1.5rem;
}

.mph-badge-content {
  flex: 1;
}

.mph-badge-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.mph-badge-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--theme-accent);
}

.mph-badge-range {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

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

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-label-required::after {
  content: " *";
  color: var(--rose-alert);
}

.form-input, .form-select {
  width: 100%;
  background: var(--theme-surface-sub);
  border: 1px solid var(--theme-border);
  color: var(--text-primary);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-inner);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition-smooth);
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.input-suffix-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix-wrapper .form-input {
  padding-right: 3.5rem;
}

.input-suffix {
  position: absolute;
  right: 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

/* Choice Chips & Bento Cards */
.choice-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.chip-label {
  cursor: pointer;
  display: block;
}

.chip-input {
  display: none;
}

.chip-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--theme-surface-sub);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-inner);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.chip-input:checked + .chip-pill {
  background: var(--theme-accent-sub);
  border-color: var(--theme-accent);
  color: var(--theme-accent);
  box-shadow: var(--shadow-glow-cyan);
}

/* Tanner Bento Choice Grid */
.bento-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.bento-choice-label {
  cursor: pointer;
  display: block;
}

.bento-choice-card {
  background: var(--theme-surface-sub);
  border: 1px solid var(--theme-border);
  border-radius: 20px;
  padding: 1.25rem 1.15rem;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.bento-choice-icon {
  font-size: 1.5rem;
  margin-bottom: 0.65rem;
  display: block;
}

.bento-choice-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.bento-choice-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.chip-input:checked + .bento-choice-card {
  border-color: var(--theme-accent);
  background: rgba(56, 189, 248, 0.1);
  box-shadow: var(--shadow-glow-cyan);
}

/* Stepper Nav Bar */
.quiz-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--theme-border-subtle);
  gap: 1rem;
}

.btn {
  padding: 0.8rem 1.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.btn:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--theme-surface-sub);
  color: var(--text-secondary);
  border: 1px solid var(--theme-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--theme-accent);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-pulse) 0%, #0284C7 100%);
  color: #FFFFFF;
  box-shadow: var(--shadow-glow-cyan);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
}

.btn-submit {
  background: linear-gradient(135deg, var(--cyan-pulse) 0%, var(--bio-emerald) 100%);
  color: #FFFFFF;
  font-size: 1rem;
  padding: 0.85rem 1.8rem;
  box-shadow: var(--shadow-glow-cyan);
}

.btn-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* 3-Second Bio Scan Loader Overlay */
.analysis-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 9, 17, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeInOverlay 0.25s ease-out;
}

[data-theme="light"] .analysis-overlay {
  background: rgba(250, 248, 245, 0.92);
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.analysis-modal {
  background: var(--theme-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--theme-border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  padding: 2.75rem 2.25rem;
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.analysis-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(56, 189, 248, 0.15);
  border-top: 4px solid var(--cyan-pulse);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: spin 0.8s linear infinite;
}

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

.analysis-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.analysis-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.analysis-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-capsule);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.analysis-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-pulse) 0%, var(--bio-emerald) 100%);
  border-radius: var(--radius-capsule);
  transition: width 0.3s ease;
}

.btn-skip-scan {
  background: transparent;
  border: none;
  color: var(--theme-accent);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* Results Prescription Container & Dashboard */
.prescription-container,
.results-dashboard {
  margin: 2rem 0 3rem;
  animation: fadeInStep 0.4s ease-out;
}

.prescription-banner {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  backdrop-filter: blur(20px);
}

.prescription-banner-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.prescription-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
  border: 1px solid var(--border-glass-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.prescription-child-info h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.prescription-child-info p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.prescription-retest-btn {
  background: var(--theme-surface-sub);
  color: var(--theme-accent);
  border: 1px solid var(--theme-border);
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-capsule);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.prescription-retest-btn:hover {
  background: var(--theme-accent-sub);
  border-color: var(--theme-accent);
}

/* Master Briefing Card (Phase 2 Diagnostic Overview) */
.master-briefing-card {
  border-left: 5px solid var(--theme-accent, #38BDF8);
  margin-bottom: 2rem;
  background: var(--theme-surface);
}

.briefing-header {
  margin-bottom: 1.5rem;
}

.briefing-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0.35rem 0;
}

.briefing-subtitle {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.briefing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.briefing-section {
  background: var(--theme-surface-sub);
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--radius-inner);
  padding: 1.25rem;
}

.briefing-section-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--theme-border-subtle);
  padding-bottom: 0.5rem;
}

.briefing-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .briefing-metric-row {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}

.briefing-metric-row:last-child {
  border-bottom: none;
}

.briefing-action-item {
  margin-bottom: 0.85rem;
}

.action-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--theme-accent-sub);
  color: var(--theme-accent);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  margin-bottom: 0.25rem;
}

.action-desc {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Tab Panes (Strict Single Active Tab View) */
.tab-pane {
  display: none !important;
}

.tab-pane.active {
  display: block !important;
}

.tab-pane.hidden {
  display: none !important;
}

.tab-section-intro {
  margin-bottom: 1.5rem;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-capsule);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.tab-badge-cyan { background: rgba(56, 189, 248, 0.15); color: var(--cyan-pulse); }
.tab-badge-mint { background: rgba(16, 185, 129, 0.15); color: var(--bio-emerald); }
.tab-badge-amber { background: rgba(245, 158, 11, 0.15); color: var(--amber-caution); }
.tab-badge-coral { background: rgba(244, 63, 94, 0.15); color: var(--rose-alert); }
.tab-badge-indigo { background: rgba(91, 75, 255, 0.15); color: #818CF8; }

.tab-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.tab-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Quiet Academic Reference Chips (12px discrete chips) */
.reference-chip-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.reference-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--theme-border-subtle);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.reference-chip:hover {
  color: var(--theme-accent);
  border-color: var(--theme-accent);
  background: var(--theme-accent-sub);
}

/* Clinic Footer */
.clinic-footer {
  max-width: var(--max-width);
  margin: 3.5rem auto 0;
  padding: 2rem 1.25rem 1rem;
  border-top: 1px solid var(--theme-border-subtle);
  text-align: center;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto 1.25rem;
  background: var(--theme-surface-sub);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-inner);
  border: 1px solid var(--theme-border-subtle);
}

.footer-copyright {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-block;
  cursor: pointer;
  user-select: none;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-capsule);
  transition: var(--transition-smooth);
}

.footer-copyright:hover {
  color: var(--theme-accent);
  background: var(--theme-accent-sub);
}

/* Secret Admin Modal */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 9, 17, 0.85);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.admin-card {
  background: var(--theme-surface-solid);
  border-radius: var(--radius-card);
  max-width: 660px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--theme-border);
}

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

.admin-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-close-btn {
  background: var(--theme-surface-sub);
  border: none;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.admin-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* ==========================================================================
   Core 3, Core 4 & Core 5 Styles: Biomechanics, Radar & Tracker
   ========================================================================== */

/* Core 3: Biomechanics Studio */
.routine-timer-card {
  transition: var(--transition-smooth);
}
.routine-timer-card:hover {
  border-color: rgba(244, 63, 94, 0.4);
}
.timer-dial-container {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
}
.timer-digits {
  text-shadow: 0 0 15px rgba(244, 63, 94, 0.25);
}

/* Core 4: Neuro-Cognitive Matrix */
.radar-chart-container {
  position: relative;
  width: 100%;
}
.radar-svg polygon {
  transition: all 0.3s ease;
}
.radar-svg path {
  transition: all 0.3s ease;
}

/* Core 5: 90-Day Tracker */
.tracker-container table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* University Pediatric Hospital A4 PDF Clinical Report Styles (@media print) */
@page {
  size: A4 portrait;
  margin: 12mm 15mm;
}

@media print {
  html, body {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 11pt !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .clinic-header,
  .capsule-nav-wrapper,
  .hero-section,
  .compact-hero,
  .presets-section,
  .quick-presets-wrapper,
  .quiz-section,
  .analysis-overlay,
  .admin-modal-overlay,
  .header-actions,
  .prescription-retest-btn,
  .prescription-banner,
  .prescription-container,
  .results-dashboard,
  .master-briefing-card,
  .tab-pane,
  .btn,
  .admin-modal,
  .theme-toggle,
  .reference-chip,
  .reference-chip-wrapper,
  .timer-controls-group,
  .btn-timer-complete,
  details,
  #btn-print-clinic-pdf,
  .clinic-footer {
    display: none !important;
  }

  .main-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #clinic-print-report-container,
  #clinic-print-report,
  .clinic-print-report {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-page,
  .print-page-1 {
    page-break-after: always !important;
    break-after: page !important;
  }

  .print-page-2 {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .print-page-break {
    page-break-after: always;
  }

  /* Learning Report Print Mode Support */
  body.print-mode-learning #clinic-print-report-container,
  body.print-mode-learning #clinic-print-report,
  body.print-mode-learning .clinic-print-report,
  body.print-mode-learning #pillar-1-container,
  body.print-mode-learning .report-mode-switcher {
    display: none !important;
  }

  body.print-mode-learning .results-dashboard,
  body.print-mode-learning #master-briefing-container,
  body.print-mode-learning .master-briefing-card,
  body.print-mode-learning #pillar-2-container {
    display: block !important;
    width: 100% !important;
    background: #FFFFFF !important;
    color: #0F172A !important;
    box-shadow: none !important;
  }

  body.print-mode-learning #pillar-2-container,
  body.print-mode-learning #pillar-2-container div,
  body.print-mode-learning #pillar-2-container section,
  body.print-mode-learning #pillar-2-container article {
    background: #FFFFFF !important;
    color: #0F172A !important;
    border-color: #CBD5E1 !important;
    box-shadow: none !important;
  }

  body.print-mode-learning #pillar-2-container h1,
  body.print-mode-learning #pillar-2-container h2,
  body.print-mode-learning #pillar-2-container h3,
  body.print-mode-learning #pillar-2-container h4,
  body.print-mode-learning #pillar-2-container p,
  body.print-mode-learning #pillar-2-container span,
  body.print-mode-learning #pillar-2-container li,
  body.print-mode-learning #pillar-2-container strong {
    color: #0F172A !important;
  }

  body.print-mode-learning #pillar-2-container button {
    display: none !important;
  }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .briefing-grid-3 {
    grid-template-columns: 1fr;
  }

  .slide-funnel-card {
    padding: 0.25rem 0;
  }

  .presets-grid {
    grid-template-columns: 1fr;
  }

  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .bento-choice-grid {
    grid-template-columns: 1fr;
  }

  .bento-card {
    padding: 1.5rem 1.15rem;
    border-radius: 20px;
  }

  .hero-headline {
    font-size: 1.5rem;
  }

  .capsule-tab {
    padding: 0.55rem 0.95rem;
    font-size: 0.8rem;
  }

  .quiz-step-title {
    font-size: 1.18rem;
  }

  .btn {
    padding: 0.85rem 1.35rem;
    font-size: 0.88rem;
  }
}

/* ==========================================================================
   K:IDS-FIT AI STUDIO — M:FFERENCE PERFORMANCE MARKETING AGENCY UI/UX SYSTEM
   (Pure Obsidian #000000 · 56px Architectural Grid · Radial Blue/Purple Glow
    · Glassmorphic Bento Cards · Contrasting Gray-50 Authority Section)
   ========================================================================== */

:root,
body,
body[data-theme="dark"] {
  --theme-bg: #000000;
  --theme-surface: rgba(255, 255, 255, 0.04);
  --theme-surface-solid: #090B10;
  --theme-surface-sub: rgba(255, 255, 255, 0.06);
  --theme-border: rgba(255, 255, 255, 0.12);
  --theme-border-subtle: rgba(255, 255, 255, 0.07);
  --theme-accent: #38BDF8;
  --theme-accent-hover: #60A5FA;
  --theme-accent-sub: rgba(56, 189, 248, 0.14);
  --theme-accent-glow: rgba(59, 130, 246, 0.28);

  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.68);
  --text-muted: rgba(255, 255, 255, 0.42);
  --text-light: #FFFFFF;

  --editorial-serif: "Inter", "DM Sans", "Pretendard Variable", "Pretendard", sans-serif;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.65);
  --shadow-card-hover: 0 28px 70px rgba(59, 130, 246, 0.18);
  --shadow-glow-cyan: 0 0 28px rgba(56, 189, 248, 0.28);
  --shadow-glow-emerald: 0 0 28px rgba(16, 185, 129, 0.25);
}

body,
body[data-theme="dark"] {
  background-color: #000000;
  color: #FFFFFF;
  background-image:
    radial-gradient(circle at 82% 16%, rgba(59, 130, 246, 0.13) 0%, transparent 42%),
    radial-gradient(circle at 18% 48%, rgba(147, 51, 234, 0.10) 0%, transparent 42%),
    radial-gradient(circle at 50% 88%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 56px 56px, 56px 56px;
  background-attachment: fixed;
}

/* Header & Floating M:FFERENCE Glass Navigation Bar */
.clinic-header,
[data-theme="dark"] .clinic-header {
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.header-trust-bar,
[data-theme="dark"] .header-trust-bar {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.38rem 1rem;
  letter-spacing: 0.02em;
}

.header-trust-badge {
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 0.74rem;
  font-weight: 600;
}

.brand-logo-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.brand-title {
  font-family: var(--font-family);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.brand-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 800;
}

/* First-Screen Gate: Hide Survey & Presets until user clicks "Start Diagnosis" */
body:not(.studio-mode-active) #quick-presets-bar,
body:not(.studio-mode-active) #quiz-section {
  display: none !important;
}

body.studio-mode-active #hero-section,
body.studio-mode-active #brand-editorial-showcase,
body.studio-mode-active .editorial-cta-bar {
  display: none !important;
}

body:not(.studio-mode-active) #studio-utility-return-bar {
  display: none !important;
}

/* M:FFERENCE Section Headers & Kickers */
.mf-kicker {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 0.65rem;
}

.mf-section-title {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.22;
  color: #FFFFFF;
  margin: 0 0 0.75rem 0;
}

.mf-section-sub {
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.68;
  max-width: 680px;
  margin: 0 auto;
}

/* M:FFERENCE Glassmorphic Cards (from-white/[0.08] to-white/[0.02] border-white/10) */
.mf-glass-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  padding: 1.65rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.mf-glass-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.035) 100%);
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.65), 0 0 32px rgba(59, 130, 246, 0.12);
}

/* M:FFERENCE High-Impact Buttons */
.mf-btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #FFFFFF;
  color: #000000 !important;
  border: 1px solid #FFFFFF;
  padding: 1.05rem 2.2rem;
  border-radius: 9999px;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 36px rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.mf-btn-white:hover {
  background: #3B82F6;
  color: #FFFFFF !important;
  border-color: #3B82F6;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(59, 130, 246, 0.45);
}

.mf-btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.98rem 1.65rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.mf-btn-glass:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Contrasting Gray-50 Official Authority Section (Exact mfference.com Section 5 Contrast) */
.mf-light-contrast-section {
  background: #F9FAFB;
  color: #111827;
  border-radius: 28px;
  padding: 2.5rem 2rem;
  margin: 2.25rem 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* Survey & Results Cards Styled in M:FFERENCE Dark Glass Aesthetic */
body[data-theme="dark"] .quiz-card,
.quiz-card,
.bento-card {
  background: linear-gradient(155deg, rgba(15, 18, 28, 0.92) 0%, rgba(8, 10, 16, 0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 26px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7) !important;
  color: #FFFFFF !important;
}

.taller-segmented-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.42rem;
  margin-bottom: 0.95rem;
}

.taller-seg-pill {
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.taller-seg-pill.completed {
  background: #10B981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.taller-seg-pill.active {
  background: linear-gradient(90deg, #3B82F6 0%, #38BDF8 100%);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.65);
  transform: scaleY(1.25);
}

.chip-pill {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
}

.chip-input:checked + .chip-pill {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(16, 185, 129, 0.18) 100%) !important;
  border-color: #38BDF8 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.28) !important;
  transform: translateY(-1px);
}

.bento-choice-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
}

.chip-input:checked + .bento-choice-card {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.22) 0%, rgba(16, 185, 129, 0.14) 100%) !important;
  border: 2px solid #38BDF8 !important;
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.22) !important;
}

.form-input,
.form-select {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  color: #FFFFFF !important;
  border-radius: 14px !important;
}

.form-select option {
  background: #0B0E17;
  color: #FFFFFF;
}

.form-input:focus,
.form-select:focus {
  border-color: #38BDF8 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22) !important;
}

.btn-primary {
  background: #FFFFFF !important;
  color: #000000 !important;
  border-radius: 9999px !important;
  font-weight: 800 !important;
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.22) !important;
}

.btn-primary:hover {
  background: #3B82F6 !important;
  color: #FFFFFF !important;
}

/* M:FFERENCE Potential Height Hero Card in Results */
.taller-height-reveal-hero {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(59, 130, 246, 0.08) 55%, rgba(16, 185, 129, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 1.65rem 1.75rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}

.taller-giant-height-number {
  font-size: clamp(2.5rem, 5.5vw, 3.7rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(135deg, #FFFFFF 0%, #38BDF8 55%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-mono);
}

/* Guidebook Chapter Quick-Jump Navigation Bar */
.guidebook-chapter-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.35rem 0 0.85rem 0;
  margin-bottom: 1.1rem;
  scrollbar-width: none;
}

.guidebook-chapter-nav::-webkit-scrollbar {
  display: none;
}

.guidebook-chapter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: var(--transition-smooth);
}

.guidebook-chapter-pill:hover {
  border-color: #38BDF8;
  background: rgba(56, 189, 248, 0.16);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Strict Single-Line Cadence & Word-Break Prevention */
body,
h1, h2, h3, h4,
p, li, dt, dd,
.hero-headline,
.hero-subtitle,
.mf-section-title,
.mf-section-sub,
.mf-glass-card h3,
.quiz-step-title,
.briefing-title {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hero-headline {
  font-size: clamp(1.26rem, 4.2vw, 2.5rem) !important;
  font-weight: 600 !important;
  line-height: 1.38 !important;
  letter-spacing: -0.025em !important;
}

.mf-glass-card h3 {
  font-size: clamp(1.0rem, 2.6vw, 1.16rem) !important;
  font-weight: 600 !important;
  line-height: 1.38 !important;
}

.hero-single-line,
.hero-one-line-list li {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all;
}

/* Natural Wrapping for Onboarding Selection Keys (Zero Truncation on Mobile/Desktop) */
.quiz-card .chip-pill,
.quiz-card .chip-pill > span,
.preset-chip,
.bento-choice-title {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: keep-all;
  max-width: 100%;
}

/* Prevent ANY Text Clipping or Truncation Inside Report (#results-dashboard) */
#results-dashboard h1,
#results-dashboard h2,
#results-dashboard h3,
#results-dashboard h4,
#results-dashboard p,
#results-dashboard li,
#results-dashboard a,
#results-dashboard button,
#results-dashboard .btn,
#results-dashboard .capsule-tab,
#results-dashboard .guidebook-chapter-pill,
#results-dashboard .pinpoint-direct-link,
#results-dashboard .mobile-touch-btn,
#results-dashboard .mobile-touch-btn-sub {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  height: auto !important;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ==========================================================================
   21. SMARTPHONE MOBILE-FIRST TOUCH & READABILITY OVERHAUL (360px ~ 768px)
   ========================================================================== */
.trait-multi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.trait-multi-grid .chip-pill {
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.25;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
}

.trait-multi-grid .chip-input:checked + .chip-pill::before {
  content: '✓ ';
  color: #34D399;
  font-weight: 900;
  margin-right: 0.25rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .main-container {
    padding: 0.45rem 0.65rem 2.5rem !important;
  }

  /* Compact Header & Studio Bars on Mobile so Selection Keys appear immediately at top */
  body.studio-mode-active .header-trust-bar {
    display: none !important;
  }

  body.studio-mode-active .header-main {
    padding: 0.45rem 0.75rem !important;
  }

  #studio-utility-return-bar {
    padding: 0.38rem 0.75rem !important;
    margin-bottom: 0.4rem !important;
    flex-wrap: nowrap !important;
  }

  #quick-presets-bar {
    margin-bottom: 0.45rem !important;
    padding: 0.35rem 0.5rem !important;
  }

  .quiz-card {
    padding: 0.85rem 0.8rem !important;
    border-radius: 18px !important;
  }

  .quiz-header {
    margin-bottom: 0.55rem !important;
    padding-bottom: 0.45rem !important;
  }

  .taller-segmented-bar {
    margin-bottom: 0.4rem !important;
  }

  .quiz-step-title {
    font-size: 1.02rem !important;
    line-height: 1.32 !important;
    margin-bottom: 0.2rem !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: keep-all;
  }

  .quiz-step-subtitle {
    font-size: 0.78rem !important;
    line-height: 1.38 !important;
    margin-bottom: 0.35rem !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: keep-all;
  }

  #guidebook-mode-banner,
  #auto-growth-stage-banner {
    padding: 0.5rem 0.65rem !important;
    margin-top: 0.35rem !important;
    margin-bottom: 0.45rem !important;
    font-size: 0.75rem !important;
  }

  #auto-growth-stage-desc {
    display: block !important;
    font-size: 0.74rem !important;
    line-height: 1.4 !important;
  }

  .form-group {
    margin-bottom: 0.7rem !important;
  }

  .form-grid-2,
  .form-grid-3 {
    gap: 0.6rem !important;
    margin-bottom: 0.6rem !important;
  }

  /* 1. Prevent mobile input zoom & enlarge tap targets */
  .form-input,
  .form-select {
    font-size: 16px !important;
    min-height: 44px !important;
    padding: 0.55rem 0.75rem !important;
    border-radius: 12px !important;
  }

  /* 2. Single-column thumb-friendly 1-line selection chips on smartphones */
  .trait-multi-grid,
  .choice-chips-grid,
  .budget-tier-grid {
    grid-template-columns: 1fr !important;
    gap: 0.4rem !important;
  }

  .chip-pill,
  .trait-multi-grid .chip-pill,
  .radio-card-content {
    min-height: 44px !important;
    padding: 0.58rem 0.8rem !important;
    font-size: 0.84rem !important;
    line-height: 1.35 !important;
    border-radius: 11px !important;
    justify-content: flex-start !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: keep-all;
  }

  .bento-choice-card {
    padding: 0.7rem 0.85rem !important;
    border-radius: 12px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.3rem !important;
  }

  .bento-choice-icon {
    font-size: 1.2rem !important;
    margin-bottom: 0.1rem !important;
    flex-shrink: 0 !important;
  }

  .bento-choice-title {
    font-size: 0.86rem !important;
    margin-bottom: 0.1rem !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.32 !important;
  }

  .bento-choice-desc {
    display: block !important;
    font-size: 0.76rem !important;
    line-height: 1.4 !important;
  }

  /* 3. Compact Stepper Nav Bar right below selection keys */
  .quiz-nav-bar {
    margin-top: 0.75rem !important;
    padding-top: 0.65rem !important;
    gap: 0.5rem !important;
  }

  .btn,
  .mf-btn-white,
  .mf-btn-glass {
    min-height: 46px !important;
    font-size: 0.86rem !important;
    padding: 0.65rem 1rem !important;
    border-radius: 9999px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.3 !important;
  }

  .editorial-cta-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.55rem !important;
    margin-bottom: 1.6rem !important;
  }

  .editorial-cta-bar .mf-btn-white,
  .editorial-cta-bar .mf-btn-glass {
    width: 100% !important;
  }

  /* 4. Results Section & Master Briefing Card Mobile Readability */
  #master-briefing-card-content,
  .bento-card {
    padding: 0.95rem 0.8rem !important;
    border-radius: 18px !important;
  }

  .taller-height-reveal-hero {
    padding: 1rem 0.85rem !important;
    border-radius: 16px !important;
  }

  .taller-giant-height-number {
    font-size: 2.25rem !important;
  }

  .briefing-title {
    font-size: 1.02rem !important;
    line-height: 1.35 !important;
  }

  /* 5. Guidebook STEP 1~4 Quick-Jump Pills: 2x2 Grid on Mobile with Full Text */
  .guidebook-chapter-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
    overflow-x: visible !important;
  }

  .guidebook-chapter-pill {
    justify-content: center !important;
    text-align: center !important;
    padding: 0.55rem 0.5rem !important;
    font-size: 0.78rem !important;
    min-height: 42px !important;
    border-radius: 10px !important;
    white-space: normal !important;
    overflow: visible !important;
    line-height: 1.3 !important;
  }
}

@media (max-width: 1150px) {
  .capsule-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
  }
  .capsule-tab {
    font-size: 0.82rem !important;
    padding: 0.55rem 0.5rem !important;
  }
}

@media (max-width: 768px) {
  /* 6. Results Category Tabs: Clean 2x2 Touch Grid on Smartphones (4 Tabs) */
  .capsule-nav-wrapper {
    padding: 0.35rem !important;
    border-radius: 16px !important;
  }

  .capsule-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .capsule-tab {
    min-height: 46px !important;
    padding: 0.55rem 0.45rem !important;
    font-size: 0.82rem !important;
    border-radius: 10px !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: visible !important;
    line-height: 1.25 !important;
  }

  /* 7. STEP 04 Curated Product Cards & Touch Buttons on Smartphones */
  .pinpoint-3col-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .pinpoint-category-box {
    padding: 0.95rem 0.85rem !important;
  }

  .pinpoint-item-card {
    padding: 0.95rem 0.85rem !important;
  }

  .mobile-touch-btn,
  .mobile-touch-btn-primary {
    min-height: 46px !important;
    font-size: 0.86rem !important;
    padding: 0.65rem 0.85rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }

  .mobile-touch-btn-sub,
  .mobile-touch-btn-secondary {
    min-height: 44px !important;
    font-size: 0.82rem !important;
    padding: 0.55rem 0.6rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }
}

/* ==========================================================================
   22. TEXT SELECTION & ACCESSIBILITY (Copy Enabled for Parents)
   ========================================================================== */
body {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

input,
textarea,
select {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

img,
svg {
  -webkit-user-drag: none;
  user-drag: none;
}

/* ==========================================================================
   23. DUAL-PILLAR 50:50 REPORT STYLING & SWS CONSOLIDATION
   ========================================================================== */
.master-pillar-container {
  margin-bottom: 2.5rem;
  position: relative;
}

.pillar-section-header {
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pillar-section-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.taller-learning-reveal-hero {
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.15);
  position: relative;
  overflow: hidden;
}

.taller-learning-reveal-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.sws-memory-consolidation-box {
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.live-bespoke-chip {
  transition: all 0.2s ease;
}

.live-bespoke-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

@media (max-width: 640px) {
  .master-pillar-container {
    margin-bottom: 1.8rem;
  }

  .pillar-section-header {
    padding: 0.85rem 1rem !important;
  }

  .pillar-section-header h3 {
    font-size: 1.05rem !important;
  }
}

/* 24. DUAL-MODE SURVEY STUDIO (Growth Quiz vs Learning Quiz) */
.wizard-mode-learning .mode-growth-field {
  display: none !important;
}
.wizard-mode-learning .mode-learning-field {
  display: block !important;
}
.wizard-mode-growth .mode-growth-field {
  display: block !important;
}
.wizard-mode-growth .mode-learning-field {
  display: none !important;
}

/* ==========================================================================
   25. UNIFIED REPORT TYPOGRAPHY (GROWTH & LEARNING) + 1-LINE VERTICAL FLOW
       & ZERO REDUNDANT CARD WHITESPACE
   ========================================================================== */

/* 25-1. 1-Item-Per-Row (한줄로 나오도록) across all 6 Quiz Steps & Report Grids (except 2x2 growth-stats-grid) */
#quiz-section .choice-chips-grid,
#quiz-section .trait-multi-grid,
#quiz-section .bento-choice-grid,
#quiz-section .form-grid-2,
#quiz-section .form-grid-3,
#results-dashboard .routines-grid,
#results-dashboard .pinpoint-3col-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.65rem !important;
}

#results-dashboard .growth-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.75rem !important;
}

#quiz-section .chip-pill {
  justify-content: flex-start !important;
  text-align: left !important;
  width: 100% !important;
  padding: 0.72rem 1rem !important;
  font-size: 0.92rem !important;
  line-height: 1.42 !important;
}

/* 25-2. Eliminate redundant outer wrapper padding/margin (카드뉴스·보고서 불필요 여백 제거) */
#master-briefing-card {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  margin-bottom: 1rem !important;
}

#master-briefing-card-content {
  padding: 1.15rem !important;
}

#pillar-1-container,
#pillar-2-container {
  padding: 1.15rem !important;
  margin-bottom: 1.25rem !important;
}

.exercise-visual-guide-box,
.radar-chart-container {
  padding: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.exercise-visual-guide-box svg,
#illustrated-growth-massage-guide svg {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

/* 25-3. Consistent Typography Hierarchy Across BOTH Growth (#pillar-1-container) & Learning (#pillar-2-container) */
/* 대주제 (Section Headings: h2, h3) */
#results-dashboard h2,
#results-dashboard h3,
#results-dashboard .briefing-title,
#results-dashboard .briefing-section-title,
#results-dashboard .pillar-section-header h3 {
  font-size: 1.2rem !important;
  line-height: 1.42 !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

/* 소주제 (Card Sub-Headings: h4) */
#results-dashboard h4 {
  font-size: 1.04rem !important;
  line-height: 1.45 !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
}

/* 본문 (Body Paragraphs & List Items: p, li, .action-desc) */
#results-dashboard p,
#results-dashboard li,
#results-dashboard .action-desc {
  font-size: 0.94rem !important;
  line-height: 1.65 !important;
}

/* 배지 (Badges & Section Pills) */
#results-dashboard .section-badge-pill,
#results-dashboard .tab-badge {
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

/* ==========================================================================
   26. DEDICATED PC HOMEPAGE vs SMARTPHONE MOBILE VIEW SEPARATION
       (홈페이지용 와이드 화면 vs 스마트폰용 큰글씨·세로 풀와이드 화면)
   ========================================================================== */
html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Top Device View Switcher Pill Bar */
.device-view-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 9999px;
  padding: 0.18rem;
  gap: 0.2rem;
}

.device-switch-btn {
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.32rem 0.68rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.device-switch-btn.active-device-btn {
  background: linear-gradient(135deg, #0EA5E9 0%, #10B981 100%);
  color: #052E16;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* Default PC View: Show .pc-view-block, Hide .mobile-view-block */
.pc-view-block {
  display: block;
}

.mobile-view-block {
  display: none;
}

/* Automatic Device Detection: Smartphone (<= 820px or coarse touch) vs PC (> 820px) */
html[data-device-view="mobile"] .pc-view-block {
  display: none !important;
}

html[data-device-view="mobile"] .mobile-view-block {
  display: block !important;
}

@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .pc-view-block {
    display: none !important;
  }

  .mobile-view-block {
    display: block !important;
  }

  .editorial-cta-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
  }

  .editorial-cta-bar > button {
    width: 100% !important;
    justify-content: center !important;
  }

  .quiz-card.bento-card {
    padding: 1rem 0.75rem !important;
    border-radius: 16px !important;
  }
}

/* Smartphone-Dedicated Full-Width & Large-Font Layout Rules */
html[data-device-view="mobile"] .main-container {
  max-width: 520px !important;
  margin: 0 auto !important;
  padding: 0.4rem 0.45rem 2.5rem !important;
}

html[data-device-view="mobile"] #master-briefing-card-content,
html[data-device-view="mobile"] #pillar-1-container,
html[data-device-view="mobile"] #pillar-2-container {
  padding: 0.65rem 0.5rem !important;
  border-radius: 16px !important;
}

html[data-device-view="mobile"] #taller-potential-reveal-hero,
html[data-device-view="mobile"] #taller-weight-reveal-hero,
html[data-device-view="mobile"] #briefing-status-section,
html[data-device-view="mobile"] #bespoke-parent-note-section,
html[data-device-view="mobile"] #briefing-actions-section,
html[data-device-view="mobile"] #expected-outcomes-section,
html[data-device-view="mobile"] #learning-step-1-style,
html[data-device-view="mobile"] #learning-step-2-strengths,
html[data-device-view="mobile"] #learning-step-3-weaknesses,
html[data-device-view="mobile"] #learning-step-4-careers,
html[data-device-view="mobile"] #learning-step-5-boost,
html[data-device-view="mobile"] #learning-step-6-remedy,
html[data-device-view="mobile"] #learning-step-7-items,
html[data-device-view="mobile"] #learning-step-8-links,
html[data-device-view="mobile"] #learning-visual-brain-illustration-card,
html[data-device-view="mobile"] #learning-visual-charts-showcase,
html[data-device-view="mobile"] .bento-card {
  padding: 0.9rem 0.75rem !important;
  border-radius: 16px !important;
}

html[data-device-view="mobile"] .weight-4stage-grid,
html[data-device-view="mobile"] .briefing-status-grid,
html[data-device-view="mobile"] .home-dual-report-grid {
  grid-template-columns: 1fr !important;
  gap: 0.55rem !important;
}

html[data-device-view="mobile"] #results-dashboard .growth-stats-grid,
html[data-device-view="mobile"] #learning-bento-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.5rem !important;
}

html[data-device-view="mobile"] #results-dashboard .growth-stats-grid .stat-card,
html[data-device-view="mobile"] #learning-bento-stats-grid > div {
  padding: 0.7rem 0.5rem !important;
  border-radius: 14px !important;
}

html[data-device-view="mobile"] .prescription-banner {
  flex-direction: column !important;
  align-items: stretch !important;
  padding: 0.85rem 0.75rem !important;
  gap: 0.65rem !important;
}

html[data-device-view="mobile"] .prescription-banner .report-mode-switcher {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.45rem !important;
  width: 100% !important;
}

html[data-device-view="mobile"] .prescription-retest-btn {
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 0.55rem 0.4rem !important;
  font-size: 0.82rem !important;
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0.55rem 0.65rem !important;
    gap: 0.45rem !important;
  }

  .brand-tagline {
    display: none !important;
  }

  .header-actions {
    gap: 0.35rem !important;
    justify-content: flex-end !important;
  }

  #nav-header-growth-report,
  #nav-header-learning-report {
    display: none !important;
  }

  .main-container {
    padding: 0.35rem 0.4rem 2.5rem !important;
    max-width: 100% !important;
  }

  #hero-section {
    padding: 1.35rem 0.5rem 1.4rem !important;
  }

  .hero-pill-badge {
    white-space: normal !important;
    font-size: 0.78rem !important;
    padding: 0.4rem 0.7rem !important;
    line-height: 1.4 !important;
  }

  #master-briefing-card-content,
  #pillar-1-container,
  #pillar-2-container {
    padding: 0.6rem 0.45rem !important;
    border-radius: 16px !important;
  }

  #taller-potential-reveal-hero,
  #taller-weight-reveal-hero,
  #briefing-status-section,
  #bespoke-parent-note-section,
  #briefing-actions-section,
  #expected-outcomes-section,
  #learning-step-1-style,
  #learning-step-2-strengths,
  #learning-step-3-weaknesses,
  #learning-step-4-careers,
  #learning-step-5-boost,
  #learning-step-6-remedy,
  #learning-step-7-items,
  #learning-step-8-links,
  #learning-visual-brain-illustration-card,
  #learning-visual-charts-showcase,
  .bento-card {
    padding: 0.85rem 0.7rem !important;
    border-radius: 15px !important;
  }

  .weight-4stage-grid,
  .briefing-status-grid,
  .home-dual-report-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  #results-dashboard .growth-stats-grid,
  #learning-bento-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.45rem !important;
  }

  #results-dashboard .growth-stats-grid .stat-card,
  #learning-bento-stats-grid > div {
    padding: 0.68rem 0.48rem !important;
    border-radius: 13px !important;
  }

  .prescription-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.8rem 0.7rem !important;
    gap: 0.6rem !important;
  }

  .prescription-banner .report-mode-switcher {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .prescription-retest-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.55rem 0.35rem !important;
    font-size: 0.8rem !important;
  }
}

/* ============================================================================
   27. APP DOWNLOAD BANNER, HEADER BUTTON & PWA INSTALL MODAL
   ============================================================================ */

.app-download-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1.5px solid rgba(52, 211, 153, 0.75);
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.32) 0%, rgba(16, 185, 129, 0.32) 100%);
  color: #6EE7B7;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.32rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.22);
}

.app-download-header-btn:hover {
  background: linear-gradient(90deg, #0284C7 0%, #10B981 100%);
  color: #FFFFFF;
}

.hero-app-download-bar {
  max-width: 920px;
  margin: 0 auto 1.35rem;
  padding: 0.9rem 1.15rem;
  border-radius: 18px;
  border: 1.5px solid rgba(52, 211, 153, 0.45);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(6, 78, 59, 0.35) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  text-align: left;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.hero-app-download-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.hero-app-download-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid #38BDF8;
  flex-shrink: 0;
}

.hero-app-download-title {
  font-size: 0.96rem;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.hero-app-download-desc {
  font-size: 0.82rem;
  color: #CBD5E1;
  line-height: 1.4;
}

.hero-app-install-btn {
  border: none;
  background: linear-gradient(90deg, #0284C7 0%, #10B981 100%);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 0.72rem 1.15rem;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.32);
  transition: transform 0.15s ease;
}

.hero-app-install-btn:active {
  transform: scale(0.98);
}

.kidsfit-app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.kidsfit-app-modal-card {
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: #0B1120;
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  border-radius: 22px;
  padding: 1.25rem 1.1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  color: #FFFFFF;
  text-align: left;
}

.kidsfit-app-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

html[data-device-view="mobile"] .hero-app-download-bar,
@media (max-width: 820px) {
  .hero-app-download-bar {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.62rem 0.8rem !important;
    margin: 0 auto 1rem !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: none !important;
  }

  .app-download-header-btn {
    font-size: 0.73rem !important;
    padding: 0.28rem 0.58rem !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #E2E8F0 !important;
    box-shadow: none !important;
  }
}




