/* === Style Mirror Web - Refined Minimalist Design === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #F5F1EB;
  --bg2: #EDE8DF;
  --bg3: #E2DBCF;
  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --muted: #8a8275;
  --muted2: #a8a095;
  --rule: rgba(26,26,26,0.08);
  --rule2: rgba(26,26,26,0.04);
  --surface: rgba(255,255,255,0.6);
  --surface2: rgba(255,255,255,0.88);
  --accent: #b08050;
  --accent-dark: #8f6640;
  --accent-light: rgba(176,128,80,0.08);
  --accent-mid: rgba(176,128,80,0.15);
  --success: #5a7a58;
  --radius: 6px;
  --radius-sm: 3px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(26,26,26,0.04);
  --shadow: 0 4px 20px rgba(26,26,26,0.06);
  --shadow-lg: 0 12px 40px rgba(26,26,26,0.1);
  --font: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Songti SC', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Courier New', monospace;
  --nav-h: 68px;
  --max-w: 1240px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.005em;
}

button { font-family: var(--font); cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: var(--font); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }

/* === Top Navigation === */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  z-index: 100;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.nav-brand:hover { opacity: 0.7; }
.brand-mark {
  width: 34px; height: 34px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: -0.01em;
}
.brand-name {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.nav-steps {
  display: flex;
  gap: 0.2rem;
  flex: 1;
  justify-content: center;
}
.nav-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.73rem;
  color: var(--muted);
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-step .step-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 600;
  transition: all 0.3s var(--ease);
  font-family: var(--font-mono);
}
.nav-step.active { color: var(--ink); }
.nav-step.active .step-num { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.nav-step.done { color: var(--success); }
.nav-step.done .step-num { background: var(--success); border-color: var(--success); color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }

/* Mobile button - proper button design */
.nav-mobile-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 100px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.25s var(--ease);
  letter-spacing: 0.02em;
}
.nav-mobile-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--surface2);
}
.nav-restart {
  padding: 0.45rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.nav-restart:hover { border-color: var(--ink); color: var(--ink); }

/* === Main Content === */
.app-main {
  padding-top: var(--nav-h);
  min-height: 100vh;
}
.screen { display: none; }
.screen.active { display: block; animation: fadeUp 0.5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.page-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 2.5rem 5rem;
}
.page-layout.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3.5rem;
  align-items: start;
}

.page-header { margin-bottom: 2.5rem; }
.page-header.wide { text-align: center; margin-bottom: 3rem; }
.page-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
  line-height: 1.25;
}
.page-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 520px;
  line-height: 1.7;
  font-weight: 400;
}
.page-header.wide .page-subtitle { margin: 0 auto; }

/* === Buttons === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.6rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.25s var(--ease);
  border: none;
  white-space: nowrap;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(176,128,80,0.25);
}
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-primary.btn-full { width: 100%; justify-content: center; }
.btn-primary svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}
.btn-primary:hover:not(:disabled) svg { transform: translateX(3px); }

/* Hero CTA - large filled button */
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2.2rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 0.3s var(--ease);
  margin-top: 2rem;
  box-shadow: 0 4px 20px rgba(26,26,26,0.15);
}
.btn-hero:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(176,128,80,0.3);
  gap: 1.1rem;
}
.btn-hero svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}
.btn-hero:hover svg { transform: translateX(4px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.btn-outline:hover { border-color: var(--ink); color: var(--ink); background: var(--surface2); }
.btn-outline svg { flex-shrink: 0; }

.btn-ghost {
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
  border: 1px solid var(--rule);
}
.btn-ghost:hover { background: #fff; border-color: var(--ink); }

.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.3rem;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.btn-retry:hover { border-color: var(--ink); color: var(--ink); background: var(--surface2); }
.btn-retry svg { flex-shrink: 0; }

.btn-secondary {
  padding: 0.7rem 1.4rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }

.btn-next { margin-top: 1.2rem; }

/* === Welcome / Hero === */
.welcome-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4.5rem 2.5rem 4rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 5rem;
  align-items: center;
  min-height: calc(100vh - var(--nav-h));
}
.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--rule);
  color: var(--muted);
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero-title .accent { color: var(--accent); font-weight: 500; }
.hero-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 0.5rem;
  max-width: 460px;
  font-weight: 400;
}
.hero-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 2.5rem;
  margin-bottom: 0;
  border-top: 1px solid var(--rule);
}
.feature-item {
  display: flex;
  gap: 0.9rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule);
  transition: all 0.3s var(--ease);
}
.feature-item:nth-child(odd) { border-right: 1px solid var(--rule); padding-right: 1.5rem; }
.feature-item:nth-child(even) { padding-left: 1.5rem; }
.feature-item:hover { color: var(--accent); }
.feature-icon {
  width: 36px; height: 36px;
  background: var(--surface2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all 0.3s var(--ease);
}
.feature-item:hover .feature-icon {
  background: var(--accent-light);
  border-color: var(--accent-mid);
}
.feature-text { display: flex; flex-direction: column; gap: 0.15rem; }
.feature-text strong { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.01em; }
.feature-text span { font-size: 0.72rem; color: var(--muted); font-weight: 400; }
.privacy-short {
  font-size: 0.7rem;
  color: var(--muted2);
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: 0.01em;
}

.hero-right { display: flex; justify-content: center; align-items: center; }
.hero-preview {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}
.preview-card {
  width: 220px;
  height: 340px;
  background: var(--surface2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.5s var(--ease);
  box-shadow: var(--shadow-sm);
}
.preview-card-1 {
  transform: rotate(-4deg) translateY(20px);
  z-index: 1;
}
.preview-card-2 {
  transform: rotate(3deg) translateY(-10px);
  z-index: 2;
  margin-left: -20px;
  box-shadow: var(--shadow-lg);
}
.preview-card:hover {
  transform: rotate(0) translateY(-8px) scale(1.02);
  z-index: 10;
  box-shadow: var(--shadow-lg);
}
.preview-label {
  padding: 0.7rem 1rem;
  font-size: 0.6rem;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
}
.preview-img-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  opacity: 0.35;
  background: linear-gradient(160deg, #FAF8F4, var(--bg2));
  transition: transform 0.5s var(--ease);
}
.preview-card:hover .preview-img-placeholder { transform: scale(1.1); opacity: 0.5; }
.preview-arrow {
  color: var(--muted2);
  flex-shrink: 0;
  z-index: 5;
  margin: 0 -0.5rem;
  width: 36px; height: 36px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  transition: all 0.3s var(--ease);
  font-size: 1rem;
}
.preview-card:hover + .preview-arrow,
.preview-arrow:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
  transform: scale(1.1);
}

/* === Upload Area === */
.upload-area-web {
  border: 1.5px dashed var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.upload-area-web:hover, .upload-area-web.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.upload-area-web .upload-placeholder {
  text-align: center;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.upload-icon-web {
  color: var(--muted2);
  margin-bottom: 1.4rem;
  display: flex;
  justify-content: center;
  opacity: 0.4;
}
.upload-icon-web svg { width: 52px; height: 52px; stroke-width: 0.8; }
.upload-placeholder h3 { font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem; letter-spacing: 0; }
.upload-placeholder p { color: var(--muted); font-size: 0.78rem; margin-bottom: 1.6rem; }
.upload-btn-group { display: flex; gap: 0.6rem; justify-content: center; }
.upload-preview { width: 100%; height: 100%; position: relative; min-height: 400px; }
.upload-preview img { width: 100%; height: 100%; object-fit: contain; background: var(--bg2); border-radius: var(--radius-lg); min-height: 400px; }
.upload-preview-overlay {
  position: absolute;
  top: 1rem; right: 1rem;
}
.upload-loading {
  position: absolute;
  inset: 0;
  background: rgba(245,241,235,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.upload-loading-spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--bg3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Side Cards === */
.col-side { position: sticky; top: calc(var(--nav-h) + 2rem); }
.side-card {
  background: var(--surface2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  margin-bottom: 0.8rem;
}
.side-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
}
.req-list-web li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.4rem 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.req-check {
  width: 16px; height: 16px;
  background: transparent;
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.req-check svg { width: 10px; height: 10px; }
.privacy-card {
  display: flex;
  gap: 0.7rem;
  background: var(--accent-light);
  border-color: transparent;
}
.privacy-card .privacy-icon { flex-shrink: 0; opacity: 0.7; color: var(--accent); margin-top: 0.1rem; }
.privacy-card p { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.6; }
.privacy-card strong { font-size: 0.78rem; font-weight: 600; }
.side-hint { text-align: center; font-size: 0.7rem; color: var(--muted2); margin-top: 0.8rem; }

/* === Form Elements === */
.form-section {
  background: var(--surface2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.form-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
}
.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.form-group-web { margin-bottom: 0; }
.form-group-web label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.range-value {
  font-size: 2rem;
  font-weight: 400;
  font-family: var(--font-serif);
  color: var(--ink);
  margin-bottom: 0.6rem;
  line-height: 1;
}
.range-value span { font-size: 2.2rem; }
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 2px;
  background: var(--bg3);
  border-radius: 1px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid var(--bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); background: var(--accent); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.range-labels { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--muted2); margin-top: 0.4rem; font-family: var(--font-mono); }

.bmi-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.bmi-label { font-size: 0.72rem; color: var(--muted); font-family: var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; }
.bmi-value-web { font-size: 1.4rem; font-weight: 400; font-family: var(--font-serif); color: var(--ink); flex: 1; }
.bmi-tag {
  padding: 0.25rem 0.7rem;
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* Tag Selectors */
.tag-selector-web {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag-btn-web {
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  background: transparent;
  border: 1px solid var(--rule);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-soft);
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0;
}
.tag-btn-web:hover { border-color: var(--ink); color: var(--ink); }
.tag-btn-web.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.tag-icon { display: inline-flex; align-items: center; justify-content: center; }

/* Profile Summary */
.profile-summary .summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule2);
  font-size: 0.82rem;
}
.profile-summary .summary-item:last-child { border-bottom: none; }
.profile-summary .summary-item span { color: var(--muted); font-size: 0.72rem; font-family: var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; }
.profile-summary .summary-item strong { font-weight: 500; color: var(--ink); }

/* === Outfit Grid === */
.outfit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.outfit-card-web {
  background: var(--surface2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.outfit-card-web:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--rule);
}
.outfit-card-web.selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
}
.outfit-card-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: var(--bg2);
  transition: transform 0.5s var(--ease);
}
.outfit-card-web:hover .outfit-card-img { transform: scale(1.03); }
.outfit-card-body { padding: 1.1rem 1.2rem; }
.outfit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}
.outfit-card-name { font-size: 0.92rem; font-weight: 600; letter-spacing: 0; }
.outfit-card-style {
  font-size: 0.6rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg);
  border-radius: 100px;
  color: var(--muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.outfit-match {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.7rem 0;
}
.match-bar {
  flex: 1;
  height: 2px;
  background: var(--bg3);
  border-radius: 1px;
  overflow: hidden;
}
.match-fill { height: 100%; background: var(--ink); border-radius: 1px; transition: width 0.6s var(--ease); }
.match-score { font-size: 0.72rem; font-weight: 600; color: var(--muted); min-width: 32px; text-align: right; font-family: var(--font-mono); }
.outfit-items { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.outfit-item-tag {
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg);
  border-radius: 4px;
  color: var(--muted);
}
.outfit-color-advice {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule2);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}
.outfit-selected-badge {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 26px; height: 26px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.outfit-card-web { position: relative; }
.loading-inline { text-align: center; padding: 4rem; color: var(--muted); grid-column: 1/-1; font-size: 0.88rem; }

/* Select Action Bar */
.select-action-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(245,241,235,0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--rule);
  padding: 1rem 0;
  z-index: 90;
}
.action-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.selected-outfit-info { font-size: 0.82rem; color: var(--muted); }
.selected-outfit-info strong { color: var(--ink); font-weight: 600; }

/* === Loading Screen === */
#screen-loading { min-height: calc(100vh - var(--nav-h)); display: none; }
#screen-loading.active { display: flex; align-items: center; justify-content: center; }
.loading-container {
  text-align: center;
  max-width: 420px;
  padding: 3rem;
}
.loading-spinner-web {
  width: 36px; height: 36px;
  border: 2px solid var(--bg3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 1.5rem;
}
.loading-title-web { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 500; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.loading-status { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.5rem; }
.loading-progress-bar-web {
  width: 100%;
  height: 2px;
  background: var(--bg3);
  border-radius: 1px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.loading-progress-fill { height: 100%; background: var(--ink); border-radius: 1px; width: 0%; transition: width 0.4s var(--ease); }
.loading-fun-text { font-size: 0.82rem; color: var(--accent); margin-bottom: 2rem; font-style: italic; font-family: var(--font-serif); }
.loading-steps-web { display: flex; flex-direction: column; gap: 0.7rem; text-align: left; }
.loading-step {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.82rem;
  color: var(--muted);
  transition: all 0.3s;
}
.loading-step .step-icon { font-size: 0; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; color: var(--muted2); }
.loading-step.active { color: var(--ink); font-weight: 500; }
.loading-step.active .step-icon { color: var(--accent); animation: spin 1s linear infinite; }
.loading-step.done { color: var(--success); }
.loading-step.done .step-icon { color: var(--success); }
.loading-step.done .step-icon svg { display: none; }
.loading-step.done .step-icon::after {
  content: '';
  width: 12px; height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7a58' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* === Results Layout === */
.results-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 2.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: start;
  min-height: calc(100vh - var(--nav-h));
}
.results-left {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Compare Slider - sized to minimize side whitespace */
.compare-slider {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 3/4;
  max-height: calc(100vh - var(--nav-h) - 50px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f8f7f5;
  box-shadow: var(--shadow-lg);
  user-select: none;
  border: 1px solid var(--rule);
  margin: 0 auto;
}
.compare-slider.loading .image-placeholder { display: flex; }
.compare-slider.loading .compare-layer, .compare-slider.loading .compare-handle { display: none; }
.image-placeholder {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.placeholder-icon { opacity: 0.3; }
.compare-layer { position: absolute; inset: 0; }
.compare-layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8f7f5;
}
.compare-after { z-index: 1; }
.compare-before {
  z-index: 2;
  clip-path: inset(0 50% 0 0);
}
.compare-label {
  position: absolute;
  top: 1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
  font-size: 0.62rem;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.compare-label-after { right: 1rem; background: rgba(26,26,26,0.75); color: #fff; }
.compare-label-before { left: 1rem; background: rgba(255,255,255,0.9); color: var(--ink); }
.compare-slider-hint {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  background: rgba(26,26,26,0.6);
  color: #fff;
  border-radius: 100px;
  font-size: 0.62rem;
  font-family: var(--font-mono);
  z-index: 10;
  backdrop-filter: blur(8px);
  pointer-events: none;
  letter-spacing: 0.05em;
}
.compare-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  z-index: 5;
  transform: translateX(-50%);
  cursor: ew-resize;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}
.compare-handle-line { position: absolute; inset: 0; background: #fff; }
.compare-handle-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  color: var(--ink);
  transition: transform 0.2s;
}
.compare-handle-circle:hover { transform: translate(-50%, -50%) scale(1.1); }

/* Result outfit info - top card */
.result-outfit-info {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.2rem;
  border: 1px solid var(--rule);
}
.outfit-info-content h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.3rem; font-family: var(--font-serif); letter-spacing: -0.01em; }
.outfit-info-content .outfit-style-tag {
  display: inline-block;
  font-size: 0.6rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg);
  color: var(--muted);
  border-radius: 4px;
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.outfit-info-content p { font-size: 0.8rem; color: var(--muted); line-height: 1.6; margin: 0; }
.result-actions-web {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  justify-content: center;
}
.result-actions-web button { flex: 1; justify-content: center; }

/* Results Right Panel - beige background, separate cards */
.results-right {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: calc(100vh - var(--nav-h) - 2rem);
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.results-tabs-card {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.results-tabs {
  display: flex;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  flex-shrink: 0;
}
.results-tab-btn {
  flex: 1;
  padding: 0.9rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.results-tab-btn:hover { color: var(--ink); }
.results-tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  background: var(--bg2);
  font-weight: 600;
}
.results-tab-content {
  display: none;
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.results-tab-content::-webkit-scrollbar { width: 4px; }
.results-tab-content::-webkit-scrollbar-track { background: transparent; }
.results-tab-content::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 2px; }
.results-tab-content::-webkit-scrollbar-thumb:hover { background: var(--muted2); }
.results-tab-content.active { display: block; }

/* Generation failed notice */
.generation-failed-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: #FFF8F0;
  border: 1px solid #F0E0C8;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: #8B6914;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 480px;
}

/* Report Styles */
.report-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule2);
}
.report-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.report-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
}
.report-section-title .sec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--accent);
  flex-shrink: 0;
}
.report-rec { font-size: 0.82rem; line-height: 1.7; color: var(--ink); margin-bottom: 0.4rem; }
.report-reason { font-size: 0.75rem; color: var(--muted); line-height: 1.6; }
.report-product-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.6rem; }
.report-tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  background: var(--bg);
  border-radius: 4px;
  color: var(--muted);
  transition: all 0.2s;
}
.report-tag:hover { background: var(--accent-light); color: var(--accent-dark); }

/* Shopping List */
.shopping-category { margin-bottom: 1.5rem; }
.shopping-category-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
}
.shopping-item-row { margin-bottom: 0.4rem; }
.shopping-item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.shopping-item-link:hover { border-color: var(--rule); background: var(--surface2); }
.shopping-item-name { font-size: 0.8rem; font-weight: 500; margin-bottom: 0.2rem; }
.shopping-item-meta { display: flex; gap: 0.4rem; align-items: center; font-size: 0.68rem; color: var(--muted); }
.platform-badge {
  padding: 0.1rem 0.4rem;
  background: var(--muted2);
  color: #fff;
  border-radius: 2px;
  font-size: 0.58rem;
  font-weight: 500;
}
.shopping-item-right { text-align: right; display: flex; align-items: center; gap: 0.6rem; }
.shopping-item-price { font-size: 0.88rem; font-weight: 600; color: var(--ink); font-family: var(--font-mono); }
.shopping-buy-btn {
  padding: 0.3rem 0.7rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 500;
}

/* === Toast === */
#toast-container {
  position: fixed;
  top: calc(var(--nav-h) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  padding: 0.7rem 1.4rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 100px;
  font-size: 0.78rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s var(--ease), toastOut 0.3s var(--ease) 2.5s forwards;
  white-space: nowrap;
  font-weight: 500;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.3);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 0.2s var(--ease);
}
.modal-content {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 380px;
  width: 90%;
  border: 1px solid var(--rule);
  text-align: center;
}
.modal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; font-family: var(--font-serif); }
.modal-text { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.6; }
.modal-actions { display: flex; gap: 0.6rem; justify-content: center; }

/* === Responsive === */
@media (max-width: 1024px) {
  .welcome-hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 2rem; min-height: auto; }
  .hero-right { order: -1; justify-content: center; }
  .preview-card { width: 180px; height: 280px; }
  .page-layout.two-col { grid-template-columns: 1fr; gap: 2rem; }
  .col-side { position: static; }
  .results-layout { grid-template-columns: 1fr; gap: 2rem; }
  .results-left { position: static; align-items: center; }
  .results-right { max-height: none; position: static; }
  .compare-slider { max-height: 70vh; aspect-ratio: 3/4; max-width: 420px; margin: 0 auto; }
  .nav-steps { display: none; }
}
@media (max-width: 640px) {
  :root { --nav-h: 56px; }
  .nav-inner { padding: 0 1.2rem; gap: 1rem; }
  .brand-name { display: none; }
  .page-layout { padding: 2rem 1.2rem 3rem; }
  .welcome-hero { padding: 2.5rem 1.2rem; }
  .hero-title { font-size: 2.6rem; }
  .hero-features { grid-template-columns: 1fr; }
  .feature-item:nth-child(odd) { border-right: none; padding-right: 0; }
  .feature-item:nth-child(even) { padding-left: 0; }
  .form-row { grid-template-columns: 1fr; gap: 1.5rem; }
  .outfit-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .outfit-card-img { height: 220px; }
  .preview-card { width: 140px; height: 220px; }
  .preview-card-2 { margin-left: -15px; }
  .results-layout { padding: 1.2rem; grid-template-columns: 1fr; }
  .action-bar-inner { padding: 0 1.2rem; flex-direction: column; gap: 0.6rem; }
  .selected-outfit-info { text-align: center; }
  .result-actions-web { flex-direction: row; }
  .nav-mobile-btn span { display: none; }
  .nav-mobile-btn { padding: 0.45rem; }
}
@media (max-width: 400px) {
  .outfit-grid { grid-template-columns: 1fr; }
}
