/*
 * Yue's Wardrobe — warm editorial theme
 * Single visual layer loaded after the legacy component styles.
 */

:root {
  color-scheme: light;
  --canvas: #e9e4dc;
  --app-bg: #f7f3ed;
  --surface: #fffdf9;
  --surface-soft: #efe9df;
  --surface-muted: #e7e0d5;
  --ink: #292621;
  --ink-soft: #4d4841;
  --text-muted: #7c756c;
  --line: #dfd7cc;
  --line-strong: #cfc3b5;
  --accent: #a8684d;
  --accent-deep: #7d4936;
  --accent-soft: #ead9ce;
  --sage: #748071;
  --sage-soft: #dde3d9;
  --sand: #d9b985;
  --sand-soft: #f1e5cd;
  --danger: #ad514b;
  --danger-soft: #f5e2df;
  --shadow-xs: 0 1px 2px rgba(54, 45, 37, 0.05);
  --shadow-sm: 0 8px 24px rgba(54, 45, 37, 0.07);
  --shadow-md: 0 18px 50px rgba(54, 45, 37, 0.11);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --font-sans: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

html {
  min-height: 100%;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 8%, rgba(168, 104, 77, 0.08), transparent 28%),
    radial-gradient(circle at 86% 24%, rgba(116, 128, 113, 0.09), transparent 32%),
    var(--canvas);
  background-attachment: scroll;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: none;
}

body.modal-open {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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

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

button svg,
a svg {
  pointer-events: none;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.app {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.55), transparent 180px),
    var(--app-bg);
  box-shadow: 0 0 0 1px rgba(64, 53, 43, 0.04), var(--shadow-md);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.main {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  padding: 32px 18px calc(112px + env(safe-area-inset-bottom));
}

.page {
  width: 100%;
  min-width: 0;
  animation: none;
}

.page > .page-header,
.welcome-intro {
  animation: page-in 160ms ease both;
}

.page.hidden,
.modal.hidden,
.auth-overlay.hidden,
.empty-state.hidden {
  display: none;
}

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

/* Bottom navigation */

.nav {
  position: fixed;
  top: auto;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 500;
  width: min(398px, calc(100vw - 24px));
  transform: translateX(-50%);
  border: 1px solid rgba(207, 195, 181, 0.78);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.985);
  box-shadow: 0 14px 36px rgba(54, 45, 37, 0.16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.nav-container {
  display: block;
  padding: 6px 7px;
}

.nav-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  -webkit-text-fill-color: currentColor;
  filter: none;
}

.nav-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 2px;
}

.btn-icon.nav-item {
  width: 100%;
  height: 54px;
  min-width: 0;
  padding: 6px 2px 5px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.btn-icon.nav-item span {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
}

.btn-icon.nav-item:hover,
.btn-icon.nav-item.active {
  transform: none;
  background: var(--surface-soft);
  color: var(--accent-deep);
  box-shadow: none;
}

.btn-icon.nav-item.active svg {
  stroke-width: 2.1;
}

.btn-icon.nav-add {
  width: 52px;
  height: 52px;
  justify-self: center;
  margin-top: -14px;
  padding: 0;
  border-radius: 18px;
  background: var(--accent);
  color: #fffaf4;
  box-shadow: 0 9px 20px rgba(125, 73, 54, 0.26);
}

.btn-icon.nav-add span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.btn-icon.nav-add:hover,
.btn-icon.nav-add:active,
.btn-icon.nav-add.active {
  transform: translateY(-1px);
  background: var(--accent-deep);
  color: #fff;
  box-shadow: 0 11px 24px rgba(125, 73, 54, 0.3);
}

/* Shared controls */

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-add-item,
.btn-url-preview,
.btn-reupload,
.btn-retry,
.btn-back,
.btn-filter-settings {
  min-height: 44px;
  border-radius: 13px;
  font-weight: 650;
  line-height: 1;
  text-shadow: none;
  box-shadow: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.btn-primary,
.btn-add-item,
.btn-url-preview,
.btn-reupload {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fffaf5;
}

.btn-secondary,
.btn-back,
.btn-filter-settings {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.btn-danger,
.btn-retry {
  border: 1px solid rgba(173, 81, 75, 0.22);
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-primary {
  padding: 0.82rem 1.25rem;
  font-size: 0.94rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.btn-secondary,
.btn-danger {
  padding: 0.76rem 1.05rem;
  font-size: 0.9rem;
}

.btn-primary:hover,
.btn-add-item:hover,
.btn-url-preview:hover,
.btn-reupload:hover {
  transform: translateY(-1px);
  border-color: var(--accent-deep);
  background: var(--accent-deep);
  box-shadow: 0 8px 20px rgba(125, 73, 54, 0.16);
}

.btn-secondary:hover,
.btn-back:hover,
.btn-filter-settings:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.btn-danger:hover,
.btn-retry:hover {
  transform: translateY(-1px);
  background: #f0d3d0;
  color: #923e39;
  box-shadow: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(168, 104, 77, 0.2);
  outline-offset: 2px;
}

/* Authentication */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  min-height: 100dvh;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 20%, rgba(217, 185, 133, 0.12), transparent 34%),
    rgba(39, 35, 31, 0.98);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-container {
  width: min(100%, 340px);
  max-width: 340px;
  padding: 0;
}

.auth-card {
  width: 100%;
  padding: 32px 26px 26px;
  border: 1px solid rgba(255, 253, 249, 0.18);
  border-radius: 28px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-monogram {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent-deep);
  font-size: 1.45rem;
  font-weight: 650;
}

.auth-kicker,
.welcome-kicker,
.page-kicker,
.section-kicker {
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.18em;
}

.auth-title {
  margin: 7px 0 8px;
  background: none;
  color: var(--ink);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  -webkit-text-fill-color: currentColor;
  filter: none;
}

.auth-description {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.auth-form .form-group {
  margin-bottom: 12px;
}

.auth-form input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(54, 45, 37, 0.02);
}

.auth-form input::placeholder {
  color: #aaa198;
}

.auth-form input:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(168, 104, 77, 0.12);
}

.auth-form .btn-primary {
  width: 100%;
}

.auth-error {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(173, 81, 75, 0.18);
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.82rem;
}

/* Home */

.welcome-card {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 16px;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.welcome-card::before {
  content: none;
}

.welcome-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 18px;
  min-height: 246px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 253, 249, 0.1);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 8%, rgba(217, 185, 133, 0.2), transparent 29%),
    #2e2a25;
  color: #fffaf3;
  box-shadow: 0 16px 40px rgba(54, 45, 37, 0.14);
}

.welcome-intro::after {
  content: "";
  position: absolute;
  right: -64px;
  bottom: -88px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 250, 243, 0.12);
  border-radius: 50%;
}

.welcome-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.welcome-kicker {
  color: var(--sand);
}

.welcome-title {
  max-width: 6em;
  margin: 14px 0 10px;
  background: none;
  color: #fffaf3;
  font-size: clamp(2.25rem, 10vw, 3rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.055em;
  -webkit-text-fill-color: currentColor;
  filter: none;
  text-shadow: none;
}

.welcome-description {
  max-width: 18em;
  margin: 0;
  color: rgba(255, 250, 243, 0.67);
  font-size: 0.91rem;
  line-height: 1.7;
  text-shadow: none;
}

.welcome-monogram {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 250, 243, 0.22);
  border-radius: 50%;
  color: var(--sand);
  font-size: 1.2rem;
  font-weight: 600;
}

.welcome-action {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 2;
  min-height: 42px;
  padding: 0.72rem 1rem;
  border-color: #fffaf3;
  background: #fffaf3;
  color: var(--ink);
  font-size: 0.84rem;
}

.welcome-action:hover {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

/* Compact weather panel */

#wxInline {
  position: relative;
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
  min-height: 216px;
  margin: 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

#wxInline::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -52px;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  background: var(--sage-soft);
  opacity: 0.62;
  pointer-events: none;
}

#wxInline *,
#wxInline *::before,
#wxInline *::after {
  text-shadow: none;
}

#wxInline .wx-header {
  position: relative;
  z-index: 2;
  display: block;
  min-width: 0;
  padding-right: 74px;
}

#wxInline .wx-title {
  margin: 0;
  background: none;
  color: var(--sage);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  -webkit-text-fill-color: currentColor;
  filter: none;
}

#wxInline .wx-sub {
  max-width: 250px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
  opacity: 1;
  overflow-wrap: anywhere;
}

#wxInline .wx-temp-line {
  max-width: 270px;
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(1.65rem, 7.2vw, 2.1rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.045em;
  opacity: 1;
  overflow-wrap: anywhere;
}

#wxInline .wx-header > .wx-toolbar {
  position: static;
  margin-top: 8px;
}

#wxInline > .wx-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin: 0;
}

#wxInline .wx-btn-group {
  display: inline-flex;
  gap: 5px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-soft);
}

#wxInline .wx-btn {
  min-height: 31px;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 650;
  box-shadow: none;
  transition: color 160ms ease, background-color 160ms ease;
}

#wxInline .wx-btn:hover {
  transform: none;
  background: rgba(255, 253, 249, 0.7);
  box-shadow: none;
}

#wxInline .wx-btn.active {
  border-color: transparent;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

#wxInline .wx-loading {
  display: none;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

#wxInline .wx-loading.show {
  display: inline-flex;
}

#wxInline .wx-spinner {
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--line);
  border-top-color: var(--sage);
}

#wxInline .wx-grid {
  position: absolute;
  top: 58px;
  right: 20px;
  z-index: 3;
  display: block;
  width: 62px;
  height: 62px;
  margin: 0;
}

#wxInline .wx-card {
  display: none;
  width: 62px;
  height: 62px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink-soft);
  box-shadow: none;
}

#wxInline .wx-card.active {
  display: grid;
  place-items: center;
  transform: none;
  border: 1px solid rgba(79, 72, 65, 0.08);
  box-shadow: 0 8px 18px rgba(54, 45, 37, 0.08);
}

#wxInline .wx-card.type-sun {
  background: var(--sand-soft);
}

#wxInline .wx-card.type-cloudy,
#wxInline .wx-card.type-overcast,
#wxInline .wx-card.type-wind {
  background: var(--sage-soft);
}

#wxInline .wx-card.type-rain,
#wxInline .wx-card.type-snow {
  background: #e4e8e7;
}

#wxInline .wx-card-header {
  display: block;
  position: static;
  text-align: center;
}

#wxInline .wx-card-title {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0;
}

#wxInline .wx-card-date,
#wxInline .wx-scene,
#wxInline .wx-legend,
#wxInline .sun,
#wxInline .glint,
#wxInline .wind-cloud,
#wxInline .cloudy-cloud,
#wxInline .wind-lines,
#wxInline .tree,
#wxInline .overcast-layer,
#wxInline .raindrop,
#wxInline .flake,
#wxInline .snow-ground,
#wxInline .puddle {
  display: none;
}

#wxInline .wx-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.73rem;
}

#wxInline .wx-footer a {
  color: var(--sage);
  font-weight: 650;
  text-decoration: none;
}

#wxInline .wx-source {
  color: #a0988f;
}

#wxInline .wx-error-banner {
  position: relative;
  z-index: 3;
  display: none;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(173, 81, 75, 0.17);
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.76rem;
}

#wxInline .wx-error-banner.show {
  display: block;
}

#wxInline .wx-error-banner .wx-btn {
  min-height: 28px;
  border: 1px solid rgba(173, 81, 75, 0.18);
  background: rgba(255, 255, 255, 0.54);
  color: var(--danger);
}

/* Recently worn */

.recent-worn-section {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
}

.section-title-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-link {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.recent-worn-list {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 10px;
  margin-top: 15px;
  padding: 0 0 2px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.recent-worn-list::-webkit-scrollbar {
  display: none;
}

.recent-worn-item {
  flex: 0 0 clamp(82px, 24vw, 94px);
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.recent-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.recent-worn-item:hover .recent-thumb img {
  transform: scale(1.025);
}

.recent-thumb-placeholder {
  color: rgba(77, 72, 65, 0.28);
  font-size: 1.6rem;
  font-weight: 650;
}

.recent-meta {
  display: grid;
  gap: 2px;
  margin-top: 7px;
}

.recent-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-date {
  color: var(--text-muted);
  font-size: 0.67rem;
}

.recent-empty {
  flex: 1 0 100%;
  padding: 8px 0 2px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

/* Page headings and filters */

.page-header {
  margin: 0 0 20px;
}

.page-header h2 {
  margin: 8px 0 5px;
  background: none;
  color: var(--ink);
  font-size: clamp(2rem, 9vw, 2.55rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.055em;
  -webkit-text-fill-color: currentColor;
  filter: none;
  text-shadow: none;
}

.page-header h2::before {
  content: none;
}

.page-subtitle {
  max-width: 26em;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

#statsPage .page-header,
#outfitsPage .page-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.page-heading {
  min-width: 0;
}

.btn-back {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
}

.filter-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: start;
  gap: 9px;
  margin-top: 22px;
}

.filter-tabs {
  display: flex;
  min-width: 0;
  gap: 7px;
  padding: 0 0 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.filter-tab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-shadow: none;
  box-shadow: none;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.filter-tab:hover:not(.active) {
  transform: none;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.filter-tab.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fffaf3;
  text-shadow: none;
  box-shadow: none;
}

.btn-filter-settings {
  display: grid;
  place-items: center;
  width: 44px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 13px;
}

.view-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 3px 0 0;
}

.sort-select,
.list-toggle,
.column-control {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: none;
}

.sort-select {
  width: 100%;
  min-width: 0;
  padding: 0 34px 0 12px;
  font-size: 0.76rem;
  cursor: pointer;
}

.column-control {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  overflow: hidden;
}

.column-button {
  min-width: 0;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 650;
  box-shadow: none;
  cursor: pointer;
}

.column-button:last-child {
  border-right: 0;
}

.column-button:hover,
.column-button.active {
  transform: none;
  background: var(--surface-soft);
  color: var(--accent-deep);
  box-shadow: none;
}

.list-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  font-size: 0.72rem;
  white-space: nowrap;
  cursor: pointer;
}

.list-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

/* Clothes collection */

.clothes-grid {
  --clothes-columns: 3;
  display: grid;
  grid-template-columns: repeat(var(--clothes-columns), minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.clothes-grid[data-columns="2"] {
  gap: 13px;
}

.clothes-grid[data-columns="4"] {
  gap: 7px;
}

.clothes-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  content-visibility: auto;
  contain-intrinsic-size: auto 230px;
}

.clothes-card::before {
  content: none;
}

.clothes-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.clothes-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 253, 249, 0.55), transparent),
    var(--surface-soft);
  backdrop-filter: none;
}

.clothes-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.clothes-card:hover .clothes-image img {
  transform: scale(1.02);
}

.clothes-image .placeholder,
.thumb-placeholder,
.outfit-clothes-placeholder,
.outfit-clothes-detail-placeholder,
.clothes-selector-item-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: transparent;
  font-size: 0;
  filter: none;
}

.clothes-image .placeholder::after,
.thumb-placeholder::after,
.outfit-clothes-placeholder::after,
.outfit-clothes-detail-placeholder::after,
.clothes-selector-item-placeholder::after {
  content: "衣";
  color: rgba(77, 72, 65, 0.23);
  font-size: 1.7rem;
  font-weight: 650;
}

.clothes-info {
  min-width: 0;
  padding: 10px;
  background: var(--surface);
  backdrop-filter: none;
}

.clothes-number {
  margin: 0 0 3px;
  background: none;
  color: var(--accent);
  font-size: 0.61rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  -webkit-text-fill-color: currentColor;
  filter: none;
}

.clothes-name {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-shadow: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.clothes-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.clothes-meta > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wear-count,
.clothes-list-right .wear-count {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.62rem;
  font-weight: 700;
  text-shadow: none;
  box-shadow: none;
}

.clothes-grid[data-columns="2"] .clothes-info {
  padding: 12px;
}

.clothes-grid[data-columns="2"] .clothes-name {
  font-size: 0.9rem;
}

.clothes-grid[data-columns="4"] .clothes-info {
  padding: 7px;
}

.clothes-grid[data-columns="4"] .clothes-name {
  min-height: 2.55em;
  font-size: 0.68rem;
}

.clothes-grid[data-columns="4"] .clothes-meta > span:first-child {
  display: none;
}

.clothes-grid[data-columns="4"] .clothes-meta {
  justify-content: flex-start;
}

.clothes-grid.list-view {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.clothes-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  content-visibility: auto;
  contain-intrinsic-size: auto 72px;
}

.clothes-list-item:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.clothes-list-left {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.clothes-list-name {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.clothes-list-meta {
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.clothes-list-right {
  flex: 0 0 auto;
}

.clothes-card.is-jump-target,
.clothes-list-item.is-jump-target {
  outline: 3px solid rgba(168, 104, 77, 0.2);
  outline-offset: 3px;
}

.empty-state {
  margin-top: 12px;
  padding: 38px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.55);
  color: var(--text-muted);
  text-align: center;
  text-shadow: none;
}

.empty-illustration {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--surface-soft);
}

.empty-illustration svg {
  display: none;
}

.empty-illustration::after {
  content: "衣";
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 650;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-shadow: none;
}

/* Statistics */

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

.stat-card {
  min-width: 0;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  backdrop-filter: none;
}

.stat-card:first-child {
  grid-column: 1 / -1;
  min-height: 118px;
  background: var(--ink);
  color: #fffaf3;
}

.stat-card::before {
  content: none;
}

.stat-card h3 {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: none;
}

.stat-card:first-child h3 {
  color: rgba(255, 250, 243, 0.58);
}

.stat-value {
  margin: 0;
  background: none;
  color: var(--sand);
  font-size: 2.8rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.05em;
  -webkit-text-fill-color: currentColor;
  filter: none;
}

.stat-item {
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-shadow: none;
}

.stat-card:first-child .stat-item {
  color: #fffaf3;
}

.stats-section {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.stats-section > h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 650;
}

.leaderboard {
  display: grid;
  gap: 0;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  content-visibility: auto;
  contain-intrinsic-size: auto 62px;
}

.leaderboard-item:last-child {
  border-bottom: 0;
}

.leaderboard-left {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.rank-badge {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent-deep);
  font-size: 0.68rem;
  font-weight: 700;
}

.leaderboard-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.leaderboard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.bar-label {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar {
  height: 7px;
  min-width: 3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: none;
}

.bar-row > span {
  margin-left: 0 !important;
  color: var(--text-muted) !important;
  font-size: 0.7rem !important;
  text-align: right;
}

.tiny-bars-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 70px;
  padding: 8px 0 0;
}

.tiny-bar {
  flex: 1 1 0;
  min-width: 3px;
  border-radius: 3px 3px 1px 1px;
  background: var(--sage);
  opacity: 0.75;
}

/* Outfits */

.outfits-container {
  padding: 0;
}

.outfits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0 0 20px;
}

.outfit-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  content-visibility: auto;
  contain-intrinsic-size: auto 150px;
}

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

.outfit-header {
  padding: 15px 16px 13px;
  border-bottom: 1px solid var(--line);
}

.outfit-name {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 650;
}

.outfit-meta {
  color: var(--text-muted);
  font-size: 0.7rem;
}

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

.outfit-clothes-item {
  width: auto;
  height: auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

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

.fab {
  position: fixed;
  right: max(22px, calc((100vw - 430px) / 2 + 22px));
  bottom: calc(94px + env(safe-area-inset-bottom));
  z-index: 220;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #fffaf3;
  box-shadow: 0 10px 24px rgba(125, 73, 54, 0.25);
  cursor: pointer;
}

.fab:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
  box-shadow: 0 12px 26px rgba(125, 73, 54, 0.28);
}

/* Modals and forms */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  min-height: 100dvh;
  padding: 16px;
  overflow-y: auto;
  background: rgba(39, 35, 31, 0.74);
  color: var(--ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal-content {
  position: relative;
  width: min(100%, 410px);
  max-width: 410px;
  max-height: min(90dvh, 780px);
  margin: auto;
  overflow-y: auto;
  border: 1px solid rgba(255, 253, 249, 0.65);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 26px 80px rgba(28, 24, 21, 0.25);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.modal-content::before {
  content: none;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal-header h3 {
  margin: 0;
  background: none;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  -webkit-text-fill-color: currentColor;
  filter: none;
}

.btn-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink-soft);
  box-shadow: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.btn-close:hover {
  transform: none;
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--ink);
}

.modal-form,
.detail-content {
  padding: 20px;
}

.form-group {
  margin: 0 0 18px;
}

.form-group > label,
.url-input-section > label {
  display: block;
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.3;
  text-shadow: none;
}

.form-group input,
.form-group select,
.form-group textarea,
.add-item input,
.url-input-container input[type="url"] {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  text-shadow: none;
  box-shadow: inset 0 1px 1px rgba(54, 45, 37, 0.025);
  backdrop-filter: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-group textarea {
  min-height: 96px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.add-item input::placeholder,
.url-input-container input[type="url"]::placeholder {
  color: #aaa198;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.add-item input:focus,
.url-input-container input[type="url"]:focus {
  border-color: var(--accent);
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(168, 104, 77, 0.11);
}

.url-input-section {
  margin-top: 12px;
}

.url-input-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.btn-url-preview,
.btn-add-item,
.btn-reupload,
.btn-retry {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 0.78rem;
}

.image-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 150px;
  overflow: hidden;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--surface-soft);
  cursor: pointer;
  backdrop-filter: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.image-upload:hover,
.image-upload.drag-over {
  transform: none;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-placeholder {
  color: var(--text-muted);
  text-align: center;
}

.upload-placeholder svg {
  margin-bottom: 4px;
  color: var(--accent);
  filter: none;
}

.upload-placeholder p {
  margin: 4px 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.upload-hint {
  color: var(--text-muted);
  font-size: 0.7rem !important;
}

.image-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.upload-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  background: rgba(41, 38, 33, 0.55);
  opacity: 0;
  backdrop-filter: blur(2px);
  transition: opacity 160ms ease;
}

.image-upload:hover .upload-overlay {
  opacity: 1;
}

.upload-progress,
.upload-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  text-align: center;
}

.upload-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
}

.upload-success,
.upload-warning {
  padding: 5px 8px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.7rem;
}

.upload-success {
  background: var(--sage);
}

.upload-warning {
  background: #a9793b;
}

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

.form-actions button,
.detail-actions button {
  flex: 1 1 0;
  min-width: 0;
}

.detail-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 420px;
  min-height: 180px;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  backdrop-filter: none;
}

.detail-image img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.detail-image.is-empty::before {
  content: "衣";
  color: rgba(77, 72, 65, 0.24);
  font-size: 2.2rem;
  font-weight: 650;
}

.detail-info {
  margin-bottom: 0;
}

.info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.info-item:last-child {
  border-bottom: 0;
}

.info-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  text-shadow: none;
}

.info-item span:not(.info-label) {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
  text-shadow: none;
}

.detail-actions .btn-danger {
  flex: 0 0 auto;
}

/* Outfit selection and settings */

.outfit-modal {
  max-width: 430px;
}

.clothes-selector {
  max-height: 300px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.clothes-selector-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.clothes-selector-item:hover {
  background: rgba(255, 253, 249, 0.72);
}

.clothes-selector-item.selected {
  border-color: rgba(168, 104, 77, 0.3);
  background: var(--accent-soft);
}

.clothes-selector-item input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.clothes-selector-item-image {
  flex: 0 0 42px;
  width: 42px;
  height: 50px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.clothes-selector-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clothes-selector-item-info {
  min-width: 0;
}

.clothes-selector-item-name {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.35;
}

.clothes-selector-item-meta {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.67rem;
}

.filter-settings {
  max-height: 58vh;
  padding: 18px 20px 0;
  overflow-y: auto;
}

.settings-section {
  margin: 0 0 22px;
}

.settings-section h4,
.outfit-clothes-list h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
  text-shadow: none;
}

.settings-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.settings-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-shadow: none;
  backdrop-filter: none;
}

.settings-item-name {
  margin: 0;
}

.settings-item-remove {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.75rem;
  text-shadow: none;
  cursor: pointer;
}

.settings-item-remove:hover {
  transform: none;
  color: #8f3935;
}

.add-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

#filterModal > .modal-content > .form-actions {
  padding: 0 20px 20px;
}

.outfit-details {
  margin: 0 0 18px;
}

.outfit-clothes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.outfit-clothes-detail-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.outfit-clothes-detail-item:hover {
  background: var(--surface-soft);
}

.outfit-clothes-detail-image {
  flex: 0 0 46px;
  width: 46px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

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

.outfit-clothes-detail-info {
  min-width: 0;
}

.outfit-clothes-detail-name {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
}

.outfit-clothes-detail-meta {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

/* Responsive refinements */

@media (max-width: 380px) {
  .main {
    padding-right: 14px;
    padding-left: 14px;
  }

  .welcome-intro {
    min-height: 238px;
    padding: 21px;
  }

  .welcome-action {
    left: 21px;
    bottom: 20px;
  }

  #wxInline,
  .recent-worn-section {
    padding: 17px;
    border-radius: 20px;
  }

  #wxInline .wx-grid {
    right: 17px;
  }

  .view-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .list-toggle {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .clothes-grid {
    gap: 8px;
  }

  .btn-icon.nav-item span {
    font-size: 9px;
  }
}

@media (min-width: 700px) {
  .app {
    margin-top: 20px;
    margin-bottom: 20px;
    min-height: calc(100vh - 40px);
    border-radius: 30px;
  }

  .nav {
    bottom: 22px;
  }
}

@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;
  }
}
