:root {
  color-scheme: light;
  --ink: #1e2926;
  --ink-soft: #43504b;
  --muted: #74807b;
  --canvas: #f3f5f1;
  --paper: #ffffff;
  --paper-warm: #fbfaf6;
  --green: #1f5f57;
  --green-deep: #164b45;
  --green-soft: #e4efeb;
  --coral: #dd7055;
  --coral-soft: #f9e8e2;
  --sand: #d9ba80;
  --sand-soft: #f4ead7;
  --blue: #587493;
  --blue-soft: #e9eef5;
  --line: #dfe4df;
  --line-strong: #cbd3cd;
  --shadow-sm: 0 2px 10px rgba(34, 52, 45, 0.06);
  --shadow-md: 0 16px 45px rgba(30, 47, 41, 0.12);
  --sidebar-width: 234px;
  --rail-width: 292px;
  --radius: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #dfe8e3;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 2%, rgba(221, 112, 85, 0.1), transparent 22rem),
    linear-gradient(135deg, #e8eeea 0%, #dce6e1 100%);
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

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

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(31, 95, 87, 0.28);
  outline-offset: 2px;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

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

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: min(1500px, calc(100vw - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
  overflow: hidden;
  background: var(--canvas);
  border: 1px solid rgba(31, 70, 60, 0.12);
  border-radius: 12px;
  box-shadow: 0 20px 80px rgba(31, 66, 56, 0.14);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 28px);
  min-height: 640px;
  padding: 27px 18px 22px;
  background: #fafbf7;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  width: fit-content;
  margin: 0 10px 36px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--green);
  place-items: center;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  border: 1.8px solid #f3eee3;
  border-radius: 3px;
}

.brand-mark::before {
  inset: 9px 8px;
}

.brand-mark::after {
  right: 8px;
  bottom: 17px;
  left: 8px;
  border-width: 1px 0 0;
}

.brand-mark span {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 4px;
  height: 4px;
  background: var(--coral);
  border-radius: 50%;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-family: "STSong", "Songti SC", serif;
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  color: var(--green);
  background: #f0f4f0;
}

.nav-item:active {
  transform: translateY(1px);
}

.nav-item.is-active {
  font-weight: 650;
  color: var(--green-deep);
  background: var(--green-soft);
}

.nav-item.is-active svg {
  stroke-width: 2.2;
}

.nav-item svg {
  width: 19px;
  height: 19px;
}

.sidebar-spacer {
  flex: 1;
}

.install-card {
  display: flex;
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  text-align: left;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.install-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.install-card span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.install-card strong {
  font-size: 12px;
}

.install-card small {
  color: var(--muted);
  font-size: 10px;
}

.install-icon {
  display: grid;
  width: 34px;
  height: 34px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 7px;
  place-items: center;
}

.install-icon svg {
  width: 17px;
}

.local-data-note {
  display: flex;
  gap: 10px;
  padding: 14px 13px 2px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.local-data-note p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

.local-data-note strong {
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-soft);
}

.local-data-icon {
  padding-top: 1px;
}

.local-data-icon svg {
  width: 16px;
  height: 16px;
}

.main-content {
  min-width: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
    var(--canvas);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 clamp(22px, 3vw, 44px);
  background: rgba(243, 245, 241, 0.9);
  border-bottom: 1px solid rgba(223, 228, 223, 0.7);
  backdrop-filter: blur(16px);
}

.topbar-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-title span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.topbar-title strong {
  font-size: 18px;
  font-weight: 680;
}

.mobile-brand {
  display: none;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.mobile-brand strong {
  font-family: "STSong", "Songti SC", serif;
  font-size: 19px;
  letter-spacing: 0.08em;
}

.brand-mark-small {
  width: 31px;
  height: 31px;
  border-radius: 8px;
}

.brand-mark-small::before {
  inset: 7px 6px;
}

.brand-mark-small::after {
  right: 6px;
  bottom: 14px;
  left: 6px;
}

.brand-mark-small span {
  right: 11px;
  bottom: 10px;
  width: 3px;
  height: 3px;
}

.topbar-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button,
.text-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  transition:
    transform 150ms ease,
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.primary-button {
  min-height: 42px;
  padding: 0 17px;
  font-size: 13px;
  font-weight: 650;
  color: #fff;
  background: var(--green);
  border-radius: var(--radius);
  box-shadow: 0 5px 14px rgba(31, 95, 87, 0.18);
}

.primary-button:hover {
  background: var(--green-deep);
  box-shadow: 0 8px 20px rgba(31, 95, 87, 0.24);
}

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

.primary-button svg {
  width: 17px;
  height: 17px;
}

.secondary-button {
  min-height: 40px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 620;
  color: var(--green-deep);
  background: var(--green-soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.secondary-button:hover {
  border-color: #bfd4cc;
}

.secondary-button svg,
.ghost-button svg,
.danger-button svg,
.text-button svg {
  width: 16px;
  height: 16px;
}

.ghost-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ghost-button:hover {
  background: var(--paper);
  border-color: var(--line-strong);
}

.danger-button {
  min-height: 40px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 620;
  color: #a54432;
  background: var(--coral-soft);
  border-radius: var(--radius);
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.icon-button:hover {
  color: var(--green);
  background: #fff;
  border-color: var(--line-strong);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.text-button {
  gap: 5px;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 620;
  color: var(--green);
  background: transparent;
}

.text-button:hover {
  color: var(--green-deep);
}

.text-button svg {
  transition: transform 160ms ease;
}

.text-button:hover svg {
  transform: translateX(2px);
}

.mobile-search-trigger {
  display: none;
}

.view-root {
  padding: clamp(24px, 3vw, 42px) clamp(22px, 3vw, 44px) 60px;
}

.view {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  animation: view-in 260ms ease both;
}

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

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

.page-heading h1,
.home-copy h1 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.page-heading p,
.home-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

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

.eyebrow::before {
  width: 18px;
  height: 2px;
  content: "";
  background: var(--coral);
  border-radius: 99px;
}

.home-topline {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.home-copy p strong {
  font-weight: 650;
  color: var(--ink-soft);
}

.date-label {
  padding-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.search-shell {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(36, 55, 48, 0.07);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.search-shell:focus-within {
  border-color: #9dbcb2;
  box-shadow: 0 10px 32px rgba(31, 95, 87, 0.12);
}

.search-shell > svg {
  width: 20px;
  height: 20px;
  margin-left: 18px;
  color: var(--green);
}

.search-shell input {
  width: 100%;
  height: 58px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-shell input::placeholder {
  color: #919b96;
}

.search-shell kbd {
  padding: 3px 6px;
  margin-right: 14px;
  color: var(--muted);
  background: #f4f6f3;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 10px;
}

.search-clear {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  margin-right: 8px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 50%;
  place-items: center;
}

.search-clear:hover {
  background: var(--canvas);
}

.search-clear svg {
  width: 16px;
  height: 16px;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 31px;
}

.search-suggestions > span {
  margin-right: 3px;
  color: var(--muted);
  font-size: 11px;
}

.suggestion-chip {
  padding: 6px 10px;
  font-size: 11px;
  color: var(--ink-soft);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 99px;
}

.suggestion-chip:hover {
  color: var(--green);
  border-color: #b6cec6;
}

.metrics {
  display: flex;
  gap: clamp(22px, 4vw, 42px);
  padding: 0 0 26px;
  margin: 0 0 28px;
  border-bottom: 1px solid var(--line);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric strong {
  font-family: "STSong", "Songti SC", serif;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.15;
}

.metric span {
  color: var(--muted);
  font-size: 10px;
}

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

.section-block:first-child {
  margin-top: 0;
}

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

.section-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 680;
}

.section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

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

.location-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 124px;
  padding: 15px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.location-tile::after {
  position: absolute;
  top: -23px;
  right: -18px;
  width: 76px;
  height: 76px;
  content: "";
  background: var(--tile-accent, var(--green-soft));
  border-radius: 50%;
  opacity: 0.7;
}

.location-tile:hover {
  transform: translateY(-2px);
  border-color: #c3d3cc;
  box-shadow: var(--shadow-sm);
}

.location-tile-icon {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  color: var(--tile-color, var(--green));
  background: var(--tile-accent, var(--green-soft));
  border-radius: 7px;
  place-items: center;
}

.location-tile-icon svg {
  width: 17px;
  height: 17px;
}

.location-tile strong {
  z-index: 1;
  overflow: hidden;
  font-size: 13px;
  font-weight: 670;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-tile small {
  z-index: 1;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.item-card {
  min-width: 0;
  cursor: pointer;
}

.item-card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1.06;
  background: #e9ece7;
  border-radius: var(--radius);
}

.item-card-image-wrap::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(31, 49, 43, 0.06);
  border-radius: inherit;
}

.item-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.item-card:hover img {
  transform: scale(1.035);
}

.favorite-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 27px;
  height: 27px;
  color: #fff;
  background: rgba(30, 41, 38, 0.52);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  place-items: center;
}

.favorite-mark svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.item-card-body {
  padding: 9px 2px 0;
}

.item-card-body h3 {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-location-line {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.item-location-line svg {
  width: 12px;
  height: 12px;
  color: var(--green);
}

.item-location-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  font-size: 9px;
  font-weight: 650;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 99px;
}

.category-pill[data-category="数码"] {
  color: #4c6380;
  background: var(--blue-soft);
}

.category-pill[data-category="包袋"] {
  color: #8b5e2d;
  background: var(--sand-soft);
}

.category-pill[data-category="文具"] {
  color: #596d5f;
  background: #ebeee7;
}

.category-pill[data-category="其他"] {
  color: #8b5548;
  background: var(--coral-soft);
}

.category-pill[data-category="配饰"] {
  color: #7b5a42;
  background: #f1e6dc;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-state-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 13px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 50%;
  place-items: center;
}

.empty-state-icon svg {
  width: 22px;
  height: 22px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 14px;
}

.empty-state p {
  max-width: 320px;
  margin: 7px 0 16px;
  font-size: 11px;
  line-height: 1.6;
}

.search-results-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-top: 3px;
  margin: 0 0 18px;
}

.search-results-head h2 {
  margin: 0;
  font-size: 15px;
}

.search-results-head h2 strong {
  color: var(--green);
}

.search-results-head span {
  color: var(--muted);
  font-size: 11px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 19px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

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

.filter-chip {
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 11px;
  color: var(--ink-soft);
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 99px;
  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.filter-chip:hover {
  border-color: #b8cec6;
}

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

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

.compact-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(360px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.compact-search svg {
  width: 16px;
  height: 16px;
  margin-left: 12px;
  color: var(--muted);
}

.compact-search input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  font-size: 12px;
  background: transparent;
  border: 0;
  outline: 0;
}

.view-switcher {
  display: flex;
  padding: 3px;
  background: #e9ede8;
  border-radius: 7px;
}

.view-switch {
  display: grid;
  width: 31px;
  height: 29px;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 5px;
  place-items: center;
}

.view-switch.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 4px rgba(31, 49, 43, 0.08);
}

.view-switch svg {
  width: 15px;
  height: 15px;
}

.items-count-label {
  color: var(--muted);
  font-size: 11px;
}

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

.item-list-row {
  display: grid;
  grid-template-columns: 66px minmax(130px, 1.05fr) minmax(160px, 1.4fr) auto;
  gap: 14px;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.item-list-row:hover {
  background: #fff;
  border-color: #c8d4ce;
}

.item-list-row img {
  width: 66px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
}

.item-list-row h3 {
  margin: 0 0 4px;
  font-size: 13px;
}

.list-location {
  display: flex;
  gap: 5px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.list-location svg {
  width: 13px;
  height: 13px;
  color: var(--green);
}

.list-location span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-tags {
  display: flex;
  gap: 5px;
  overflow: hidden;
}

.mini-tag {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: var(--muted);
  background: #f1f3ef;
  border-radius: 99px;
  font-size: 9px;
}

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

.outfit-card {
  overflow: hidden;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.outfit-card:hover {
  transform: translateY(-2px);
  border-color: #c5d2cc;
  box-shadow: var(--shadow-sm);
}

.outfit-collage {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 2px;
  height: 205px;
  padding: 2px;
  background: #e7ebe6;
}

.outfit-collage-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.outfit-collage-side {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
}

.outfit-collage-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.outfit-card-body {
  padding: 14px 15px 15px;
}

.outfit-card-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
}

.outfit-card-meta span:not(:last-child)::after {
  margin-left: 7px;
  content: "·";
}

.outfit-card h3 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 18px;
  font-weight: 650;
}

.outfit-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.wardrobe-note {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  margin-top: 25px;
  color: var(--ink-soft);
  background: var(--green-soft);
  border: 1px solid #d2e2dc;
  border-radius: var(--radius);
}

.wardrobe-note div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wardrobe-note strong {
  font-size: 12px;
}

.wardrobe-note span {
  color: var(--muted);
  font-size: 10px;
}

.category-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 26px;
}

.category-summary {
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.category-summary-icon {
  display: grid;
  width: 29px;
  height: 29px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 6px;
  place-items: center;
}

.category-summary-icon svg {
  width: 15px;
  height: 15px;
}

.category-summary strong {
  font-family: "STSong", "Songti SC", serif;
  font-size: 20px;
}

.category-summary span {
  color: var(--muted);
  font-size: 10px;
}

.location-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.cabinet-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cabinet-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
}

.cabinet-icon {
  display: grid;
  width: 42px;
  height: 42px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 8px;
  place-items: center;
}

.cabinet-icon svg {
  width: 21px;
  height: 21px;
}

.cabinet-title h3 {
  margin: 0;
  font-size: 14px;
}

.cabinet-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

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

.cabinet-toggle {
  display: grid;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: #f2f4f1;
  border: 0;
  border-radius: 6px;
  place-items: center;
}

.cabinet-toggle svg {
  width: 15px;
  height: 15px;
  transition: transform 180ms ease;
}

.cabinet-card.is-open .cabinet-toggle svg {
  transform: rotate(180deg);
}

.cabinet-body {
  display: none;
  padding: 0 18px 16px;
}

.cabinet-card.is-open .cabinet-body {
  display: block;
}

.area-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.area-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.7fr) minmax(0, 1.5fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #f7f8f5;
  border: 1px solid #edf0ec;
  border-radius: 6px;
}

.area-name {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  font-weight: 620;
}

.area-name svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.area-items {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.area-item-dot {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border: 2px solid #fff;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(31, 49, 43, 0.1);
}

.area-empty {
  color: var(--muted);
  font-size: 10px;
}

.area-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.tiny-icon-button {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  place-items: center;
}

.tiny-icon-button:hover {
  color: var(--green);
  border-color: #bfd2cb;
}

.tiny-icon-button svg {
  width: 13px;
  height: 13px;
}

.insight-rail {
  display: none;
  padding: 28px 22px;
  overflow-y: auto;
  background: #f8f9f5;
  border-left: 1px solid var(--line);
}

.rail-header {
  margin-bottom: 20px;
}

.rail-header span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.rail-header h2 {
  margin: 5px 0 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 18px;
  font-weight: 650;
}

.rail-outfit {
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rail-outfit-image {
  position: relative;
  height: 162px;
  overflow: hidden;
}

.rail-outfit-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-outfit-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 50%, rgba(23, 36, 32, 0.38));
}

.rail-outfit-label {
  position: absolute;
  right: 13px;
  bottom: 12px;
  left: 13px;
  z-index: 1;
  color: #fff;
}

.rail-outfit-label span {
  display: block;
  margin-bottom: 3px;
  font-size: 9px;
  opacity: 0.75;
}

.rail-outfit-label strong {
  font-family: "STSong", "Songti SC", serif;
  font-size: 16px;
}

.rail-outfit-info {
  padding: 12px 13px 13px;
}

.rail-outfit-info p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.rail-section {
  padding-top: 23px;
  margin-top: 23px;
  border-top: 1px solid var(--line);
}

.rail-section h3 {
  margin: 0 0 12px;
  font-size: 12px;
}

.rail-location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  cursor: pointer;
  border-bottom: 1px solid #edf0ec;
}

.rail-location-row:last-of-type {
  border-bottom: 0;
}

.rail-location-row div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rail-location-row strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-location-row span {
  color: var(--muted);
  font-size: 9px;
}

.rail-location-row b {
  font-family: "STSong", "Songti SC", serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
}

.rail-stat-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.rail-stat {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rail-stat strong {
  display: block;
  font-family: "STSong", "Songti SC", serif;
  font-size: 21px;
}

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

.bottom-nav {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(21, 32, 28, 0.48);
  backdrop-filter: blur(5px);
  animation: fade-in 180ms ease both;
}

.modal {
  position: relative;
  width: min(670px, 100%);
  max-height: min(880px, calc(100vh - 48px));
  overflow: hidden;
  background: var(--paper-warm);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  animation: modal-in 230ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.modal.modal-wide {
  width: min(760px, 100%);
}

.modal.modal-compact {
  width: min(430px, 100%);
}

.modal-scroll {
  max-height: min(880px, calc(100vh - 48px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: rgba(251, 250, 246, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.modal-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-heading span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.modal-heading h2 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 21px;
  font-weight: 650;
}

.modal-close {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  background: #f1f3ef;
  border: 0;
  border-radius: 50%;
  place-items: center;
}

.modal-close:hover {
  color: var(--ink);
  background: #e7ebe6;
}

.modal-close svg {
  width: 17px;
  height: 17px;
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(251, 250, 246, 0.95);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.form-section + .form-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.form-section-title {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 680;
}

.form-section-title svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.photo-editor {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 13px;
  background: #f4f5f1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.photo-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #e4e9e3;
  border-radius: 7px;
}

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

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  text-align: center;
}

.photo-placeholder svg {
  width: 26px;
  height: 26px;
  margin-bottom: 8px;
  color: var(--green);
}

.photo-placeholder span {
  font-size: 9px;
}

.photo-copy {
  min-width: 0;
}

.photo-copy h3 {
  margin: 0;
  font-size: 13px;
}

.photo-copy p {
  margin: 5px 0 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.photo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

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

.form-field > label,
.field-label {
  font-size: 10px;
  font-weight: 650;
  color: var(--ink-soft);
}

.required-mark {
  margin-left: 2px;
  color: var(--coral);
}

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

.text-input,
.select-input,
.textarea-input {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.text-input,
.select-input {
  height: 42px;
  padding: 0 12px;
  font-size: 12px;
}

.textarea-input {
  min-height: 86px;
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}

.text-input:focus,
.select-input:focus,
.textarea-input:focus {
  border-color: #91b6aa;
  box-shadow: 0 0 0 3px rgba(31, 95, 87, 0.08);
}

.text-input::placeholder,
.textarea-input::placeholder {
  color: #a0a9a4;
}

.select-input {
  padding-right: 32px;
  cursor: pointer;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 18px,
    calc(100% - 11px) 18px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.category-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.category-option {
  position: relative;
}

.category-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.category-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 32px;
  padding: 0 12px;
  color: var(--ink-soft);
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 10px;
  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.category-option input:checked + span {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.category-option input:focus-visible + span {
  outline: 3px solid rgba(31, 95, 87, 0.25);
  outline-offset: 2px;
}

.wear-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  margin-top: 14px;
  background: #f5f3ed;
  border: 1px solid #eae5db;
  border-radius: var(--radius);
}

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

.custom-location-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 13px;
  margin-top: 12px;
  background: var(--green-soft);
  border: 1px solid #d2e2dc;
  border-radius: var(--radius);
}

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

.detail-image {
  position: relative;
  min-height: 360px;
  background: #e7ebe6;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-content {
  padding: 25px;
}

.detail-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}

.detail-content h2 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 27px;
  font-weight: 650;
  line-height: 1.3;
}

.detail-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.detail-location {
  padding: 14px;
  margin-top: 22px;
  background: var(--green-soft);
  border: 1px solid #d0e1da;
  border-radius: var(--radius);
}

.detail-location > span {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.detail-location > span svg {
  width: 13px;
  height: 13px;
}

.location-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.location-breadcrumb strong {
  padding: 7px 9px;
  font-size: 11px;
  background: #fff;
  border-radius: 5px;
}

.location-breadcrumb svg {
  width: 12px;
  height: 12px;
  color: #7da198;
}

.detail-note {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-note h3 {
  margin: 0 0 7px;
  font-size: 10px;
  font-weight: 680;
}

.detail-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 19px;
  margin-top: 19px;
  border-top: 1px solid var(--line);
}

.outfit-detail-hero {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  background: #e6ebe6;
}

.outfit-detail-hero img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.outfit-detail-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  color: #fff;
  background: linear-gradient(180deg, transparent 35%, rgba(23, 34, 30, 0.7));
}

.outfit-detail-overlay h2 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 28px;
  font-weight: 650;
}

.outfit-detail-overlay p {
  margin: 5px 0 0;
  font-size: 10px;
  opacity: 0.82;
}

.outfit-pieces {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.outfit-piece {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 7px;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.outfit-piece:hover {
  border-color: #bdd0c9;
}

.outfit-piece img {
  width: 58px;
  height: 54px;
  object-fit: cover;
  border-radius: 5px;
}

.outfit-piece h4 {
  margin: 0 0 4px;
  font-size: 11px;
}

.outfit-piece p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.outfit-piece > svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.outfit-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  max-height: 320px;
  padding: 3px;
  overflow-y: auto;
}

.outfit-select-option {
  position: relative;
}

.outfit-select-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.outfit-select-option label {
  display: block;
  padding: 5px;
  cursor: pointer;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px var(--line);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.outfit-select-option img {
  width: 100%;
  aspect-ratio: 1.15;
  object-fit: cover;
  border-radius: 4px;
}

.outfit-select-option span {
  display: block;
  padding: 6px 3px 3px;
  overflow: hidden;
  font-size: 9px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outfit-select-option input:checked + label {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 95, 87, 0.09);
}

.outfit-select-option input:checked + label::after {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  width: 20px;
  height: 20px;
  content: "✓";
  color: #fff;
  background: var(--green);
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 10px;
  place-items: center;
}

.outfit-selection-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.badge-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 99px;
  font-size: 9px;
  place-items: center;
}

.confirm-copy {
  padding: 4px 2px 20px;
}

.confirm-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 220;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}

.toast {
  display: flex;
  gap: 9px;
  align-items: center;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 14px;
  color: #fff;
  background: #22322d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(23, 35, 30, 0.22);
  font-size: 11px;
  animation: toast-in 220ms ease both;
}

.toast.is-leaving {
  animation: toast-out 180ms ease both;
}

.toast svg {
  width: 15px;
  height: 15px;
  color: #a8d4c7;
}

.toast[data-type="error"] svg {
  color: #f3b29f;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(5px);
  }
}

@media (min-width: 1180px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--rail-width);
  }

  .insight-rail {
    display: block;
  }
}

@media (min-width: 1440px) {
  .item-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1179px) {
  .item-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  html,
  body {
    background: var(--canvas);
  }

  .app-shell {
    display: block;
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    overflow: visible;
    background: var(--canvas);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    height: 65px;
    padding: 0 20px;
    background: rgba(243, 245, 241, 0.94);
  }

  .topbar-title {
    display: none;
  }

  .mobile-brand {
    display: flex;
  }

  .mobile-search-trigger {
    display: grid;
  }

  .top-add-button {
    display: none;
  }

  .view-root {
    padding: 22px 20px calc(92px + var(--safe-bottom));
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    height: calc(67px + var(--safe-bottom));
    padding: 0 8px var(--safe-bottom);
    background: rgba(253, 253, 250, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(30, 47, 41, 0.06);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    height: 58px;
    padding: 0;
    color: var(--muted);
    cursor: pointer;
    background: transparent;
    border: 0;
    font-size: 9px;
  }

  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav-item.is-active {
    color: var(--green);
    font-weight: 680;
  }

  .mobile-nav-item.is-active svg {
    stroke-width: 2.2;
  }

  .mobile-add-button {
    display: grid;
    width: 50px;
    height: 50px;
    padding: 0;
    margin: -24px auto 0;
    color: #fff;
    cursor: pointer;
    background: var(--green);
    border: 5px solid var(--canvas);
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(31, 95, 87, 0.28);
    place-items: center;
  }

  .mobile-add-button:active {
    transform: scale(0.97);
  }

  .mobile-add-button svg {
    width: 20px;
    height: 20px;
  }

  .toast-region {
    right: 16px;
    bottom: calc(82px + var(--safe-bottom));
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal,
  .modal.modal-wide,
  .modal.modal-compact {
    width: 100%;
    max-height: calc(94dvh - var(--safe-bottom));
    border: 0;
    border-radius: 18px 18px 0 0;
    animation-name: sheet-in;
  }

  @keyframes sheet-in {
    from {
      opacity: 0;
      transform: translateY(36px);
    }
  }

  .modal-scroll {
    max-height: calc(94dvh - var(--safe-bottom));
  }

  .modal-header {
    padding: 17px 20px;
  }

  .modal-header::before {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 34px;
    height: 4px;
    content: "";
    background: #d5dad5;
    border-radius: 99px;
    transform: translateX(-50%);
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 13px 20px calc(13px + var(--safe-bottom));
  }
}

@media (max-width: 720px) {
  .page-heading {
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .page-heading h1,
  .home-copy h1 {
    font-size: 28px;
  }

  .page-heading p,
  .home-copy p {
    font-size: 11px;
  }

  .page-heading-actions .ghost-button span:not([data-icon]) {
    display: none;
  }

  .date-label {
    display: none;
  }

  .search-shell input {
    height: 54px;
    font-size: 13px;
  }

  .search-shell kbd {
    display: none;
  }

  .search-suggestions {
    margin-bottom: 24px;
  }

  .metrics {
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 22px;
    margin-bottom: 24px;
  }

  .metric strong {
    font-size: 21px;
  }

  .location-strip {
    display: flex;
    gap: 9px;
    padding-bottom: 3px;
    margin-right: -20px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .location-strip::-webkit-scrollbar {
    display: none;
  }

  .location-tile {
    flex: 0 0 166px;
    min-height: 116px;
    scroll-snap-align: start;
  }

  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 11px;
  }

  .item-card-body {
    padding-top: 7px;
  }

  .item-card-body h3 {
    font-size: 12px;
  }

  .items-toolbar {
    align-items: flex-start;
  }

  .items-count-label {
    align-self: center;
  }

  .item-list-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .item-list-row img {
    width: 58px;
    height: 58px;
  }

  .list-tags {
    display: none;
  }

  .outfit-grid {
    grid-template-columns: 1fr;
  }

  .outfit-collage {
    height: 230px;
  }

  .category-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .category-summary {
    padding: 11px;
  }

  .category-summary-top {
    margin-bottom: 8px;
  }

  .category-summary-icon {
    width: 25px;
    height: 25px;
  }

  .category-summary strong {
    font-size: 18px;
  }

  .cabinet-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 14px;
  }

  .cabinet-actions .ghost-button {
    display: none;
  }

  .cabinet-body {
    padding: 0 14px 14px;
  }

  .area-row {
    grid-template-columns: minmax(80px, 0.6fr) minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
  }

  .area-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .area-actions .tiny-icon-button:first-child {
    display: none;
  }

  .photo-editor {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 13px;
    padding: 10px;
  }

  .photo-copy p {
    display: none;
  }

  .photo-buttons {
    margin-top: 10px;
  }

  .photo-buttons .ghost-button {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field.is-full {
    grid-column: auto;
  }

  .wear-fields {
    grid-template-columns: 1fr;
  }

  .location-form-grid {
    grid-template-columns: 1fr;
  }

  .custom-location-fields {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    display: block;
  }

  .detail-image {
    min-height: 260px;
    aspect-ratio: 1.2;
  }

  .detail-content {
    padding: 20px;
  }

  .detail-content h2 {
    font-size: 24px;
  }

  .outfit-selector-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wardrobe-note {
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .view-root {
    padding-right: 16px;
    padding-left: 16px;
  }

  .topbar {
    padding: 0 16px;
  }

  .location-strip {
    margin-right: -16px;
  }

  .item-grid {
    gap: 14px 9px;
  }

  .category-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(3) {
    display: none;
  }

  .outfit-selector-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;
  }
}
