/* ==========================================================================
   Aromansa Biometric Scent Engine — Clinical Diagnostic Suite v4.0 (rPPG + FACS)
   PT Ruang Kode Digital (RKD)
   
   Bespoke Biomedical Luxury Aesthetic (Strict Anti-Slop Design System)
   ========================================================================== */

:root {
  --bg-sand: #F7F4EC;
  --bg-surface: #FFFFFF;
  --bg-card-tint: #F1ECE0;
  
  --pine-deep: #142017;
  --pine-slate: #202F24;
  --moss-primary: #37533E;
  --moss-light: #E4ECE5;
  --emerald-lock: #2A7E4B;
  
  --rppg-neon: #34D399;
  --rppg-glow: rgba(52, 211, 153, 0.25);
  
  --terracotta: #B35238;
  --terracotta-soft: #F7EAE6;
  --brass: #9E7A32;
  --brass-soft: #F4EEDB;
  
  --ink-900: #19201B;
  --ink-700: #3E4B40;
  --ink-400: #738076;
  --line-subtle: #DFD7C9;
  --line-medium: #C8BDB0;

  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-sand);
  color: var(--ink-900);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 4rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line-subtle);
  background: rgba(247, 244, 236, 0.96);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--pine-deep);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-subtitle,
.brand-suite-tag {
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--moss-primary);
  font-weight: 600;
  background: var(--moss-light);
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
}

.header-contact-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--moss-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--moss-light);
  border: 1px solid rgba(55, 83, 62, 0.15);
  transition: all 0.2s ease;
}

.header-contact-link:hover {
  background: #D5E2D7;
  color: var(--pine-deep);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-700);
  background: var(--bg-surface);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-subtle);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #A0AEC0;
  display: inline-block;
  transition: background-color 0.3s;
}

.status-dot.active {
  background: var(--emerald-lock);
  box-shadow: 0 0 0 3px rgba(42, 126, 75, 0.2);
}

/* Compact Instruction Bar */
.compact-bar {
  max-width: 1320px;
  margin: 1.25rem auto 0;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: 12px;
}

.compact-bar-text {
  font-size: 0.86rem;
  color: var(--ink-700);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.compact-bar-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brass);
  background: var(--brass-soft);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.btn-lock-toggle {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--line-medium);
  background: var(--pine-deep);
  color: #FFFFFF;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s;
  flex-shrink: 0;
}

.btn-lock-toggle:hover {
  background: var(--moss-primary);
}

/* Main Diagnostic Grid */
.main-wrapper {
  max-width: 1320px;
  margin: 1.25rem auto 0;
  padding: 0 1.5rem;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .diagnostic-grid {
    grid-template-columns: 1fr;
  }
}

/* Scanner Stage Viewport */
.scanner-viewport-card {
  background: #0B100C;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(20, 32, 23, 0.12);
  border: 1px solid rgba(20, 32, 23, 0.25);
  display: flex;
  flex-direction: column;
}

.viewport-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #060907;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cameraFeed {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: block;
}

#meshCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
  pointer-events: none;
}

/* HUD Overlay */
.viewport-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.15rem;
}

.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: rgba(247, 244, 236, 0.85);
  background: rgba(8, 12, 9, 0.75);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Live Emotion Badge */
.live-emotion-badge {
  align-self: center;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1.5px solid transparent;
}

.emotion-joy {
  background: rgba(245, 158, 11, 0.92);
  color: #1F2937;
  border-color: #FCD34D;
  transform: scale(1.04);
}

.emotion-gloom {
  background: rgba(99, 102, 241, 0.92);
  color: #FFFFFF;
  border-color: #C7D2FE;
}

.emotion-tense {
  background: rgba(220, 38, 38, 0.92);
  color: #FFFFFF;
  border-color: #FCA5A5;
  transform: scale(1.03);
}

.emotion-drowsy {
  background: rgba(139, 92, 246, 0.92);
  color: #FFFFFF;
  border-color: #DDD6FE;
}

.emotion-neutral {
  background: rgba(16, 185, 129, 0.88);
  color: #FFFFFF;
  border-color: #A7F3D0;
}

/* Reticle & Forehead rPPG Target */
.reticle-container {
  align-self: center;
  position: relative;
  width: 220px;
  height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Precision Optical Frame Corner Brackets */
.reticle-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(247, 244, 236, 0.45);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
  transition: all 0.3s ease;
}

.reticle-corner.top-left {
  top: -8px;
  left: -8px;
  border-width: 2px 0 0 2px;
  border-top-left-radius: 4px;
}

.reticle-corner.top-right {
  top: -8px;
  right: -8px;
  border-width: 2px 2px 0 0;
  border-top-right-radius: 4px;
}

.reticle-corner.bottom-left {
  bottom: -8px;
  left: -8px;
  border-width: 0 0 2px 2px;
  border-bottom-left-radius: 4px;
}

.reticle-corner.bottom-right {
  bottom: -8px;
  right: -8px;
  border-width: 0 2px 2px 0;
  border-bottom-right-radius: 4px;
}

.hud-center-guide {
  width: 100%;
  height: 100%;
  border: 1.5px solid rgba(158, 122, 50, 0.35);
  border-radius: 50% 50% 46% 46%;
  box-shadow: 0 0 0 9999px rgba(8, 12, 9, 0.25);
  position: absolute;
  inset: 0;
  transition: all 0.35s ease;
}

.hud-center-guide.scanning {
  border-color: var(--brass);
  box-shadow: 0 0 16px rgba(158, 122, 50, 0.35), 0 0 0 9999px rgba(8, 12, 9, 0.2);
}

.hud-center-guide.optimal-focus {
  border-color: var(--rppg-neon);
  border-width: 2px;
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.45), 0 0 0 9999px rgba(8, 12, 9, 0.16);
  animation: guideBreathing 3s infinite ease-in-out;
}

@keyframes guideBreathing {
  0%, 100% {
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.35), 0 0 0 9999px rgba(8, 12, 9, 0.16);
  }
  50% {
    box-shadow: 0 0 28px rgba(52, 211, 153, 0.55), 0 0 0 9999px rgba(8, 12, 9, 0.14);
  }
}

.hud-center-guide.locked {
  border-color: #38A169;
  border-width: 2.5px;
  box-shadow: 0 0 25px rgba(56, 161, 105, 0.5), 0 0 0 9999px rgba(8, 12, 9, 0.15);
}

/* Forehead rPPG Sensor Reticle (Visible on Video) */
.rppg-forehead-target {
  position: absolute;
  top: 18px;
  width: 85px;
  height: 38px;
  border: 1.5px dashed var(--rppg-neon);
  border-radius: 6px;
  background: rgba(52, 211, 153, 0.08);
  box-shadow: 0 0 12px var(--rppg-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.rppg-forehead-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--rppg-neon);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Floating Live ECG / Pulse Oscilloscope in Bottom Viewport */
.hud-pulse-dock {
  background: rgba(8, 12, 9, 0.88);
  border: 1px solid rgba(52, 211, 153, 0.35);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 92%;
  align-self: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  margin-bottom: 0.4rem;
}

.pulse-dock-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pulse-heart-icon {
  font-size: 1.3rem;
  color: #EF4444;
  animation: none;
  opacity: 0.65;
  transition: opacity 0.3s;
}

.pulse-heart-icon.pulsing {
  opacity: 1;
  animation: heartPulse 1.2s infinite ease-in-out;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.22); }
  30% { transform: scale(1.05); }
  45% { transform: scale(1.18); }
}

.pulse-bpm-val {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
}

.pulse-bpm-unit {
  font-size: 0.68rem;
  color: var(--rppg-neon);
  font-weight: 700;
  text-transform: uppercase;
}

.pulse-waveform-canvas {
  width: 140px;
  height: 34px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

/* Viewport Controls */
.viewport-footer {
  padding: 0.9rem 1.25rem;
  background: #141B16;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Dedicated Telemetry Status Console */
.telemetry-status-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(7, 11, 8, 0.92);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 8px;
  padding: 0.48rem 0.85rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.telemetry-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rppg-neon);
  box-shadow: 0 0 8px var(--rppg-neon);
  flex-shrink: 0;
  animation: telemetryPulse 1.6s infinite ease-in-out;
}

@keyframes telemetryPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.telemetry-status-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--rppg-neon);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(52, 211, 153, 0.12);
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.viewport-status-bar {
  font-size: 0.8rem;
  color: #E2E8F0;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-cam-start {
  background: var(--brass);
  color: #FFFFFF;
}

.btn-cam-start:hover {
  background: #AF8839;
}

.btn-cam-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #F7F4EC;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-cam-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Mobile Chest Acoustic Stethoscope CTA Box */
.mobile-chest-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  margin-top: 0.4rem;
  transition: all 0.25s ease;
}

.mobile-chest-cta-box:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(52, 211, 153, 0.35);
}

.mobile-cta-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-cta-icon {
  font-size: 1.4rem;
}

.mobile-cta-title {
  display: block;
  font-size: 0.82rem;
  color: #F7F4EC;
  font-weight: 700;
  line-height: 1.25;
}

.mobile-cta-sub {
  font-size: 0.72rem;
  color: rgba(247, 244, 236, 0.65);
  margin-top: 2px;
}

.btn-open-qr {
  background: var(--moss-primary);
  color: #FFFFFF;
  padding: 0.6rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid rgba(52, 211, 153, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-open-qr:hover {
  background: #257845;
  border-color: var(--rppg-neon);
  transform: translateY(-1px);
}

/* Modal Overlay & QR Code Box */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 12, 0.78);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: modalFadeIn 0.25s ease-out;
}

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

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  padding: 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: modalSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--moss-primary);
  background: var(--moss-light);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--pine-deep);
  font-weight: 700;
  margin-top: 0.35rem;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink-400);
  cursor: pointer;
  transition: color 0.15s;
}

.modal-close-btn:hover {
  color: var(--pine-deep);
}

.modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.qr-wrapper {
  background: #FFFFFF;
  padding: 1rem;
  border-radius: 16px;
  border: 1.5px solid var(--line-subtle);
  box-shadow: 0 6px 20px rgba(20, 32, 23, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 202px;
  height: 202px;
  margin: 0 auto;
}

#qrcodeCanvas {
  width: 170px;
  height: 170px;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

#qrcodeCanvas canvas,
#qrcodeCanvas img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 170px !important;
  height: 170px !important;
  max-width: 170px !important;
  max-height: 170px !important;
  border-radius: 6px;
  object-fit: contain !important;
}

.modal-instructions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  background: #F9F7F2;
  border-radius: 12px;
  padding: 0.95rem;
  border: 1px solid var(--line-subtle);
}

.instruction-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--ink-700);
  line-height: 1.45;
}

.instruction-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brass);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.modal-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--line-subtle);
  padding-top: 1rem;
}

.modal-sync-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--moss-primary);
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rppg-neon);
  box-shadow: 0 0 8px var(--rppg-neon);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}


/* ==========================================================================
   Clean Unified Consultation & Prescription Sheet (Apothecary Luxury)
   ========================================================================== */

.consultation-sheet {
  background: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: 0 12px 36px rgba(20, 32, 23, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.consultation-header {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.consultation-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.consultation-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss-primary);
  background: var(--moss-light);
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
}

.rx-timestamp {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-400);
}

.consultation-heading {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--pine-deep);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.consultation-desc {
  font-size: 0.88rem;
  color: var(--ink-700);
  line-height: 1.6;
}

/* 3 Essential Vitals Summary Tiles */
.vitals-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.vital-tile {
  background: #F8F6F1;
  border: 1px solid var(--line-subtle);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.vital-tile:hover {
  border-color: var(--line-medium);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 32, 23, 0.04);
}

.vital-tile-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-400);
}

.vital-tile-val-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.vital-tile-val {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--pine-deep);
  line-height: 1.05;
}

.vital-tile-unit {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--moss-primary);
  text-transform: uppercase;
}

.vital-tile-status {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-700);
}

/* Official Recommended Aromatherapy Oil Card */
.rx-recommendation-card {
  background: linear-gradient(145deg, #F6F2E9 0%, #EBE4D3 100%);
  border: 1px solid rgba(158, 122, 50, 0.3);
  border-radius: 16px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 6px 20px rgba(158, 122, 50, 0.08);
}

.rx-card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rx-badge-pill {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  background: var(--brass);
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
}

.rx-promo-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brass);
  letter-spacing: 0.05em;
}

.rx-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pine-deep);
  line-height: 1.35;
}

.rx-product-box {
  display: flex;
  gap: 1.25rem;
  background: #FFFFFF;
  border: 1px solid var(--line-subtle);
  border-radius: 14px;
  padding: 1.15rem;
  align-items: center;
  box-shadow: 0 4px 14px rgba(20, 32, 23, 0.03);
}

.rx-product-img-col {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  background: #F8F6F1;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rx-product-img-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rx-product-box:hover .rx-product-img-col img {
  transform: scale(1.04);
}

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

.rx-product-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pine-deep);
}

.rx-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.benefit-badge {
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--bg-card-tint);
  color: var(--ink-700);
  padding: 0.18rem 0.48rem;
  border-radius: 4px;
}

.rx-pricing-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 0.15rem;
  flex-wrap: wrap;
}

.price-strike {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-400);
  text-decoration: line-through;
}

.price-actual {
  font-family: var(--font-mono);
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--terracotta);
}

.discount-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  padding: 0.18rem 0.48rem;
  border-radius: 4px;
}

.btn-order-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: #25D366;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: 9px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: 0.45rem;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.28);
}

.btn-order-wa:hover {
  background: #20BD5A;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

/* Diagnostic Mode & Lock Badges (Compatibility) */
.lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: var(--bg-card-tint);
  color: var(--ink-700);
}

.lock-badge.locked {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid rgba(46, 125, 50, 0.2);
}

/* ==========================================================================
   Mobile-First High-Precision Responsive Polish (< 768px & < 480px)
   ========================================================================== */

@media (max-width: 768px) {
  body {
    padding-bottom: 2rem;
  }

  .main-wrapper {
    padding: 0 0.85rem;
    margin-top: 0.85rem;
  }

  .site-header {
    padding: 0.65rem 0.85rem;
  }

  .header-inner {
    padding: 0;
  }

  .brand-wrapper {
    gap: 0.4rem;
  }

  .brand-title {
    font-size: 1.35rem;
  }

  /* Compact Brand Subtitle on Mobile */
  .brand-subtitle {
    display: none;
  }

  .header-contact-link {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
  }

  /* Stage & Reticle Dimensions on Mobile (Avoids Reticle Collision) */
  .viewport-stage {
    aspect-ratio: 1 / 1;
    min-height: 330px;
    max-height: 400px;
  }

  .reticle-container {
    width: 165px;
    height: 215px;
  }

  .reticle-corner {
    width: 14px;
    height: 14px;
  }

  .live-emotion-badge {
    font-size: 0.76rem;
    padding: 0.35rem 0.85rem;
    margin-top: 0.15rem;
  }

  .hud-pulse-dock {
    width: 95%;
    padding: 0.45rem 0.75rem;
    margin-bottom: 0.2rem;
  }

  .pulse-bpm-val {
    font-size: 1.25rem;
  }

  .pulse-waveform-canvas {
    width: 110px;
    height: 28px;
  }

  /* Footer Controls & Stethoscope CTA on Mobile */
  .viewport-footer {
    padding: 0.85rem;
    gap: 0.6rem;
  }

  .footer-btn-row {
    flex-direction: row;
    gap: 0.5rem;
  }

  .btn-pill {
    flex: 1;
    justify-content: center;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
  }

  .mobile-chest-cta-box {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .mobile-cta-info {
    gap: 0.65rem;
  }

  .btn-open-qr {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.84rem;
  }

  /* Consultation Sheet on Mobile */
  .consultation-sheet {
    padding: 1.25rem 1rem;
    border-radius: 16px;
    gap: 1.15rem;
  }

  .consultation-heading {
    font-size: 1.25rem;
  }

  .consultation-desc {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  /* 3 Compact Vitals in a Single Beautiful Row! */
  .vitals-summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .vital-tile {
    padding: 0.65rem 0.5rem;
    border-radius: 10px;
    gap: 0.2rem;
    text-align: center;
    align-items: center;
  }

  .vital-tile-label {
    font-size: 0.62rem;
    letter-spacing: 0.02em;
  }

  .vital-tile-val-row {
    gap: 0.2rem;
  }

  .vital-tile-val {
    font-size: 1.35rem;
  }

  .vital-tile-unit {
    font-size: 0.65rem;
  }

  .vital-tile-status {
    font-size: 0.64rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Prescription Card on Mobile */
  .rx-recommendation-card {
    padding: 1.15rem 1rem;
    border-radius: 14px;
    gap: 0.85rem;
  }

  .rx-title {
    font-size: 1.1rem;
  }

  .rx-product-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem;
  }

  .rx-product-img-col {
    width: 78px;
    height: 78px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .rx-product-name {
    font-size: 0.98rem;
  }

  .rx-pricing-row {
    gap: 0.45rem;
  }

  .price-actual {
    font-size: 1.12rem;
  }

  .btn-order-wa {
    font-size: 0.84rem;
    padding: 0.75rem 1rem;
  }

  /* Catalog Filter & Search on Mobile */
  .catalog-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .catalog-filter-group {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.4rem;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    white-space: nowrap;
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  .search-box-wrapper {
    min-width: 100%;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }
}

/* Real Catalog Section from aromansa.id */
.catalog-section {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line-subtle);
  padding-top: 2.5rem;
}

.catalog-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.catalog-filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--line-subtle);
  background: var(--bg-surface);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink-700);
  transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--brass);
  color: #FFFFFF;
  border-color: var(--brass);
}

.search-box-wrapper {
  position: relative;
  min-width: 260px;
}

.search-input {
  width: 100%;
  padding: 0.5rem 0.85rem 0.5rem 2.2rem;
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  outline: none;
  background: var(--bg-surface);
}

.search-input:focus {
  border-color: var(--brass);
}

.search-icon-svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-400);
  pointer-events: none;
}

/* Product Cards Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.catalog-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(20, 32, 23, 0.06);
}

.card-top-image {
  width: 100%;
  height: 220px;
  background: #F8F6F1;
  position: relative;
  overflow: hidden;
}

.card-top-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  color: var(--ink-700);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--pine-deep);
  margin-bottom: 0.35rem;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--ink-700);
  line-height: 1.5;
  margin-bottom: 0.85rem;
  flex: 1;
}

.card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-subtle);
}

.card-price {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--brass);
}

.btn-card-buy {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--moss-primary);
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-card-buy:hover {
  background: var(--pine-deep);
}

/* Meta Footer */
.meta-footer {
  margin-top: 4rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.8rem;
  color: var(--ink-400);
}

.meta-footer a {
  color: var(--ink-700);
  text-decoration: none;
}
