:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-deep: #f6f6f6;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-strong: #ffffff;
  --text: #111214;
  --muted: #6f6e6b;
  --muted-2: #9b9994;
  --line: rgba(23, 23, 23, 0.09);
  --line-strong: rgba(23, 23, 23, 0.15);
  --black: #0f1011;
  --accent-soft: #f3f3f3;
  --success: #2e765b;
  --danger: #b13d35;
  --shadow: 0 16px 45px rgba(0, 0, 0, 0.07);
  --shadow-soft: 0 8px 26px rgba(0, 0, 0, 0.045);
  --radius-xl: 30px;
  --radius-lg: 23px;
  --radius-md: 17px;
  --radius-sm: 12px;
  --nav-h: calc(74px + env(safe-area-inset-bottom));
  --content-max: 1160px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-width: 320px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }

.app-shell {
  min-height: 100dvh;
  padding-bottom: var(--nav-h);
  background:
    radial-gradient(circle at 18% -6%, rgba(255,255,255,.95), transparent 36%),
    linear-gradient(180deg, #faf8f4 0%, var(--bg) 42%, #f1ede6 100%);
}

.main-frame {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px 34px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 660;
  letter-spacing: .075em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 8vw, 50px);
  line-height: .98;
  letter-spacing: -.046em;
  font-weight: 740;
}
h2 {
  margin-bottom: 10px;
  font-size: clamp(25px, 5vw, 34px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
h3 { margin-bottom: 5px; font-size: 17px; letter-spacing: -.015em; }

.header-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.66);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  backdrop-filter: blur(18px);
}
.icon-btn:hover { background: white; border-color: var(--line-strong); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 21px; height: 21px; stroke-width: 1.8; }

.segmented {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(25,25,25,.055);
  margin-bottom: 17px;
}
.segmented button {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #343432;
  cursor: pointer;
  font-size: 14px;
  font-weight: 580;
  transition: .2s ease;
}
.segmented button.active {
  color: white;
  background: var(--black);
  box-shadow: 0 4px 12px rgba(0,0,0,.17);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: max-height .28s ease, opacity .2s ease, margin .28s ease;
}
.search-panel.visible { max-height: 64px; opacity: 1; margin-bottom: 14px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 19px; color: var(--muted); }
.search-wrap input {
  width: 100%;
  height: 48px;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 0 16px 0 42px;
  background: rgba(255,255,255,.72);
  outline: none;
  color: var(--text);
}
.search-wrap input:focus { border-color: rgba(0,0,0,.28); background: white; }

.category-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -18px 13px;
  padding: 0 18px 4px;
}
.category-strip::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  padding: 9px 13px;
  color: #565550;
  font-size: 13px;
  cursor: pointer;
}
.chip.active { background: var(--black); color: white; }
.chip:not(.active):hover { background: rgba(0,0,0,.045); }

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.summary-line strong { color: var(--text); font-weight: 650; }
.text-btn { border: 0; background: none; padding: 5px 0; cursor: pointer; font-weight: 600; }

.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 10px;
}
.product-card {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  border-radius: 18px;
  position: relative;
  display: block;
  width: 100%;
  overflow: visible;
}
.product-card:focus-visible { outline: 2px solid var(--black); outline-offset: 4px; }
.product-card .image-stage {
  display: block;
  width: 100%;
  aspect-ratio: .88;
  border-radius: 18px;
  overflow: hidden;
  background: #f6f3ee;
  position: relative;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}
.product-card:hover .image-stage { transform: translateY(-2px); background: #fbfaf7; box-shadow: var(--shadow-soft); }
.product-card img { width: 100%; height: 100%; object-fit: cover; }
.product-card .fav {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: rgba(255,255,255,.68);
  display: grid;
  place-items: center;
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity .18s ease;
}
.product-card:hover .fav, .product-card .fav.on { opacity: 1; }
.product-card .fav svg { width: 16px; height: 16px; }
.product-meta { display:block; padding: 9px 4px 0; min-width: 0; }
.product-brand { display:block; margin: 0 0 3px; font-size: 11px; font-weight: 760; letter-spacing: .055em; text-transform: uppercase; }
.product-name { display:block; margin: 0; color: #4e4d49; font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty-state {
  min-height: 340px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-xl);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 24px;
  background: rgba(255,255,255,.35);
}
.empty-state .empty-icon {
  width: 70px; height: 70px; margin: 0 auto 18px; border-radius: 23px;
  background: white; display: grid; place-items: center; box-shadow: var(--shadow-soft);
}
.empty-state p { color: var(--muted); max-width: 330px; line-height: 1.45; margin: 0 auto 20px; }

.primary-btn, .secondary-btn, .danger-btn {
  border-radius: 15px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 650;
  cursor: pointer;
  transition: transform .17s ease, opacity .17s ease, background .17s ease;
}
.primary-btn { background: var(--black); color: white; }
.secondary-btn { background: rgba(255,255,255,.75); border-color: var(--line); color: var(--text); }
.danger-btn { background: #fff0ed; color: var(--danger); border-color: rgba(177,61,53,.14); }
.primary-btn:active, .secondary-btn:active, .danger-btn:active { transform: scale(.98); }
.primary-btn:disabled { opacity: .4; cursor: not-allowed; }
.full-btn { width: 100%; }

.bottom-nav {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 620px);
  height: var(--nav-h);
  padding: 9px 13px calc(7px + env(safe-area-inset-bottom));
  background: rgba(250,248,244,.87);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(140%);
  display: grid;
  grid-template-columns: 1fr 1fr 1.05fr 1fr 1fr;
  align-items: start;
}
.nav-btn {
  border: 0;
  background: none;
  min-width: 0;
  height: 56px;
  color: #74736f;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 540;
}
.nav-btn svg { width: 22px; height: 22px; stroke-width: 1.75; }
.nav-btn.active { color: var(--text); font-weight: 700; }
.nav-btn.add-btn {
  width: 57px;
  height: 57px;
  justify-self: center;
  margin-top: -21px;
  border-radius: 50%;
  color: white;
  background: var(--black);
  box-shadow: 0 9px 24px rgba(0,0,0,.24);
}
.nav-btn.add-btn svg { width: 27px; height: 27px; }

/* Home */
.home-hero {
  border-radius: 32px;
  background: var(--black);
  color: white;
  padding: 25px;
  min-height: 250px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.home-hero::after {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  right: -95px; top: -100px;
  background: radial-gradient(circle at 40% 40%, rgba(255,255,255,.28), rgba(255,255,255,0));
}
.hero-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .65; font-weight: 650; }
.hero-number { margin: 12px 0 3px; font-size: 72px; line-height: .85; letter-spacing: -.075em; font-weight: 760; }
.hero-copy { color: rgba(255,255,255,.68); margin: 0 0 24px; }
.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.hero-actions button { border-radius: 999px; min-height: 42px; padding: 0 15px; }
.hero-actions .light { background: white; color: black; border: 0; font-weight: 650; }
.hero-actions .ghost { background: rgba(255,255,255,.1); color: white; border: 1px solid rgba(255,255,255,.16); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 24px 0 13px; }
.section-head h2 { font-size: 23px; margin: 0; }
.section-head button { border: 0; background: none; font-size: 13px; font-weight: 620; cursor: pointer; }
.horizontal-products { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(145px, 43%); gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 8px; scrollbar-width: none; }
.horizontal-products::-webkit-scrollbar { display:none; }
.horizontal-products .product-card .image-stage { aspect-ratio: .88; }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-card { min-height: 134px; border-radius: var(--radius-lg); padding: 18px; background: rgba(255,255,255,.62); border: 1px solid var(--line); }
.stat-card .value { font-size: 32px; font-weight: 730; letter-spacing: -.045em; margin-bottom: 5px; }
.stat-card .label { color: var(--muted); font-size: 13px; line-height: 1.3; }
.stat-card .mini-bar { height: 5px; border-radius: 999px; background: rgba(0,0,0,.07); overflow: hidden; margin-top: 18px; }
.stat-card .mini-bar span { display: block; height: 100%; border-radius: inherit; background: var(--black); }

/* Looks */
.look-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.look-card { border: 0; padding: 0; background: none; text-align: left; cursor:pointer; }
.look-photo { aspect-ratio: .78; background: var(--accent-soft); border-radius: 22px; overflow: hidden; }
.look-photo img { width:100%;height:100%;object-fit:cover; }
.look-card .look-info { padding: 9px 4px 0; }
.look-card .look-info strong { display:block; font-size:13px; }
.look-card .look-info span { color:var(--muted); font-size:12px; }

/* Calendar */
.calendar-toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.calendar-toolbar h2 { margin:0; font-size:27px; }
.month-actions { display:flex; gap:7px; }
.month-actions button { width:39px;height:39px;border-radius:50%;border:1px solid var(--line);background:rgba(255,255,255,.7);display:grid;place-items:center;cursor:pointer; }
.calendar-card { background:rgba(255,255,255,.65);border:1px solid var(--line);border-radius:26px;padding:17px 10px; }
.week-row,.days-grid { display:grid;grid-template-columns:repeat(7,1fr); }
.week-row span { text-align:center;font-size:11px;color:var(--muted);font-weight:650;padding:5px 0 10px; }
.day-cell { aspect-ratio:1; border:0; background:transparent; position:relative; padding:3px; display:flex;align-items:flex-start;justify-content:center;cursor:pointer; }
.day-num { width:29px;height:29px;border-radius:50%;display:grid;place-items:center;font-size:12px;position:relative;z-index:2; }
.day-cell.today .day-num { background:var(--black);color:white;font-weight:700; }
.day-cell.muted { opacity:.3; }
.day-thumbs { position:absolute;left:50%;transform:translateX(-50%);bottom:4px;display:flex;gap:2px; }
.day-thumbs img { width:13px;height:17px;border-radius:4px;object-fit:cover;border:1px solid white; }
.day-dot { width:4px;height:4px;border-radius:50%;background:var(--black); }
.day-detail { margin-top:14px;border-radius:22px;background:rgba(255,255,255,.66);border:1px solid var(--line);padding:16px; }
.day-detail h3 { margin-bottom:10px; }
.day-detail-row { display:flex;align-items:center;gap:12px;padding:9px 0;border-top:1px solid var(--line); }
.day-detail-row:first-of-type { border-top:0; }
.day-detail-row img { width:50px;height:61px;border-radius:12px;object-fit:cover;background:var(--accent-soft); }
.day-detail-row .grow { flex:1;min-width:0; }
.day-detail-row strong { display:block;font-size:14px; }
.day-detail-row span { color:var(--muted);font-size:12px; }

/* Overlay, sheets and modals */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(19,18,16,.36);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  animation: overlayIn .2s forwards;
  backdrop-filter: blur(8px);
}
@keyframes overlayIn { to { opacity:1; } }
.sheet {
  width: min(100%, 680px);
  max-height: min(91dvh, 900px);
  overflow-y: auto;
  background: #fbfaf7;
  border-radius: 30px 30px 0 0;
  padding: 11px 18px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 70px rgba(0,0,0,.14);
  transform: translateY(35px);
  animation: sheetIn .24s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes sheetIn { to { transform: translateY(0); } }
.sheet-handle { width:42px;height:5px;border-radius:999px;background:rgba(0,0,0,.15);margin:1px auto 17px; }
.sheet-head { display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px; }
.sheet-head h2 { margin:0;font-size:27px; }
.close-btn { width:38px;height:38px;border-radius:50%;border:0;background:rgba(0,0,0,.06);display:grid;place-items:center;cursor:pointer; }
.close-btn svg { width:18px;height:18px; }

.action-list { display:grid;gap:8px; }
.action-row { width:100%;min-height:67px;border:1px solid var(--line);border-radius:18px;background:white;padding:12px 14px;display:flex;align-items:center;gap:13px;text-align:left;cursor:pointer; }
.action-icon { width:42px;height:42px;border-radius:14px;background:var(--bg);display:grid;place-items:center;flex:0 0 auto; }
.action-icon svg { width:21px;height:21px; }
.action-copy { flex:1; }
.action-copy strong { display:block;font-size:15px;margin-bottom:2px; }
.action-copy span { color:var(--muted);font-size:12px; }
.action-row > svg { width:18px;color:var(--muted); }

.form-grid { display:grid;gap:14px; }
.form-row { display:grid;gap:7px; }
.form-row.two { grid-template-columns:1fr 1fr;gap:10px; }
label { font-size:12px;font-weight:650;color:#474641; }
input[type="text"],input[type="number"],input[type="date"],select,textarea {
  width:100%;min-height:48px;border:1px solid var(--line);border-radius:14px;background:white;padding:0 13px;outline:none;color:var(--text);
}
textarea { min-height:90px;padding-top:13px;resize:vertical; }
input:focus,select:focus,textarea:focus { border-color:rgba(0,0,0,.28); }
.toggle-row { display:flex;gap:8px;flex-wrap:wrap; }
.toggle-pill { border:1px solid var(--line);border-radius:999px;background:white;padding:9px 13px;font-size:13px;cursor:pointer; }
.toggle-pill.on { background:var(--black);color:white;border-color:var(--black); }

.upload-drop {
  min-height:210px;border:1px dashed var(--line-strong);border-radius:22px;background:rgba(255,255,255,.5);display:grid;place-items:center;text-align:center;padding:22px;cursor:pointer;overflow:hidden;position:relative;
}
.upload-drop img,.upload-drop canvas { width:100%;height:100%;max-height:360px;object-fit:contain;position:absolute;inset:0;margin:auto; }
.upload-placeholder svg { width:35px;height:35px;margin:0 auto 10px; }
.upload-placeholder strong { display:block;margin-bottom:4px; }
.upload-placeholder span { color:var(--muted);font-size:12px; }
.process-stage { display:none; }
.process-stage.visible { display:block; }
.process-grid { display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0; }
.preview-box { min-height:190px;border-radius:18px;overflow:hidden;background:var(--bg);border:1px solid var(--line);position:relative; }
.preview-box img,.preview-box canvas { width:100%;height:100%;object-fit:contain;position:absolute;inset:0; }
.preview-label { position:absolute;left:8px;top:8px;z-index:2;padding:5px 8px;border-radius:999px;background:rgba(255,255,255,.8);font-size:10px;font-weight:650;backdrop-filter:blur(10px); }
.range-row { display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;font-size:12px;color:var(--muted); }
input[type="range"] { width:100%; accent-color:var(--black); }
.helper { color:var(--muted);font-size:12px;line-height:1.4; }
.form-actions { display:grid;grid-template-columns:1fr 1.45fr;gap:9px;margin-top:20px; }

/* Product detail */
.detail-sheet { padding-left:0;padding-right:0;padding-top:0; }
.detail-sheet .sheet-handle { position:sticky;top:8px;z-index:4;background:rgba(0,0,0,.2); }
.detail-hero { aspect-ratio:1.05;background:var(--bg);position:relative;margin-top:-22px; }
.detail-hero img { width:100%;height:100%;object-fit:contain; }
.detail-hero .detail-actions { position:absolute;left:14px;right:14px;top:22px;display:flex;justify-content:space-between; }
.detail-hero .detail-actions button { background:rgba(255,255,255,.78);backdrop-filter:blur(14px); }
.detail-content { padding:22px 18px calc(24px + env(safe-area-inset-bottom)); }
.detail-brand { font-size:12px;font-weight:760;letter-spacing:.06em;text-transform:uppercase;margin:0 0 5px; }
.detail-title { font-size:28px;line-height:1.04;letter-spacing:-.035em;margin:0 0 8px; }
.detail-sub { color:var(--muted);margin-bottom:20px; }
.metrics { display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:20px; }
.metric { background:white;border:1px solid var(--line);border-radius:17px;padding:13px 10px; }
.metric strong { display:block;font-size:17px;margin-bottom:2px; }
.metric span { color:var(--muted);font-size:10px; }
.info-list { border-top:1px solid var(--line);margin-bottom:19px; }
.info-row { display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line);font-size:13px; }
.info-row span:first-child { color:var(--muted); }
.detail-footer { display:grid;grid-template-columns:1fr auto;gap:9px; }

/* Toast */
.toast { position:fixed;z-index:150;left:50%;bottom:calc(var(--nav-h) + 14px);transform:translate(-50%,20px);background:rgba(15,16,17,.94);color:white;padding:11px 15px;border-radius:999px;font-size:13px;box-shadow:var(--shadow);opacity:0;animation:toastIn .22s forwards;white-space:nowrap;max-width:calc(100% - 36px);overflow:hidden;text-overflow:ellipsis; }
@keyframes toastIn { to{opacity:1;transform:translate(-50%,0)} }

.loading { min-height:70vh;display:grid;place-items:center;color:var(--muted); }
.spinner { width:28px;height:28px;border:2px solid rgba(0,0,0,.12);border-top-color:var(--black);border-radius:50%;animation:spin .75s linear infinite;margin:auto; }
@keyframes spin { to { transform:rotate(360deg); } }

@media (min-width: 700px) {
  .main-frame { padding-left:28px;padding-right:28px; }
  .wardrobe-grid { grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 16px; }
  .horizontal-products { grid-auto-columns:190px;margin:0; padding-left:0;padding-right:0; }
  .stats-grid { grid-template-columns:repeat(4,1fr); }
  .look-grid { grid-template-columns:repeat(4,1fr); }
  .bottom-nav { border:1px solid var(--line);border-bottom:0;border-radius:24px 24px 0 0; }
  .sheet { border-radius:30px; margin-bottom:18px; max-height:calc(100dvh - 36px); }
  .overlay { align-items:center; }
  .detail-sheet { max-width:720px; }
  .detail-hero { aspect-ratio:1.55; }
}

@media (min-width: 1000px) {
  .wardrobe-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
}

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

/* Adaptive image cleanup and framing */
.control-section {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
}
.control-title {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  font-size: 13px;
}
.control-title > strong { font-size: 14px; }
.control-title > span { color: var(--muted); font-size: 11px; }
.text-btn.compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  color: var(--text);
  font-size: 12px;
}
.text-btn.compact svg { width: 16px; height: 16px; }
.mini-pill {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(255,255,255,.82);
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
  cursor: pointer;
}
.mini-pill.on {
  border-color: rgba(15,16,17,.25);
  background: #ece8e1;
  color: var(--text);
}
.slider-control {
  display: grid;
  grid-template-columns: 74px 1fr 42px;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
}
.slider-control output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 11px;
}
.master-preview { cursor: grab; }
.master-preview:active { cursor: grabbing; }
#processed-canvas,
#editor-canvas {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.drag-hint {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 16px);
  transform: translateX(-50%);
  padding: 5px 8px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #55534f;
  box-shadow: 0 3px 12px rgba(0,0,0,.055);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
  pointer-events: none;
}
.drag-hint svg { width: 12px; height: 12px; }
.crop-editor { padding-bottom: 2px; }
.crop-intro { margin: -2px 0 12px; }
.crop-canvas-wrap {
  position: relative;
  width: min(100%, 470px);
  margin: 0 auto 14px;
  aspect-ratio: 720 / 820;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg);
  cursor: grab;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.crop-canvas-wrap:active { cursor: grabbing; }
.crop-canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 8.5% 8%;
  border: 1px dashed rgba(17,18,20,.18);
  border-radius: 14px;
  pointer-events: none;
}
.crop-canvas-wrap canvas { width: 100%; height: 100%; }
.drag-hint.permanent { bottom: 12px; font-size: 10px; }
.safe-area-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 3px 0;
  color: var(--muted);
}
.safe-area-note > span {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  flex: 0 0 auto;
  border: 1px dashed rgba(17,18,20,.28);
  border-radius: 4px;
}
.safe-area-note p { margin: 0; font-size: 11px; line-height: 1.4; }
.editor-loading {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}
.editor-loading p { margin: 0; font-size: 13px; }
.detail-image-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 10px;
}
.detail-image-actions > :only-child { grid-column: 1 / -1; }
.detail-image-actions button,
.image-adjust-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.detail-image-actions svg,
.image-adjust-btn svg { width: 17px; height: 17px; }
.edit-image-preview img { object-fit: contain; }

@media (max-width: 430px) {
  .control-title { align-items: flex-start; }
  .control-title > span { max-width: 45%; text-align: right; }
  .slider-control { grid-template-columns: 66px 1fr 38px; }
}

/* Base V3 · white visual system, guided wardrobe, filters and Sport insights */
:root {
  --bg: #fff;
  --bg-deep: #f7f7f7;
  --surface: #fff;
  --surface-solid: #fff;
  --accent-soft: #f4f4f4;
  --line: rgba(17, 18, 20, .085);
  --line-strong: rgba(17, 18, 20, .16);
}
html, body { background: #fff; }
.app-shell { background: #fff; }
.main-frame { background: #fff; }
.icon-btn { background: #fff; backdrop-filter: none; }
.bottom-nav { background: rgba(255,255,255,.94); }
.sheet { background: #fff; }
.product-card .image-stage { background: #fff; border: 1px solid rgba(17,18,20,.04); }
.product-card:hover .image-stage { background: #fff; box-shadow: none; }
.product-card img { object-fit: cover; }
.segmented { background: #f2f2f2; }
.chip:not(.active):hover { background: #f5f5f5; }
.calendar-card, .day-detail, .stat-card { background: #fff; }
.preview-box, .crop-canvas-wrap, .detail-hero { background: #fff; }
.control-section { background: #fff; }
.mini-pill.on { background: #f1f1f1; }

.home-header { align-items: flex-start; }
.home-header h1 { font-size: clamp(36px, 9vw, 56px); line-height: .98; }
.card-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.today-look-card {
  min-height: 300px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  margin-bottom: 28px;
}
.today-copy { padding: 24px 6px 24px 24px; align-self: center; }
.today-copy h2 { font-size: clamp(27px, 7vw, 38px); max-width: 370px; margin-bottom: 10px; }
.today-copy p { color: var(--muted); line-height: 1.45; max-width: 340px; margin-bottom: 20px; }
.compact-btn { min-height: 44px; border-radius: 999px; padding: 0 17px; }
.today-visual { min-height: 260px; display: grid; place-items: end center; overflow: hidden; }
.today-visual img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.today-placeholder { width: 78%; aspect-ratio: .8; display: grid; place-items: center; color: #c9c9c9; }
.today-placeholder svg { width: 74px; height: 74px; stroke-width: 1.1; }
.home-section { margin-bottom: 26px; }
.section-head > div { min-width: 0; }
.section-head.compact { align-items: center; margin: 0 0 14px; }
.section-head.compact h2, .section-head.compact h3 { margin: 0; }
.section-head.compact > span { color: var(--muted); font-size: 12px; }
.forgotten-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.forgotten-card { min-width: 0; border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; }
.forgotten-card img { width: 100%; aspect-ratio: .88; object-fit: cover; border: 1px solid rgba(17,18,20,.045); border-radius: 18px; background: #fff; }
.forgotten-card strong { display: block; margin: 8px 3px 2px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.forgotten-card span { display: block; margin: 0 3px; color: var(--muted); font-size: 10px; }
.week-card, .guide-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.week-day { min-width: 0; border: 0; border-radius: 15px; background: transparent; padding: 7px 2px; cursor: pointer; }
.week-day > span { display: block; color: var(--muted); font-size: 9px; font-weight: 700; }
.week-day > strong { display: grid; place-items: center; width: 25px; height: 25px; margin: 4px auto 5px; border-radius: 50%; font-size: 11px; }
.week-day.today > strong { background: var(--black); color: #fff; }
.week-thumb { height: 54px; overflow: hidden; border-radius: 10px; background: #fafafa; }
.week-thumb img { width: 100%; height: 100%; object-fit: contain; }
.guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.guide-head h2 { margin: 0; font-size: 24px; }
.guide-progress { display: grid; place-items: center; min-width: 44px; height: 30px; border-radius: 999px; background: #f3f3f3; font-size: 12px; font-weight: 700; }
.guide-list { display: grid; }
.guide-step { display: grid; grid-template-columns: 34px 1fr 18px; gap: 10px; align-items: center; width: 100%; padding: 13px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.guide-step:first-child { border-top: 0; }
.guide-step > svg { width: 17px; color: var(--muted); }
.step-index { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 11px; font-weight: 700; }
.step-index svg { width: 14px; height: 14px; }
.guide-step.done .step-index { background: var(--black); color: #fff; }
.guide-step strong, .guide-step small { display: block; }
.guide-step strong { font-size: 13px; }
.guide-step small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.dismiss-guide { margin-top: 5px; color: var(--muted); font-size: 11px; }
.future-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.future-card { display: grid; grid-template-columns: 42px 1fr 16px; align-items: center; gap: 10px; min-height: 88px; padding: 13px; border: 1px solid var(--line); border-radius: 20px; background: #fff; text-align: left; cursor: pointer; }
.future-card > svg { width: 16px; color: var(--muted); }
.future-card strong, .future-card small { display: block; }
.future-card strong { font-size: 13px; }
.future-card small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }

.filter-button { position: relative; }
.filter-button > span { position: absolute; top: -4px; right: -3px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border-radius: 999px; background: var(--black); color: #fff; border: 2px solid #fff; font-size: 9px; font-weight: 800; }
.sort-summary { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--text); font-size: 12px; font-weight: 650; cursor: pointer; }
.sort-summary svg { width: 14px; transform: rotate(90deg); }
.insight-banner { width: 100%; display: grid; grid-template-columns: 42px 1fr 18px; align-items: center; gap: 11px; margin: 0 0 14px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 18px; background: #fff; text-align: left; cursor: pointer; }
.insight-banner > svg { width: 17px; color: var(--muted); }
.insight-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: #f4f4f4; }
.insight-icon svg { width: 20px; }
.insight-banner strong, .insight-banner small { display: block; }
.insight-banner strong { font-size: 13px; }
.insight-banner small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.filter-form { display: grid; gap: 18px; }
.filter-section { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.filter-section h3 { margin-bottom: 11px; }
.sort-list { display: grid; }
.sort-option { position: relative; display: flex; justify-content: space-between; align-items: center; min-height: 43px; border-top: 1px solid var(--line); cursor: pointer; }
.sort-option:first-child { border-top: 0; }
.sort-option input { position: absolute; opacity: 0; }
.sort-option span { font-size: 13px; }
.sort-option i { width: 19px; height: 19px; border: 1px solid var(--line-strong); border-radius: 50%; }
.sort-option input:checked + span { font-weight: 700; }
.sort-option input:checked ~ i { border: 5px solid var(--black); }
.filter-pills { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-pill { position: relative; cursor: pointer; }
.filter-pill input { position: absolute; opacity: 0; pointer-events: none; }
.filter-pill span { min-height: 34px; display: inline-flex; align-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
.filter-pill input:checked + span { background: var(--black); border-color: var(--black); color: #fff; }
.favorite-filter { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.favorite-filter input { width: 18px; height: 18px; accent-color: var(--black); }
.favorite-filter span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.favorite-filter svg { width: 16px; }

.capture-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.capture-card { min-height: 138px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: #fff; text-align: center; cursor: pointer; }
.capture-card svg { width: 28px; height: 28px; margin-bottom: 7px; }
.capture-card strong { font-size: 14px; }
.capture-card span { color: var(--muted); font-size: 11px; font-weight: 500; }
.capture-helper { text-align: center; margin: 10px 12px 18px; }
.compact-capture .capture-card { min-height: 112px; }
.quality-strip { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; }
.quality-strip > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: #f4f4f4; }
.quality-strip svg { width: 18px; }
.quality-strip p, .quality-strip strong, .quality-strip small { display: block; margin: 0; }
.quality-strip strong { font-size: 12px; }
.quality-strip small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.quality-strip button { font-size: 11px; }
.product-fields { margin-top: 18px; }
.sport-activity-field { padding-top: 2px; }

.look-filter-strip { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px 14px; padding: 0 18px 4px; }
.look-filter-strip::-webkit-scrollbar { display: none; }
.look-photo { position: relative; background: #fff; border: 1px solid rgba(17,18,20,.05); }
.look-photo img { object-fit: contain; }
.look-badge, .look-detail-badge, .composition-label { position: absolute; left: 9px; top: 9px; z-index: 2; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.9); border: 1px solid var(--line); color: var(--text); font-size: 9px; font-weight: 750; backdrop-filter: blur(12px); }
.look-favorite { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.88); }
.look-favorite svg { width: 14px; }
.look-photo-section { display: grid; gap: 10px; }
.look-preview { position: relative; min-height: 260px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.look-preview img { width: 100%; height: 100%; max-height: 470px; object-fit: contain; }
.look-preview-empty { max-width: 330px; padding: 30px 24px; text-align: center; color: var(--muted); }
.look-preview-empty svg { width: 34px; height: 34px; margin: 0 auto 10px; }
.look-preview-empty strong, .look-preview-empty span { display: block; }
.look-preview-empty strong { color: var(--text); font-size: 14px; margin-bottom: 5px; }
.look-preview-empty span { font-size: 11px; line-height: 1.45; }
.remove-look-photo { justify-self: center; font-size: 11px; }
.look-product-list { max-height: 340px; overflow-y: auto; display: grid; gap: 6px; padding: 1px; }
.look-product-row { position: relative; min-height: 68px; display: grid; grid-template-columns: 0 50px 1fr 26px; align-items: center; gap: 10px; padding: 7px 10px 7px 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; }
.look-product-row input { opacity: 0; }
.look-product-row img { width: 50px; height: 56px; object-fit: cover; border-radius: 11px; background: #fff; }
.look-product-row strong, .look-product-row small { display: block; }
.look-product-row strong { font-size: 12px; }
.look-product-row small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.look-product-row i { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: transparent; }
.look-product-row i svg { width: 14px; }
.look-product-row:has(input:checked) { border-color: rgba(17,18,20,.3); }
.look-product-row:has(input:checked) i { background: var(--black); color: #fff; border-color: var(--black); }
.look-detail-hero { position: relative; min-height: 430px; aspect-ratio: .88; background: #fff; overflow: hidden; }
.look-detail-hero > img { width: 100%; height: 100%; object-fit: contain; }
.look-detail-actions { position: absolute; top: 20px; left: 14px; right: 14px; display: flex; justify-content: space-between; }
.look-detail-badge { top: auto; bottom: 14px; }
.detail-products { margin: 0; padding: 0 0 8px; grid-auto-columns: 130px; }
.future-model-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; margin-top: 9px; }
.future-model-button svg { width: 17px; }
.related-looks { margin: 0 0 18px; }
.related-look-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 116px; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 3px; }
.related-look-strip::-webkit-scrollbar { display: none; }
.related-look-strip button { border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; }
.related-look-strip img { width: 100%; aspect-ratio: .8; object-fit: contain; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.related-look-strip span { display: block; margin: 6px 2px 0; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.four-metrics { grid-template-columns: repeat(4, 1fr); }
.quality-label.good { color: #247253; }
.quality-label.warn { color: #a35d18; }

.settings-summary { display: flex; align-items: center; gap: 12px; margin: 2px 0 17px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; }
.profile-monogram { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--black); color: #fff; font-size: 18px; font-weight: 750; }
.settings-summary strong, .settings-summary small { display: block; }
.settings-summary small { color: var(--muted); margin-top: 2px; font-size: 11px; }
.privacy-note { margin: 14px 4px 0; }
.soon-badge { padding: 5px 8px; border-radius: 999px; background: #f3f3f3; color: var(--muted); font-size: 9px; font-weight: 750; }
.muted-action { color: var(--muted); }
.welcome-hero, .future-hero { padding: 12px 2px 20px; }
.welcome-hero > svg, .future-hero > svg { width: 38px; height: 38px; margin-bottom: 16px; }
.welcome-hero h2, .future-hero h2 { font-size: 30px; max-width: 560px; }
.welcome-hero p, .future-hero p { color: var(--muted); line-height: 1.5; }
.welcome-steps { display: grid; gap: 0; margin-bottom: 20px; }
.welcome-steps > div { display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); }
.welcome-steps > div > span { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--black); color: #fff; font-size: 11px; font-weight: 750; }
.welcome-steps strong { font-size: 13px; }
.welcome-steps p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.future-hero > span { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #f3f3f3; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.stylist-example, .future-notice { padding: 15px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fafafa; }
.stylist-example span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.stylist-example p { margin: 7px 0 0; font-size: 14px; line-height: 1.45; }
.future-notice { display: flex; gap: 12px; align-items: flex-start; }
.future-notice > span { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; background: #fff; }
.future-notice svg { width: 19px; }
.future-notice p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.future-notice strong { color: var(--text); }
.roadmap-list { display: grid; margin-bottom: 20px; }
.roadmap-item { display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line); }
.roadmap-item:first-child { border-top: 0; }
.roadmap-item > span { align-self: start; padding: 5px 7px; border-radius: 999px; background: #f3f3f3; text-align: center; font-size: 9px; font-weight: 750; }
.roadmap-item strong { font-size: 14px; }
.roadmap-item p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

.sport-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 18px; }
.sport-stat-grid > div { min-height: 110px; padding: 16px; border: 1px solid var(--line); border-radius: 19px; }
.sport-stat-grid strong, .sport-stat-grid span { display: block; }
.sport-stat-grid strong { font-size: 31px; letter-spacing: -.04em; }
.sport-stat-grid span { color: var(--muted); font-size: 11px; line-height: 1.35; margin-top: 5px; }
.stats-section { padding: 17px 0; border-top: 1px solid var(--line); }
.stats-section h3 { margin-bottom: 13px; }
.rotation-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin-top: 13px; }
.rotation-row span { font-size: 12px; }
.rotation-row strong { font-size: 12px; }
.rotation-row i { grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: 999px; background: #efefef; }
.rotation-row b, .activity-bars b { display: block; height: 100%; border-radius: inherit; background: var(--black); }
.activity-bars { display: grid; gap: 11px; }
.activity-bars > div { display: grid; grid-template-columns: 70px 1fr 22px; gap: 8px; align-items: center; }
.activity-bars span, .activity-bars strong { font-size: 11px; }
.activity-bars i { height: 6px; overflow: hidden; border-radius: 999px; background: #efefef; }
.most-used-product { width: 100%; display: grid; grid-template-columns: 65px 1fr 18px; gap: 11px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 17px; background: #fff; text-align: left; cursor: pointer; }
.most-used-product img { width: 65px; height: 70px; object-fit: cover; border-radius: 12px; }
.most-used-product strong, .most-used-product small { display: block; }
.most-used-product small { color: var(--muted); margin-top: 2px; }
.most-used-product > svg { width: 17px; color: var(--muted); }

.day-cell.selected:not(.today) .day-num { outline: 1px solid rgba(17,18,20,.3); }
.day-detail-row { width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: transparent; text-align: left; cursor: pointer; }
.edit-image-preview { height: 280px; margin-bottom: 12px; }

@media (max-width: 520px) {
  .today-look-card { min-height: 278px; grid-template-columns: 1.1fr .9fr; }
  .today-copy { padding: 20px 2px 20px 18px; }
  .today-copy h2 { font-size: 25px; }
  .today-copy p { font-size: 12px; }
  .today-visual { min-height: 250px; }
  .future-row { grid-template-columns: 1fr; }
  .future-card { min-height: 78px; }
  .four-metrics { grid-template-columns: repeat(2, 1fr); }
  .capture-card { min-height: 122px; }
  .form-row.two { grid-template-columns: 1fr; }
  .look-detail-hero { min-height: 390px; }
}

@media (min-width: 700px) {
  .today-look-card { min-height: 360px; }
  .today-copy { padding-left: 34px; }
  .forgotten-grid { max-width: 720px; }
  .week-card, .guide-card { padding: 23px; }
  .look-preview { min-height: 390px; }
  .look-product-list { max-height: 430px; }
}

/* V4 · header settings, version, PIN access, replaceable photography, climate and adaptive appearance */
.header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin-bottom: 7px;
}
.header-meta .eyebrow { margin: 0; }
.version-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .025em;
  line-height: 1;
  white-space: nowrap;
}
.header-actions { align-items: center; flex-wrap: nowrap; }
.weather-chip {
  min-width: 52px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text);
  cursor: pointer;
}
.weather-chip svg { width: 17px; height: 17px; }
.weather-chip strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.weather-chip span { font-size: 11px; font-weight: 680; }
.weather-chip.muted { color: var(--muted); }

.settings-version {
  margin-left: auto;
  align-self: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}
.settings-section {
  margin: 0 0 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-solid);
}
.settings-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.settings-section-head span { font-size: 13px; font-weight: 720; }
.settings-section-head small { color: var(--muted); font-size: 10px; }
.theme-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.theme-option {
  min-width: 0;
  min-height: 72px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  color: var(--muted);
  cursor: pointer;
}
.theme-option svg { width: 20px; height: 20px; }
.theme-option span { font-size: 11px; font-weight: 650; }
.theme-option.active {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}
.version-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
}
.version-panel > span { color: var(--muted); font-size: 11px; }
.version-panel > strong { grid-column: 2; grid-row: 1; font-size: 12px; }
.version-panel > small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.danger-row .action-copy strong { color: var(--danger); }

.replace-photo-intro {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 13px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
}
.replace-photo-intro img {
  width: 78px;
  height: 88px;
  object-fit: cover;
  border: 1px solid rgba(17,18,20,.05);
  border-radius: 13px;
  background: #fff;
}
.replace-photo-intro strong,
.replace-photo-intro small { display: block; }
.replace-photo-intro strong { font-size: 13px; }
.replace-photo-intro small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.edit-image-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 16px;
}
.edit-image-actions button { min-width: 0; padding: 0 10px; }
.replace-photo-button { grid-column: 1 / -1; }

.security-hero,
.weather-hero {
  padding: 8px 2px 20px;
}
.security-hero > svg,
.weather-hero > svg {
  width: 40px;
  height: 40px;
  margin-bottom: 15px;
}
.security-hero > span,
.weather-hero > span {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.security-hero h2,
.weather-hero h2 { margin-bottom: 9px; font-size: clamp(27px, 7vw, 36px); }
.security-hero p,
.weather-hero p { margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.security-hero.compact { padding-bottom: 16px; }
.security-points { display: grid; gap: 8px; margin: 0 0 18px; }
.security-points > div {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-solid);
}
.security-points > div > svg { width: 20px; height: 20px; justify-self: center; }
.security-points strong,
.security-points small { display: block; }
.security-points strong { font-size: 12px; }
.security-points small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.security-disclaimer { margin: 14px 4px 0; }
.security-status {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  gap: 11px;
  align-items: center;
  margin-bottom: 15px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
}
.security-status > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
}
.security-status svg { width: 20px; height: 20px; }
.security-status strong,
.security-status small { display: block; }
.security-status strong { font-size: 13px; }
.security-status small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.security-status i {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(46,118,91,.11);
  color: var(--success);
  font-size: 9px;
  font-style: normal;
  font-weight: 760;
}
.security-lock-section { margin-top: 0; }
.lock-time-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.lock-time-option {
  min-width: 0;
  min-height: 38px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  cursor: pointer;
}
.lock-time-option.active { border-color: var(--text); background: var(--text); color: var(--bg); }
.pin-settings-form input,
.pin-form input { letter-spacing: .22em; font-variant-numeric: tabular-nums; }
.pin-message { min-height: 18px; margin: -4px 2px 0; color: var(--danger); font-size: 11px; opacity: 0; }
.pin-message.visible { opacity: 1; }
.future-notice.warning { border-color: rgba(177,61,53,.16); background: rgba(177,61,53,.045); }
.inline-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(177,61,53,.07);
  color: var(--danger);
  font-size: 11px;
  line-height: 1.4;
}
.inline-warning svg { width: 17px; height: 17px; flex: 0 0 auto; }

.lock-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  gap: 24px;
  padding: calc(28px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  background: var(--bg);
}
.lock-card { width: min(100%, 390px); text-align: center; }
.lock-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}
.lock-app-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
}
.lock-app-icon svg { width: 17px; height: 17px; }
.lock-version { margin-left: 2px; }
.lock-profile-monogram {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 28px;
  font-weight: 760;
}
.lock-kicker { margin: 0 0 7px; color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.lock-card h1 { font-size: clamp(36px, 10vw, 48px); }
.lock-copy { max-width: 310px; margin: 12px auto 25px; color: var(--muted); line-height: 1.45; }
.pin-form { display: grid; gap: 8px; text-align: left; }
.pin-form label { padding-left: 2px; }
.pin-form input {
  width: 100%;
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: var(--surface-solid);
  color: var(--text);
  text-align: center;
  font-size: 22px;
  outline: none;
}
.pin-form input:focus { border-color: var(--text); }
.pin-form .primary-btn { margin-top: 2px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pin-form .primary-btn svg { width: 18px; height: 18px; }
.lock-help { margin-top: 14px; color: var(--muted); font-size: 11px; }
.lock-footnote { max-width: 360px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; }

.weather-reading {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 94px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-solid);
}
.weather-reading-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
}
.weather-reading-icon svg { width: 23px; height: 23px; }
.weather-reading strong,
.weather-reading small { display: block; }
.weather-reading strong { font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.weather-reading small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.weather-feels { color: var(--muted); font-size: 10px; text-align: right; }
.weather-info-list { margin-top: 15px; }
.weather-privacy { margin: 14px 4px 0; }
.stylist-context {
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 11px;
  align-items: center;
  margin: 0 0 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-solid);
  text-align: left;
}
.stylist-context > span:first-child {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
}
.stylist-context svg { width: 18px; height: 18px; }
.stylist-context strong,
.stylist-context small { display: block; }
.stylist-context strong { font-size: 12px; }
.stylist-context small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.stylist-context > button,
.stylist-context.connect { border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.stylist-context > button { border: 0; background: transparent; padding: 5px 0; font-size: 10px; font-weight: 700; }
.stylist-context.connect > svg { color: var(--muted); }

.primary-btn svg,
.secondary-btn svg,
.danger-btn svg { width: 17px; height: 17px; vertical-align: middle; }

/* Dark appearance. Product and look photography deliberately remains on white studio surfaces. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0d0f;
  --bg-deep: #111216;
  --surface: #15161a;
  --surface-solid: #17181c;
  --surface-strong: #1d1e23;
  --text: #f4f4f6;
  --muted: #aaaab0;
  --muted-2: #77787f;
  --line: rgba(255,255,255,.095);
  --line-strong: rgba(255,255,255,.18);
  --black: #f4f4f6;
  --accent-soft: #202126;
  --shadow: 0 18px 50px rgba(0,0,0,.34);
  --shadow-soft: 0 8px 30px rgba(0,0,0,.22);
}
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .main-frame { background: var(--bg); color: var(--text); }
html[data-theme="dark"] .app-shell { background: var(--bg); }
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .weather-chip,
html[data-theme="dark"] .version-badge,
html[data-theme="dark"] .sheet,
html[data-theme="dark"] .action-row,
html[data-theme="dark"] .settings-summary,
html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .version-panel,
html[data-theme="dark"] .security-points > div,
html[data-theme="dark"] .security-status,
html[data-theme="dark"] .lock-time-option,
html[data-theme="dark"] .replace-photo-intro,
html[data-theme="dark"] .weather-reading,
html[data-theme="dark"] .stylist-context,
html[data-theme="dark"] .week-card,
html[data-theme="dark"] .guide-card,
html[data-theme="dark"] .future-card,
html[data-theme="dark"] .insight-banner,
html[data-theme="dark"] .calendar-card,
html[data-theme="dark"] .day-detail,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .capture-card,
html[data-theme="dark"] .control-section,
html[data-theme="dark"] .quality-strip,
html[data-theme="dark"] .look-product-row,
html[data-theme="dark"] .most-used-product,
html[data-theme="dark"] .metric,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .toggle-pill,
html[data-theme="dark"] .secondary-btn,
html[data-theme="dark"] .mini-pill,
html[data-theme="dark"] .pin-form input {
  background: var(--surface-solid);
  color: var(--text);
  border-color: var(--line);
}
html[data-theme="dark"] .sheet { box-shadow: 0 -22px 75px rgba(0,0,0,.48); }
html[data-theme="dark"] .bottom-nav { background: rgba(13,14,16,.92); }
html[data-theme="dark"] .segmented { background: #1b1c20; }
html[data-theme="dark"] .segmented button { color: var(--muted); }
html[data-theme="dark"] .segmented button.active,
html[data-theme="dark"] .chip.active,
html[data-theme="dark"] .toggle-pill.on,
html[data-theme="dark"] .filter-pill input:checked + span,
html[data-theme="dark"] .lock-time-option.active,
html[data-theme="dark"] .theme-option.active,
html[data-theme="dark"] .guide-step.done .step-index,
html[data-theme="dark"] .week-day.today > strong,
html[data-theme="dark"] .day-cell.today .day-num,
html[data-theme="dark"] .profile-monogram,
html[data-theme="dark"] .lock-profile-monogram,
html[data-theme="dark"] .welcome-steps > div > span,
html[data-theme="dark"] .nav-btn.add-btn {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
html[data-theme="dark"] .primary-btn { background: var(--text); color: var(--bg); }
html[data-theme="dark"] .secondary-btn { color: var(--text); }
html[data-theme="dark"] .theme-option { background: var(--surface-solid); color: var(--muted); }
html[data-theme="dark"] .theme-option.active { color: var(--bg); }
html[data-theme="dark"] .product-name,
html[data-theme="dark"] label { color: var(--text); }
html[data-theme="dark"] .chip { color: var(--muted); }
html[data-theme="dark"] .chip:not(.active):hover { background: var(--accent-soft); }
html[data-theme="dark"] .search-wrap input { background: var(--surface-solid); }
html[data-theme="dark"] .search-wrap input:focus { background: var(--surface-strong); border-color: var(--line-strong); }
html[data-theme="dark"] .close-btn,
html[data-theme="dark"] .action-icon,
html[data-theme="dark"] .insight-icon,
html[data-theme="dark"] .quality-strip > span,
html[data-theme="dark"] .future-notice > span,
html[data-theme="dark"] .security-status > span,
html[data-theme="dark"] .weather-reading-icon,
html[data-theme="dark"] .stylist-context > span:first-child,
html[data-theme="dark"] .guide-progress,
html[data-theme="dark"] .soon-badge,
html[data-theme="dark"] .security-hero > span,
html[data-theme="dark"] .weather-hero > span,
html[data-theme="dark"] .future-hero > span,
html[data-theme="dark"] .roadmap-item > span,
html[data-theme="dark"] .settings-version {
  background: var(--accent-soft);
  color: var(--muted);
}
html[data-theme="dark"] .future-notice,
html[data-theme="dark"] .stylist-example { background: var(--surface-solid); }
html[data-theme="dark"] .future-notice.warning { background: rgba(177,61,53,.10); }
html[data-theme="dark"] .week-thumb,
html[data-theme="dark"] .rotation-row i,
html[data-theme="dark"] .activity-bars i { background: #202126; }
html[data-theme="dark"] .rotation-row b,
html[data-theme="dark"] .activity-bars b,
html[data-theme="dark"] .stat-card .mini-bar span { background: var(--text); }
html[data-theme="dark"] .stat-card .mini-bar { background: rgba(255,255,255,.09); }
html[data-theme="dark"] .filter-button > span { border-color: var(--bg); background: var(--text); color: var(--bg); }
html[data-theme="dark"] .sort-option input:checked ~ i { border-color: var(--text); }
html[data-theme="dark"] .overlay { background: rgba(0,0,0,.58); }
html[data-theme="dark"] .sheet-handle { background: rgba(255,255,255,.18); }
html[data-theme="dark"] .spinner { border-color: rgba(255,255,255,.14); border-top-color: var(--text); }
html[data-theme="dark"] .toast { background: rgba(244,244,246,.95); color: #101114; }
html[data-theme="dark"] .danger-btn { background: rgba(177,61,53,.14); }

/* Studio surfaces remain neutral and consistent in every appearance. */
html[data-theme="dark"] .product-card .image-stage,
html[data-theme="dark"] .product-card:hover .image-stage,
html[data-theme="dark"] .forgotten-card img,
html[data-theme="dark"] .look-photo,
html[data-theme="dark"] .look-preview,
html[data-theme="dark"] .look-detail-hero,
html[data-theme="dark"] .related-look-strip img,
html[data-theme="dark"] .detail-hero,
html[data-theme="dark"] .preview-box,
html[data-theme="dark"] .crop-canvas-wrap,
html[data-theme="dark"] .look-product-row img,
html[data-theme="dark"] .replace-photo-intro img {
  background: #fff;
}
html[data-theme="dark"] .look-badge,
html[data-theme="dark"] .look-detail-badge,
html[data-theme="dark"] .composition-label,
html[data-theme="dark"] .look-favorite,
html[data-theme="dark"] .detail-hero .detail-actions button,
html[data-theme="dark"] .preview-label,
html[data-theme="dark"] .drag-hint {
  background: rgba(255,255,255,.9);
  color: #111214;
  border-color: rgba(17,18,20,.09);
}

@media (max-width: 560px) {
  .page-header { align-items: flex-start; }
  .header-actions { gap: 6px; }
  .header-actions .icon-btn { width: 41px; height: 41px; }
  .weather-chip { height: 41px; min-width: 48px; padding: 0 10px; }
  .version-badge { min-height: 19px; padding: 0 7px; font-size: 8px; }
  .lock-time-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .weather-reading { grid-template-columns: 46px 1fr; }
  .weather-feels { grid-column: 2; text-align: left; }
}

@media (max-width: 390px) {
  .home-header h1 { font-size: 34px; }
  .header-actions .weather-chip span { display: none; }
  .header-actions .weather-chip { min-width: 41px; width: auto; }
  .header-actions .icon-btn { width: 39px; height: 39px; }
  .weather-chip { height: 39px; }
  .theme-option { min-height: 66px; }
  .settings-summary { gap: 9px; }
  .settings-version { padding: 5px 7px; font-size: 9px; }
}

input[type="password"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  padding: 0 13px;
  outline: none;
  color: var(--text);
}
input[type="password"]:focus { border-color: var(--line-strong); }
