/* ==========================================================================
   Love Calculator - Modern Romantic Stylesheet
   Pure CSS3 with custom variables, smooth animations, and mobile-first layout.
   ========================================================================== */

:root {
  --primary: #f43f5e;
  --primary-hover: #e11d48;
  --primary-active: #be123c;
  --primary-light: #ffe4e6;
  --primary-gradient: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #e11d48 100%);
  --surface-gradient: linear-gradient(180deg, #fff5f5 0%, #fff1f2 50%, #ffe4e6 100%);
  
  --bg-color: #fff5f7;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(244, 63, 94, 0.16);
  --card-shadow: 0 20px 40px -15px rgba(225, 29, 72, 0.12), 0 0 1px 1px rgba(225, 29, 72, 0.08);
  
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --text-heading: #881337;
  
  --input-bg: #ffffff;
  --input-border: #fecdd3;
  --input-focus: #f43f5e;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;
  
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Theme Variables */
[data-theme="dark"] {
  --bg-color: #0f0a12;
  --surface-gradient: linear-gradient(180deg, #160c18 0%, #1e0e22 50%, #25102a 100%);
  --card-bg: rgba(26, 15, 30, 0.88);
  --card-border: rgba(244, 63, 94, 0.25);
  --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(244, 63, 94, 0.2);
  
  --text-main: #f3f4f6;
  --text-muted: #d1d5db;
  --text-light: #9ca3af;
  --text-heading: #fecdd3;
  
  --input-bg: #1f1224;
  --input-border: rgba(244, 63, 94, 0.3);
  --input-focus: #fb7185;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--surface-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: background var(--transition-smooth), color var(--transition-smooth);
}

/* Background Animated Canvas */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* Container Constraint */
.app-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Navigation */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0 1.5rem;
  border-bottom: 1px solid rgba(244, 63, 94, 0.12);
  margin-bottom: 1.5rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 1.1rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.icon-btn:hover, .icon-btn:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  outline: none;
}

/* Hero Intro */
.hero-intro {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.15;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

.main-title .highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-description {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  max-width: 580px;
  margin: 0 auto;
  text-wrap: balance;
}

/* Calculator Main Layout Grid */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .calculator-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }
}

/* Main Interactive Card */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

@media (max-width: 480px) {
  .card {
    padding: 1.5rem 1.15rem;
    border-radius: var(--radius-lg);
  }
}

/* Inputs Layout */
.names-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.inputs-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

@media (min-width: 640px) {
  .inputs-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
  }
}

.input-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-counter {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 400;
}

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

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--primary);
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.8;
}

.name-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  font-size: 1.05rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.name-input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15);
}

.name-input.is-invalid {
  border-color: var(--error);
  background-color: rgba(239, 68, 68, 0.03);
}

.field-error-msg {
  font-size: 0.78rem;
  color: var(--error);
  min-height: 1.1rem;
  padding-left: 0.25rem;
  display: block;
}

/* Center Heart Divider */
.heart-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0;
}

.heart-divider-btn {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(244, 63, 94, 0.2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
  transition: transform var(--transition-fast), background var(--transition-fast);
  cursor: default;
}

.heart-divider-btn.pulse {
  animation: heartPulse 1.8s infinite ease-in-out;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Sample Suggestions */
.quick-try-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.82rem;
}

.quick-try-label {
  color: var(--text-muted);
}

.sample-chip {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.15);
  color: var(--primary-hover);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.sample-chip:hover, .sample-chip:focus-visible {
  background: var(--primary);
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

/* Form Actions */
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 480px) {
  .form-actions {
    flex-direction: row;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(244, 63, 94, 0.45);
  flex: 2;
}

.btn-primary:hover, .btn-primary:focus-visible {
  box-shadow: 0 12px 24px -4px rgba(244, 63, 94, 0.55);
  transform: translateY(-2px);
  outline: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--input-border);
  flex: 1;
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  background: rgba(244, 63, 94, 0.06);
  color: var(--text-main);
  border-color: var(--primary);
  outline: none;
}

.btn-icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* Disclaimer text */
.disclaimer-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.4;
}

/* ==========================================================================
   Result Screen Presentation
   ========================================================================== */
.result-section {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.result-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.result-card {
  text-align: center;
  padding: 2.25rem 2rem;
  position: relative;
}

.couple-names-header {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.couple-names-header .partner-name {
  color: var(--text-main);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.couple-names-header .love-ampersand {
  color: var(--primary);
  font-size: 1.3rem;
}

/* Gauge / Big Heart Display */
.gauge-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-gauge {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg-circle {
  fill: none;
  stroke: rgba(244, 63, 94, 0.12);
  stroke-width: 10;
}

.gauge-fill-circle {
  fill: none;
  stroke: url(#scoreGrad);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 565;
  stroke-dashoffset: 565;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gauge-center-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.heart-beating-icon {
  font-size: 2.5rem;
  margin-bottom: -0.25rem;
  filter: drop-shadow(0 4px 10px rgba(244, 63, 94, 0.35));
  animation: heartPulse 1.4s infinite ease-in-out;
}

.percentage-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.percentage-symbol {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
  margin-left: 2px;
}

/* Category Message & Tier */
.score-badge-wrap {
  margin-bottom: 0.75rem;
}

.score-tier-title {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.compatibility-message {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 1.25rem;
  line-height: 1.35;
  text-wrap: balance;
}

/* Breakdown meters */
.metrics-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(244, 63, 94, 0.04);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(244, 63, 94, 0.1);
  margin-bottom: 1.75rem;
}

@media (max-width: 520px) {
  .metrics-breakdown {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    text-align: left;
  }
  .metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-hover);
  font-variant-numeric: tabular-nums;
}

/* Result Buttons */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.result-actions .btn {
  flex: 1 1 calc(50% - 0.75rem);
  min-width: 140px;
}

@media (max-width: 480px) {
  .result-actions .btn {
    flex: 1 1 100%;
  }
}

/* ==========================================================================
   Side Panel: History & FAQs
   ========================================================================== */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.side-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
}

.side-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(244, 63, 94, 0.1);
}

.side-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.clear-history-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.clear-history-btn:hover {
  color: var(--error);
}

.history-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.history-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0;
  font-style: italic;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: rgba(244, 63, 94, 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(244, 63, 94, 0.08);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.history-item:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: var(--primary);
  transform: translateX(2px);
}

.history-names {
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

.history-score {
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item details {
  background: rgba(244, 63, 94, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(244, 63, 94, 0.08);
  overflow: hidden;
  transition: background var(--transition-fast);
}

.faq-item summary {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
  outline: none;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.1rem;
  color: var(--primary);
  transition: transform var(--transition-fast);
}

.faq-item details[open] summary::after {
  content: "−";
}

.faq-content {
  padding: 0 1rem 0.85rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  padding: 2rem 0 1rem;
  text-align: center;
  border-top: 1px solid rgba(244, 63, 94, 0.12);
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-light);
  font-size: 0.78rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-main);
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Canvas Confetti overlay */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

/* Hidden canvas for image generation */
#card-canvas {
  display: none;
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   Mobile Fixed-Screen Mode & Drawer Modal (max-width: 899px)
   Prevents entire page scrolling on phones; everything fits cleanly on one screen.
   ========================================================================== */
.mobile-drawer-btn {
  display: none;
}

@media (max-width: 899px) {
  html, body {
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    touch-action: manipulation;
  }

  .app-container {
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    padding: 0.35rem 0.65rem 0.35rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .site-header {
    padding: 0.2rem 0 0.35rem !important;
    margin-bottom: 0.25rem !important;
  }

  .brand-lockup {
    font-size: 1.05rem !important;
    gap: 0.4rem !important;
  }

  .brand-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.95rem !important;
  }

  .icon-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.95rem !important;
  }

  .mobile-drawer-btn {
    display: inline-flex !important;
  }

  .hero-intro {
    margin-bottom: 0.35rem !important;
    padding: 0 !important;
  }

  .badge-tag {
    display: none !important;
  }

  .main-title {
    font-size: 1.25rem !important;
    margin-bottom: 0.15rem !important;
    line-height: 1.15 !important;
  }

  .hero-description {
    font-size: 0.76rem !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .calculator-grid {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    margin-bottom: 0 !important;
    gap: 0 !important;
    min-height: 0 !important;
  }

  .calculator-main-col {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 0 !important;
  }

  /* Card compact styling on mobile */
  .card {
    padding: 0.75rem 0.85rem !important;
    border-radius: var(--radius-lg) !important;
    max-height: calc(100dvh - 125px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: 0 8px 24px -4px rgba(225, 29, 72, 0.12) !important;
  }

  .names-form {
    gap: 0.55rem !important;
  }

  .inputs-row {
    gap: 0.25rem !important;
  }

  .input-field-group {
    gap: 0.15rem !important;
  }

  .field-label {
    font-size: 0.78rem !important;
  }

  .char-counter {
    display: none !important;
  }

  .name-input {
    padding: 0.5rem 0.75rem 0.5rem 2.1rem !important;
    font-size: 0.95rem !important;
    border-radius: var(--radius-sm) !important;
  }

  .input-icon {
    left: 0.75rem !important;
    font-size: 0.9rem !important;
  }

  .field-error-msg {
    min-height: 0.85rem !important;
    font-size: 0.7rem !important;
  }

  .heart-divider {
    padding: 0 !important;
  }

  .heart-divider-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.9rem !important;
  }

  .quick-try-wrap {
    padding: 0.15rem 0 !important;
    gap: 0.3rem !important;
    font-size: 0.72rem !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .quick-try-wrap::-webkit-scrollbar {
    display: none;
  }

  .quick-try-label {
    white-space: nowrap !important;
    font-size: 0.7rem !important;
  }

  .sample-chip {
    padding: 0.18rem 0.45rem !important;
    font-size: 0.7rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .form-actions {
    flex-direction: row !important;
    gap: 0.45rem !important;
    margin-top: 0.15rem !important;
  }

  .btn {
    padding: 0.6rem 0.85rem !important;
    font-size: 0.88rem !important;
    border-radius: var(--radius-sm) !important;
  }

  .btn-primary {
    flex: 2 !important;
  }

  .btn-secondary {
    flex: 1 !important;
  }

  .disclaimer-note {
    font-size: 0.7rem !important;
    margin-top: 0.3rem !important;
    line-height: 1.2 !important;
  }

  /* Result screen compact styling on mobile */
  .result-card {
    padding: 0.75rem 0.85rem !important;
  }

  .couple-names-header {
    font-size: 1.1rem !important;
    margin-bottom: 0.35rem !important;
    gap: 0.35rem !important;
  }

  .couple-names-header .partner-name {
    max-width: 130px !important;
  }

  .gauge-container {
    width: 125px !important;
    height: 125px !important;
    margin: 0 auto 0.35rem !important;
  }

  .heart-beating-icon {
    font-size: 1.5rem !important;
    margin-bottom: -0.25rem !important;
  }

  .percentage-number {
    font-size: 1.9rem !important;
  }

  .percentage-symbol {
    font-size: 1rem !important;
  }

  .score-badge-wrap {
    margin-bottom: 0.15rem !important;
  }

  .score-tier-title {
    font-size: 0.72rem !important;
    margin-bottom: 0.1rem !important;
  }

  .compatibility-message {
    font-size: 0.95rem !important;
    margin-bottom: 0.4rem !important;
    line-height: 1.2 !important;
  }

  .metrics-breakdown {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.3rem !important;
    padding: 0.35rem 0.45rem !important;
    margin-bottom: 0.5rem !important;
    text-align: center !important;
  }

  .metric-item {
    gap: 0 !important;
  }

  .metric-label {
    font-size: 0.65rem !important;
  }

  .metric-value {
    font-size: 0.85rem !important;
  }

  .result-actions {
    gap: 0.35rem !important;
  }

  .result-actions .btn {
    flex: 1 1 calc(50% - 0.35rem) !important;
    min-width: 0 !important;
    padding: 0.5rem 0.55rem !important;
    font-size: 0.78rem !important;
  }

  /* Hide Desktop side-panel on mobile so it doesn't cause vertical scrolling */
  .side-panel {
    display: none !important;
  }

  .site-footer {
    padding: 0.2rem 0 !important;
    border-top: none !important;
    font-size: 0.7rem !important;
    line-height: 1.15 !important;
  }

  .footer-links {
    display: none !important;
  }

  .footer-privacy-badge {
    display: none !important;
  }
}

/* Modal Overlay & Card for Mobile Drawer */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-height: 80dvh;
  background: var(--card-bg);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(244, 63, 94, 0.15);
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
}

.modal-body {
  padding: 1rem 1.1rem 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

