/* BeautyIQ — PWA Prontuario Makeup Artist */
/* Mobile-first, offline, WCAG AA contrast */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Aligned to DESIGN.md — cool-neutral palette (Cool-Neutral Rule), teal = action, rosa = brand voice */
  --bg: #f4f5f7;            /* BG Grigio Fresco — cool, not cream */
  --bg-card: #ffffff;
  --text: #16181d;          /* Testo Inchiostro */
  --text-light: #4d5562;    /* Testo Ardesia */
  --accent: #0c7a74;        /* Teal Fiducia — action/CTA voice */
  --accent-light: #0a5f5a;  /* Teal hover/darker */
  --rose: #c43f63;          /* Rosa Confidente — brand voice */
  --rose-light: rgba(196, 63, 99, 0.10); /* light rosa tint (borders/hover) */
  --rose-bg: #eef8f6;       /* Surface Menta — soft info tint */
  --green: #5B8C5A;
  --red: #C0392B;
  --border: #d6dee6;        /* Linea — cool */
  --shadow: rgba(15, 23, 42, 0.12); /* cool ambient */
  --nav-height: 64px;
  --search-height: 52px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

/* Accessibility — visible keyboard focus ring (DESIGN.md §5) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: calc(var(--nav-height) + 16px + constant(safe-area-inset-bottom));
  padding-bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

input, textarea, select, [contenteditable] {
  -webkit-user-select: auto;
  user-select: auto;
  -webkit-touch-callout: default;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: calc(var(--nav-height) + 16px + constant(safe-area-inset-bottom));
  padding-bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

input, textarea, select, [contenteditable] {
  -webkit-user-select: auto;
  user-select: auto;
  -webkit-touch-callout: default;
}

/* ─── Splash Screen ─── */

#splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--bg) 0%, var(--rose-bg) 50%, #cceee9 100%);
  opacity: 1;
  transition: opacity 0.8s ease-out;
}

#splash.fade-out {
  opacity: 0;
  pointer-events: none;
}

#splash .splash-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin-bottom: 1.1rem;
  border-radius: 28px;
  filter:
    drop-shadow(0 18px 36px rgba(15, 23, 42, 0.32))
    drop-shadow(0 4px 10px rgba(15, 23, 42, 0.18));
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.1s forwards, pulse 2.6s ease-in-out 1.1s infinite;
}

#splash .splash-title {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.3s forwards;
}

#splash .splash-tagline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.45s forwards;
}

#splash .splash-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.65s forwards;
}

#splash .splash-dedication {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-light);
  margin-top: 1rem;
  max-width: 280px;
  text-align: center;
  font-style: italic;
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.9s forwards;
}

#splash .splash-tap {
  position: absolute;
  bottom: 2.75rem;
  left: 0;
  right: 0;
  width: fit-content;
  margin: 0 auto;
  min-width: 220px;
  padding: 0.95rem 2.4rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg-card);
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25), 0 2px 6px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.8s ease-out 1.5s forwards;
  transition: box-shadow 0.15s ease;
}

#splash .splash-tap:hover,
#splash .splash-tap:active {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.3), 0 3px 8px rgba(15, 23, 42, 0.15);
}

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

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Offline Banner ─── */

#offline-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#offline-banner.visible {
  display: block;
}

/* ─── Personalization Modal ─── */

#personalize-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  border: none;
  background: rgba(15, 23, 42, 0.5);
  padding: 0;
  max-width: 100vw;
  max-height: 100vh; /* fallback for browsers without dvh */
  max-height: 100dvh; /* iOS Safari: exclude dynamic toolbar from viewport height */
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
}

#personalize-modal[open],
#personalize-modal.visible {
  display: flex;
}

#personalize-modal::backdrop {
  background: rgba(15, 23, 42, 0.5);
}

.modal-content {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  width: 90%;
  max-width: 340px;
  box-shadow: 0 8px 32px var(--shadow);
}

.modal-content h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.modal-content label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.3rem;
  margin-top: 1rem;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem; /* ≥16px: sotto questa soglia iOS zooma il viewport al focus */
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
}

.modal-content input:focus,
.modal-content textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 122, 116, 0.15);
}

.modal-content textarea {
  height: 80px;
  resize: none;
}

.modal-content button {
  margin-top: 1.5rem;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-content button:hover {
  background: var(--accent-light);
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.modal-actions button {
  margin-top: 0;
  flex: 1;
}

.modal-content .modal-skip {
  background: transparent;
  color: var(--text-light);
  border: 1.5px solid var(--border);
}

.modal-content .modal-skip:hover {
  background: var(--bg);
  color: var(--text);
}

/* ─── Header ─── */

#app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 0;
}

.install-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--rose-bg);
}

.install-banner.visible {
  display: flex;
}

.install-banner-copy {
  min-width: 0;
}

.install-banner-eyebrow {
  margin-bottom: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.install-banner-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.install-banner-text {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.45;
  white-space: pre-line;
}

.install-steps {
  margin: 8px 0 0 18px;
  padding: 0;
  color: var(--text);
  font-size: 0.81rem;
  line-height: 1.45;
}

.install-steps li + li {
  margin-top: 4px;
}

.install-banner-helper {
  margin-top: 8px;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-light);
}

.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.install-btn-primary,
.install-btn-secondary {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.install-btn-primary {
  border: none;
  background: var(--accent);
  color: #fff;
}

.install-btn-secondary {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-light);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 8px;
}

.header-top h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 0 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

#header-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.18);
}

.header-menu {
  position: absolute;
  top: calc(100% - 2px);
  right: 16px;
  left: 16px;
  z-index: 130;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 30px var(--shadow);
  padding: 14px;
  padding-bottom: calc(16px + var(--nav-height) + env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 96px - var(--nav-height) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.menu-group + .menu-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.menu-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.menu-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  flex: 0 0 auto;
}

.profile-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--text);
}

.profile-text strong {
  font-size: 0.95rem;
}

.profile-text span {
  font-size: 0.78rem;
  color: var(--text-light);
}

#lang-switcher {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover {
  border-color: var(--accent);
}

.lang-btn.active {
  background: var(--rose-bg);
  border-color: var(--accent);
  color: var(--accent);
}

.flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-name {
  min-width: 0;
}

/* Role switcher — consumer vs beauty-advisor. Two buttons side by side,
   same visual language as the language switcher so the pattern is
   recognisable. Active state is the accent-tinted fill that lang-btn
   uses, so the user reads it as "this is your current selection". */
#role-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.role-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.role-btn:hover {
  border-color: var(--accent);
}

.role-btn.active {
  background: var(--rose-bg);
  border-color: var(--accent);
  color: var(--accent);
}

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

.menu-link-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.menu-link-button::after {
  content: "↗";
  color: var(--text-light);
  font-size: 0.85rem;
}

.menu-link-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.brands-intro {
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.favorites-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.favorite-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 8px var(--shadow);
}

.favorite-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.favorite-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.favorite-card-text,
.favorites-empty {
  font-size: 0.88rem;
  color: var(--text-light);
}

.favorite-jump,
.favorite-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.favorite-external::after,
.favorite-jump::after {
  content: "↗";
  font-size: 0.8rem;
}

.usage-status {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(196, 63, 99, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(252, 232, 238, 0.92), rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 32px -24px rgba(28, 26, 23, 0.28);
}

.usage-status strong,
.usage-status span {
  display: block;
}

.usage-status strong {
  color: var(--accent);
  font-size: 0.95rem;
}

.usage-status span {
  margin-top: 0.15rem;
  color: var(--text-light);
  font-size: 0.82rem;
  line-height: 1.45;
}

.usage-status-paid {
  border-color: rgba(12, 122, 116, 0.22);
  background: linear-gradient(135deg, rgba(232, 249, 247, 0.92), rgba(255, 255, 255, 0.96));
}

.usage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.usage-chips span {
  margin: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
}

.usage-paywall-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(18, 24, 32, 0.52);
  backdrop-filter: blur(8px);
}

.usage-paywall-card {
  position: relative;
  width: min(100%, 420px);
  padding: 1.35rem;
  border-radius: 14px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 24px 80px -32px rgba(18, 24, 32, 0.55);
}

.usage-paywall-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(196, 63, 99, 0.08);
  color: var(--accent);
  cursor: pointer;
  font-size: 1.2rem;
}

.usage-paywall-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  margin: 0 auto 0.75rem;
  border-radius: 999px;
  background: rgba(196, 63, 99, 0.12);
}

.usage-paywall-card h3 {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.1;
}

.usage-paywall-card p {
  margin: 0.7rem 0 1rem;
  color: var(--text-light);
  line-height: 1.55;
}

.usage-paywall-primary,
.usage-paywall-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.usage-paywall-primary {
  background: var(--accent);
  color: #ffffff;
}

.usage-paywall-primary:disabled {
  cursor: wait;
  opacity: 0.78;
}

.usage-paywall-message {
  min-height: 1.1rem;
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.usage-paywall-secondary {
  margin-top: 0.6rem;
  border: 1px solid rgba(196, 63, 99, 0.28);
  background: #ffffff;
  color: var(--accent);
}

.favorite-toggle {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}

.favorite-toggle.active {
  background: #fff3c9;
  border-color: var(--accent);
  color: var(--accent);
}

.item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.item-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--rose-bg);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
}

.brand-players-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.brand-player-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 8px var(--shadow);
  text-decoration: none;
}

.brand-player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.brand-player-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.brand-player-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--rose-bg);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
}

.brand-player-text {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.brand-player-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
}

.brand-player-action::after {
  content: "↗";
  font-size: 0.8rem;
}

.brand-player-card:hover {
  border-color: var(--accent);
}

.setup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.setup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 8px var(--shadow);
}

.setup-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.setup-title-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setup-card-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.setup-icon {
  font-size: 1.2rem;
}

.setup-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.setup-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
}

.setup-list li:last-child {
  border-bottom: none;
}

.setup-list strong {
  color: var(--text);
}

.client-card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 8px var(--shadow);
}

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

.client-field {
  display: block;
  margin-bottom: 12px;
}

.client-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-light);
}

.client-field input,
.client-field select,
.client-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
}

.client-field textarea {
  min-height: 96px;
  resize: vertical;
}

/* ─── Client Archive ─── */

.client-archive {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px var(--shadow);
}

.client-archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.client-archive-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.client-new-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.client-new-btn:hover {
  background: var(--accent-light);
}

.client-search {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  background: var(--bg);
  margin-bottom: 10px;
}

.client-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 122, 116, 0.15);
}

.client-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.client-archive-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 0.88rem;
  padding: 16px;
  font-style: italic;
}

.client-list-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: var(--font-body);
  width: 100%;
}

.client-list-item:hover {
  border-color: var(--accent-light);
}

.client-list-item.active {
  background: var(--rose-bg);
  border-color: var(--accent);
}

.client-list-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.client-list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.client-chip {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-light);
}

.client-list-date {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-left: auto;
}

.client-timestamps {
  font-size: 0.75rem;
  color: var(--text-light);
  margin: 8px 0;
  font-style: italic;
}

.btn-danger {
  background: #FFF0EE !important;
  border-color: #C0392B !important;
  color: #C0392B !important;
}

.btn-danger:hover {
  background: #C0392B !important;
  color: #fff !important;
}

/* ─── Needs (customer questions) ─── */

.needs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.need-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.need-chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.need-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.need-chip-icon {
  font-size: 1.1rem;
}

.need-answer-card {
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 8px;
  box-shadow: 0 4px 16px var(--shadow);
  animation: needFadeIn 0.25s ease-out;
}

@keyframes needFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.need-answer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.need-answer-icon {
  font-size: 1.6rem;
}

.need-answer-header h3 {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  margin: 0;
}

.need-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 4px;
}

.need-close:hover {
  color: var(--text);
  background: var(--bg);
}

.need-answer-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 14px 0;
}

.need-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.need-action {
  padding: 8px 14px;
  background: var(--rose-bg);
  border: 1px solid var(--rose-light);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.15s;
}

.need-action:hover {
  background: var(--accent);
  color: #fff;
}

/* ─── Contextual section CTAs (content → feature next-step) ─── */
/* Ghost/secondary teal link: gentle next step, not a hard sell. DESIGN.md:
   teal voice, radius 8px, ≥44px touch target, no warm tints, no stripes. */
.section-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.section-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.section-cta:hover,
.section-cta:focus-visible {
  background: var(--accent);
  color: #fff;
}

/* Quiet variant: borderless ghost link (used as the discreet looks hook). */
.section-cta-quiet {
  border-color: transparent;
  padding: 10px 4px;
}

.section-cta-quiet:hover,
.section-cta-quiet:focus-visible {
  background: transparent;
  color: var(--accent-light);
  text-decoration: underline;
}

.shade-inspire-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* ─── Virtual Try-On hero (home focal point) ─── */
.tryon-hero {
  border: none;
  background: none;
  padding: 0;
  box-shadow: none;
}

.tryon-hero-inner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 30px 26px;
  background: linear-gradient(135deg, #0c7a74 0%, #0a5f5a 58%, #08433f 100%);
  color: #fff;
  box-shadow: 0 14px 36px rgba(12, 122, 116, 0.30);
}

/* soft radial glow, decorative */
.tryon-hero-inner::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(174, 233, 227, 0.35), transparent 65%);
  pointer-events: none;
}

.tryon-hero-eyebrow {
  position: relative;
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #aee9e3;
  margin-bottom: 12px;
}

.tryon-hero-title {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5.2vw, 2.15rem);
  line-height: 1.12;
  color: #fff;
  margin-bottom: 10px;
}

.tryon-hero-sub {
  position: relative;
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.98rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.tryon-hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tryon-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 24px;
  border-radius: 11px;
  background: #fff;
  color: #0a5f5a;
  font-weight: 800;
  font-size: 1.02rem;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tryon-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

/* ─── Shade Compare ─── */

.shade-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shade-result-card.comparing {
  border-color: var(--accent);
  background: var(--rose-bg);
}

.shade-result-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.shade-result-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.shade-tryon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--accent);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.15s;
}

.shade-tryon-btn:hover {
  border-color: var(--accent);
  background: var(--rose-bg);
  transform: scale(1.05);
}

.shade-compare-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.shade-compare-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.shade-compare-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.compare-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 16px;
  animation: needFadeIn 0.2s ease-out;
}

.compare-modal {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 20px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.compare-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.compare-modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
  margin: 0;
}

.compare-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.compare-side {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
}

.compare-brand {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.compare-shade {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.compare-category {
  font-size: 0.72rem;
  color: var(--text-light);
}

.compare-price {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 700;
  margin-top: 4px;
}

.compare-vs {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-light);
  text-align: center;
}

.compare-match {
  background: #eef8f6;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 14px;
}

.compare-match.warning {
  background: rgba(255, 211, 111, 0.18);
  border-color: var(--border);
  color: var(--text);
}

.compare-actions {
  display: flex;
  justify-content: flex-end;
}

.compare-clear {
  padding: 8px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
}

.compare-clear:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Cross-sell ─── */

.crosssell-card {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px dashed var(--rose-light);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 12px;
}

.crosssell-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
  margin: 0 0 10px 0;
  font-weight: 600;
}

.crosssell-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crosssell-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
}

.crosssell-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.crosssell-body h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px 0;
}

.crosssell-body p {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.4;
}

/* ─── Wizard ─── */

.wizard-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px;
  box-shadow: 0 2px 8px var(--shadow);
}

.wizard-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.wizard-progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.wizard-step-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px 0;
}

.wizard-question {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px 0;
}

.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.wizard-option {
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.wizard-option:hover {
  border-color: var(--accent-light);
  background: var(--rose-bg);
}

.wizard-option.selected {
  border-color: var(--accent);
  background: var(--rose-bg);
  color: var(--accent);
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.wizard-btn-back,
.wizard-btn-next {
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.wizard-btn-next {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.wizard-btn-next:hover {
  background: var(--accent-light);
}

.wizard-btn-back:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Wizard result */

.wizard-result {
  padding: 20px 18px;
}

.wizard-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.wizard-result-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin: 0;
}

.wizard-btn-reset {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 10px 14px;
  min-height: 44px;
}

.wizard-btn-reset:hover {
  color: var(--accent);
}

.wizard-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.wizard-chip {
  font-size: 0.78rem;
  color: var(--text-light);
  padding: 4px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.wizard-chip strong {
  color: var(--text);
  margin-right: 4px;
}

.wizard-recs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.wizard-rec {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #eef8f6;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.wizard-rec-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.wizard-rec-body h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin: 0 0 4px 0;
  color: var(--accent);
}

.wizard-rec-body p {
  font-size: 0.88rem;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

.wizard-actions-result {
  display: flex;
  gap: 8px;
}

.wizard-btn-save-client,
.wizard-btn-copy {
  flex: 1;
  padding: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.wizard-btn-save-client {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.wizard-btn-save-client:hover {
  background: var(--accent-light);
}

.wizard-btn-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Shade Finder ─── */

.shade-finder-intro {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.shade-cat-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.shade-cat-tabs::-webkit-scrollbar { display: none; }

.shade-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}

.shade-cat-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.shade-cat-btn:not(.active):hover {
  border-color: var(--accent);
  color: var(--accent);
}

.shade-cat-icon {
  font-size: 1rem;
}

.shade-finder-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px var(--shadow);
}

.shade-mode-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--bg);
  border-radius: 8px;
  padding: 3px;
}

.shade-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.shade-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: 0 1px 4px var(--shadow);
}

.shade-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.shade-field {
  display: block;
}

.shade-field span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-light);
}

.shade-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234d5562' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.shade-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 122, 116, 0.15);
}

.shade-field select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shade-find-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.shade-find-btn:hover {
  background: var(--accent-light);
}

.shade-results {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.shade-answer-card {
  padding: 12px 14px;
  border: 1px solid rgba(12, 122, 116, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(204, 238, 233, 0.72), rgba(244, 245, 247, 0.92));
}

.shade-answer-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
}

.shade-answer-card strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.25;
}

.shade-answer-card p {
  margin: 5px 0 0;
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.35;
}

.shade-result-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.shade-result-card:hover {
  border-color: rgba(12, 122, 116, 0.28);
  box-shadow: 0 6px 18px var(--shadow);
  transform: translateY(-1px);
}

.shade-swatch {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(22, 24, 29, 0.14);
  background: var(--shade-color, var(--rose-bg));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.shade-swatch-image {
  background-size: cover;
  background-position: center;
}

.shade-swatch-empty {
  background: linear-gradient(135deg, var(--rose-bg), var(--bg));
}

.shade-result-info {
  min-width: 0;
}

.shade-brand-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-light);
}

.shade-shade-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shade-catalog-line {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shade-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.shade-evidence span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-light);
  font-size: 0.68rem;
  font-weight: 800;
}

.shade-result-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shade-source-link,
.shade-tryon-btn,
.shade-compare-btn {
  min-width: 36px;
  height: 36px;
}

.shade-source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.shade-source-link:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}

.shade-no-match {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 16px;
}

.shade-disclaimer {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-light);
  font-style: italic;
  text-align: center;
}

.shade-undertone-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-light);
  background: #eef8f6;
  border-radius: 6px;
  padding: 8px 10px;
}

@media (max-width: 480px) {
  .shade-fields {
    grid-template-columns: 1fr;
  }

  .shade-result-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .shade-swatch {
    width: 34px;
    height: 34px;
  }

  .shade-result-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* ─── Search Bar ─── */

#search-bar {
  position: relative;
  margin-bottom: 10px;
}

#search-bar input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem; /* ≥16px: sotto questa soglia iOS zooma il viewport al focus */
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.2s;
}

#search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 122, 116, 0.15);
}

#search-bar .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--text-light);
  pointer-events: none;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.quick-link-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f7 100%);
  font-family: var(--font-body);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 14px var(--shadow);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.quick-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--rose-bg);
  font-size: 1rem;
  flex: 0 0 auto;
}

.quick-link-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.quick-link-copy strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.quick-link-copy span {
  font-size: 0.72rem;
  color: var(--text-light);
}

.quick-link-btn:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, #eef8f6 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px var(--shadow);
}

.quick-link-btn:hover .quick-link-copy strong {
  color: var(--accent);
}

/* ─── Main Content ─── */

#content {
  padding: 12px 16px;
}

/* ─── Section ─── */

.section {
  margin-bottom: 20px;
  scroll-margin-top: 200px;
}

.section.hidden {
  display: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-top: 8px;
}

.section-header .section-icon {
  font-size: 1.3rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

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

.section-updated {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 400;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 3px 8px;
  background: var(--rose-bg);
  border-radius: 10px;
}

/* ─── Cards ─── */

.card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 8px;
}

/* ─── Diagrams ─── */

.diagram-container {
  margin: 12px 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.diagram-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Rules list ─── */

.rules-list {
  list-style: none;
  margin: 12px 0;
  display: grid;
  gap: 8px;
}

.rules-list li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(238,248,246,0.72));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  font-size: 0.9rem;
}

.rules-list .rule-label {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.rules-list .rule-result {
  color: var(--text-light);
  display: block;
  margin-top: 4px;
  padding-left: 0;
  line-height: 1.5;
}

/* ─── Ordine di Applicazione ─── */

#section-ordine .section-header {
  margin-bottom: 12px;
}

#section-ordine .card-order {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 12px;
}

.order-intro {
  padding: 16px 18px 12px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(160deg, #ffffff 0%, #eef8f6 100%);
  border: 1px solid var(--border);
  border-bottom: none;
}

.order-intro h3 {
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--text);
}

.order-intro p {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--text-light);
}

.order-sequence {
  list-style: none;
  margin: 0;
  padding: 6px 0 14px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 18px 18px;
  background: #ffffff;
}

.order-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 0 16px 10px;
  position: relative;
}

.order-step:last-child {
  padding-bottom: 6px;
}

.order-step::after {
  content: "";
  position: absolute;
  left: 35px;
  top: 40px;
  bottom: -4px;
  width: 2px;
  background: var(--border);
  z-index: 0;
}

.order-step:last-child::after {
  display: none;
}

.order-step-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.order-step-body {
  min-width: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.order-step-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.order-step-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-light);
}

.order-callouts {
  display: grid;
  gap: 8px;
  padding: 12px 0 0;
}

#section-ordine .box-error,
#section-ordine .box-tip {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border-left-width: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

#section-ordine .box-error .box-label,
#section-ordine .box-tip .box-label {
  display: inline-block;
  margin-right: 6px;
}

#section-ordine .accordion-toggle {
  margin-top: 8px;
}

#section-ordine .diagram-container {
  overflow: hidden;
}

#section-ordine .diagram-svg {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* ─── Tables ─── */

.table-wrapper {
  overflow-x: auto;
  margin: 10px 0;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.table-wrapper caption {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  padding: 6px 0;
  color: var(--text);
}

.table-wrapper th {
  background: var(--rose-bg);
  color: var(--text);
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--rose);
  white-space: nowrap;
}

.table-wrapper td {
  padding: 6px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  font-size: 0.76rem;
  line-height: 1.4;
}

.table-wrapper th {
  background: var(--rose-bg);
  color: var(--text);
  font-weight: 700;
  text-align: left;
  padding: 6px 6px;
  border-bottom: 2px solid var(--rose);
  white-space: nowrap;
  font-size: 0.74rem;
}

.table-wrapper tr:last-child td {
  border-bottom: none;
}

/* ─── Common Error & Pro Tip ─── */

.box-error,
.box-tip {
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.box-error {
  background: rgba(196, 63, 99, 0.10);
  border: 1px solid var(--border);
  color: var(--text);
}

.box-error .box-label,
.box-tip .box-label {
  font-weight: 700;
}

.box-tip {
  background: #eef8f6;
  border: 1px solid var(--border);
  color: var(--text);
}

/* ─── Accordion (Level 2 & 3) ─── */

.accordion-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s;
}

.accordion-toggle:hover {
  color: var(--accent-light);
}

.accordion-toggle .chevron {
  display: inline-block;
  transition: transform 0.3s;
  font-size: 0.7rem;
}

.accordion-toggle.open .chevron {
  transform: rotate(90deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.accordion-body.open {
  max-height: 2000px;
}

.accordion-body .level-content {
  padding: 8px 0 12px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
}

.level2-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}

.level2-bullets li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.level2-bullets li:last-child {
  border-bottom: none;
}

/* ─── Sources (Level 3) ─── */

.sources-list {
  list-style: none;
  margin: 6px 0;
}

.sources-list li {
  padding: 6px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.sources-list li:last-child {
  border-bottom: none;
}

.sources-list .source-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rose);
  background: var(--rose-bg);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

.sources-list a {
  color: var(--accent);
  text-decoration: none;
}

.sources-list a:hover {
  text-decoration: underline;
}

/* ─── Scripts Section ─── */

.script-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
}

.script-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.script-steps {
  list-style: none;
  counter-reset: step;
}

.script-steps li {
  position: relative;
  padding: 6px 0 6px 28px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.script-steps li:last-child {
  border-bottom: none;
}

.script-steps li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0;
  top: 6px;
  width: 20px;
  height: 20px;
  background: var(--rose-bg);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Notes Section ─── */

#notes-section {
  margin-bottom: 20px;
}

#notes-section h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.notes-area {
  display: block;
  width: 100%;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  min-height: 120px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
  resize: vertical;
}

.notes-area:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 122, 116, 0.15);
}

.notes-area::placeholder {
  color: var(--text-light);
}

.notes-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.notes-actions button {
  flex: 1;
  padding: 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.notes-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Bottom Navigation ─── */

#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  min-height: calc(var(--nav-height) + constant(safe-area-inset-bottom));
  min-height: var(--nav-height);
  min-height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  /* iOS PWA: grow container by the home-indicator inset so items don't clip. */
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-top: 0.5px solid rgba(12, 122, 116, 0.12);
  display: flex;
  align-items: stretch;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04), 0 -4px 16px rgba(15, 23, 42, 0.06);
  /* ≤5 primary destinations now fit on one bar — no horizontal scroll. */
  overflow: hidden;
}

#bottom-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 10px;
  /* Safe-area handled by #bottom-nav container padding-bottom. */
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 60px;
  min-height: 44px; /* touch target ≥44px (DESIGN.md §5) */
  flex: 1 1 0;
  position: relative;
  border-radius: 14px;
  margin: 4px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Active item on mobile: Surface Menta bg + teal indicator (DESIGN.md §5). */
.nav-item.active {
  background: var(--rose-bg);
}

.nav-item::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item:hover {
  color: var(--accent-light);
}

.nav-item.active {
  color: var(--accent);
}

.nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 10px;
  background: rgba(12, 122, 116, 0.07);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              box-shadow 0.3s ease;
}

.nav-item.active .nav-icon {
  transform: scale(1.08);
  background: rgba(12, 122, 116, 0.15);
  box-shadow: 0 2px 8px rgba(12, 122, 116, 0.12);
}

.nav-item .nav-label {
  display: block;
  max-width: 100%;
  font-size: 0.72rem;
  line-height: 1.15;
  text-align: center;
  padding-bottom: 1px;
}

.nav-item.active .nav-label {
  opacity: 1;
  font-weight: 700;
  color: var(--accent);
}

.nav-item.active .nav-label {
  opacity: 1;
  font-weight: 700;
  color: var(--accent);
}

/* ─── "Altro" bottom sheet ─── */

#more-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(17, 32, 40, 0.32);
  opacity: 0;
  transition: opacity 0.25s ease;
}

#more-sheet-backdrop.open {
  opacity: 1;
}

#more-sheet-backdrop[hidden] {
  display: none;
}

#more-sheet {
  width: 100%;
  max-width: 600px;
  max-height: 82vh;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 30px -10px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

#more-sheet-backdrop.open #more-sheet {
  transform: translateY(0);
}

.more-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 12px;
}

.more-sheet-head h2 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.more-sheet-close {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--rose-bg);
  border-radius: 14px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
}

.more-sheet-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 12px;
  margin-bottom: 12px;
}

.more-sheet-search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
}

.more-sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.more-group {
  margin-bottom: 16px;
}

.more-group.hidden {
  display: none;
}

.more-group-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}

.more-group-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.more-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: none;
  background: var(--bg-card);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: background 0.18s ease;
}

.more-entry:hover,
.more-entry:focus-visible {
  background: var(--rose-bg);
}

.more-entry.hidden {
  display: none;
}

.more-entry-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(12, 122, 116, 0.07);
  font-size: 1.05rem;
  flex-shrink: 0;
}

.more-entry-label {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
}

body.more-sheet-lock {
  overflow: hidden;
}

/* Inline "X prove rimaste" chip near gated actions. */
.uses-remaining {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-light);
}

.uses-remaining:empty {
  display: none;
}

/* ─── Responsive ─── */

@media (min-width: 480px) {
  .install-banner {
    margin-left: auto;
    margin-right: auto;
    max-width: 480px;
  }

  #content {
    max-width: 480px;
    margin: 0 auto;
  }

  .nav-item {
    min-width: 64px;
    padding: 8px 12px;
  }

  .nav-item .nav-label {
    font-size: 0.72rem;
  }
}

@media (min-width: 768px) {
  .install-banner {
    max-width: 600px;
  }

  #content {
    max-width: 600px;
  }

  .table-wrapper table {
    font-size: 0.88rem;
  }
}

@media (max-width: 420px) {
  .install-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .install-banner-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .install-btn-primary,
  .install-btn-secondary {
    flex: 1;
  }
}

/* ─── Utility ─── */

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

/* ─── Personal Color quiz ─── */
/* Quiz mirrors the existing .wizard-option pattern: full-width stacked
   options, ≥44px touch targets (one-handed in-store use), app tokens only. */
.pc-quiz-block { margin-bottom: 16px; }
.pc-quiz-cta {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--accent); border-radius: 10px;
  background: var(--rose-bg); color: var(--accent);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 700;
  text-align: center; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.pc-quiz-cta:hover { background: var(--rose-light); border-color: var(--accent-light); }
.pc-quiz {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px;
}
.pc-quiz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.pc-quiz-title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.pc-quiz-progress { font-size: .8rem; font-weight: 600; color: var(--text-light); white-space: nowrap; }
.pc-quiz-q { margin: 0 0 12px; font-size: 1rem; font-weight: 600; color: var(--text); }
.pc-quiz-answers { display: flex; flex-direction: column; gap: 8px; }
.pc-quiz-answer {
  width: 100%; padding: 14px 16px; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  color: var(--text); text-align: left; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.pc-quiz-answer:hover { border-color: var(--accent-light); background: var(--rose-bg); }
.pc-quiz-answer:active { transform: scale(.99); border-color: var(--accent); background: var(--rose-bg); color: var(--accent); }
.pc-quiz-back {
  margin-top: 14px; padding: 6px 2px; background: none; border: none;
  font-family: var(--font-body); font-size: .9rem; font-weight: 600;
  color: var(--text-light); cursor: pointer;
}
.pc-quiz-back:hover { color: var(--accent); }
.pc-quiz-result {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; margin-bottom: 16px;
}
.pc-result-badge { display: flex; flex-direction: column; gap: 3px; margin-bottom: 14px; }
.pc-result-prefix { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); }
.pc-result-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1.15; color: var(--text); }
.pc-result-descriptor { font-size: .9rem; color: var(--text-light); }
.pc-result-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pc-chips-header { width: 100%; margin-bottom: 2px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); }
.pc-chip {
  padding: 11px 16px; background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: 999px; font-family: var(--font-body); font-size: .88rem; font-weight: 600;
  color: var(--text); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.pc-chip:hover { border-color: var(--accent-light); background: var(--rose-bg); }
.pc-result-retake {
  margin-top: 14px; padding: 6px 2px; background: none; border: none;
  font-family: var(--font-body); font-size: .9rem; font-weight: 600;
  color: var(--accent); cursor: pointer;
}
.pc-result-retake:hover { color: var(--accent-light); }

/* ============================================================
   In-app Dupe finder (#section-dupe-finder) — search/browse a
   prestige product → ranked drugstore dupes. Spec 2026-06-16.
   ============================================================ */
.dupe-finder-panel { position: relative; }
.dupe-search-input {
  width: 100%; box-sizing: border-box; padding: 0.7rem 0.9rem;
  border: 1px solid var(--border); border-radius: 10px; font-size: 1rem;
  background: var(--bg-card); color: var(--text);
}
.dupe-search-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.dupe-suggestions {
  list-style: none; margin: 0.25rem 0 0; padding: 0.25rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card);
  box-shadow: 0 8px 24px -16px rgba(15,23,42,.4); max-height: 320px; overflow-y: auto;
}
.dupe-suggestion {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem;
  border-radius: 8px; cursor: pointer;
}
.dupe-suggestion:hover { background: var(--rose-bg); }
.dupe-sugg-text { flex: 1; font-size: 0.92rem; }
.dupe-sugg-cat { font-size: 0.72rem; color: var(--text-light); text-transform: capitalize; }
.dupe-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.1); display: inline-block; }
.dupe-dot-lg { width: 34px; height: 34px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.1); display: inline-block; }
.dupe-popular-wrap { margin-top: 1rem; }
.dupe-popular-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-light); margin: 0 0 0.5rem; }
.dupe-popular { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.5rem; }
.dupe-pop-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.7rem 0.4rem; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-card); cursor: pointer; text-align: center;
}
.dupe-pop-card:hover { border-color: var(--accent); }
.dupe-pop-brand { font-size: 0.74rem; font-weight: 700; color: var(--text); }
.dupe-pop-shade { font-size: 0.72rem; color: var(--text-light); line-height: 1.2; }
.dupe-results { margin-top: 1.25rem; }
.dupe-anchor-head { font-size: 0.95rem; margin-bottom: 0.6rem; }
.dupe-anchor-label { color: var(--text-light); }
.dupe-card {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.dupe-card-anchor { background: var(--rose-bg); border-radius: 12px; padding: 0.8rem; border-bottom: none; margin-bottom: 0.5rem; }
.dupe-main { flex: 1; min-width: 0; }
.dupe-brand { font-weight: 700; font-size: 0.92rem; }
.dupe-shade { font-size: 0.82rem; color: var(--text-light); }
.dupe-prod { color: var(--text-light); }
.dupe-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.dupe-de { font-size: 0.74rem; color: var(--text-light); white-space: nowrap; }
.dupe-badge { font-size: 0.7rem; font-weight: 700; padding: 0.12rem 0.5rem; border-radius: 999px; background: #e7eef0; color: var(--accent-light); }
.dupe-badge.dupe-perfect { background: #d8f0e6; color: #0a5f5a; }
.dupe-badge.dupe-approximate { background: #f0ece0; color: #7a6a3a; }
.dupe-price { font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.dupe-price em { color: var(--green); font-style: normal; }
.dupe-buy {
  font-size: 0.82rem; font-weight: 700; color: var(--bg-card); background: var(--accent);
  padding: 0.35rem 0.7rem; border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.dupe-buy:hover { background: var(--accent-light); }
.dupe-loading, .dupe-empty { color: var(--text-light); font-size: 0.9rem; padding: 0.8rem 0; }
