:root {
  color-scheme: light;
  --ink: #26352d;
  --muted: #72766f;
  --paper: #f4f0e8;
  --paper-2: #fbf9f4;
  --white: #fffefa;
  --line: rgba(38, 53, 45, 0.12);
  --green: #24372d;
  --green-2: #496354;
  --sage: #dbe3d7;
  --clay: #c86f4d;
  --clay-soft: #efd8cc;
  --gold: #caa76d;
  --shadow: 0 20px 60px rgba(50, 48, 40, 0.1);
  --soft-shadow: 0 10px 30px rgba(50, 48, 40, 0.07);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% -10%, rgba(202, 167, 109, 0.14), transparent 28rem),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(200, 111, 77, 0.42);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.side-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 34px 24px 28px;
  border-right: 1px solid var(--line);
  background: rgba(251, 249, 244, 0.76);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  color: var(--paper-2);
  background: var(--green);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 21px;
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.desktop-nav {
  display: grid;
  gap: 8px;
  margin-top: 48px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 15px;
  border: 0;
  border-radius: 16px;
  color: #596159;
  background: transparent;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.62);
}

.nav-button.is-active {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 12px 22px rgba(36, 55, 45, 0.16);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 24px;
  font-size: 18px;
}

.local-note {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 15px;
  border: 1px solid rgba(73, 99, 84, 0.12);
  border-radius: 17px;
  color: var(--muted);
  background: rgba(219, 227, 215, 0.38);
  font-size: 12px;
  line-height: 1.55;
}

.local-note p {
  margin: 0;
}

.local-note strong {
  color: var(--ink);
}

.privacy-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #5d8b69;
  box-shadow: 0 0 0 4px rgba(93, 139, 105, 0.12);
}

.workspace {
  position: relative;
  min-width: 0;
}

.mobile-head,
.mobile-nav {
  display: none;
}

#app {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 44px 0 92px;
}

.loading-view {
  display: grid;
  place-items: center;
  min-height: 60vh;
  color: var(--muted);
}

.loading-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  color: var(--paper);
  background: var(--green);
  font-family: Georgia, "Songti SC", serif;
  font-size: 32px;
  animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
  50% { transform: translateY(-4px); box-shadow: 0 18px 30px rgba(36, 55, 45, 0.18); }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-head h1,
.hero-copy h1,
.sheet-head h2,
.detail-copy h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-weight: 500;
}

.page-head h1 {
  font-size: clamp(32px, 4vw, 50px);
  letter-spacing: -0.035em;
}

.page-head p {
  max-width: 590px;
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--clay);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.round-button,
.icon-button,
.chip,
.segmented button,
.text-button {
  min-height: 44px;
  border-radius: 14px;
  cursor: pointer;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  color: white;
  background: var(--green);
  box-shadow: 0 10px 24px rgba(36, 55, 45, 0.16);
}

.primary-button.clay {
  background: var(--clay);
  box-shadow: 0 10px 24px rgba(200, 111, 77, 0.18);
}

.secondary-button {
  color: var(--green);
  border-color: rgba(36, 55, 45, 0.18);
  background: var(--white);
}

.ghost-button {
  color: var(--ink);
  border-color: var(--line);
  background: transparent;
}

.danger-button {
  color: #973f34;
  border-color: rgba(151, 63, 52, 0.16);
  background: #fff5f1;
}

.text-button {
  padding: 0 8px;
  border: 0;
  color: var(--clay);
  background: transparent;
  font-weight: 700;
}

.round-button,
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  gap: 22px;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  min-height: 340px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #f8f5ef;
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.13), transparent 13rem),
    var(--green);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 42px 12px 38px 42px;
}

.hero-copy h1 {
  max-width: 520px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero-copy p {
  max-width: 440px;
  margin: 18px 0 28px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
}

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

.hero-actions .primary-button {
  color: var(--green);
  background: #f5f0e7;
}

.hero-actions .ghost-button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-wardrobe {
  position: relative;
  align-self: end;
  height: 300px;
  margin: 0 22px 0 0;
}

.wardrobe-arch {
  position: absolute;
  right: 4px;
  bottom: -24px;
  width: 210px;
  height: 292px;
  border-radius: 110px 110px 0 0;
  background: #d7c39d;
  box-shadow: inset -20px 0 0 rgba(0, 0, 0, 0.05);
}

.wardrobe-arch::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(36, 55, 45, 0.18);
  border-radius: 94px 94px 0 0;
}

.wardrobe-line {
  position: absolute;
  top: 104px;
  left: 38px;
  width: 130px;
  height: 2px;
  background: rgba(36, 55, 45, 0.58);
}

.hanger {
  position: absolute;
  top: 91px;
  width: 44px;
  height: 72px;
  border: 2px solid rgba(36, 55, 45, 0.65);
  border-top: 0;
  border-radius: 3px 3px 16px 16px;
  transform: skew(-2deg);
}

.hanger::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 18px;
  width: 9px;
  height: 17px;
  border: 2px solid rgba(36, 55, 45, 0.65);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
}

.hanger.one { left: 54px; background: #f4efe4; }
.hanger.two { left: 101px; height: 88px; background: #a75f49; }
.hanger.three { left: 143px; height: 65px; background: #657b73; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat-card {
  min-height: 162px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  background: rgba(255, 254, 250, 0.82);
  box-shadow: var(--soft-shadow);
}

.stat-card.wide {
  grid-column: 1 / -1;
  min-height: 148px;
}

.stat-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat-card strong {
  display: block;
  margin: 17px 0 4px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 42px;
  font-weight: 500;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.section-block {
  margin-top: 40px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 27px;
  font-weight: 500;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.quick-card {
  min-height: 154px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: left;
  background: rgba(255, 254, 250, 0.75);
  cursor: pointer;
  transition: 150ms ease;
}

.quick-card:hover {
  transform: translateY(-3px);
  border-color: rgba(36, 55, 45, 0.22);
  box-shadow: var(--soft-shadow);
}

.quick-card .quick-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--sage);
  font-size: 20px;
}

.quick-card:nth-child(2) .quick-icon { background: var(--clay-soft); }
.quick-card:nth-child(3) .quick-icon { background: #e6dfce; }
.quick-card:nth-child(4) .quick-icon { background: #dbe3ea; }

.quick-card strong,
.quick-card small {
  display: block;
}

.quick-card strong {
  margin-top: 18px;
  font-size: 16px;
}

.quick-card small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 24px;
  padding: 14px 16px 14px 18px;
  border: 1px solid rgba(200, 111, 77, 0.16);
  border-radius: 17px;
  color: #704b3d;
  background: rgba(239, 216, 204, 0.54);
  font-size: 13px;
  line-height: 1.5;
}

.demo-banner button {
  flex: 0 0 auto;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.search-field {
  position: relative;
  display: flex;
  flex: 1 1 340px;
  align-items: center;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.86);
}

.search-field span {
  color: var(--muted);
  font-size: 18px;
}

.search-field input {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-field button {
  display: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

.search-field.has-value button {
  display: grid;
  place-items: center;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 254, 250, 0.62);
}

.segmented button {
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.segmented button.is-active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 4px 14px rgba(50, 48, 40, 0.08);
}

.filter-row {
  display: flex;
  gap: 9px;
  margin-bottom: 24px;
  padding: 2px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  color: #596159;
  background: rgba(255, 254, 250, 0.66);
}

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

.item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.item-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(38, 53, 45, 0.1);
  border-radius: 22px;
  background: rgba(255, 254, 250, 0.82);
  box-shadow: 0 8px 26px rgba(50, 48, 40, 0.045);
  transition: 160ms ease;
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--soft-shadow);
}

.item-card-main {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.item-photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.05)),
    var(--tone, #ddd5c7);
}

.item-photo::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(38, 53, 45, 0.08);
  border-radius: 16px;
  pointer-events: none;
}

.item-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.garment-glyph {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 68%;
  height: 68%;
  filter: drop-shadow(0 12px 14px rgba(36, 55, 45, 0.11));
}

.garment-glyph svg {
  width: 100%;
  height: 100%;
}

.favorite-button {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(38, 53, 45, 0.08);
  border-radius: 50%;
  color: #6d716b;
  background: rgba(255, 254, 250, 0.82);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.favorite-button.is-active {
  color: #b85d47;
}

.item-card-copy {
  padding: 15px 16px 17px;
}

.item-card-copy strong,
.item-card-copy small {
  display: block;
}

.item-card-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.item-card-copy small {
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-list {
  display: grid;
  gap: 10px;
}

.item-list .item-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 104px;
}

.item-list .item-card-main {
  display: contents;
}

.item-list .item-photo {
  grid-row: 1;
  aspect-ratio: auto;
  min-height: 104px;
}

.item-list .item-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 62px;
}

.empty-card {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 40px;
  border: 1px dashed rgba(38, 53, 45, 0.2);
  border-radius: var(--radius-xl);
  text-align: center;
  background: rgba(255, 254, 250, 0.48);
}

.empty-illustration {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 30px;
  color: var(--green);
  background: var(--sage);
  font-family: Georgia, "Songti SC", serif;
  font-size: 34px;
}

.empty-card h2 {
  margin: 22px 0 8px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 26px;
  font-weight: 500;
}

.empty-card p {
  max-width: 390px;
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.outfit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.outfit-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 254, 250, 0.8);
  box-shadow: 0 8px 26px rgba(50, 48, 40, 0.045);
}

.outfit-card > button {
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.outfit-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  height: 270px;
  overflow: hidden;
  background: #ede8dc;
}

.outfit-collage .item-photo {
  aspect-ratio: auto;
  border-radius: 0;
}

.outfit-collage .item-photo:only-child {
  grid-column: 1 / -1;
}

.outfit-collage .item-photo:nth-child(3):last-child {
  grid-column: 1 / -1;
}

.outfit-collage .item-photo::after { inset: 6px; border-radius: 8px; }
.outfit-collage .garment-glyph { width: 62%; height: 62%; }

.outfit-copy {
  padding: 18px;
}

.outfit-copy strong,
.outfit-copy span,
.outfit-copy small {
  display: block;
}

.outfit-copy strong { font-size: 17px; }
.outfit-copy span { margin-top: 7px; color: var(--clay); font-size: 12px; font-weight: 700; }
.outfit-copy small { margin-top: 7px; color: var(--muted); }

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.65fr);
  gap: 22px;
}

.calendar-card,
.timeline-card,
.panel-card {
  border: 1px solid rgba(38, 53, 45, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 254, 250, 0.76);
  box-shadow: 0 8px 26px rgba(50, 48, 40, 0.04);
}

.calendar-card { padding: 24px; }

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.calendar-toolbar strong {
  font-family: Georgia, "Songti SC", serif;
  font-size: 23px;
  font-weight: 500;
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-nav button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}

.calendar-week,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.calendar-week span {
  padding: 8px 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.calendar-day {
  position: relative;
  min-height: 78px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  text-align: left;
  background: rgba(244, 240, 232, 0.64);
  cursor: pointer;
}

.calendar-day:hover { border-color: rgba(36, 55, 45, 0.14); }
.calendar-day.is-outside { opacity: 0.3; }
.calendar-day.is-today { border-color: var(--clay); }
.calendar-day.has-log { background: var(--sage); }
.calendar-day.is-selected { color: white; background: var(--green); }

.calendar-day b {
  font-size: 13px;
  font-weight: 600;
}

.calendar-dots {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 3px;
}

.calendar-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
}

.timeline-card {
  padding: 24px;
}

.timeline-card h2 {
  margin: 0 0 18px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 23px;
  font-weight: 500;
}

.wear-entry {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.wear-entry:first-of-type { border-top: 0; }

.wear-date {
  display: grid;
  place-items: center;
  align-self: start;
  width: 46px;
  height: 50px;
  border-radius: 14px;
  color: var(--green);
  background: var(--sage);
}

.wear-date b,
.wear-date small { display: block; text-align: center; }
.wear-date b { font-size: 17px; }
.wear-date small { font-size: 9px; text-transform: uppercase; }

.wear-entry strong,
.wear-entry small { display: block; }
.wear-entry small { margin-top: 5px; color: var(--muted); line-height: 1.45; }

.settings-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
}

.panel-card {
  padding: 24px;
}

.panel-card h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
  font-weight: 500;
}

.panel-card > p {
  margin: 7px 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.overview-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.overview-cell {
  padding: 16px;
  border-radius: 16px;
  background: var(--paper);
}

.overview-cell strong,
.overview-cell small { display: block; }
.overview-cell strong { font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.overview-cell small { margin-top: 4px; color: var(--muted); }

.progress-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.progress-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e4db;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-2);
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
  background: var(--white);
  cursor: pointer;
}

.settings-row span,
.settings-row small { display: block; }
.settings-row small { margin-top: 4px; color: var(--muted); }
.settings-row b { color: var(--muted); font-weight: 500; }

.privacy-panel {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  color: #4f6557;
  background: rgba(219, 227, 215, 0.62);
  line-height: 1.65;
}

.privacy-panel strong { display: block; margin-bottom: 5px; color: var(--green); }

.fab {
  position: fixed;
  z-index: 30;
  right: max(28px, calc((100vw - 248px - 1180px) / 2 + 24px));
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 21px;
  color: white;
  background: var(--clay);
  box-shadow: 0 18px 36px rgba(200, 111, 77, 0.28);
  cursor: pointer;
  transition: 140ms ease;
}

.fab:hover { transform: translateY(-2px) rotate(2deg); }
.fab span { font-size: 30px; font-weight: 300; line-height: 1; }

.overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(27, 36, 31, 0.46);
  backdrop-filter: blur(8px);
  animation: overlayIn 160ms ease both;
}

@keyframes overlayIn { from { opacity: 0; } }

.sheet {
  width: min(720px, 100%);
  max-height: min(880px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  background: var(--paper-2);
  box-shadow: 0 34px 90px rgba(24, 30, 26, 0.25);
  animation: sheetIn 190ms ease both;
}

.sheet.sheet-wide { width: min(960px, 100%); }

@keyframes sheetIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
}

.sheet-head {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 249, 244, 0.94);
  backdrop-filter: blur(16px);
}

.sheet-head h2 { font-size: 27px; }
.sheet-head p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }

.sheet-body { padding: 24px 26px 30px; }

.sheet-actions {
  position: sticky;
  z-index: 4;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(251, 249, 244, 0.94);
  backdrop-filter: blur(16px);
}

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

.field {
  display: grid;
  gap: 8px;
}

.field.full { grid-column: 1 / -1; }
.form-grid > .full { grid-column: 1 / -1; }

.field > span,
.fieldset legend {
  color: #596159;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: var(--ink);
  background: var(--white);
}

.field textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.55;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.fieldset {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  border: 0;
}

.fieldset legend { margin-bottom: 10px; }

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.option-pill {
  position: relative;
}

.option-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-pill span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
}

.option-pill input:checked + span {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.photo-picker {
  position: relative;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px dashed rgba(38, 53, 45, 0.22);
  border-radius: 20px;
  background: rgba(244, 240, 232, 0.68);
}

.photo-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 16px;
  color: var(--muted);
  background: #e7e0d3;
  text-align: center;
  font-size: 12px;
}

.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview span { display: block; font-size: 28px; }

.photo-picker-copy strong,
.photo-picker-copy small { display: block; }
.photo-picker-copy small { margin: 7px 0 12px; color: var(--muted); line-height: 1.5; }
.photo-picker input { position: absolute; opacity: 0; pointer-events: none; }

.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-option {
  position: relative;
  width: 36px;
  height: 36px;
}

.color-option input { position: absolute; opacity: 0; }

.color-option span {
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid var(--paper-2);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}

.color-option input:checked + span {
  box-shadow: 0 0 0 3px var(--clay);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
}

.detail-photo .item-photo {
  min-height: 430px;
  border-radius: 22px;
}

.detail-copy h2 {
  padding-right: 48px;
  font-size: 34px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 22px;
}

.meta-pill {
  padding: 7px 10px;
  border-radius: 999px;
  color: #566459;
  background: var(--sage);
  font-size: 12px;
}

.detail-facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-facts > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.detail-note {
  margin-top: 18px;
  padding: 15px;
  border-radius: 15px;
  color: #5c665e;
  background: var(--paper);
  line-height: 1.6;
}

.selectable-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.selectable-item {
  position: relative;
}

.selectable-item input {
  position: absolute;
  opacity: 0;
}

.selectable-item label {
  display: block;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--white);
  cursor: pointer;
}

.selectable-item input:checked + label {
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(200, 111, 77, 0.12);
}

.selectable-item .item-photo { aspect-ratio: 1 / 1.12; }
.selectable-item strong { display: block; padding: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

.confirm-card {
  padding: 18px;
  border-radius: 18px;
  color: #704b3d;
  background: rgba(239, 216, 204, 0.58);
  line-height: 1.65;
}

.location-list {
  display: grid;
  gap: 9px;
}

.location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px 10px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.location-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-row small { color: var(--muted); }

.inline-form {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.inline-form input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.backup-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.backup-card {
  min-height: 130px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  background: var(--white);
  cursor: pointer;
}

.backup-card span { display: block; font-size: 23px; }
.backup-card strong { display: block; margin-top: 12px; }
.backup-card small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.45; }

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  max-width: min(440px, calc(100% - 32px));
  padding: 12px 17px;
  border-radius: 14px;
  color: white;
  background: rgba(36, 55, 45, 0.94);
  box-shadow: 0 18px 36px rgba(24, 30, 26, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript-card {
  position: fixed;
  z-index: 999;
  inset: 24px 24px auto;
  padding: 18px;
  border-radius: 16px;
  color: white;
  background: #8f4339;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #496354;
  background: var(--sage);
  font-size: 11px;
  font-weight: 700;
}

.badge.archived { color: #6d6760; background: #e5e1da; }

.sync-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid #e0bd79;
  border-radius: 16px;
  color: #65502d;
  background: #fff7e7;
  line-height: 1.45;
}

.sync-banner span { flex: 1; font-size: 13px; }
.sync-banner button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(101, 80, 45, .22);
  border-radius: 11px;
  color: inherit;
  background: rgba(255, 255, 255, .72);
  font-weight: 700;
  cursor: pointer;
}

.server-account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
}

.server-account .brand-mark { flex: 0 0 auto; }
.server-account > span:last-child { display: grid; gap: 3px; min-width: 0; }
.server-account small { color: var(--muted); line-height: 1.45; }
.danger-row strong { color: #8f4339; }

.fatal-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 520px;
  margin: 12vh auto 0;
  padding: 42px 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper-light);
  box-shadow: var(--shadow);
  text-align: center;
}

.fatal-card h1 { margin: 6px 0 0; }
.fatal-card p { max-width: 380px; margin: 0 0 8px; color: var(--muted); line-height: 1.7; }
.fatal-card a { display: inline-grid; place-items: center; text-decoration: none; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 214px minmax(0, 1fr); }
  .side-rail { padding-inline: 18px; }
  #app { width: min(100% - 42px, 1040px); }
  .hero-card { grid-template-columns: minmax(0, 1fr) 190px; }
  .wardrobe-arch { width: 174px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fab { right: 24px; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .side-rail { display: none; }
  .workspace { min-height: 100vh; }
  .mobile-head {
    position: sticky;
    z-index: 40;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: max(10px, env(safe-area-inset-top)) 16px 10px;
    border-bottom: 1px solid rgba(38, 53, 45, 0.08);
    background: rgba(244, 240, 232, 0.9);
    backdrop-filter: blur(18px);
  }
  .brand-mobile { width: auto; }
  .brand-mobile .brand-mark { width: 38px; height: 38px; border-radius: 13px; font-size: 20px; }
  .brand-mobile strong { font-size: 17px; }
  .brand-mobile small { font-size: 9px; }
  #app { width: auto; margin: 0; padding: 26px 16px calc(112px + var(--safe-bottom)); }
  .mobile-nav {
    position: fixed;
    z-index: 45;
    right: 12px;
    bottom: calc(10px + var(--safe-bottom));
    left: 12px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 66px;
    padding: 7px 74px 7px 7px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 23px;
    background: rgba(36, 55, 45, 0.95);
    box-shadow: 0 18px 42px rgba(24, 30, 26, 0.25);
    backdrop-filter: blur(18px);
  }
  .mobile-nav .nav-button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    min-height: 52px;
    padding: 0;
    border-radius: 15px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 9px;
  }
  .mobile-nav .nav-button.is-active { color: white; background: rgba(255, 255, 255, 0.1); box-shadow: none; }
  .mobile-nav .nav-icon { width: auto; font-size: 17px; }
  .fab {
    z-index: 50;
    right: 24px;
    bottom: calc(17px + var(--safe-bottom));
    width: 52px;
    height: 52px;
    border-radius: 18px;
  }
  .page-head { align-items: flex-start; margin-bottom: 22px; }
  .page-head h1 { font-size: 34px; }
  .page-head p { margin-top: 7px; font-size: 13px; }
  .head-actions { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 340px; grid-template-columns: minmax(0, 1fr) 150px; }
  .hero-copy { padding: 34px 0 32px 28px; }
  .hero-copy h1 { font-size: 43px; }
  .hero-copy p { margin: 16px 0 22px; font-size: 13px; }
  .hero-wardrobe { height: 300px; margin-right: 8px; }
  .wardrobe-arch { right: -10px; width: 158px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .stat-card, .stat-card.wide { grid-column: auto; min-height: 120px; padding: 18px; }
  .stat-card strong { margin-top: 14px; font-size: 34px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .outfit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-layout, .settings-grid { grid-template-columns: 1fr; }
  .calendar-day { min-height: 70px; }
  .overlay { align-items: end; padding: 0; }
  .sheet, .sheet.sheet-wide {
    width: 100%;
    max-height: calc(100vh - max(18px, env(safe-area-inset-top)));
    border-radius: 28px 28px 0 0;
  }
  .sheet-head { padding: 20px 18px 15px; }
  .sheet-body { padding: 20px 18px 26px; }
  .sheet-actions { padding: 14px 18px calc(14px + var(--safe-bottom)); }
  .detail-layout { grid-template-columns: 0.8fr 1.2fr; gap: 20px; }
  .detail-photo .item-photo { min-height: 350px; }
}

@media (max-width: 600px) {
  .sync-banner { align-items: flex-start; flex-wrap: wrap; }
  .sync-banner span { flex-basis: calc(100% - 90px); }
  .demo-banner { align-items: flex-start; }
  .demo-banner button { min-height: 40px; padding-inline: 12px; }
  .hero-card { display: block; min-height: 440px; }
  .hero-copy { padding: 30px 26px 0; }
  .hero-copy h1 { max-width: 310px; font-size: 40px; }
  .hero-wardrobe { position: absolute; right: 0; bottom: 0; width: 184px; height: 245px; }
  .wardrobe-arch { width: 178px; height: 248px; }
  .wardrobe-line { top: 96px; left: 34px; width: 112px; }
  .hanger { top: 84px; }
  .hanger.one { left: 43px; }
  .hanger.two { left: 88px; }
  .hanger.three { left: 127px; }
  .hero-stats { gap: 9px; }
  .stat-card, .stat-card.wide { min-height: 106px; padding: 15px 12px; }
  .stat-card strong { font-size: 29px; }
  .stat-card span { font-size: 10px; }
  .quick-grid { gap: 10px; }
  .quick-card { min-height: 144px; padding: 17px; }
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .segmented { margin-left: auto; }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .item-card { border-radius: 18px; }
  .item-card-copy { padding: 12px 12px 14px; }
  .item-list .item-card { grid-template-columns: 88px minmax(0, 1fr); min-height: 88px; }
  .item-list .item-photo { min-height: 88px; }
  .outfit-grid { grid-template-columns: 1fr; }
  .outfit-collage { height: 250px; }
  .calendar-card { padding: 14px 11px; }
  .calendar-week, .calendar-grid { gap: 3px; }
  .calendar-day { min-height: 58px; padding: 6px; border-radius: 11px; }
  .calendar-dots { right: 5px; bottom: 5px; }
  .timeline-card, .panel-card { padding: 19px; }
  .overview-row { gap: 7px; }
  .overview-cell { padding: 13px 9px; }
  .overview-cell strong { font-size: 26px; }
  .overview-cell small { font-size: 10px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .field.full, .fieldset { grid-column: auto; }
  .photo-picker { grid-template-columns: 112px minmax(0, 1fr); gap: 13px; }
  .selectable-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-photo .item-photo { min-height: 0; aspect-ratio: 4 / 4.2; }
  .detail-copy h2 { font-size: 29px; }
  .detail-facts > div { grid-template-columns: 74px minmax(0, 1fr); }
  .backup-actions { grid-template-columns: 1fr; }
  .sheet-actions > button { flex: 1; }
}

@media (max-width: 380px) {
  .mobile-nav { right: 8px; left: 8px; padding-right: 66px; }
  .fab { right: 17px; }
  .hero-card { min-height: 420px; }
  .hero-copy h1 { font-size: 36px; }
  .hero-actions .ghost-button { display: none; }
  .stat-card strong { font-size: 25px; }
  .quick-card { min-height: 136px; }
  .selectable-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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