/* ═══════════════════════════════════════════════════════════════
   FASHION MVP — Design System v2.0
   Direction: Editorial Minimal. Clean. Confident. Premium.
   Think: SSENSE x The RealReal x Vogue editorial
   ═══════════════════════════════════════════════════════════════ */

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

/* ─── 1. DESIGN TOKENS ──────────────────────────────────────── */

:root {
  /* --- Color: Surfaces --- */
  --surface-primary: #ffffff;
  --surface-secondary: #F7F6F3;
  --surface-tertiary: #efeeec;
  --surface-elevated: #ffffff;
  --surface-overlay: rgba(0, 0, 0, 0.5);

  /* --- Color: Text --- */
  --text-primary: #0a0a0a;
  --text-secondary: #525252;
  --text-tertiary: #8a8a8a;
  --text-inverse: #ffffff;
  --text-disabled: #b3b3b3;

  /* --- Color: Brand & Accent --- */
  --accent: #1A1A2E;
  --accent-hover: #2D2D4A;
  --accent-subtle: #f0f0f0;
  --accent-light: #F0EFF5;
  --brand-highlight: #c8a97e;
  --brand-highlight-soft: rgba(200, 169, 126, 0.12);

  /* --- Color: Semantic --- */
  --color-success: #1a7a4c;
  --color-success-bg: #e8f5ef;
  --color-error: #cc3340;
  --color-error-bg: #fce8ea;
  --color-warning: #b45309;
  --color-warning-bg: #fef3e2;
  --color-info: #2563eb;
  --color-info-bg: #eff4ff;

  /* --- Color: Interactive --- */
  --color-like: #E63946;
  --color-like-bg: #FEF0F0;
  --color-skip: #cc3340;
  --color-skip-bg: #fce8ea;

  /* --- Color: AI --- */
  --color-ai: #7C6AEF;
  --color-ai-bg: #F5F4FF;

  /* --- Color: Aliases (used by style/dream components) --- */
  --color-bg: #ffffff;
  --color-text: #0a0a0a;
  --color-text-secondary: #525252;
  --color-border: #e5e5e5;

  /* --- Color: Borders --- */
  --border-primary: #e5e5e5;
  --border-secondary: #f0f0f0;
  --border-strong: #d4d4d4;
  --border-focus: #1a1a1a;

  /* --- Typography --- */
  --font-sans: "Inter", "DM Sans", "Plus Jakarta Sans", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

  /* --- Type Scale (rem-based) --- */
  --text-xs: 0.6875rem;     /* 11px */
  --text-sm: 0.8125rem;     /* 13px */
  --text-base: 0.9375rem;   /* 15px */
  --text-md: 1rem;           /* 16px */
  --text-lg: 1.125rem;       /* 18px */
  --text-xl: 1.375rem;       /* 22px */
  --text-2xl: 1.75rem;       /* 28px */
  --text-3xl: 2.25rem;       /* 36px */

  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --tracking-tight: -0.02em;
  --tracking-normal: 0em;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;
  --tracking-caps: 0.12em;

  /* --- Spacing Scale (4px base grid) --- */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* --- Border Radius --- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-inner: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 28px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-drawer: 0 -8px 40px rgba(0, 0, 0, 0.12), 0 -2px 12px rgba(0, 0, 0, 0.06);

  /* --- Transitions --- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 320ms;
  --duration-slower: 500ms;

  --transition-colors: color var(--duration-normal) var(--ease-in-out),
    background-color var(--duration-normal) var(--ease-in-out),
    border-color var(--duration-normal) var(--ease-in-out);
  --transition-transform: transform var(--duration-normal) var(--ease-out);
  --transition-shadow: box-shadow var(--duration-normal) var(--ease-in-out);
  --transition-all: all var(--duration-normal) var(--ease-out);

  /* --- Z-index layers --- */
  --z-base: 0;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-drawer: 50;
  --z-overlay: 100;
  --z-toast: 200;

  /* --- Layout --- */
  --content-max-width: 480px;
  --page-padding: var(--space-5);

  /* Legacy aliases (backward compat for JS-generated HTML) */
  --bg: var(--surface-secondary);
  --ink: var(--text-primary);
  --card: var(--surface-primary);
  --muted: var(--text-tertiary);
  --border: var(--border-primary);
}

/* ─── 1b. DARK MODE TOKENS ──────────────────────────────────── */

[data-theme="dark"] {
  --surface-primary: #1a1a1a;
  --surface-secondary: #121212;
  --surface-tertiary: #222222;
  --surface-elevated: #242424;
  --surface-overlay: rgba(0, 0, 0, 0.7);

  --text-primary: #e8e6e3;
  --text-secondary: #a8a8a8;
  --text-tertiary: #6b6b6b;
  --text-inverse: #0a0a0a;
  --text-disabled: #4a4a4a;

  --accent: #e8e6e3;
  --accent-hover: #d0cec9;
  --accent-subtle: #2a2a2a;
  --accent-light: #2a2840;
  --brand-highlight: #c8a97e;
  --brand-highlight-soft: rgba(200, 169, 126, 0.15);

  --color-success: #34d399;
  --color-success-bg: #0d2818;
  --color-error: #f87171;
  --color-error-bg: #2d1215;
  --color-warning: #fbbf24;
  --color-warning-bg: #2d1f06;
  --color-info: #60a5fa;
  --color-info-bg: #0d1a2d;

  --color-like: #f87171;
  --color-like-bg: #2d1215;
  --color-skip: #f87171;
  --color-skip-bg: #2d1215;

  --color-ai: #a78bfa;
  --color-ai-bg: #1e1b2e;

  --color-bg: #1a1a1a;
  --color-text: #e8e6e3;
  --color-text-secondary: #a8a8a8;
  --color-border: #2e2e2e;

  --border-primary: #2e2e2e;
  --border-secondary: #252525;
  --border-strong: #3a3a3a;
  --border-focus: #e8e6e3;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-drawer: 0 -8px 40px rgba(0, 0, 0, 0.5), 0 -2px 12px rgba(0, 0, 0, 0.3);

  color-scheme: dark;
}

/* ─── 2. RESET & BASE ───────────────────────────────────────── */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-secondary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: 72px;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

input {
  font-family: var(--font-sans);
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--brand-highlight);
  color: var(--text-primary);
}


/* ─── 3. HEADER ─────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--page-padding);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-secondary);
  transition: transform var(--duration-normal) var(--ease-out);
}

.header.header-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}

.header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-primary);
}


/* ─── 4. TAB BAR (Bottom Navigation) ────────────────────────── */

.tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border-secondary);
  gap: 0;
}
[data-theme="dark"] .tabs {
  background: rgba(18, 18, 18, 0.92);
  border-top-color: var(--border-primary);
}

/* ─── Background Generation Banner ──────────────────────────── */
.bg-gen-banner {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--content-max-width);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 16px;
  background: var(--color-success, #22c55e);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md, 8px) var(--radius-md, 8px) 0 0;
  animation: bgBannerSlideUp 0.25s ease-out;
}
.bg-gen-banner.bg-gen-banner--error {
  background: var(--color-error, #ef4444);
}
.bg-gen-banner .bg-gen-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes bgBannerSlideUp {
  from { transform: translateX(-50%) translateY(100%); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: var(--space-2) var(--space-1);
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--text-tertiary);
  transition: var(--transition-colors);
  cursor: pointer;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
}

.tab svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
  transition: var(--transition-colors);
}

.tab.active svg {
  stroke-width: 2;
}

.tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 32px;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  transition: transform var(--duration-normal) var(--ease-out);
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--text-primary);
  font-weight: 600;
  background: transparent;
  border-color: transparent;
}

.tab.active::before {
  transform: translateX(-50%) scaleX(1);
}


/* ─── 4b. AI FLOATING ACTION BUTTON ────────────────────────── */

.ai-fab {
  position: fixed;
  bottom: 88px;
  right: 16px;
  z-index: var(--z-sticky);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  border: none;
  background: linear-gradient(135deg, #1A1A2E, #16213e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 1px 4px rgba(0,0,0,0.1);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-in-out);
  animation: fabPulse 30s ease infinite;
  -webkit-tap-highlight-color: transparent;
}

.ai-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.12);
}

.ai-fab:active {
  transform: scale(0.95);
}

.ai-fab svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
}

.ai-fab-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-like);
  border: 2px solid #1A1A2E;
  animation: scaleIn var(--duration-fast) var(--ease-spring) both;
}

@keyframes fabPulse {
  0%, 96% { transform: scale(1); }
  97% { transform: scale(1.06); }
  98.5% { transform: scale(1); }
  100% { transform: scale(1); }
}

/* ─── 5. PANELS & LAYOUT ────────────────────────────────────── */

.panel {
  margin: var(--space-3) var(--page-padding) var(--space-4);
  padding: var(--space-6);
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-secondary);
  box-shadow: var(--shadow-xs);
}

.panel h2 {
  margin: 0 0 var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}


/* ─── 5b. DISCOVER SEARCH BAR ───────────────────────────────── */

.discover-search-wrap {
  position: relative;
  margin-bottom: var(--space-3);
}
.discover-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}
.discover-search-input {
  width: 100%;
  padding: 10px 36px 10px 36px;
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-full, 50px);
  background: var(--surface-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}
.discover-search-input:focus {
  border-color: var(--color-ai, #7c5cfc);
}
.discover-search-input::placeholder {
  color: var(--text-tertiary);
}
.discover-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-secondary, #f0f0f0);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── 6. FILTER BAR ─────────────────────────────────────────── */

.filter-bar-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  background: var(--surface-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition-all);
}
.filter-toggle:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: var(--text-xs);
  font-weight: 700;
}

.filter-clear {
  border: none;
  background: none;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: var(--space-1) 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: var(--transition-colors);
}
.filter-clear:hover {
  color: var(--text-primary);
}

.filter-bar {
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition-all);
}

.filter-bar.collapsed {
  display: none;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.filter-row:last-child {
  margin-bottom: 0;
}

.filter-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  min-width: 56px;
  padding-top: 7px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter-chips-scroll {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-1);
  scrollbar-width: none;
}
.filter-chips-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 14px;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  background: var(--surface-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 450;
  cursor: pointer;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: var(--transition-all);
  text-transform: capitalize;
}
.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.filter-chip.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
  font-weight: 500;
}

.color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-inner);
}


/* ─── 7. SWIPE CARD ──────────────────────────────────────────── */

.swipe-card {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.swipe-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.swipe-image-wrap img {
  width: 100%;
  height: 540px;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-slower) var(--ease-out);
}
.swipe-image-wrap:hover img {
  transform: scale(1.02);
}

.swipe-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 80px var(--space-6) var(--space-6);
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.swipe-brand {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: rgba(255, 255, 255, 0.7);
}

.swipe-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

.swipe-price {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  letter-spacing: var(--tracking-tight);
}

.swipe-meta {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
  text-transform: capitalize;
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
}

.swipe-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-6) 0 var(--space-2);
}

.btn-skip,
.btn-like {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid;
  background: var(--surface-primary);
  transition: var(--transition-all);
  box-shadow: var(--shadow-md);
}

.btn-skip svg,
.btn-like svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
}
.btn-like svg {
  fill: currentColor;
  stroke: none;
}

.btn-skip {
  border-color: var(--color-skip-bg);
  color: var(--color-skip);
}
.btn-skip:hover {
  background: var(--color-skip);
  color: var(--text-inverse);
  border-color: var(--color-skip);
  box-shadow: 0 6px 20px rgba(204, 51, 64, 0.3);
  transform: translateY(-2px) scale(1.05);
}
.btn-skip:active {
  transform: translateY(0) scale(0.95);
}

.btn-like {
  border-color: var(--color-like-bg);
  color: var(--color-like);
}
.btn-like:hover {
  background: var(--color-like);
  color: var(--text-inverse);
  border-color: var(--color-like);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
  transform: translateY(-2px) scale(1.05);
}
.btn-like:active {
  transform: translateY(0) scale(0.95);
}


/* ─── 8. CHANGING ROOM GRID ──────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  vertical-align: middle;
  margin-left: var(--space-2);
  min-width: 24px;
  height: 22px;
}

.liked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
}

.liked-tile {
  position: relative;
  background: var(--surface-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-secondary);
  transition:
    transform var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-in-out),
    border-color var(--duration-normal) var(--ease-in-out);
  cursor: pointer;
}
.liked-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-primary);
}
.liked-tile:active {
  transform: translateY(-1px) scale(0.98);
}

.liked-tile img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-slower) var(--ease-out);
}
.liked-tile:hover img {
  transform: scale(1.04);
}

.liked-info {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.liked-brand {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-tertiary);
  font-weight: 500;
}

.liked-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  line-height: var(--leading-snug);
}

.liked-price {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--space-1);
  letter-spacing: var(--tracking-tight);
}


/* ─── 9. EMPTY STATE ─────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-tertiary);
  border-radius: var(--radius-full);
}
.empty-state-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-tertiary);
  stroke-width: 1.5;
  fill: none;
}
.empty-state h2 {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.empty-state p {
  color: var(--text-tertiary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  max-width: 280px;
  margin: 0 auto;
}
.btn-clear-filters {
  display: inline-block;
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-6);
  background: var(--text-primary);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-all);
}
.btn-clear-filters:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}


/* ─── 10. CHAT / AI STYLIST ──────────────────────────────────── */

.chat-panel {
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 200px;
  max-height: 400px;
  padding: var(--space-2) 0;
}

.chat-empty {
  color: var(--text-tertiary);
  text-align: center;
  padding: var(--space-10) 0;
  font-size: var(--text-base);
}

.chat-bubble {
  display: flex;
}

.chat-bubble.user {
  justify-content: flex-end;
}

.bubble-content {
  max-width: 80%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-xl);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

.chat-bubble.user .bubble-content {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-bottom-right-radius: var(--radius-xs);
}

.chat-bubble.assistant .bubble-content {
  background: var(--surface-tertiary);
  color: var(--text-primary);
  border-bottom-left-radius: var(--radius-xs);
}

.chat-bubble.typing .bubble-content {
  color: var(--text-tertiary);
  font-style: italic;
}

.bubble-content p {
  margin: 0 0 6px;
}
.bubble-content p:last-child {
  margin-bottom: 0;
}
.bubble-content ul {
  margin: 4px 0 8px;
  padding-left: 20px;
}
.bubble-content li {
  margin-bottom: 4px;
}
.bubble-content code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.bubble-content pre {
  background: rgba(0, 0, 0, 0.06);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 6px 0;
}
.bubble-content pre code {
  background: none;
  padding: 0;
}
.bubble-content strong {
  font-weight: 700;
}
.bubble-content em {
  font-style: italic;
}
.bubble-content br {
  display: block;
  content: "";
  margin: 4px 0;
}

.suggested-prompts {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-3) 0;
}

.prompt-chip {
  background: var(--surface-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 450;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-all);
}
.prompt-chip:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}
.prompt-chip:active {
  transform: translateY(0) scale(0.97);
}

.chat-input-row {
  display: flex;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-secondary);
  margin-top: var(--space-3);
}

.chat-input-row input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  outline: none;
  background: var(--surface-primary);
  color: var(--text-primary);
  transition: var(--transition-all);
}
.chat-input-row input::placeholder {
  color: var(--text-disabled);
}
.chat-input-row input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.btn-send {
  padding: var(--space-3) var(--space-5);
  border: none;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: var(--text-inverse);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-all);
}
.btn-send:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-send:active {
  transform: translateY(0) scale(0.97);
}


/* ─── 11. STYLIST DRAWER ─────────────────────────────────────── */

.stylist-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 75vh;
  background: var(--surface-primary);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
  z-index: var(--z-drawer);
  transition: transform var(--duration-slow) var(--ease-out);
}

.stylist-drawer.hidden {
  display: none;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-secondary);
}

.drawer-product {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.drawer-product img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.drawer-product strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
}

.drawer-product span {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.drawer-close {
  background: var(--surface-tertiary);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-all);
}
.drawer-close:hover {
  background: var(--border-primary);
  color: var(--text-primary);
}

.drawer-prompts {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  flex-wrap: wrap;
}

.drawer-custom-input-row {
  display: flex; gap: 8px; align-items: center;
}
.drawer-custom-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  font-size: 14px;
  background: var(--surface-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}
.drawer-custom-input:focus {
  border-color: var(--color-ai, #7C6AEF);
}
.drawer-custom-input::placeholder {
  color: var(--text-muted);
}
.drawer-custom-send {
  width: 38px; height: 38px;
  border-radius: 50%; border: none;
  background: var(--color-ai, #7C6AEF); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: opacity 0.15s ease;
}
.drawer-custom-send:hover { opacity: 0.85; }

.drawer-chat {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2) var(--space-5);
  max-height: 250px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.stylist-drawer .chat-input-row {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border-secondary);
  margin-top: 0;
}


/* ─── 12. INLINE AI STYLIST (Changing Room) ──────────────────── */

.stylist-panel {
  margin-top: 0;
}

.stylist-context {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin: 0 0 var(--space-3);
  letter-spacing: var(--tracking-wide);
}

.stylist-prompts {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.stylist-chat {
  min-height: 0;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}

.stylist-panel .chat-input-row {
  border-top: 1px solid var(--border-secondary);
  margin-top: var(--space-2);
}


/* ─── 13. MY BODY TAB ────────────────────────────────────────── */

/* -- Body Note: mini product card -- */
.body-note {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  background: var(--surface-secondary, var(--brand-highlight-soft));
  border: 1px solid var(--border-secondary, rgba(200, 169, 126, 0.2));
  padding: var(--space-3, 12px) var(--space-4, 16px);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5, 20px);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.body-note-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: var(--radius-sm, 8px);
  background: var(--text-primary, #111);
  color: var(--text-inverse, #fff);
  font-size: 18px;
}

.body-note-text {
  flex: 1;
  min-width: 0;
}

.body-note-label {
  display: block;
  font-size: var(--text-xs, 10px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary, #999);
  margin-bottom: 2px;
}

.body-note-title {
  font-size: var(--text-base, 14px);
  font-weight: 600;
  color: var(--text-primary, #111);
  letter-spacing: var(--tracking-tight, -0.01em);
}

.body-note-brand {
  font-size: var(--text-xs, 12px);
  color: var(--text-tertiary, #999);
}

/* -- Selfie Upload Area -- */
.body-selfie-area {
  margin: var(--space-5, 20px) 0;
}

.selfie-upload {
  position: relative;
  text-align: center;
  padding: var(--space-12, 48px) var(--space-8, 32px);
  border: 1.5px dashed var(--border-primary, #ddd);
  border-radius: var(--radius-lg);
  background: var(--surface-secondary, #f8f8f8);
  transition: var(--transition-all, all 0.3s ease);
  cursor: pointer;
}
.selfie-upload:hover {
  border-color: var(--border-strong, #999);
  background: var(--surface-primary, #fff);
}

.selfie-upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4, 16px);
  border-radius: var(--radius-full, 50%);
  background: var(--surface-primary, #fff);
  border: 1px solid var(--border-primary, #ddd);
  transition: var(--transition-all, all 0.3s ease);
}
.selfie-upload:hover .selfie-upload-icon {
  background: var(--text-primary, #111);
  border-color: var(--text-primary, #111);
  transform: scale(1.04);
}
.selfie-upload-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--text-tertiary, #999);
  transition: stroke 0.3s ease;
}
.selfie-upload:hover .selfie-upload-icon svg {
  stroke: var(--text-inverse, #fff);
}

.selfie-upload-title {
  font-family: var(--font-display, inherit);
  font-size: var(--text-md, 15px);
  font-weight: 600;
  color: var(--text-primary, #111);
  margin: 0 0 var(--space-1, 4px);
  letter-spacing: var(--tracking-tight, -0.01em);
}

.selfie-upload-hint {
  font-size: var(--text-sm, 13px);
  color: var(--text-tertiary, #999);
  margin: 0 0 var(--space-5, 20px);
}

.selfie-upload-privacy {
  font-size: 11px !important;
  color: var(--text-tertiary) !important;
  margin-top: var(--space-3) !important;
  margin-bottom: 0 !important;
  opacity: 0.7;
}

.tryon-context {
  margin: var(--space-4) 0;
}

.selfie-upload p {
  color: var(--text-tertiary, #999);
  margin-bottom: var(--space-4, 16px);
  font-size: var(--text-base, 14px);
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 8px);
  padding: var(--space-3, 12px) var(--space-7, 28px);
  background: var(--text-primary, #111);
  color: var(--text-inverse, #fff);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-sans, inherit);
  font-size: var(--text-sm, 13px);
  font-weight: 600;
  letter-spacing: var(--tracking-wide, 0.02em);
  transition: var(--transition-all, all 0.2s ease);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}
.btn-upload:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08));
}
.btn-upload:active {
  transform: translateY(0);
}

/* -- Selfie Preview (after upload) -- */
.selfie-preview {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--text-primary, #111);
  max-width: 400px;
  margin: 0 auto;
}

.selfie-preview img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.15s ease;
}

.selfie-preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(transparent, rgba(0,0,0,0.35));
  pointer-events: none;
}

.body-type-preview img {
  max-height: 320px;
}
.body-type-actions {
  display: flex;
  gap: var(--space-2, 8px);
  justify-content: center;
  padding: var(--space-2, 8px) 0;
}

.btn-change-selfie {
  position: absolute;
  bottom: var(--space-4, 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1, 6px);
  background: rgba(255,255,255,0.92);
  color: var(--text-primary, #111);
  border: none;
  padding: var(--space-2, 9px) var(--space-5, 20px);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-sans, inherit);
  font-size: var(--text-xs, 12px);
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-change-selfie:hover {
  background: rgba(235,235,235,0.95);
}
.btn-change-selfie:active {
  transform: translateX(-50%) scale(0.92);
}

/* -- Try-On Button -- */
.btn-tryon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2, 8px);
  width: 100%;
  padding: var(--space-4, 15px) var(--space-6, 24px);
  margin: var(--space-5, 20px) 0;
  background: var(--color-ai, #7c3aed);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans, inherit);
  font-size: var(--text-base, 14px);
  font-weight: 600;
  letter-spacing: var(--tracking-wide, 0.02em);
  cursor: pointer;
  transition: var(--transition-all, all 0.2s ease);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}
.btn-tryon:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08));
}
.btn-tryon:active {
  transform: translateY(0);
}
.btn-tryon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}


/* ─── 14. TRY-ON LOADING, RESULTS & ACTIONS ──────────────────── */

/* -- Loading State -- */
.tryon-loading {
  padding: var(--space-7, 28px) 0;
}

.tryon-loading-stage {
  display: flex;
  align-items: stretch;
  gap: var(--space-4, 16px);
  margin-bottom: var(--space-6, 24px);
}

.tryon-loading-product {
  flex: 0 0 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-secondary, #ddd);
}

.tryon-loading-product img {
  width: 110px;
  height: 150px;
  object-fit: cover;
  display: block;
}

.tryon-loading-skeleton {
  flex: 1;
  min-height: 150px;
  border-radius: var(--radius-md);
  background: var(--surface-secondary, #f5f5f5);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-secondary, #ddd);
}

.tryon-loading-skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  animation: shimmer 1.8s ease-in-out infinite;
}

.tryon-loading-skeleton-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2, 6px);
  color: var(--text-tertiary, #999);
  font-size: var(--text-xs, 12px);
  z-index: 1;
}

.tryon-loading-skeleton-label svg {
  width: 24px;
  height: 24px;
  fill: var(--text-tertiary, #999);
  opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.08); }
}

.tryon-loading-progress {
  width: 100%;
  max-width: 240px;
  margin: 0 auto var(--space-4, 14px);
  height: 2px;
  border-radius: 2px;
  background: var(--border-primary, #e5e5e5);
  overflow: hidden;
}

.tryon-loading-progress-bar {
  height: 100%;
  border-radius: 2px;
  background: var(--text-primary, #111);
  animation: progressIndeterminate 2.2s ease-in-out infinite;
  width: 35%;
}

@keyframes progressIndeterminate {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(200%); }
  100% { transform: translateX(400%); }
}

.tryon-loading-text {
  text-align: center;
}

.tryon-loading-text p {
  margin: 0;
  font-size: var(--text-sm, 13px);
  color: var(--text-tertiary, #999);
}

.tryon-loading-text .tryon-loading-headline {
  font-family: var(--font-display, inherit);
  font-size: var(--text-base, 14px);
  font-weight: 600;
  color: var(--text-primary, #111);
  margin-bottom: var(--space-1, 3px);
  letter-spacing: var(--tracking-tight, -0.01em);
}

.tryon-loading-text .tryon-item {
  font-size: var(--text-xs, 12px);
  margin-top: var(--space-1, 4px);
}

.tryon-item strong {
  color: var(--text-primary, #111);
}

/* Spinner fallback */
.spinner {
  width: 36px;
  height: 36px;
  border: 2.5px solid var(--border-primary, #e5e5e5);
  border-top-color: var(--text-primary, #111);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-4, 14px);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* -- Result Display -- */
.tryon-result {
  margin-top: var(--space-6, 24px);
  animation: resultReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes resultReveal {
  0% { opacity: 0; transform: translateY(12px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.tryon-result-header {
  text-align: center;
  margin-bottom: var(--space-4, 16px);
}

.tryon-result-header h3 {
  margin: 0 0 2px;
  font-family: var(--font-display, inherit);
  font-size: var(--text-lg, 16px);
  font-weight: 600;
  color: var(--text-primary, #111);
  letter-spacing: var(--tracking-tight, -0.01em);
}

.tryon-result-header p {
  margin: 0;
  font-size: var(--text-xs, 12px);
  color: var(--text-tertiary, #999);
}

.tryon-result-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl, 0 8px 30px rgba(0,0,0,0.12));
}

.tryon-result-image img {
  display: block;
  width: 100%;
  object-fit: contain;
}

.tryon-result-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3, 10px);
  margin-top: var(--space-5, 18px);
  padding-bottom: var(--space-4, 16px);
}

.tryon-action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 6px);
  padding: var(--space-3, 10px) var(--space-5, 20px);
  border-radius: var(--radius-full);
  font-family: var(--font-sans, inherit);
  font-size: var(--text-sm, 13px);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-all, all 0.2s ease);
}

.tryon-action-btn svg {
  width: 15px;
  height: 15px;
}

.tryon-action-btn-primary {
  background: var(--text-primary, #111);
  color: var(--text-inverse, #fff);
  border: none;
}

.tryon-action-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.tryon-action-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.tryon-action-btn-secondary {
  background: var(--surface-primary, #fff);
  color: var(--text-primary, #111);
  border: 1px solid var(--border-primary, #e5e5e5);
}

.tryon-action-btn-secondary:hover {
  border-color: var(--text-primary, #111);
  transform: translateY(-1px);
}

.tryon-action-btn-secondary svg { fill: currentColor; }
.tryon-action-btn-primary svg { fill: currentColor; }

/* -- Error -- */
.tryon-error {
  text-align: center;
  padding: var(--space-7, 28px) var(--space-5, 20px);
  border-radius: var(--radius-md);
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.tryon-error p {
  color: #dc2626;
  font-size: var(--text-sm, 13px);
  margin: 0;
}


/* ─── 15. TRY-ON GALLERY (Lookbook) ──────────────────────────── */

.gallery-section {
  margin-top: var(--space-8, 32px);
  padding-top: var(--space-6, 24px);
  border-top: 1px solid var(--border-secondary, #e5e5e5);
}

.gallery-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-4, 16px);
}

.gallery-title {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: var(--text-sm, 15px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary, #111);
  padding-top: 0;
  border-top: none;
}

.gallery-count {
  font-size: var(--text-xs, 12px);
  color: var(--text-tertiary, #999);
  font-weight: 400;
}

.tryon-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3, 14px);
}

/* Feature first item when multiple exist */
.tryon-gallery-grid.has-feature .tryon-gallery-item:first-child {
  grid-column: 1 / -1;
  max-width: 420px;
}
.tryon-gallery-grid.has-feature .tryon-gallery-item:first-child img {
  height: 320px;
}

.tryon-gallery-item {
  position: relative;
  background: var(--surface-primary, #fff);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-secondary, #e5e5e5);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.tryon-gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover, 0 8px 30px rgba(0,0,0,0.12));
}

.tryon-gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.tryon-gallery-item:hover img {
  transform: scale(1.03);
}

.tryon-gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 14px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.tryon-gallery-item:hover .tryon-gallery-overlay {
  opacity: 1;
}

.tryon-gallery-info {
  padding: var(--space-3, 10px) var(--space-3, 14px) var(--space-3, 12px);
}

.tryon-gallery-name {
  font-size: var(--text-sm, 13px);
  font-weight: 600;
  color: var(--text-primary, #111);
  display: block;
  letter-spacing: var(--tracking-tight, -0.01em);
}

.tryon-gallery-brand {
  font-size: var(--text-xs, 11px);
  color: var(--text-tertiary, #999);
  display: block;
  margin-top: 1px;
}

.tryon-gallery-date {
  font-size: 10px;
  color: var(--text-tertiary, #999);
  display: block;
  margin-top: 3px;
  opacity: 0.6;
}


/* ─── 16. OUTFIT BUILDER ─────────────────────────────────────── */

.outfit-builder {
  background: var(--surface-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.outfit-builder-title {
  margin: 0 0 var(--space-1);
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

.outfit-builder-hint {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.outfit-slots {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  justify-content: center;
}

.outfit-slot {
  position: relative;
  width: 140px;
  height: 170px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-primary);
  background: var(--surface-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: var(--transition-all);
}

.outfit-slot.filled {
  border-style: solid;
  border-color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.outfit-slot img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.outfit-slot-label {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-weight: 500;
  color: var(--text-secondary);
}

.outfit-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  font-weight: 450;
}

.outfit-slot-icon {
  font-size: 28px;
  opacity: 0.6;
}

.outfit-slot-clear {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--text-inverse);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: var(--transition-all);
}
.outfit-slot-clear:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: scale(1.1);
}

.outfit-plus {
  font-size: var(--text-xl);
  font-weight: 300;
  color: var(--text-disabled);
}

.btn-outfit-tryon {
  margin-top: var(--space-4);
}
.btn-outfit-tryon:disabled {
  opacity: 0.4;
  pointer-events: none;
}


/* ─── 17. LIKED TILE SELECTION STATE ──────────────────────────── */

.liked-tile.selected {
  outline: 2px solid var(--text-primary);
  outline-offset: -2px;
  box-shadow: var(--shadow-md);
}

.liked-tile-check {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}


/* ─── 18. SCROLLBAR STYLING ───────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}


/* ─── 19. FOCUS VISIBLE (Accessibility) ───────────────────────── */

:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
  outline: none;
}


/* ─── 20. RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 480px) {
  :root {
    --page-padding: var(--space-4);
  }

  .panel {
    margin: var(--space-2) var(--space-3) var(--space-3);
    padding: var(--space-5);
    border-radius: var(--radius-md);
  }

  .swipe-image-wrap img {
    height: 460px;
  }

  .liked-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  .liked-tile img {
    height: 180px;
  }

  .outfit-slot {
    width: 120px;
    height: 150px;
  }

  .outfit-slot img {
    height: 100px;
  }

  .tryon-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .panel {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }

  .header {
    max-width: 640px;
    margin: 0 auto;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
  }

  .tabs {
    max-width: 640px;
    margin: 0 auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  body {
    padding-bottom: 80px;
  }
}


/* ─── 21b. DISCOVER — MASONRY GRID & PRODUCT CARDS ─────────── */

.discover-section {
  padding: var(--space-3) var(--space-4) var(--space-4);
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.discover-section .filter-bar-wrap {
  padding: 0 var(--space-1);
}

.discover-section .filter-bar {
  margin-left: var(--space-1);
  margin-right: var(--space-1);
}

.discover-section .empty-state {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-secondary);
}

.discover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding: 0 var(--space-1);
}
.discover-greeting {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface-tertiary);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.view-toggle-btn {
  width: 36px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: var(--transition-all);
}
.view-toggle-btn.active {
  background: var(--surface-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.masonry-grid {
  columns: 2;
  column-gap: 12px;
  padding: 0;
}

.product-card {
  break-inside: avoid;
  margin-bottom: 16px;
  background: var(--surface-primary);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-secondary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-in-out);
}
.product-card:active {
  transform: scale(0.97);
}

.product-card-image {
  position: relative;
  overflow: hidden;
}
.product-card-image img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.tryon-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-all);
  -webkit-tap-highlight-color: transparent;
}
.tryon-pill:hover {
  background: rgba(0, 0, 0, 0.85);
}
.tryon-pill svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
}

.product-card-info {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-card-brand {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 500;
}

.product-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.product-card-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.product-card-heart {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-disabled);
  transition: color var(--duration-fast) ease,
              transform var(--duration-fast) var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.product-card-heart svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: fill var(--duration-fast) ease, stroke var(--duration-fast) ease;
}
.product-card-heart.liked {
  color: var(--color-like);
}
.product-card-heart.liked svg {
  fill: var(--color-like);
  stroke: var(--color-like);
}

.discover-load-more {
  text-align: center;
  padding: var(--space-4) 0 var(--space-8);
}

.btn-load-more {
  padding: var(--space-3) var(--space-8);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  background: var(--surface-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-all);
}
.btn-load-more:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Scroll-to-top FAB */
.scroll-to-top-fab {
  position: fixed;
  bottom: 80px;
  left: 16px;
  z-index: 90;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-secondary);
  background: var(--surface-primary);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.1));
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.scroll-to-top-fab.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.scroll-to-top-fab:active {
  transform: scale(0.9);
}

/* ─── 22a. AI CHAT SHEET ─────────────────────────────────────── */

.ai-chat-sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: calc(90vh - 20px);
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.ai-chat-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ai-chat-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  scroll-behavior: smooth;
}

.ai-chat-prompts {
  padding: var(--space-3) var(--space-5);
  flex-shrink: 0;
}

.ai-chat-input-row {
  padding: var(--space-3) var(--space-5) var(--space-4);
  border-top: 1px solid var(--border-secondary);
  margin-top: 0;
  flex-shrink: 0;
}


/* ─── 22b. CLOSET — Category Rows ──────────────────────────── */

.closet-panel {
  padding: var(--space-5) 0;
}
.closet-panel h2 {
  padding: 0 var(--space-5);
}

.closet-category {
  margin-bottom: var(--space-6);
}

.closet-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5) var(--space-3);
}

.new-outfit-header-btn {
  background: none;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-all);
  white-space: nowrap;
}
.new-outfit-header-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}
.new-outfit-header-btn:active {
  transform: scale(0.96);
}

.closet-section-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  color: var(--text-secondary);
}

.closet-section-count {
  color: var(--text-tertiary);
  font-weight: 400;
}

.category-scroll-row {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding: 0 var(--space-5);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-scroll-row::-webkit-scrollbar {
  display: none;
}

.closet-item-card {
  flex: 0 0 120px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-out);
}
.closet-item-card:active {
  transform: scale(0.96);
}

.closet-item-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-secondary);
  display: block;
  margin-bottom: var(--space-1);
}

.closet-item-brand {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.closet-item-title {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* -- Outfit Board Cards -- */
.outfit-board-row {
  gap: var(--space-3);
}

.outfit-board-card {
  flex: 0 0 140px;
  height: 180px;
  background: var(--surface-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-secondary);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-in-out);
}
.outfit-board-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.outfit-board-preview {
  flex: 1;
  display: flex;
  gap: 2px;
  overflow: hidden;
}
.outfit-board-preview img {
  flex: 1;
  object-fit: cover;
  min-width: 0;
}

.outfit-board-name {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.outfit-board-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border-primary);
  background: transparent;
}

.outfit-board-add-icon {
  font-size: var(--text-2xl);
  color: var(--text-tertiary);
  font-weight: 300;
  line-height: 1;
}

.outfit-board-price {
  display: block;
  padding: 0 var(--space-3) var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-align: center;
}

/* -- Empty state for Combination from Wardrobe -- */
.outfit-empty-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  text-align: center;
}
.outfit-empty-inline p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin: 0;
}
.outfit-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  border: 2px dashed var(--border-primary);
  border-radius: var(--radius-md);
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.outfit-empty-btn:active {
  border-color: var(--accent);
  color: var(--accent);
}

/* -- Curated board card (violet accent) -- */
.curated-board-card {
  border: 1.5px solid var(--color-ai) !important;
}

/* -- Curated section label -- */
.curated-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  color: var(--color-ai);
}

/* -- Outfit builder actions (Save + Try On) -- */
.outfit-builder-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.outfit-builder-actions .btn-tryon {
  flex: 1;
  width: auto;
  margin: 0;
}
.outfit-builder-actions .btn-tryon:disabled {
  opacity: 0.5;
  cursor: default;
}

/* -- Outfit Detail Sheet -- */
.outfit-detail-sheet {
  padding: var(--space-4) var(--space-5) var(--space-6);
}
.outfit-detail-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin: 0 0 var(--space-1);
  color: var(--text-primary);
}
.outfit-detail-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-4);
}
.outfit-detail-source.curated {
  color: var(--color-ai);
}
.outfit-detail-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.outfit-detail-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
  cursor: pointer;
  transition: background 0.15s;
}
.outfit-detail-item:active {
  background: var(--surface-tertiary);
}
.outfit-detail-item-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.outfit-detail-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.outfit-detail-item-brand {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.outfit-detail-item-title {
  font-size: var(--text-sm);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.outfit-detail-item-price {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.outfit-detail-total {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--border-secondary);
  margin-bottom: var(--space-4);
}
.outfit-detail-preview {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-secondary);
}
.outfit-detail-preview img {
  flex: 1;
  min-width: 0;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.outfit-detail-preview--tryon {
  justify-content: center;
}
.outfit-detail-preview--tryon img {
  flex: none;
  width: 100%;
  max-width: 280px;
  aspect-ratio: auto;
  border-radius: var(--radius-lg);
}

.outfit-detail-actions {
  display: flex;
  gap: var(--space-3);
}
.outfit-detail-btn {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.outfit-detail-btn:active { opacity: 0.7; }
.outfit-detail-btn.edit {
  background: var(--accent);
  color: var(--text-inverse);
}
.outfit-detail-btn.edit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.outfit-detail-btn.tryon {
  background: var(--color-ai, #7c3aed);
  color: #fff;
}
.outfit-detail-btn.tryon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.outfit-detail-btn.remove {
  background: var(--color-error, #DC2626);
  color: #fff;
}
.outfit-detail-btn.remove:active {
  opacity: 0.85;
}


/* ─── 22c. DIGITAL WARDROBE ────────────────────────────────── */

/* -- Section Dividers -- */
.closet-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-5) var(--space-3);
  margin-top: var(--space-4);
}
.closet-divider-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  color: var(--text-secondary);
}
.closet-divider-count {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-weight: 400;
}

/* -- Category Filter Chips -- */
.dw-category-chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: 0 var(--space-5) var(--space-3);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.dw-category-chips::-webkit-scrollbar { display: none; }

.dw-chip {
  flex-shrink: 0;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-primary);
  background: transparent;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  font-family: var(--font-sans);
}
.dw-chip.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
}
.dw-chip:not(.active):hover {
  border-color: var(--border-strong);
}

/* -- 3-Column Grid -- */
.dw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  padding: 0 var(--space-5);
}

/* -- Add Card -- */
.dw-add-card {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 2px dashed var(--border-primary);
  border-radius: var(--radius-lg);
  background: transparent;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: 500;
  transition: all var(--duration-normal) var(--ease-out);
}
.dw-add-card:hover {
  border-color: var(--border-strong);
  color: var(--text-secondary);
}
.dw-add-card:active {
  transform: scale(0.97);
}

/* -- Item Card -- */
.dw-item-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-secondary);
  transition: transform var(--duration-normal) var(--ease-out);
}
.dw-item-card:active {
  transform: scale(0.96);
}
.dw-item-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dw-item-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  font-size: 14px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.dw-item-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4) var(--space-2) var(--space-2);
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -- Empty Inline Prompt -- */
.dw-empty-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-5);
  text-align: center;
}
.dw-empty-icon {
  opacity: 0.5;
}
.dw-empty-text {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  max-width: 260px;
}
.dw-empty-add-btn {
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--text-primary);
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  font-family: var(--font-sans);
}
.dw-empty-add-btn:hover {
  background: var(--text-primary);
  color: var(--text-inverse);
}

/* -- Add Sheet -- */
.dw-add-sheet {
  padding: 0 var(--space-5) var(--space-5);
}
.dw-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0 var(--space-4);
}
.dw-add-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--text-primary);
  margin: 0;
}
.dw-step-bar {
  display: flex;
  gap: 6px;
}
.dw-step-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-primary);
  transition: background var(--duration-fast) var(--ease-out);
}
.dw-step-dot.active {
  background: var(--text-primary);
}
.dw-step-dot.done {
  background: var(--color-success);
}
.dw-add-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.dw-add-hint {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin: 0;
}

/* -- Photo Upload (step 1) -- */
.dw-photo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  aspect-ratio: 3 / 4;
  max-height: 340px;
  border: 2px dashed var(--border-primary);
  border-radius: var(--radius-lg);
  background: var(--surface-secondary);
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.dw-photo-upload:hover {
  border-color: var(--border-strong);
}
.dw-photo-text {
  font-size: var(--text-sm);
  font-weight: 500;
}
.dw-photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dw-photo-change {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-3);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 500;
  text-align: center;
}
.dw-next-btn {
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: none;
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: opacity var(--duration-fast) var(--ease-out);
}
.dw-next-btn:hover { opacity: 0.85; }

/* -- Category Picker (step 2) -- */
.dw-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.dw-cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-3);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-primary);
  background: var(--surface-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  font-family: var(--font-sans);
}
.dw-cat-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-primary);
}
.dw-cat-btn:active, .dw-cat-btn.active {
  border-color: var(--text-primary);
  background: var(--text-primary);
}
.dw-cat-btn:active .dw-cat-label, .dw-cat-btn.active .dw-cat-label {
  color: var(--text-inverse);
}
.dw-cat-icon {
  font-size: 28px;
  line-height: 1;
}
.dw-cat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

/* -- Details Form (step 3) -- */
.dw-detail-preview {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.dw-detail-preview img {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-secondary);
}
.dw-detail-cat {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}
.dw-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.dw-field-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}
.dw-field-input {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  background: var(--surface-secondary);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out);
}
.dw-field-input:focus {
  border-color: var(--border-focus);
}
.dw-field-input::placeholder {
  color: var(--text-disabled);
}
.dw-save-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-2);
}
.dw-save-btn {
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: none;
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: opacity var(--duration-fast) var(--ease-out);
}
.dw-save-btn:hover { opacity: 0.85; }
.dw-skip-btn {
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--duration-fast) var(--ease-out);
}
.dw-skip-btn:hover { border-color: var(--border-strong); }

/* -- AI Analysis Progress & Badges -- */
.dw-ai-progress {
  padding: var(--space-3) 0;
  text-align: center;
}
.dw-ai-progress-inner {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.dw-skip-ai-btn {
  margin-top: var(--space-3);
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  text-decoration: underline;
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
}
.dw-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary, #6c5ce7);
  background: color-mix(in srgb, var(--color-primary, #6c5ce7) 12%, transparent);
  padding: 2px 7px;
  border-radius: var(--radius-full, 100px);
  vertical-align: middle;
  margin-left: 4px;
}
.dw-bg-badge {
  color: #00b894;
  background: color-mix(in srgb, #00b894 12%, transparent);
  margin-top: var(--space-1);
  display: inline-block;
}
.dw-detail-cat-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.dw-detail-cat {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.dw-change-cat-btn {
  background: none;
  border: none;
  color: var(--color-primary, #6c5ce7);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  padding: 2px 6px;
  text-decoration: underline;
  font-family: var(--font-sans);
}

/* -- Item Detail Sheet -- */
.dw-detail-sheet {
  padding: var(--space-3) var(--space-5) var(--space-5);
}
.dw-detail-img-wrap {
  width: 100%;
  max-height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.dw-detail-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dw-detail-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.dw-detail-cat-tag {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}
.dw-detail-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--text-primary);
  margin: 0;
}
.dw-detail-meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
}
.dw-detail-meta strong {
  color: var(--text-primary);
  font-weight: 600;
}
.dw-detail-date {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin: var(--space-2) 0 0;
}
.dw-detail-actions {
  display: flex;
  gap: var(--space-3);
}
.dw-detail-edit-btn {
  flex: 1;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  background: transparent;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--duration-fast) var(--ease-out);
}
.dw-detail-edit-btn:hover { border-color: var(--border-strong); }
.dw-detail-delete-btn {
  flex: 1;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-error);
  background: transparent;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-error);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--duration-fast) var(--ease-out);
}
.dw-detail-delete-btn:hover { background: var(--color-error-bg); }


/* ─── 23. BOTTOM SHEET (Reusable) ──────────────────────────── */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-drawer);
  animation: backdropFadeIn var(--duration-normal) var(--ease-in-out) both;
}
.sheet-backdrop.closing {
  animation: backdropFadeOut var(--duration-normal) var(--ease-in-out) both;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-drawer) + 1);
  background: var(--surface-primary);
  border-top-left-radius: var(--radius-2xl);
  border-top-right-radius: var(--radius-2xl);
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawerSlideUp var(--duration-slow) var(--ease-out) both;
  transition: transform var(--duration-slow) var(--ease-out);
}
.bottom-sheet.closing {
  animation: drawerSlideDown var(--duration-slow) var(--ease-in-out) both;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  margin: var(--space-3) auto var(--space-1);
  flex-shrink: 0;
  opacity: 0.6;
  cursor: grab;
}

.sheet-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ─── 24. QUICK TRY-ON SHEET ─────────────────────────────────── */

.tryon-sheet {
  padding: 0 var(--space-5) var(--space-5);
}

.tryon-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0 var(--space-4);
  border-bottom: 1px solid var(--border-secondary);
  margin-bottom: var(--space-4);
  gap: var(--space-2);
}

.tryon-back-btn {
  background: none;
  border: none;
  padding: var(--space-1);
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  border-radius: 50%;
  transition: background 0.15s;
}
.tryon-back-btn:active {
  background: var(--bg-tertiary);
}

.tryon-sheet-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  text-align: center;
}

.tryon-sheet-product {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.tryon-sheet-product-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-secondary);
}

.tryon-sheet-product-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tryon-sheet-product-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.tryon-sheet-product-meta {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.tryon-sheet-selfie {
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 200px;
}

.tryon-sheet-selfie-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
}

.tryon-sheet-generate {
  margin: 0 0 var(--space-4);
}
.tryon-sheet-generate:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.tryon-sheet-upload {
  margin-bottom: var(--space-4);
}

.tryon-sheet-loading {
  text-align: center;
  padding: var(--space-8) 0;
}

.tryon-sheet-loading-text {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-4);
  transition: opacity var(--duration-normal) ease;
}


/* ─── 25. PROFILE TAB ────────────────────────────────────────── */

.profile-section {
  margin-bottom: var(--space-6);
}

.profile-section-title {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-tertiary);
  margin: 0 0 var(--space-4);
}

.profile-placeholder {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}


/* ═══════════════════════════════════════════════════════════════
   DELIVERABLES: Chat Micro-interactions, Animations, Drawer
   Premium AI Stylist: WhatsApp polish x Net-a-Porter editorial
   ═══════════════════════════════════════════════════════════════ */

/* ─── D1. CHAT BUBBLE ENTRANCE ANIMATIONS ─────────────────────── */
@keyframes bubbleSlideInLeft {
  from { opacity: 0; transform: translateX(-16px) translateY(6px); }
  to { opacity: 1; transform: translateX(0) translateY(0); }
}
@keyframes bubbleSlideInRight {
  from { opacity: 0; transform: translateX(16px) translateY(6px); }
  to { opacity: 1; transform: translateX(0) translateY(0); }
}
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-bubble { animation: bubbleSlideInLeft var(--duration-slow) var(--ease-out) both; }
.chat-bubble.user { animation-name: bubbleSlideInRight; }
.chat-bubble.assistant .bubble-content { border: 1px solid var(--border-secondary); }

/* Typing indicator: 3 animated bouncing dots */
.chat-bubble.typing .bubble-content {
  padding: 14px 22px; display: flex; align-items: center;
  min-width: 68px; font-style: normal; color: transparent; overflow: hidden;
}
.typing-dots { display: flex; align-items: center; gap: 5px; height: 20px; }
.typing-dot {
  width: 7px; height: 7px; border-radius: var(--radius-full);
  background: var(--text-tertiary); animation: typingDot 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

/* Enhanced markdown in bubbles */
.bubble-content ol { margin: 6px 0 10px; padding-left: 20px; }
.bubble-content li { line-height: var(--leading-normal); }
.bubble-content li::marker { color: var(--text-tertiary); }
.chat-bubble.user .bubble-content li::marker { color: rgba(255,255,255,0.5); }
.chat-bubble.user .bubble-content code { background: rgba(255,255,255,0.15); }

/* ─── D2. SUGGESTED PROMPTS — Stagger + Smooth Hide ───────────── */
@keyframes promptFadeOut {
  from { opacity: 1; transform: translateY(0); max-height: 200px; margin-bottom: var(--space-3); }
  to { opacity: 0; transform: translateY(-8px); max-height: 0; margin-bottom: 0; padding: 0; overflow: hidden; }
}
@keyframes promptScaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1); }
}

.stylist-prompts {
  overflow: hidden;
  transition: opacity var(--duration-normal) var(--ease-in-out),
              max-height var(--duration-slow) var(--ease-out),
              margin var(--duration-slow) var(--ease-out);
}
.stylist-prompts.hiding {
  animation: promptFadeOut var(--duration-slow) var(--ease-out) forwards;
  pointer-events: none;
}
.stylist-prompts .prompt-chip { animation: promptScaleIn var(--duration-slow) var(--ease-out) both; }
.stylist-prompts .prompt-chip:nth-child(1) { animation-delay: 0ms; }
.stylist-prompts .prompt-chip:nth-child(2) { animation-delay: 60ms; }
.stylist-prompts .prompt-chip:nth-child(3) { animation-delay: 120ms; }
.stylist-prompts .prompt-chip:nth-child(4) { animation-delay: 180ms; }

/* Green online indicator for stylist */
@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(26,122,76,0.35); }
  70% { box-shadow: 0 0 0 5px rgba(26,122,76,0); }
  100% { box-shadow: 0 0 0 0 rgba(26,122,76,0); }
}
.stylist-context { display: flex; align-items: center; gap: var(--space-2); }
.stylist-context::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: var(--radius-full); background: var(--color-success);
  flex-shrink: 0; animation: pulseGreen 2s ease infinite;
}

/* ─── D3. CHAT INPUT — Circular Send + Disabled State ─────────── */
.btn-send {
  width: 42px; height: 42px; min-width: 42px; padding: 0;
  border-radius: var(--radius-full); font-size: 0;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.btn-send::after {
  content: ''; display: block; width: 13px; height: 13px;
  border: 2.5px solid var(--text-inverse); border-bottom: none; border-left: none;
  transform: rotate(-45deg) translate(-1px, 1px);
  transition: transform var(--duration-fast) var(--ease-out);
}
.btn-send:disabled {
  background: var(--border-primary); cursor: not-allowed;
  opacity: 0.6; transform: none !important; box-shadow: none !important;
}
.btn-send:disabled::after { opacity: 0.45; }
.chat-input-row input:disabled {
  background: var(--surface-secondary); color: var(--text-disabled); cursor: not-allowed;
}
.chat-char-count {
  position: absolute; right: 56px; bottom: 18px; font-size: var(--text-xs);
  color: var(--text-tertiary); opacity: 0; transition: opacity var(--duration-fast) ease;
  pointer-events: none; font-variant-numeric: tabular-nums;
}
.chat-char-count.visible { opacity: 1; }
.chat-char-count.near-limit { color: var(--color-warning); }
.chat-char-count.at-limit { color: var(--color-error); font-weight: 600; }

/* ─── D4. GLOBAL MICRO-ANIMATIONS ─────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.fade-in { animation: fadeIn var(--duration-normal) var(--ease-out) both; }
.slide-up { animation: slideUp var(--duration-slow) var(--ease-out) both; }
.scale-in { animation: scaleIn var(--duration-normal) var(--ease-out) both; }

button:active:not(:disabled), .prompt-chip:active:not(:disabled), .filter-chip:active:not(:disabled) {
  transform: scale(0.96) !important; transition: transform 60ms ease !important;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-secondary) 25%, var(--surface-tertiary) 37%, var(--surface-secondary) 63%);
  background-size: 200% 100%; animation: shimmer 1.8s ease infinite; border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: var(--space-2); border-radius: var(--radius-sm); }
.skeleton-text:last-child { width: 60%; }
.skeleton-image { width: 100%; height: 200px; border-radius: var(--radius-md); }

.panel { animation: slideUp var(--duration-slow) var(--ease-out) both; }
.swipe-image-wrap { animation: scaleIn var(--duration-slow) var(--ease-out) both; }
.liked-tile { animation: scaleIn var(--duration-slow) var(--ease-out) both; }
.liked-tile:nth-child(1) { animation-delay: 0ms; }
.liked-tile:nth-child(2) { animation-delay: 40ms; }
.liked-tile:nth-child(3) { animation-delay: 80ms; }
.liked-tile:nth-child(4) { animation-delay: 120ms; }
.liked-tile:nth-child(5) { animation-delay: 160ms; }
.liked-tile:nth-child(6) { animation-delay: 200ms; }
.liked-tile:nth-child(n+7) { animation-delay: 240ms; }
.liked-tile-check { animation: scaleIn var(--duration-fast) var(--ease-spring) both; }
.tryon-result { animation: scaleIn var(--duration-slow) var(--ease-out) both; }
.selfie-preview img { animation: fadeIn var(--duration-normal) var(--ease-out) both; }
.stylist-chat, .chat-messages, .drawer-chat { scroll-behavior: smooth; }

/* ─── D5. DRAWER OVERLAY — Backdrop Blur + Slide ──────────────── */
@keyframes drawerSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes drawerSlideDown { from { transform: translateY(0); } to { transform: translateY(100%); } }
@keyframes backdropFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdropFadeOut { from { opacity: 1; } to { opacity: 0; } }

.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.32);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: calc(var(--z-drawer) - 1);
  animation: backdropFadeIn var(--duration-normal) var(--ease-in-out) both;
}
.drawer-backdrop.closing { animation: backdropFadeOut var(--duration-normal) var(--ease-in-out) both; }

.stylist-drawer {
  animation: drawerSlideUp var(--duration-slow) var(--ease-out) both;
  border-top-left-radius: var(--radius-2xl); border-top-right-radius: var(--radius-2xl);
}
.stylist-drawer.closing { animation: drawerSlideDown var(--duration-slow) var(--ease-in-out) both; }

.drawer-handle {
  width: 36px; height: 4px; background: var(--border-strong);
  border-radius: var(--radius-full); margin: var(--space-3) auto var(--space-1);
  flex-shrink: 0; opacity: 0.6;
}
.drawer-close {
  width: 34px; height: 34px; border-radius: var(--radius-full);
  background: var(--surface-tertiary); display: flex; align-items: center; justify-content: center;
}
.drawer-close:hover { transform: scale(1.05); }
.drawer-product img { box-shadow: var(--shadow-sm); }

/* ─── 21. REDUCED MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── 26. ONBOARDING ──────────────────────────────────────────── */

.ob-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--surface-primary);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ob-screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

/* ─── Progress Dots ──────────────────────────────────────────── */

.ob-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 1.25rem 0 0.75rem;
  width: 100%;
}

.ob-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-tertiary);
  transition: all 0.3s ease;
}

.ob-progress-dot.filled {
  background: var(--accent);
}

.ob-progress-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ─── Shared Typography ──────────────────────────────────────── */

.ob-heading {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.ob-subheading {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.ob-skip-link {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 1rem;
  cursor: pointer;
}
.ob-skip-link span {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
}

.ob-selfie-tip {
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-ai, #7c5cfc);
  font-weight: 500;
  margin: var(--space-2, 0.5rem) 0 0;
  text-align: center;
}
.ob-selfie-gallery-link {
  font-size: var(--text-xs, 0.75rem);
  color: var(--text-tertiary);
  cursor: pointer;
  text-decoration: underline;
  margin: var(--space-1, 0.25rem) 0 0;
  text-align: center;
}
.ob-selfie-gallery-link:hover { color: var(--text-secondary); }

.ob-skip-step {
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin-top: 1rem;
  padding: 0.5rem;
}
.ob-skip-step:hover {
  color: var(--accent);
}

.ob-privacy {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.75rem;
}

/* ─── Gender Selection ───────────────────────────────────────── */

.ob-gender-cards {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 320px;
  margin-top: 1.5rem;
}

.ob-gender-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 2rem 1rem;
  background: var(--surface-secondary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ob-gender-card:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.ob-gender-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(124, 106, 239, 0.15);
}

.ob-gender-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.ob-gender-card.selected .ob-gender-icon {
  color: var(--accent);
}

.ob-gender-label {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── Profile Gender Toggle ─────────────────────────────────── */

.profile-gender-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
}

.profile-gender-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-gender-btn.active {
  background: var(--accent);
  color: var(--text-inverse);
  font-weight: 600;
}

.profile-gender-btn:not(.active):hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* ─── Primary Button ─────────────────────────────────────────── */

.ob-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--text-inverse);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
  margin-top: 1.5rem;
}
.ob-btn-primary:hover {
  background: var(--accent-hover);
}
.ob-btn-primary:active {
  transform: scale(0.97);
}
.ob-btn-primary.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ob-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  background: var(--accent-light);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  transition: background 0.2s ease;
}
.ob-btn-secondary:hover {
  background: var(--surface-tertiary);
}

/* ─── Screen 0: Welcome ──────────────────────────────────────── */

.ob-welcome {
  justify-content: flex-end;
}

.ob-welcome-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  overflow: hidden;
}

.ob-welcome-animation {
  position: relative;
  width: 220px;
  height: 280px;
}

.ob-card {
  position: absolute;
  width: 160px;
  height: 220px;
  border-radius: 16px;
  background: var(--surface-secondary);
  border: 1px solid var(--surface-tertiary);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.ob-card-1 {
  top: 20px;
  left: 0;
  transform: rotate(-8deg);
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--surface-secondary) 100%);
  animation: obCardFloat1 3s ease-in-out infinite;
}

.ob-card-2 {
  top: 10px;
  left: 30px;
  transform: rotate(2deg);
  background: linear-gradient(135deg, var(--color-ai-bg) 0%, var(--surface-secondary) 100%);
  animation: obCardFloat2 3s ease-in-out infinite 0.3s;
}

.ob-card-3 {
  top: 0;
  left: 55px;
  transform: rotate(8deg);
  background: linear-gradient(135deg, var(--color-like-bg) 0%, var(--surface-secondary) 100%);
  animation: obCardFloat3 3s ease-in-out infinite 0.6s;
}

@keyframes obCardFloat1 {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-8deg) translateY(-8px); }
}
@keyframes obCardFloat2 {
  0%, 100% { transform: rotate(2deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-12px); }
}
@keyframes obCardFloat3 {
  0%, 100% { transform: rotate(8deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-6px); }
}

.ob-welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem 3rem;
  text-align: center;
}

.ob-brand {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin: 0 0 0.75rem;
}

.ob-tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 2rem;
}

/* ─── Screen 1: Vibe Picker ──────────────────────────────────── */

.ob-vibe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin-bottom: 0.5rem;
}

/* 2-column grid when AI-curated images are loaded */
.ob-vibe-grid--images {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.ob-vibe-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 1.25rem 0.5rem;
  background: var(--surface-secondary);
  border: 2px solid transparent;
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Image variant: no padding at top, let image fill */
.ob-vibe-card--image {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.ob-vibe-card:hover {
  background: var(--surface-tertiary);
}

.ob-vibe-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.ob-vibe-card--image.selected {
  background: var(--accent-light);
}

.ob-vibe-emoji {
  font-size: 1.75rem;
  line-height: 1;
}

/* Outfit image inside vibe card */
.ob-vibe-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  display: block;
  pointer-events: none;
}

.ob-vibe-card--image .ob-vibe-label {
  padding: 8px 4px 10px;
  font-size: 0.85rem;
}

.ob-vibe-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: none;
}

.ob-vibe-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-inverse);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: obPopIn 0.2s ease;
  pointer-events: none;
}

@keyframes obPopIn {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ─── Screen 2: Budget ───────────────────────────────────────── */

.ob-budget-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.ob-budget-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  background: var(--surface-secondary);
  border: 2px solid transparent;
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.ob-budget-option:hover {
  background: var(--surface-tertiary);
}

.ob-budget-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.ob-budget-icon {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 40px;
  text-align: center;
}

.ob-budget-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ─── Screen 3: Selfie Upload ────────────────────────────────── */

.ob-selfie-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
  padding: 3rem 1.5rem;
  border: 2px dashed var(--surface-tertiary);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: var(--surface-secondary);
}

.ob-selfie-upload:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.ob-photo-processing {
  border-style: solid;
  border-color: var(--accent);
  cursor: default;
}
.ob-processing-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.ob-selfie-icon {
  color: var(--text-tertiary);
}
.ob-selfie-upload:hover .ob-selfie-icon {
  color: var(--accent);
}

.ob-selfie-actions {
  display: flex;
  gap: 12px;
}

.ob-selfie-preview {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin: 1rem auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.ob-selfie-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ob-selfie-change {
  display: block;
  margin: 0.5rem auto 0;
  padding: 0.375rem 1rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.15s ease;
}
.ob-selfie-change:active {
  transform: scale(0.92);
}

/* ─── Screen 4: Ready ────────────────────────────────────────── */

.ob-ready {
  justify-content: center;
}

.ob-ready-content {
  justify-content: center;
}

.ob-ready-checkmark {
  margin-bottom: 1.5rem;
  animation: obCheckBounce 0.6s ease;
}

@keyframes obCheckBounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

.ob-check-path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: obCheckDraw 0.6s ease 0.3s forwards;
}

@keyframes obCheckDraw {
  to { stroke-dashoffset: 0; }
}

.ob-ready-heading {
  font-size: 2rem;
}

.ob-ready-summary {
  width: 100%;
  max-width: 300px;
  background: var(--surface-secondary);
  border-radius: var(--radius-lg, 12px);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}

.ob-ready-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
}

.ob-ready-summary-row + .ob-ready-summary-row {
  border-top: 1px solid var(--surface-tertiary);
}

.ob-ready-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.ob-ready-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── Confetti ───────────────────────────────────────────────── */

.ob-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  overflow: hidden;
}

.ob-confetti-dot {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: obConfettiFall linear forwards;
}

@keyframes obConfettiFall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0.3);
    opacity: 0;
  }
}

/* ─── 27. STYLE ME AI (Phase 2.5) ─────────────────────────────── */

/* ─── Style Me Card (Closet hero) ────────────────────────────── */

.style-me-card {
  background: linear-gradient(135deg, var(--color-ai-bg) 0%, #FFFFFF 100%);
  border: 1px solid rgba(124, 106, 239, 0.15);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.06));
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.style-me-card:active {
  transform: scale(0.97);
}

.style-me-card-icon {
  margin-bottom: 8px;
  animation: smSparkleRotate 0.8s ease-out;
}
@keyframes smSparkleRotate {
  0% { transform: rotate(-90deg) scale(0); opacity: 0; }
  100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

.style-me-card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.style-me-card-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.style-me-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  background: var(--color-ai);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 22px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.style-me-card-btn:hover {
  opacity: 0.9;
}

/* ─── Style Me Sheet ─────────────────────────────────────────── */

.style-me-sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ─── Step Bar ───────────────────────────────────────────────── */

.style-me-steps {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  margin-bottom: 4px;
}

.sm-step-seg {
  flex: 1;
  height: 4px;
  background: var(--surface-tertiary);
  border-radius: 2px;
  transition: background 0.3s ease;
}
.sm-step-seg.filled {
  background: var(--color-ai);
}

.sm-step-label {
  font-size: 0.675rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 20px;
  margin-bottom: 12px;
}

/* ─── Shared Screen Layout ───────────────────────────────────── */

.sm-screen {
  padding: 0 20px 20px;
  flex: 1;
}

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

.sm-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.sm-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 16px;
}

.sm-edit-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-ai);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
}

.sm-back-btn {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}
.sm-back-btn:hover {
  color: var(--text-primary);
}

.sm-back-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  text-decoration: underline;
}

/* ─── CTA Button ─────────────────────────────────────────────── */

.sm-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  background: var(--color-ai);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  margin-top: 20px;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.sm-cta:hover { opacity: 0.9; }
.sm-cta:active { transform: scale(0.97); }
.sm-cta.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ─── Step 1: Style Profile ──────────────────────────────────── */

.sm-profile-section {
  background: var(--surface-secondary);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.sm-profile-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.sm-profile-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.sm-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sm-chip-readonly {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--color-ai-bg);
  color: var(--color-ai);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 16px;
}

.sm-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--surface-primary);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1.5px solid var(--surface-tertiary);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sm-chip:hover {
  border-color: var(--color-ai);
}
.sm-chip.selected {
  background: var(--color-ai);
  color: white;
  border-color: var(--color-ai);
}

.sm-empty-text {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-style: italic;
}

.sm-patterns {
  font-size: 0.8rem;
  color: var(--text-primary);
}
.sm-pattern-row {
  margin-bottom: 4px;
  line-height: 1.5;
}
.sm-pattern-key {
  color: var(--text-secondary);
  font-weight: 500;
}
.sm-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 3px;
  vertical-align: middle;
  border: 1px solid rgba(0,0,0,0.1);
}

.sm-selfie-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sm-selfie-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface-tertiary);
}
.sm-selfie-status {
  font-size: 0.8rem;
  color: var(--color-success);
  font-weight: 500;
}
.sm-selfie-change {
  font-size: 0.75rem;
  color: var(--color-ai);
  cursor: pointer;
  font-weight: 500;
}

/* ─── Step 2: Style Brief ────────────────────────────────────── */

.sm-brief-section {
  margin-bottom: 18px;
}

.sm-brief-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.sm-required {
  color: var(--color-like);
}
.sm-optional {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 0.7rem;
}

.sm-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sm-brand-chips {
  max-height: 120px;
  overflow-y: auto;
}

.sm-brief-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1.5px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sm-brief-chip:hover {
  background: var(--surface-tertiary);
}
.sm-brief-chip.selected {
  background: var(--color-ai);
  color: white;
  border-color: var(--color-ai);
}

/* Anchor piece */
.sm-anchor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: var(--surface-secondary);
  border: 1.5px dashed var(--surface-tertiary);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s ease;
  width: 100%;
}
.sm-anchor-btn:hover {
  border-color: var(--color-ai);
  color: var(--color-ai);
}

.sm-anchor-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--color-ai-bg);
  border-radius: 10px;
}
.sm-anchor-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}
.sm-anchor-name {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}
.sm-anchor-clear {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px 8px;
}

.sm-anchor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.sm-anchor-item {
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease;
}
.sm-anchor-item:active {
  transform: scale(0.95);
}
.sm-anchor-item img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 10px;
}
.sm-anchor-item-name {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Step 3: Outfit Suggestions ─────────────────────────────── */

.sm-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0 0 16px;
  line-height: 1.5;
}

.sm-outfits-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Pagination: "Look N of M" label */
.sm-page-label {
  text-align: center;
  font-size: var(--text-xs, 12px);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--space-2, 8px);
}

/* Pagination controls */
.sm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3, 12px);
  margin: var(--space-3, 12px) 0;
}

.sm-pagination-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--surface-tertiary, #e5e2db);
  background: var(--surface-primary, #fff);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.sm-pagination-arrow:hover:not(:disabled) {
  background: var(--surface-secondary, #f5f4f0);
  border-color: var(--text-tertiary);
}
.sm-pagination-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.sm-pagination-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sm-pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-tertiary, #e5e2db);
  cursor: pointer;
  transition: all 0.2s ease;
}
.sm-pagination-dot.active {
  background: var(--color-ai, #6c5ce7);
  width: 20px;
  border-radius: 4px;
}
.sm-pagination-dot:hover:not(.active) {
  background: var(--text-tertiary);
}

.outfit-suggestion-card {
  background: var(--surface-primary);
  border: 1px solid var(--surface-tertiary);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  animation: smCardEntrance 0.3s ease both;
}
.outfit-suggestion-card:nth-child(2) { animation-delay: 0.1s; }
.outfit-suggestion-card:nth-child(3) { animation-delay: 0.2s; }

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

.outfit-suggestion-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.outfit-suggestion-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.outfit-item-cell {
  text-align: center;
}
.outfit-item-cell img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 6px;
}
.outfit-item-brand {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.outfit-item-title {
  display: block;
  font-size: 0.7rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.outfit-item-price {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.outfit-suggestion-total {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.outfit-suggestion-total.over-budget {
  color: var(--color-warning, #b45309);
}
.outfit-suggestion-total.under-budget {
  color: var(--color-success);
}
.budget-note {
  font-size: 0.7rem;
  font-weight: 400;
  margin-left: 8px;
}
.budget-note.success {
  color: var(--color-success);
}

.outfit-suggestion-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
  border-left: 3px solid var(--color-ai);
  padding-left: 12px;
  margin: 8px 0 12px;
}

.outfit-suggestion-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.sm-action-btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.sm-action-btn:active { transform: scale(0.96); }
.sm-action-btn.primary {
  background: var(--color-ai);
  color: white;
}
.sm-action-btn.primary:hover { opacity: 0.9; }
.sm-action-btn.secondary {
  background: transparent;
  color: var(--color-ai);
  border: 1px solid var(--color-ai);
}
.sm-action-btn.secondary:hover { background: var(--color-ai-bg); }
.sm-action-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.outfit-suggestion-hearts {
  display: flex;
  gap: 6px;
  padding-top: 4px;
}
.outfit-heart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-secondary);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.outfit-heart-btn:hover { background: var(--color-like-bg); }
.outfit-heart-btn.liked { background: var(--color-like-bg); }

/* Loading state */
.sm-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 20px;
  text-align: center;
}
.sm-loading-sparkle {
  animation: smSpinSlow 2s linear infinite;
  margin-bottom: 16px;
}
@keyframes smSpinSlow {
  to { transform: rotate(360deg); }
}
.sm-loading-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  transition: opacity 0.3s ease;
}

/* Realistic skeleton — mimics the actual outfit card layout */
.sm-skeleton-outfit {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border-secondary, #eee);
  padding: 16px;
  background: var(--surface-primary);
}
.sm-skeleton-outfit-header {
  height: 16px;
  width: 50%;
  border-radius: 8px;
  margin-bottom: 16px;
}
.sm-skeleton-outfit-items {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.sm-skeleton-outfit-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sm-skeleton-outfit-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
}
.sm-skeleton-outfit-line {
  height: 10px;
  border-radius: 5px;
  width: 80%;
}
.sm-skeleton-outfit-line.short {
  width: 50%;
}
.sm-skeleton-outfit-actions {
  display: flex;
  gap: 8px;
}
.sm-skeleton-outfit-btn {
  flex: 1;
  height: 36px;
  border-radius: 10px;
}

/* Style tips — single tip, auto-advancing */
.style-tips-carousel {
  margin-top: 20px;
  width: 100%;
}
.style-tip-single {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--color-ai-bg, rgba(124, 106, 239, 0.06));
  border: 1px solid var(--color-ai-border, rgba(124, 106, 239, 0.12));
  transition: opacity 0.3s ease;
}
.style-tip-single.style-tip-fade-out {
  opacity: 0;
}
.style-tip-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}
.style-tip-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* Error state */
.sm-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  text-align: center;
}
.sm-error-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 16px 0;
  line-height: 1.5;
}

/* Generate more */
.sm-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--color-ai);
  border: 1.5px solid var(--color-ai);
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.2s ease;
}
.sm-more-btn:hover { background: var(--color-ai-bg); }

.sm-more-done {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 12px;
}

/* ─── Step 4: Try-On Visualization ───────────────────────────── */

.sm-tryon-title {
  margin-bottom: 12px;
}

.sm-tryon-items {
  margin-bottom: 16px;
}

.sm-tryon-selfie {
  margin-bottom: 8px;
}

.sm-tryon-upload {
  text-align: center;
  padding: 20px 0;
}

/* Loading */
.sm-tryon-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.sm-tryon-loading-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3/4;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-secondary);
}
.sm-tryon-loading-selfie {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.sm-tryon-loading-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(124, 106, 239, 0.08) 40%,
    rgba(124, 106, 239, 0.15) 50%,
    rgba(124, 106, 239, 0.08) 60%,
    transparent 100%
  );
  animation: smShimmer 1.5s ease-in-out infinite;
}
@keyframes smShimmer {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
.sm-tryon-loading-text {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Result */
.sm-tryon-result {
  text-align: center;
  animation: smResultFade 0.5s ease;
}
@keyframes smResultFade {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.sm-tryon-result-img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.sm-tryon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  padding-bottom: 12px;
}

/* ─── AUTO TRY-ON RESULT ────── */
.sm-product-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
}
.sm-product-strip::-webkit-scrollbar { display: none; }
.sm-product-strip-item {
  flex: 0 0 100px;
  scroll-snap-align: start;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}
.sm-product-strip-item img {
  width: 100px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-secondary, #f5f5f5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.sm-strip-brand {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}
.sm-strip-price {
  font-size: 0.8rem;
  font-weight: 600;
}
.sm-product-strip-item .outfit-item-buy {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  color: var(--text-primary);
  text-decoration: none;
  padding: 0;
}
.sm-fallback-notice {
  padding: 12px 16px;
  margin: 8px 0;
  background: var(--surface-secondary, #fff8e1);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ─── 21b-pre. SELFIE PROMPT ON STYLE BRIEF ────── */
.sm-selfie-prompt {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--surface-secondary, #f8f8fa);
  border: 1.5px dashed var(--color-ai, #7C6AEF);
  border-radius: 12px;
}
.sm-selfie-prompt-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sm-selfie-prompt-icon {
  flex-shrink: 0;
  color: var(--color-ai, #7C6AEF);
}
.sm-selfie-prompt-text {
  flex: 1;
  font-size: var(--text-sm, 14px);
  color: var(--text-secondary, #666);
  line-height: 1.3;
}
.sm-selfie-prompt-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--color-ai, #7C6AEF);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: var(--text-sm, 14px);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sm-selfie-prompt-btn:active {
  opacity: 0.85;
}

/* ─── 21b. DUAL MODE SELECTOR & DREAM CLOSET (Phase 2.5B) ────── */

/* Mode selector container */
.sm-mode-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid var(--color-border);
}
.sm-mode-label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-accent);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Mode cards */
.sm-mode-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border: 2px solid var(--color-accent);
  border-radius: 16px;
  background: var(--color-bg);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s, background 0.2s;
}
.sm-mode-card:active {
  transform: scale(0.97);
}
.sm-mode-card:hover {
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.15);
}
.sm-mode-card.disabled {
  opacity: 0.35;
  pointer-events: none;
  border-color: var(--color-border);
}
/* Ready-state entrance animation */
.sm-mode-card.sm-mode-ready {
  animation: modeCardPulse 1.8s ease-in-out 0.3s 1;
}
@keyframes modeCardPulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
  30% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.18); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}
.sm-mode-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}
.sm-mode-icon.curated {
  background: linear-gradient(135deg, var(--color-ai), #c084fc);
  color: #fff;
}
.sm-mode-icon.dream {
  background: linear-gradient(135deg, var(--color-ai), #c084fc);
  color: #fff;
}
.sm-mode-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.sm-mode-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}
.sm-mode-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.sm-mode-chevron {
  flex-shrink: 0;
  color: var(--color-accent);
  opacity: 0.7;
  transition: transform 0.2s, opacity 0.2s;
}
.sm-mode-card:hover .sm-mode-chevron {
  transform: translateX(3px);
  opacity: 1;
}

/* Dream Closet loading */
.sm-loading-dream {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 16px;
}
.sm-dream-shimmer-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
}
.sm-dream-shimmer-overlay {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  pointer-events: none;
}
.sm-dream-shimmer {
  width: 100%;
  height: 100%;
  border-radius: 20px;
}
.sm-loading-patience {
  font-size: 13px;
  color: var(--color-text-secondary);
  text-align: center;
  animation: smPatienceFade 0.5s ease;
}
@keyframes smPatienceFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dream outfit cards */
.dream-outfit-card {
  background: var(--color-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  animation: dreamCardReveal 0.5s ease both;
}
.dream-outfit-card:nth-child(2) {
  animation-delay: 0.15s;
}
@keyframes dreamCardReveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.dream-outfit-image {
  width: 100%;
  object-fit: contain;
  display: block;
}
.dream-outfit-image-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 14px;
}
.dream-outfit-body {
  padding: 16px 18px 20px;
}
.dream-outfit-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--color-text);
}
.dream-outfit-pieces {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.dream-piece {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.dream-piece-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-ai);
  min-width: 52px;
  flex-shrink: 0;
}
.dream-piece-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}
.dream-outfit-note {
  font-size: 13px;
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: 1.5;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
  margin-bottom: 12px;
}
.dream-outfit-actions {
  display: flex;
  gap: 8px;
}
.dream-outfit-actions .sm-action-btn {
  flex: 1;
}

/* ─── 21c. STYLE TAB (Phase 2.7) ─────────────────────────────── */

/* Style panel */
.style-panel {
  padding-bottom: 100px;
}

/* Hero CTA Card */
.style-hero-card {
  margin: var(--space-4);
  padding: var(--space-6) var(--space-5);
  background: linear-gradient(135deg, #F5F0FF 0%, #FFFFFF 60%, #FFF5F5 100%);
  border: 1px solid rgba(124, 106, 239, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(124, 106, 239, 0.08), 0 1px 4px rgba(0,0,0,0.04);
  min-height: 180px;
  cursor: pointer;
  animation: styleHeroEnter 400ms ease-out both;
}
.style-hero-card-icon {
  margin-bottom: var(--space-3);
  animation: sparkleRotate 800ms ease-out;
}
@keyframes sparkleRotate {
  from { transform: rotate(-90deg) scale(0.6); opacity: 0; }
  to { transform: rotate(0deg) scale(1); opacity: 1; }
}
.style-hero-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--color-text);
  margin: 0 0 var(--space-2);
}
.style-hero-card-sub {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 280px;
  margin: 0 0 var(--space-4);
}
.style-hero-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  min-width: 160px;
  padding: 0 var(--space-5);
  background: var(--color-ai);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(124, 106, 239, 0.3);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.style-hero-card-btn:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(124, 106, 239, 0.2);
}
@keyframes styleHeroEnter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Style Mode Cards (2-column grid) */
.style-mode-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: var(--space-4);
  animation: styleHeroEnter 400ms ease-out both;
}
.style-mode-card {
  padding: var(--space-5) var(--space-4);
  background: linear-gradient(135deg, #F5F0FF 0%, #FFFFFF 60%, #FFF5F5 100%);
  border: 1px solid rgba(124, 106, 239, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(124, 106, 239, 0.08), 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
  display: flex;
  flex-direction: row;
  gap: 14px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.style-mode-card:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(124, 106, 239, 0.2);
}
.style-mode-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.style-mode-card-icon.curated {
  background: linear-gradient(135deg, #7C6AEF, #A78BFA);
}
.style-mode-card-icon.dream {
  background: linear-gradient(135deg, #EC4899, #F472B6);
}
.style-mode-card-text {
  flex: 1;
  min-width: 0;
}
.style-mode-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--color-text);
  margin: 0;
}
.style-mode-card-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin: 2px 0 0;
}
.style-mode-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-width: 72px;
  padding: 0 var(--space-4);
  background: var(--color-ai);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(124, 106, 239, 0.3);
}

/* Preset mode highlight (Step 2 in Style Me sheet) */
.sm-mode-card--preset {
  border: 2px solid var(--color-ai);
  box-shadow: 0 0 12px rgba(124, 106, 239, 0.25), 0 2px 8px rgba(124, 106, 239, 0.15);
}

/* Dark mode: Style mode cards */
[data-theme="dark"] .style-mode-card {
  background: linear-gradient(135deg, #1e1b2e 0%, #1a1a1a 60%, #1f1a1a 100%);
  border-color: rgba(167, 139, 250, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .style-mode-card:active {
  box-shadow: 0 1px 4px rgba(167, 139, 250, 0.3);
}
/* Dark mode: Style hero card */
[data-theme="dark"] .style-hero-card {
  background: linear-gradient(135deg, #1e1b2e 0%, #1a1a1a 60%, #1f1a1a 100%);
  border-color: rgba(167, 139, 250, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
}
/* Dark mode: Dream outfit cards */
[data-theme="dark"] .dream-outfit-card {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .dream-outfit-image-placeholder {
  background: linear-gradient(135deg, #2a2a2a, #222222);
}

/* Dream Look Detail Sheet — reuses .dream-outfit-card styles */
.dream-detail-remove-btn {
  color: var(--color-error, #DC2626) !important;
  border-color: var(--color-error, #DC2626) !important;
}

/* Quick Briefs */
.quick-briefs-section {
  padding: var(--space-4) 0 0 var(--space-4);
}
.quick-briefs-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.quick-briefs-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-3);
  padding-right: var(--space-4);
}
.quick-briefs-row::-webkit-scrollbar { display: none; }
.quick-brief-card {
  flex: 0 0 100px;
  height: 120px;
  background: var(--surface-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 200ms ease, background 200ms ease;
}
.quick-brief-card:active {
  border-color: rgba(124, 106, 239, 0.3);
  background: var(--color-ai-bg);
}
.quick-brief-emoji {
  font-size: 28px;
  line-height: 1;
}
.quick-brief-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}

/* Past Styled Looks & Try-On Gallery (shared section styles) */
.style-history-section {
  padding: var(--space-5) 0 0 var(--space-4);
}
.style-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: var(--space-4);
  margin-bottom: var(--space-3);
}
.style-section-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  letter-spacing: 0.08em;
  font-weight: 600;
}
.style-history-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-3);
  padding-right: var(--space-4);
}
.style-history-row::-webkit-scrollbar { display: none; }
.style-history-card {
  flex: 0 0 140px;
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 120ms ease;
}
.style-history-card:active {
  transform: scale(0.97);
}
.style-history-card-img {
  width: 100%;
  display: block;
}
.style-history-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  object-fit: unset;
  overflow: hidden;
  background: var(--surface-secondary);
}
.style-history-collage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.style-history-collage img:first-child:nth-last-child(3) {
  grid-column: 1 / -1;
}
.style-history-card-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 11px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
}
.style-history-card-info {
  padding: var(--space-2);
}
.style-history-card-brief {
  font-size: 12px;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.style-history-card-date {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* Style Tab Empty Illustration */
.style-empty-illustration {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-6) var(--space-4);
  text-align: center;
}
.style-empty-illustration svg {
  opacity: 0.6;
  margin-bottom: var(--space-4);
}
.style-empty-illustration p {
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 240px;
  line-height: 1.5;
}

/* Style Tab Active State Override — violet instead of navy */
.tabs .tab[data-tab="style"].active svg {
  stroke: var(--color-ai);
}
.tabs .tab[data-tab="style"].active {
  color: var(--color-ai);
}

/* Lookbook Tab Active State Override — violet (AI content) */
.tabs .tab[data-tab="lookbook"].active svg {
  stroke: var(--color-ai);
}
.tabs .tab[data-tab="lookbook"].active {
  color: var(--color-ai);
}

/* ─── 21e. LOOKBOOK TAB ──────────────────────────────────────── */

.lookbook-panel {
  padding: var(--space-4) var(--space-4) 100px;
}
.lookbook-panel h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin: 0 0 var(--space-4);
}

/* Filter chip row */
.lookbook-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lookbook-filters::-webkit-scrollbar { display: none; }

.lookbook-chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-primary);
  background: var(--surface-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.lookbook-chip.active {
  background: var(--color-ai);
  color: #fff;
  border-color: var(--color-ai);
}

/* Card grid */
.lookbook-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Card */
.lookbook-card {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.lookbook-card:active {
  transform: scale(0.97);
}

.lookbook-card-img {
  width: 100%;
  display: block;
}

.lookbook-card-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  object-fit: unset;
  overflow: hidden;
}
.lookbook-card-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* If only 2 items, stack vertically */
.lookbook-card-collage img:first-child:nth-last-child(2),
.lookbook-card-collage img:first-child:nth-last-child(2) ~ img {
  grid-column: auto;
}
/* If 3 items, first item spans full width top row */
.lookbook-card-collage img:first-child:nth-last-child(3) {
  grid-column: 1 / -1;
}

.lookbook-card-body {
  padding: 8px 10px 10px;
}

/* Source badge */
.lookbook-source-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.lookbook-source-badge.dream {
  background: var(--color-ai-bg);
  color: var(--color-ai);
}
.lookbook-source-badge.stylist {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}
.lookbook-source-badge.my-pick {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.lookbook-source-badge.tryon {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.lookbook-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lookbook-card-date {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Empty state */
.lookbook-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}
.lookbook-empty svg {
  margin-bottom: 16px;
  opacity: 0.4;
}
.lookbook-empty p {
  font-size: 14px;
  line-height: 1.5;
  max-width: 240px;
  margin: 0 0 16px;
}
.lookbook-empty .lookbook-cta {
  padding: 10px 24px;
  background: var(--color-ai);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.lookbook-empty .lookbook-cta:active {
  transform: scale(0.97);
}

/* "See all in Lookbook" link for Style tab */
.lookbook-see-all-link {
  display: block;
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-ai);
  cursor: pointer;
  padding: 4px 0 8px;
}
.lookbook-see-all-link:hover {
  text-decoration: underline;
}

/* ─── Collection Picker Modal ─── */
.collection-picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-3, 12px);
  max-height: 200px;
  overflow-y: auto;
}
.collection-picker-item {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  padding: var(--space-2, 8px) var(--space-3, 12px);
  border: 1px solid var(--surface-tertiary, #e5e2db);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--surface-primary);
}
.collection-picker-item.selected {
  border-color: var(--color-ai, #6c5ce7);
  background: var(--surface-secondary, #f5f4f0);
}
.collection-picker-item input[type="checkbox"] { display: none; }
.collection-picker-name {
  flex: 1;
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  color: var(--text-primary);
}
.collection-picker-count {
  font-size: var(--text-xs, 12px);
  color: var(--text-tertiary);
}
.collection-picker-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--surface-tertiary, #e5e2db);
  position: relative;
  flex-shrink: 0;
}
.collection-picker-item.selected .collection-picker-check {
  border-color: var(--color-ai, #6c5ce7);
  background: var(--color-ai, #6c5ce7);
}
.collection-picker-item.selected .collection-picker-check::after {
  content: '';
  position: absolute;
  top: 3px; left: 6px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.collection-picker-create {
  display: flex;
  gap: var(--space-2, 8px);
  align-items: center;
}

/* ─── Lookbook Collections View ─── */
.lookbook-collections-bar {
  display: flex;
  gap: var(--space-2, 8px);
  margin-bottom: var(--space-3, 12px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lookbook-collections-bar::-webkit-scrollbar { display: none; }

.lookbook-col-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--surface-tertiary, #e5e2db);
  background: var(--surface-primary);
  font-size: var(--text-xs, 12px);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.lookbook-col-chip.active {
  background: var(--color-ai, #6c5ce7);
  color: #fff;
  border-color: var(--color-ai, #6c5ce7);
}
.lookbook-col-chip:hover:not(.active) {
  border-color: var(--text-tertiary);
}
.lookbook-col-chip.add-new {
  border-style: dashed;
  color: var(--color-ai, #6c5ce7);
}

/* Collection badge on lookbook cards */
.lookbook-card {
  position: relative;
}
.lookbook-card-col-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* Remove button on cards in collection view */
.lookbook-card-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease;
  line-height: 1;
}
.lookbook-card-remove:hover {
  background: rgba(204, 51, 64, 0.8);
}

/* Collection picker empty state */
.collection-picker-empty {
  text-align: center;
  padding: var(--space-3, 12px) 0;
}

/* Lightbox collection button styling */
.image-lightbox-btn-collection {
  border-color: rgba(108, 92, 231, 0.5);
  color: #c4b5fd;
}
.image-lightbox-btn-collection:hover {
  background: rgba(108, 92, 231, 0.25);
}

/* Liked items empty state */
.liked-empty-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  text-align: center;
}
.liked-empty-inline svg {
  opacity: 0.4;
}
.liked-empty-inline p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin: 0;
}

/* Closet empty state secondary link */
.closet-empty-style-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-ai);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}
.closet-empty-style-link:hover {
  text-decoration: underline;
}

/* ─── 21d. PROFILE MEASUREMENTS & MEASUREMENT HINTS ──────────── */

/* Measurements grid */
.measurements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  max-width: 100%;
}
.measurement-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
.measurement-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.measurement-field input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-primary);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.measurement-field input:focus {
  border-color: var(--color-ai);
}
.measurement-field input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
  font-size: 12px;
}
.profile-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 24px;
  background: var(--color-ai);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 120ms ease, background 200ms ease;
}
.profile-save-btn:active {
  transform: scale(0.97);
}
.profile-save-btn.saved {
  background: #22c55e;
}
.profile-privacy-note {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
}
.profile-section-hint {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}
.profile-pref-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-pref-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-tertiary);
}
.profile-panel {
  overflow: hidden;
  max-width: 100%;
}
.profile-panel .profile-section {
  padding: 16px;
  border-bottom: 1px solid var(--border-primary);
  overflow: hidden;
}
.profile-panel .profile-section:last-child {
  border-bottom: none;
}

/* Measurement hint in loading states */
.sm-measurement-hint {
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
  animation: smFadeIn 0.5s ease;
}
.sm-measurement-hint a {
  color: var(--color-ai);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}
.sm-measurement-hint a:hover {
  text-decoration: underline;
}

/* ─── 22. CHAT MINI-CARDS ────────────────────────────────────── */
.chat-product-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}
.chat-product-row::-webkit-scrollbar { display: none; }
.chat-mini-card {
  position: relative;
  flex: 0 0 130px;
  scroll-snap-align: start;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-surface);
}
.chat-match-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  line-height: 1.2;
  white-space: nowrap;
}
.chat-mini-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}
.chat-mini-info {
  padding: 6px 8px 2px;
}
.chat-mini-brand {
  font-size: 10px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.chat-mini-title {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.chat-mini-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
  margin-top: 2px;
}
.chat-mini-actions {
  display: flex;
  gap: 4px;
  padding: 4px 8px 8px;
}
.chat-mini-like,
.chat-mini-tryon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all 0.15s ease;
}
.chat-mini-like:hover { color: var(--color-like); border-color: var(--color-like); }
.chat-mini-like.liked { color: var(--color-like); border-color: var(--color-like); }
.chat-mini-tryon:hover { color: var(--color-ai); border-color: var(--color-ai); }

/* ─── 23. CHAT OUTFIT BOARDS ────────────────────────────────── */
.chat-outfit-board {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-surface);
  margin: 8px 0;
}
.chat-outfit-images {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
}
.chat-outfit-piece {
  text-align: center;
  flex: 1;
  max-width: 120px;
}
.chat-outfit-piece img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}
.chat-outfit-piece-name {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-outfit-plus {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-secondary);
}
.chat-outfit-meta {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  padding: 0 12px 8px;
}
.chat-outfit-actions {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}
.chat-outfit-tryon,
.chat-outfit-save {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.chat-outfit-tryon {
  background: var(--color-ai);
  color: white;
}
.chat-outfit-save {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.chat-outfit-tryon:hover,
.chat-outfit-save:hover { opacity: 0.85; }
.chat-outfit-save:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ─── 24. AI NOTIFICATION BUBBLE ─────────────────────────────── */
.ai-notification-bubble {
  position: fixed;
  bottom: 152px;
  right: 16px;
  max-width: 200px;
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  cursor: pointer;
  z-index: 1100;
  animation: notifSlideIn 0.35s ease;
}
.ai-notification-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 0 0 3px 0;
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes notifDismiss {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(12px) scale(0.9); }
}
[data-theme="dark"] .ai-notification-bubble {
  background: var(--surface-tertiary);
  color: var(--text-primary);
}
[data-theme="dark"] .ai-notification-bubble::after {
  background: var(--surface-tertiary);
}

/* ─── 25. IMAGE LIGHTBOX ─────────────────────────────────────── */

.image-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s ease;
}
.image-lightbox.open { opacity: 1; }

.image-lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.image-lightbox-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  max-width: 92vw; max-height: 92vh;
  transform: scale(0.92); transition: transform 0.25s ease;
}
.image-lightbox.open .image-lightbox-content { transform: scale(1); }

.image-lightbox-img {
  max-width: 100%; max-height: 78vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.image-lightbox-close {
  position: absolute; top: -12px; right: -12px;
  width: 36px; height: 36px;
  border-radius: 50%; border: none;
  background: var(--surface-card, #fff); color: var(--text-primary, #1a1a2e);
  font-size: 20px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  z-index: 2;
}

.image-lightbox-actions {
  display: flex; gap: 12px; margin-top: 16px;
}

.image-lightbox-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.15); color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 24px; font-size: 14px; font-weight: 500;
  cursor: pointer; backdrop-filter: blur(8px);
  transition: background 0.15s ease;
}
.image-lightbox-btn:hover { background: rgba(255,255,255,0.25); }
.image-lightbox-btn-danger { border-color: rgba(230,57,70,0.5); color: #ff6b6b; }
.image-lightbox-btn-danger:hover { background: rgba(230,57,70,0.25); }
.image-lightbox-btn svg { flex-shrink: 0; }

/* ─── 26. PROFILE PREFERENCES: READ-ONLY SUMMARY ────────────── */

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.profile-section-header .profile-section-title {
  margin-bottom: 0;
}
.profile-edit-link {
  background: none;
  border: none;
  color: var(--color-ai);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  padding: 4px 0;
  transition: opacity 0.15s ease;
}
.profile-edit-link:active {
  opacity: 0.6;
}
.profile-pref-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-pref-vibes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-vibe-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: var(--surface-secondary);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}
.profile-vibe-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-vibe-thumb-emoji {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.profile-pref-value {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
}
.profile-pref-empty {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-style: italic;
}

/* ─── Style DNA ──────────────────── */
.style-dna-stats {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.sd-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: var(--space-3);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}
.sd-stat-num {
  font-size: var(--text-xl, 1.25rem);
  font-weight: 700;
  color: var(--color-primary, #6c5ce7);
}
.sd-stat-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.sd-row {
  margin-bottom: var(--space-3);
}
.sd-row-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}
.sd-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sd-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  padding: 4px 10px;
  border-radius: var(--radius-full, 100px);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 500;
}
.sd-pill-color {
  gap: 5px;
}
.sd-pill .color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sd-pill-count {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 400;
}

.sd-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--color-primary, #6c5ce7) 10%, transparent);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}
.sd-banner-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.sd-banner-text {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ─── 27. ONBOARDING SELFIE UPLOAD FEEDBACK ──────────────────── */

.ob-selfie-success {
  border: 3px solid #22c55e;
  animation: obSelfiePulse 0.8s ease;
}

@keyframes obSelfiePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { box-shadow: 0 0 0 14px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.ob-selfie-check-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  animation: obCheckBounce 0.6s ease;
}

.ob-upload-check-path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: obCheckDraw 0.6s ease 0.3s forwards;
}

.ob-selfie-uploaded-text {
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #22c55e;
  margin: 8px 0 0;
  animation: obFadeIn 0.4s ease;
}

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

/* ─── 28. FULL-BODY PHOTO TIP ────────────────────────────────── */

.ob-photo-tip {
  font-size: var(--text-xs);
  color: var(--color-ai);
  font-weight: 500;
  margin: -4px 0 12px;
}

/* ─── 29. ITEM DRAWER: REMOVE FROM WARDROBE ─────────────────── */

.drawer-remove-wrap {
  border-top: 1px solid var(--border-secondary);
}

.drawer-remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-error);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-error);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.drawer-remove-btn:hover {
  background: var(--color-error-bg);
}

.drawer-remove-btn:active {
  background: var(--color-error);
  color: #fff;
}

/* ─── 30. LIKE-TO-WARDROBE FEEDBACK ──────────────────────────── */

/* Toast notification */
.wardrobe-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: var(--text-inverse);
  padding: 10px 20px;
  border-radius: var(--radius-full, 50px);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  animation: toastIn 0.3s ease forwards;
  white-space: nowrap;
}

.wardrobe-toast.toast-out {
  animation: toastOut 0.3s ease forwards;
}
.wardrobe-toast.toast-brief {
  bottom: 136px;
  pointer-events: none;
}

.wardrobe-toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* Action toast with button */
.action-toast {
  pointer-events: auto !important;
  gap: 12px;
}
.toast-action-btn {
  background: rgba(255,255,255,0.25);
  color: inherit;
  border: none;
  border-radius: var(--radius-sm, 6px);
  padding: 4px 12px;
  font-family: var(--font-sans);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.toast-action-btn:active { opacity: 0.7; }
.toast-dismiss-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 4px;
  margin-left: -4px;
}
.toast-dismiss-btn:hover { color: #fff; }

/* Continue browsing button in loading screens */
.bg-gen-continue-btn {
  margin-top: var(--space-3, 12px);
  padding: 8px 20px;
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-full, 50px);
  background: var(--surface-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-all, all 0.2s ease);
}
.bg-gen-continue-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Tab badge */
.tab-badge {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(16px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--color-ai);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  box-sizing: border-box;
  transition: opacity 0.2s ease;
}

.tab-badge:empty {
  display: none;
}

.tab-badge--pulse {
  animation: badgePulse 0.4s ease;
}

@keyframes badgePulse {
  0%   { transform: translateX(16px) scale(1); }
  50%  { transform: translateX(16px) scale(1.4); }
  100% { transform: translateX(16px) scale(1); }
}

/* Fly-to-wardrobe animation */
.fly-to-wardrobe {
  position: fixed;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-like-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  pointer-events: none;
  transition: transform 600ms cubic-bezier(0.4, 0, 1, 1), opacity 600ms ease;
  will-change: transform, opacity;
}

.fly-to-wardrobe svg {
  width: 16px;
  height: 16px;
}

/* ─── 31. AUTH / GOOGLE SIGN-IN ───────────────────────────────── */

/* Google Sign-In container */
.google-signin-wrap {
  display: flex;
  justify-content: center;
  margin: var(--space-3) 0;
}

/* "or" divider on welcome screen */
.ob-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-5) 0 var(--space-3);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}
.ob-divider::before,
.ob-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-primary);
}

/* Header layout for avatar */
#appHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#appHeader h1 { margin: 0; }
#headerRight { display: flex; align-items: center; }

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: none;
  padding: 0;
  background: var(--surface-secondary);
  cursor: pointer;
  flex-shrink: 0;
}
.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Profile account section */
.profile-account-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
}

.profile-account-photo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}
.profile-account-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-tertiary);
  color: var(--text-tertiary);
}

.profile-account-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-account-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-account-email {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-logout-btn {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-colors);
}
.profile-logout-btn:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

.profile-account-cta {
  text-align: center;
  padding: var(--space-4);
  background: var(--surface-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
}
.profile-account-cta p {
  margin: 0 0 var(--space-3);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* ─── 32a. DARK MODE TOGGLE ─────────────────────────────────── */
.profile-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
}
.profile-theme-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-strong);
  border-radius: var(--radius-full);
  transition: background-color var(--duration-normal) var(--ease-in-out);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--surface-primary);
  border-radius: 50%;
  transition: transform var(--duration-normal) var(--ease-out);
}
.toggle-switch input:checked + .toggle-slider {
  background-color: var(--color-ai);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* ─── 32b. PROFILE DELETE BUTTON ─────────────────────────────── */
.profile-danger-zone {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-primary);
}
.profile-delete-btn {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-error, #cc3340);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.profile-delete-btn:active {
  opacity: 0.8;
}

/* ─── 32c. PROFILE HEADER ROW + SETTINGS GEAR ──────────────── */
.profile-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.profile-header-row h2 {
  margin: 0;
}
.profile-settings-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.profile-settings-btn:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}
.profile-settings-btn:active {
  background: var(--surface-tertiary);
}

/* ─── 32d. SETTINGS SHEET ──────────────────────────────────── */
.settings-sheet {
  padding: var(--space-2) var(--space-5) var(--space-6);
}
.settings-sheet-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 var(--space-5);
}
.settings-section {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-primary);
}
.settings-section-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}
.settings-danger-zone {
  border-bottom: none;
  padding-top: var(--space-5);
}

/* ─── 32e. PROFILE PHOTO THUMBNAIL GRID ────────────────────── */
.profile-photos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.profile-photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-2);
  background: var(--surface-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.profile-photo-card:hover {
  background: var(--surface-tertiary);
  border-color: var(--border-strong);
}
.profile-photo-card:active {
  transform: scale(0.97);
}
.profile-photo-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  object-position: center top;
}
.profile-photo-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-tertiary);
  border: 1.5px dashed var(--border-strong);
  color: var(--text-tertiary);
}
.profile-photo-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.profile-photo-action {
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 500;
}

/* ─── 32f. PHOTO PREVIEW SHEET ─────────────────────────────── */
.photo-preview-sheet {
  padding: var(--space-2) var(--space-5) var(--space-6);
}
.photo-preview-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 var(--space-4);
}
.photo-preview-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--text-primary);
  max-width: 320px;
  margin: 0 auto var(--space-4);
}
.photo-preview-img {
  display: block;
  width: 100%;
  max-height: 400px;
  object-fit: contain;
}
.photo-preview-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}
.photo-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  background: var(--surface-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.photo-preview-btn:hover {
  background: var(--surface-tertiary);
  border-color: var(--border-strong);
}
.photo-preview-btn--remove {
  background: transparent;
  border-color: var(--color-error);
  color: var(--color-error);
}
.photo-preview-btn--remove:hover {
  background: var(--color-error-bg);
}
.photo-preview-empty {
  text-align: center;
  padding: var(--space-6) 0;
  color: var(--text-secondary);
}
.photo-preview-empty p {
  margin: 0 0 var(--space-4);
}

/* ─── AI FEATURE CARDS (Color Analysis, Fit Diagnosis) ─────── */
.ai-feature-loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.fit-guide-promo {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px dashed var(--border-primary);
}
.fit-guide-promo-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 var(--space-3);
}
.fit-guide-promo-btn {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.color-analysis-card,
.fit-diagnosis-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.ca-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.ca-season {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}
.ca-undertone, .ca-metal {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-full, 100px);
}
.ca-summary, .fd-summary {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.ca-colors-section, .fd-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.ca-label, .fd-label, .sa-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}
.ca-color-pills, .fd-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ca-pill, .fd-pill {
  font-size: var(--text-xs);
  padding: 4px 10px;
  border-radius: var(--radius-full, 100px);
  font-weight: 500;
}
.ca-pill-best {
  background: color-mix(in srgb, #00b894 14%, transparent);
  color: #00b894;
}
.ca-pill-avoid {
  background: color-mix(in srgb, #e74c3c 14%, transparent);
  color: #e74c3c;
}
.fd-pill-best {
  background: color-mix(in srgb, var(--color-primary, #6c5ce7) 14%, transparent);
  color: var(--color-primary, #6c5ce7);
}
.fd-pill-avoid {
  background: color-mix(in srgb, #e74c3c 14%, transparent);
  color: #e74c3c;
}
.ca-redo-btn {
  background: transparent !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-primary) !important;
  font-size: var(--text-sm) !important;
  padding: var(--space-2) !important;
}
.fd-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.fd-body-type {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}
.fd-tips {
  margin: 0;
  padding-left: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}
.fd-tips li {
  margin-bottom: var(--space-1);
}
.fd-proportion-tip {
  font-size: var(--text-sm);
  color: var(--color-primary, #6c5ce7);
  font-style: italic;
  margin: 0;
}

/* ─── CHAT THUMBS UP/DOWN FEEDBACK ────────────────────────── */
.chat-feedback {
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-1);
  opacity: 0.5;
  transition: opacity 0.2s;
}
.chat-bubble:hover .chat-feedback,
.chat-feedback.has-feedback {
  opacity: 1;
}
.chat-fb-btn {
  background: none;
  border: none;
  padding: 3px 6px;
  cursor: pointer;
  color: var(--text-tertiary);
  border-radius: var(--radius-md);
  transition: all 0.15s;
  display: flex;
  align-items: center;
}
.chat-fb-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.chat-fb-btn.active {
  color: var(--color-primary, #6c5ce7);
}
.chat-fb-btn.active[data-fb="down"] {
  color: #e74c3c;
}

/* ─── SHOPPING ADVISOR ────────────────────────────────────── */
.sa-loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.sa-cta {
  text-align: center;
  padding: var(--space-4) var(--space-3);
}
.sa-cta p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
}
.sa-cta-btn {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  border: none;
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: opacity 0.15s;
}
.sa-cta-btn:hover { opacity: 0.85; }
.sa-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0 var(--space-3);
}
.sa-analysis {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.sa-gaps ul {
  margin: var(--space-1) 0 0;
  padding-left: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.sa-gaps li {
  margin-bottom: var(--space-1);
}
.sa-rec-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
.sa-rec-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}
.sa-rec-item:hover {
  background: var(--bg-tertiary);
}
.sa-rec-item img {
  width: 56px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.sa-rec-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sa-rec-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sa-rec-brand {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}
.sa-rec-reason {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}
.sa-rec-score {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-primary, #6c5ce7);
}
.sa-capsule {
  font-size: var(--text-sm);
  color: var(--color-primary, #6c5ce7);
  font-style: italic;
  margin: 0;
}
.sa-redo-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
  font-size: var(--text-sm);
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.15s;
}
.sa-redo-btn:hover { border-color: var(--border-strong); }

/* ─── 32b. ONBOARDING CAROUSEL ───────────────────────────────── */
.ob-carousel-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}
.ob-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-primary, #d4d4d4);
  transition: background 0.2s, transform 0.2s;
}
.ob-carousel-dot.filled {
  background: var(--text-tertiary, #8a8a8a);
}
.ob-carousel-dot.active {
  background: var(--accent, #1A1A2E);
  transform: scale(1.25);
}
.ob-walkthrough-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-8) 0 var(--space-4);
}
.ob-walkthrough-title {
  font-family: var(--font-display), serif;
  font-size: var(--text-2xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

/* ─── 31a-pre. SINGLE GO BUTTON IN STYLE BRIEF ──────────────── */
.sm-go-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 0;
  margin-top: 8px;
  background: var(--color-ai, #7C6AEF);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-xl, 16px);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 4px 16px rgba(124, 106, 239, 0.3);
}
.sm-go-btn:active {
  transform: scale(0.97);
}
.sm-go-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ─── 31a. CUSTOM NOTE IN STYLE BRIEF ────────────────────────── */
.sm-custom-note {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1.5px solid var(--border-primary, #ddd);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-primary, #fff);
  resize: none;
  line-height: 1.4;
  transition: border-color 0.15s;
}
.sm-custom-note:focus {
  outline: none;
  border-color: var(--color-ai, #7C6AEF);
}
.sm-custom-note::placeholder {
  color: var(--text-tertiary, #999);
}

/* ─── 31b. QUICK FILL ROW IN STYLE BRIEF ─────────────────────── */
.sm-quickfill {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-secondary, #eee);
}
.sm-quickfill-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary, #999);
  margin-bottom: 8px;
}
.sm-quickfill-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sm-quickfill-row::-webkit-scrollbar { display: none; }
.sm-quickfill-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1.5px solid var(--border-primary, #ddd);
  border-radius: 20px;
  background: var(--surface-primary, #fff);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #555);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.sm-quickfill-chip:active {
  transform: scale(0.97);
}
.sm-quickfill-chip.active {
  border-color: var(--color-ai, #7C6AEF);
  color: var(--color-ai, #7C6AEF);
  background: rgba(124, 106, 239, 0.06);
}
.sm-quickfill-emoji {
  font-size: 14px;
  line-height: 1;
}
.sm-quickfill-chip.surprise {
  border-style: dashed;
  border-color: var(--color-ai, #7C6AEF);
  color: var(--color-ai, #7C6AEF);
}
.sm-quickfill-chip.surprise.active {
  background: var(--color-ai, #7C6AEF);
  color: #fff;
  border-style: solid;
}

/* ─── Onboarding Back Button ─────────────────────────────────── */
.ob-back-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-primary, #e5e5e5);
  background: var(--surface-primary);
  color: var(--text-primary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.ob-back-btn:active {
  background: var(--surface-secondary);
}

/* ─── 33. BUY BUTTONS ────────────────────────────────────────── */

/* Drawer buy chip — green accent */
.buy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-success-bg) !important;
  border-color: var(--color-success) !important;
  color: var(--color-success) !important;
}
.buy-chip:hover {
  background: var(--color-success) !important;
  color: #fff !important;
}
.buy-chip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Drawer try-on chip — purple accent (matches try-on buttons across app) */
.tryon-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--color-primary, #6c5ce7) 12%, transparent) !important;
  border-color: var(--color-primary, #6c5ce7) !important;
  color: var(--color-primary, #6c5ce7) !important;
}
.tryon-chip:hover {
  background: var(--color-primary, #6c5ce7) !important;
  color: #fff !important;
}
.tryon-chip:hover svg {
  stroke: #fff;
}
.tryon-chip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Grid card buy pill — positioned right of try-on pill */
.buy-pill {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(26, 122, 76, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-all);
  -webkit-tap-highlight-color: transparent;
}
.buy-pill:hover {
  background: rgba(26, 122, 76, 1);
}
.buy-pill svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
}

/* Swipe mode buy button — smaller than skip/like */
.btn-buy {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--color-success-bg);
  background: var(--surface-primary);
  color: var(--color-success);
  transition: var(--transition-all);
  box-shadow: var(--shadow-md);
}
.btn-buy svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
}
.btn-buy:hover {
  background: var(--color-success);
  color: var(--text-inverse);
  border-color: var(--color-success);
  box-shadow: 0 6px 20px rgba(26, 122, 76, 0.3);
  transform: translateY(-2px) scale(1.05);
}
.btn-buy:active {
  transform: translateY(0) scale(0.95);
}

/* Chat mini-card buy button */
.chat-mini-buy {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all 0.15s ease;
}
.chat-mini-buy:hover {
  color: var(--color-success);
  border-color: var(--color-success);
}

/* Chat outfit buy button */
.chat-outfit-buy {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--color-success);
  background: none;
  color: var(--color-success);
  transition: opacity 0.15s;
}
.chat-outfit-buy:hover {
  background: var(--color-success-bg);
}

/* Shopping advisor buy button */
.sa-rec-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-success);
  background: none;
  color: var(--color-success);
  cursor: pointer;
  transition: all 0.15s ease;
  align-self: center;
}
.sa-rec-buy:hover {
  background: var(--color-success);
  color: #fff;
}
.sa-rec-buy svg {
  width: 16px;
  height: 16px;
}

/* Style Me outfit item buy button */
.outfit-item-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 14px;
  border: 1px solid var(--color-success);
  background: none;
  color: var(--color-success);
  cursor: pointer;
  transition: all 0.15s ease;
}
.outfit-item-buy:hover {
  background: var(--color-success);
  color: #fff;
}
.outfit-item-buy svg {
  width: 12px;
  height: 12px;
}

/* Style Me "Buy All" button */
.sm-action-btn.buy {
  background: var(--color-success);
  color: white;
}
.sm-action-btn.buy:hover {
  opacity: 0.9;
}

/* Outfit detail sheet per-item buy button */
.outfit-detail-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-success);
  background: none;
  color: var(--color-success);
  cursor: pointer;
  transition: all 0.15s ease;
  align-self: center;
  margin-left: auto;
}
.outfit-detail-buy:hover {
  background: var(--color-success);
  color: #fff;
}
.outfit-detail-buy svg {
  width: 14px;
  height: 14px;
}

/* Outfit detail "Buy Items" action button */
.outfit-detail-btn.buy {
  background: var(--color-success);
  color: #fff;
}

/* ─── 33b. BUY BUTTONS — DARK MODE ───────────────────────────── */
[data-theme="dark"] .buy-pill {
  background: rgba(52, 211, 153, 0.85);
  color: #0a0a0a;
}
[data-theme="dark"] .buy-pill:hover {
  background: rgba(52, 211, 153, 1);
}
[data-theme="dark"] .buy-pill svg {
  stroke: #0a0a0a;
}
[data-theme="dark"] .btn-buy {
  border-color: var(--color-success);
  background: var(--surface-primary);
}
[data-theme="dark"] .btn-buy:hover {
  box-shadow: 0 6px 20px rgba(52, 211, 153, 0.3);
}

/* ─── 33c. WEATHER CARD (Style Me Brief) ─────────────────────── */

/* ─── 34. FEEDBACK SHEET ─────────────────────────────────────── */

.profile-feedback-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.profile-feedback-btn:hover {
  background: var(--surface-tertiary);
  border-color: var(--border-strong);
}
.profile-feedback-btn:active {
  opacity: 0.85;
}

.feedback-sheet {
  padding: var(--space-4) var(--space-5) var(--space-6);
}
.feedback-sheet-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 var(--space-4);
}
.feedback-type-pills {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.feedback-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-primary);
  background: var(--surface-primary);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-pill:hover {
  border-color: var(--border-strong);
}
.feedback-pill.active {
  background: var(--color-ai);
  color: #fff;
  border-color: var(--color-ai);
}
.feedback-pill-icon {
  font-size: 16px;
  line-height: 1;
}
.feedback-textarea {
  width: 100%;
  min-height: 120px;
  padding: var(--space-3);
  border: 1.5px solid var(--border-primary);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--text-sm);
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.feedback-textarea:focus {
  outline: none;
  border-color: var(--color-ai);
}
.feedback-textarea::placeholder {
  color: var(--text-tertiary);
}
.feedback-attach-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-4);
}
.feedback-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.feedback-attach-btn:hover {
  background: var(--surface-tertiary);
}
.feedback-attach-name {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.feedback-submit-btn {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-ai);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.feedback-submit-btn:hover {
  opacity: 0.92;
}
.feedback-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── 32. PRINT ──────────────────────────────────────────────── */
@media print {
  .chat-input-row, .stylist-prompts, .drawer-backdrop, .stylist-drawer,
  .filter-bar-wrap, .filter-bar, .swipe-actions, .tabs { display: none !important; }
}
