:root {
  --bg-porcelain: #FAF9F7;
  --bg-porcelain-alt: #F3F2EE;
  --surface-card: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.90);
  --surface-subtle: #F7F6F2;
  --border-hairline: #E7E4DC;
  --border-active: #486658;
  --ink-primary: #1E242B;
  --ink-secondary: #535C66;
  --ink-muted: #7C858F;
  --accent-sage: #486658;
  --accent-sage-dark: #375045;
  --accent-sage-soft: #ECF2EF;
  --accent-champagne: #B59B78;
  --accent-champagne-soft: #F6F0E6;
  --shadow-soft: 0 10px 30px rgba(30, 36, 43, 0.045);
  --shadow-card: 0 4px 18px rgba(30, 36, 43, 0.035);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-porcelain);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.68;
  letter-spacing: 0.02em;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select {
  font-family: inherit;
}

/* Desktop Split Shell + Mobile Native Viewport */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: radial-gradient(circle at 15% 10%, #FDFCFA 0%, #FAF9F7 55%, #F3F4F5 100%);
}

/* Desktop Architectural Context Panel (Hidden on phones, shown >= 980px) */
.desktop-atelier-panel {
  display: none;
}

.counseling-viewport {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-porcelain);
  position: relative;
}

@media (min-width: 980px) {
  .app-shell {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 44px;
    padding: 32px 36px;
  }

  .desktop-atelier-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 380px;
    position: sticky;
    top: 32px;
    padding-top: 8px;
  }

  .counseling-viewport {
    width: 468px;
    max-width: 468px;
    min-height: calc(100dvh - 64px);
    border-radius: 30px;
    border: 1px solid var(--border-hairline);
    box-shadow: 0 22px 60px rgba(30, 36, 43, 0.075);
    overflow: hidden;
  }
}

/* Atelier Left Panel Cards */
.atelier-brand-eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-champagne);
  font-weight: 600;
}

.atelier-brand-title {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin: 4px 0 10px;
  color: var(--ink-primary);
}

.atelier-lead {
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin: 0;
  line-height: 1.8;
}

.atelier-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.atelier-card-title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-sage);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.atelier-spec-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.atelier-spec-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.55;
}

.spec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-champagne);
  margin-top: 7px;
  flex-shrink: 0;
}

/* Sticky Top Header inside Counseling Viewport */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 249, 247, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-hairline);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.1;
  color: var(--ink-primary);
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-sage-soft);
  color: var(--accent-sage);
  white-space: nowrap;
}

.mode-icon-btn {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  color: var(--ink-secondary);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.mode-icon-btn:hover {
  border-color: var(--accent-champagne);
  color: var(--ink-primary);
}

/* Global Progress Track */
.progress-track {
  width: 100%;
  height: 3px;
  background: #ECEAE3;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-sage) 0%, var(--accent-champagne) 100%);
  width: 25%;
  transition: width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Main Stage */
.viewport-main {
  flex: 1;
  padding: 20px 16px 28px;
  display: flex;
  flex-direction: column;
}

.step-screen {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeSlideUp 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.step-screen.is-active {
  display: flex;
}

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

/* Hero Intro Banner on Step 1 */
.welcome-hero {
  background: linear-gradient(155deg, #FFFFFF 0%, #F7F4EE 100%);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  box-shadow: var(--shadow-soft);
}

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-sage);
  background: var(--accent-sage-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.hero-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 8px;
  color: var(--ink-primary);
  word-break: auto-phrase;
  text-wrap: balance;
}

.hero-desc {
  font-size: 13px;
  color: var(--ink-secondary);
  margin: 0;
  line-height: 1.65;
}

/* Question Card Container */
.question-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.q-step-count {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-champagne);
}

.q-badge {
  font-size: 11px;
  color: var(--accent-sage);
  background: var(--accent-sage-soft);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.q-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.48;
  margin: 0;
  color: var(--ink-primary);
  word-break: auto-phrase;
}

.q-hint {
  font-size: 12px;
  color: var(--ink-muted);
  margin: -6px 0 0;
}

/* Selectable Option Cards */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.options-grid.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.option-card {
  appearance: none;
  width: 100%;
  text-align: left;
  background: var(--bg-porcelain);
  border: 1.2px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.18s ease;
  color: var(--ink-primary);
  min-height: 50px;
}

.option-card:hover {
  border-color: #C5BFB3;
  background: #FFFFFF;
}

.option-card.is-selected {
  background: var(--accent-sage-soft);
  border-color: var(--accent-sage);
  box-shadow: 0 2px 10px rgba(72, 102, 88, 0.08);
}

.option-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.option-sub {
  display: block;
  font-size: 11.5px;
  color: var(--ink-muted);
  font-weight: 400;
  margin-top: 2px;
}

.option-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.4px solid #C8C3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  color: transparent;
  background: #FFFFFF;
  transition: all 0.18s ease;
}

.option-card.is-selected .option-check {
  background: var(--accent-sage);
  border-color: var(--accent-sage);
  color: #FFFFFF;
}

.q-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

/* Buttons */
.btn-primary {
  appearance: none;
  border: none;
  background: var(--ink-primary);
  color: #FAF9F7;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.12s ease;
  text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-sage);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn-secondary {
  appearance: none;
  background: var(--surface-card);
  color: var(--ink-primary);
  border: 1px solid var(--border-hairline);
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  transition: all 0.18s ease;
}

.btn-secondary:hover {
  border-color: var(--accent-champagne);
  background: #FFFFFF;
}

.btn-ghost {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--ink-secondary);
  font-size: 13px;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: var(--radius-md);
}

.btn-ghost:hover {
  color: var(--ink-primary);
  background: rgba(30, 36, 43, 0.04);
}

/* Security Privacy Zero-Retention Badge */
.privacy-security-badge {
  background: linear-gradient(90deg, #F3F6F4 0%, #F7F5F0 100%);
  border: 1px solid #D8E2DC;
  border-radius: var(--radius-md);
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.55;
  color: #364B40;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.privacy-security-badge strong {
  font-weight: 600;
}

/* Step 2: Smart Scan Frame */
.scan-card {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.camera-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 390px;
  background: #EFECE6;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-stage video,
.camera-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-stage video.is-mirrored {
  transform: scaleX(-1);
}

.face-guide-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.guide-svg {
  width: 76%;
  height: 76%;
  opacity: 0.88;
}

.guide-caption {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  text-align: center;
  font-size: 11.5px;
  color: #FAF9F7;
  background: rgba(30, 36, 43, 0.62);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.preprocess-meta-pill {
  font-size: 11px;
  color: var(--accent-sage);
  background: var(--accent-sage-soft);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  text-align: center;
}

.scan-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.scan-row-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

/* Sales / Presentation Demo Sample Section */
.demo-box {
  background: var(--surface-subtle);
  border: 1px dashed #D3CEC2;
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-box-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-samples-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.demo-sample-btn {
  appearance: none;
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.demo-sample-btn:hover {
  border-color: var(--accent-champagne);
  box-shadow: 0 3px 12px rgba(30, 36, 43, 0.05);
}

.demo-thumb {
  width: 38px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-hairline);
}

.demo-sample-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.35;
}

.demo-sample-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Step 3: JEV Real-Time Scanning Animation */
.analyzing-stage {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 20px 16px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scan-beam-wrapper {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  background: #EFECE6;
}

.scan-beam-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.02);
}

.scan-laser-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #D9C3A3 25%, #FFFFFF 50%, #7EA693 75%, transparent 100%);
  box-shadow: 0 0 18px 4px rgba(181, 155, 120, 0.55);
  animation: scanSweep 2.1s ease-in-out infinite;
}

@keyframes scanSweep {
  0% {
    top: 6%;
    opacity: 0.4;
  }
  50% {
    top: 88%;
    opacity: 1;
  }
  100% {
    top: 6%;
    opacity: 0.4;
  }
}

.telemetry-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-porcelain);
  border: 1px solid var(--border-hairline);
  font-size: 12.5px;
  color: var(--ink-muted);
  transition: all 0.25s ease;
}

.telemetry-item.is-active {
  color: var(--ink-primary);
  border-color: var(--accent-champagne);
  background: var(--accent-champagne-soft);
}

.telemetry-item.is-done {
  color: var(--accent-sage);
  border-color: #C8DBD2;
  background: var(--accent-sage-soft);
}

.telemetry-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

/* Retake Notice Card */
.retake-card {
  background: #FFFDF9;
  border: 1px solid #E5D5BE;
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Step 4: Personalized Report & 3-Item Regimen */
.report-type-card {
  background: linear-gradient(160deg, #FFFFFF 0%, #F7F3EB 100%);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-eng-tag {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-champagne);
}

.report-type-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.42;
  margin: 0;
  color: var(--ink-primary);
}

.profile-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-chip {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-hairline);
  color: var(--ink-secondary);
}

.report-summary-text {
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin: 0;
  line-height: 1.72;
}

.counseling-advice-box {
  background: rgba(255, 255, 255, 0.82);
  border-left: 3px solid var(--accent-sage);
  padding: 11px 13px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 12.5px;
  color: var(--ink-primary);
  line-height: 1.68;
}

/* Result Photo + JEV Box Overlay Card */
.section-card {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 20px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--ink-primary);
  word-break: auto-phrase;
}

.section-en-sub {
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.result-photo-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  background: #EFECE6;
}

.result-photo-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.result-photo-frame.is-blurred img {
  filter: blur(15px);
  transform: scale(1.05);
}

.face-zones-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.face-zones-layer.is-hidden {
  opacity: 0;
}

.face-zones-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.photo-toggle-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toggle-chip-btn {
  appearance: none;
  background: var(--bg-porcelain);
  border: 1px solid var(--border-hairline);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
}

.toggle-chip-btn.is-active {
  background: var(--accent-sage-soft);
  border-color: var(--accent-sage);
  color: var(--accent-sage);
}

.zone-telemetry-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.zone-mini-card {
  background: var(--bg-porcelain);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
}

.zone-mini-name {
  display: block;
  font-size: 10.5px;
  color: var(--ink-secondary);
  font-weight: 600;
}

.zone-mini-prob {
  display: block;
  font-size: 10px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* SVG Radar Chart + 5-Axis Score Bars */
.radar-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.radar-svg {
  width: 100%;
  max-width: 330px;
  height: auto;
  overflow: visible;
}

.radar-axis-label {
  font-size: 11.5px;
  fill: var(--ink-secondary);
  font-weight: 500;
}

.radar-axis-score {
  font-size: 12px;
  fill: var(--accent-sage);
  font-weight: 700;
}

.radar-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: -4px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch-user {
  width: 12px;
  height: 3px;
  background: var(--accent-sage);
  border-radius: 2px;
}

.legend-swatch-ref {
  width: 12px;
  height: 0;
  border-top: 2px dashed #B9AA96;
}

.axis-bars-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.axis-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.axis-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
}

.axis-bar-name {
  font-weight: 500;
  color: var(--ink-primary);
}

.axis-bar-val {
  font-weight: 600;
  color: var(--accent-sage);
  font-size: 12px;
}

.axis-bar-track {
  width: 100%;
  height: 6px;
  background: #EFECE6;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.axis-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-sage) 0%, #7BA08E 100%);
  border-radius: var(--radius-pill);
}

/* Personalized 3-Item Recommendation Cards */
.recommendations-header-card {
  background: var(--ink-primary);
  color: #FAF9F7;
  border-radius: var(--radius-xl);
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rec-header-eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #D7C2A3;
}

.rec-header-title {
  font-size: 15.5px;
  font-weight: 600;
  margin: 0;
  word-break: auto-phrase;
}

.rec-header-cost {
  font-size: 12px;
  color: #D0D6DC;
  margin-top: 2px;
}

.product-card {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 20px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.slot-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-champagne-soft);
  color: #7D6545;
}

.product-class-tag {
  font-size: 11px;
  color: var(--ink-muted);
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
  color: var(--ink-primary);
}

.reason-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reason-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-sage-soft);
  color: var(--accent-sage);
  border: 1px solid #D3E2DA;
}

.reason-explanation {
  background: var(--bg-porcelain);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.65;
  margin: 0;
}

.ingredients-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ingredient-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #F3F1EC;
  color: var(--ink-secondary);
}

.feature-text {
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.68;
  margin: 0;
}

.cost-and-channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #F0EDE6;
  font-size: 12px;
  flex-wrap: wrap;
}

.daily-cost-strong {
  font-weight: 600;
  color: var(--ink-primary);
}

.channel-meta {
  font-size: 11px;
  color: var(--ink-muted);
}

.btn-amazon {
  appearance: none;
  text-decoration: none;
  background: var(--ink-primary);
  color: #FAF9F7;
  font-size: 13.5px;
  font-weight: 500;
  padding: 13px 16px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.btn-amazon:hover {
  background: var(--accent-sage);
}

/* Interactive Quick Re-Simulation Drawer inside Step 4 */
.retune-details {
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 12px 15px;
}

.retune-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.retune-details summary::-webkit-details-marker {
  display: none;
}

.retune-form-grid {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.retune-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 5px;
}

.retune-select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-porcelain);
  font-size: 13px;
  color: var(--ink-primary);
}

.retune-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-check-pill {
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: var(--bg-porcelain);
  color: var(--ink-secondary);
  cursor: pointer;
}

.mini-check-pill.is-selected {
  background: var(--accent-sage-soft);
  border-color: var(--accent-sage);
  color: var(--accent-sage);
  font-weight: 500;
}

/* OEM Mode Switcher Segment */
.mode-switch-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-radio-btn {
  appearance: none;
  text-align: left;
  background: var(--bg-porcelain);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.mode-radio-btn.is-active {
  background: var(--accent-sage-soft);
  border-color: var(--accent-sage);
}

.mode-radio-title {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-primary);
}

.mode-radio-desc {
  display: block;
  font-size: 11px;
  color: var(--ink-secondary);
  margin-top: 2px;
  line-height: 1.45;
}

/* Modal Sheet for OEM / Architecture Settings on Mobile */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(30, 36, 43, 0.38);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-sheet {
  width: 100%;
  max-width: 440px;
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  border: 1px solid var(--border-hairline);
  box-shadow: 0 18px 48px rgba(30, 36, 43, 0.16);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Mandatory Legal Disclaimer Footer */
.compliance-footer {
  padding: 18px 18px 26px;
  border-top: 1px solid var(--border-hairline);
  background: #F5F4F0;
  font-size: 11px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.compliance-footer p {
  margin: 0 0 6px;
}

.compliance-footer p:last-child {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
