*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --touch: 44px;
  --brand: #b8977b;
  --brand-dark: #9f7658;
  --brand-deep: #6f4e3d;
  --action: #ff6a1f;
  --action-dark: #d94f10;
  --success: #20a85a;
  --warning: #f08a24;
  --danger: #e53935;
  --ink: #2f2520;
  --ink-soft: #6f625b;
  --muted: #a28f84;
  --bg: #faf8f5;
  --bg-deep: #f7f1ea;
  --card: #fffdfa;
  --line: #eee2d8;
  --line-strong: #dcc9b7;
  --shadow: 0 10px 28px rgba(118, 82, 52, .08);
  --shadow-soft: 0 3px 12px rgba(66, 42, 24, .06);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1816;
    --bg-deep: #141210;
    --card: #242220;
    --ink: #e0d8d0;
    --ink-soft: #b0a49a;
    --muted: #7a7068;
    --line: #33302c;
    --line-strong: #4a4440;
    --brand: #c9a88a;
    --brand-dark: #b8977b;
    --brand-deep: #8f7058;
    --action: #ff7a3a;
    --shadow: 0 10px 28px rgba(0, 0, 0, .25);
    --shadow-soft: 0 3px 12px rgba(0, 0, 0, .2);
  }
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 12% 0%, #fff 0%, var(--bg) 42%, var(--bg-deep) 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

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

.app-shell {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.app-shell.has-sticky-header {
  padding-bottom: 18px;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 18px 12px;
  background: rgba(250, 248, 245, .94);
  border-bottom: 1px solid rgba(234, 223, 212, .78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.page-header.plain {
  box-shadow: none;
}

.header-content {
  position: relative;
  display: flex;
  min-height: var(--touch);
  flex-direction: column;
  justify-content: center;
  padding-right: 52px;
}

.header-content h1 {
  margin-bottom: 4px;
  color: #3b251c;
  font-size: 1.34rem;
  font-weight: 850;
  letter-spacing: 0;
}

.header-content .order-title {
  font-size: 1.72rem;
  color: #4a1e12;
}

.subtitle {
  color: var(--muted);
  font-size: .875rem;
}

.notification {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: var(--touch);
  height: var(--touch);
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(118, 82, 52, .03);
}

.notification::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 9px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--danger);
}

.notification svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

/* 身材匹配开关 */
.size-filter-group {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.product-count {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 28px;
  text-align: right;
}
.size-filter-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--touch);
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(118, 82, 52, .04);
  transition: all .2s;
}
.size-filter-toggle.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.size-filter-toggle .toggle-label {
  font-weight: 500;
}
.size-filter-toggle.active .toggle-label {
  color: #fff;
}

/* 身材匹配过滤：开启时隐藏不匹配的产品 */
.product-grid.size-filter-on .product-card[data-fits="false"] {
  display: none;
}

/* 匹配度标签（独立于 corner-tags，✕ 按钮下方） */
.fit-tag {
  position: absolute;
  top: 34px;
  right: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.4;
  z-index: 2;
}
.fit-yes {
  background: #e8f5e9;
  color: #2e7d32;
}
.fit-no {
  background: #fce4ec;
  color: #c62828;
}

.size-rec-compact {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(32, 168, 90, .10);
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.size-rec-compact.medium {
  background: rgba(221, 145, 57, .12);
  color: #a7661f;
}

.size-rec-compact.low {
  background: rgba(139, 113, 93, .12);
  color: var(--muted);
}

/* SKU 颜色缩略图 */
.sku-thumbs {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  flex-wrap: wrap;
}
.sku-thumb {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .2s;
}
.sku-thumb:hover {
  border-color: var(--primary);
}
.sku-thumb.active {
  border-color: var(--primary);
}

.page-main {
  padding: 0 18px;
}

.frozen-stack {
  position: sticky;
  top: 0;
  z-index: 70;
  padding-bottom: 12px;
  background: rgba(250, 248, 245, .94);
  border-bottom: 1px solid rgba(234, 223, 212, .78);
  box-shadow: 0 8px 24px rgba(118, 82, 52, .08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.frozen-stack .page-header {
  position: static;
  padding-bottom: 10px;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.frozen-stack .member-context {
  margin-bottom: 0;
}

.stack {
  display: grid;
  gap: 16px;
}

.card,
.panel {
  border: 1px solid #eadfd4;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255, 253, 250, .98), rgba(255, 250, 245, .95));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card {
  padding: 16px;
}

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

.section-head h2 {
  color: #3b251c;
  font-size: 1.08rem;
  font-weight: 850;
}

.section-head span,
.section-head small {
  color: var(--muted);
  font-size: .78rem;
}

.member-context {
  margin: 0 18px 16px;
}

.member-context.compact {
  border-radius: 22px;
}

.member-context .context-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 6px;
}

.member-context .context-sub {
  padding: 0 16px 8px;
  color: var(--muted);
  font-size: .82rem;
}

.expand-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.8);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-toggle-bar {
  display: flex;
  gap: 8px;
  padding: 0 16px 4px;
}

.filter-toggle-bar .expand-toggle {
  width: auto;
  height: auto;
  padding: 4px 10px;
  border-radius: var(--pill);
  font-size: 12px;
  gap: 4px;
}

.member-context.compact .context-sub {
  padding: 0 14px 6px;
  font-size: .75rem;
}

.member-context strong {
  min-width: 0;
  color: var(--brand-dark);
  font-size: .96rem;
  font-weight: 850;
}

.member-context span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}

.member-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 2px 16px 16px;
}

.member-context.compact .context-title {
  padding: 12px 14px 8px;
}

.member-context.compact .member-row {
  padding: 0 14px 14px;
}

.member-context.compact .member {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  min-width: auto;
  padding: 5px 12px 5px 6px;
  border-radius: var(--pill);
}

.member-context.compact .member-name {
  width: auto;
  flex-shrink: 0;
  font-size: .78rem;
  overflow: visible;
}

.member-context.compact .member-avatar {
  width: 32px;
  height: 32px;
}

.member-context.compact .member-avatar.add {
  font-size: 1.2rem;
  line-height: 1;
}



.member-context.compact .member.active::after {
  display: none;
}

.member-context.compact .member.active::before {
  display: none;
}

.member {
  position: relative;
  display: flex;
  flex: 0 0 74px;
  min-width: 74px;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-height: 104px;
  padding: 8px 5px 10px;
  border: 1px solid #f0e5db;
  border-radius: 22px;
  background: linear-gradient(180deg, #fdf8f3, #fbf5ef);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.member:active {
  transform: scale(.98);
}

.member.active {
  border-color: rgba(184, 151, 123, .72);
  background: linear-gradient(180deg, #fffdfb, #fff5ea);
  box-shadow: 0 8px 18px rgba(184, 151, 123, .16), inset 0 1px 0 rgba(255, 255, 255, .92);
}

.member.active::before {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 6px;
  left: 14px;
  height: 3px;
  border-radius: var(--pill);
  background: linear-gradient(90deg, rgba(184, 151, 123, .1), rgba(184, 151, 123, .88), rgba(184, 151, 123, .1));
}

.member.active::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 9px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .68rem;
  font-weight: 850;
  box-shadow: 0 2px 8px rgba(184, 151, 123, .32);
}

.member-avatar {
  width: 58px;
  height: 58px;
  border: 2px solid rgba(240, 232, 223, .95);
  border-radius: 50%;
  background-position: center;
  background-size: cover;
  box-shadow: 0 2px 8px rgba(94, 74, 58, .08);
}

.member.active .member-avatar {
  border-color: rgba(184, 151, 123, .95);
  box-shadow: 0 6px 16px rgba(184, 151, 123, .28);
}

.member-avatar.add {
  display: grid;
  place-items: center;
  border-style: dashed;
  background: #f3eee8;
  color: var(--brand-dark);
  font-size: 2rem;
}

.member-name {
  width: 100%;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: .82rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member.active .member-name {
  color: var(--brand-dark);
  font-weight: 850;
}

.search-line {
  display: flex;
  gap: 8px;
}

.search-bar {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: var(--touch);
  padding: 0 12px;
  border: 1px solid #f1e8df;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, .96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 4px 14px rgba(118, 82, 52, .04);
}

.search-bar svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  stroke: #aa8c7a;
}

.search-bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: .92rem;
}

.search-bar input::placeholder {
  color: #b59f91;
}

.filter-btn,
.chip-btn,
.small-btn,
.secondary-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--touch);
  border-radius: var(--pill);
  font-weight: 800;
}

.filter-btn {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid rgba(184, 151, 123, .28);
  background: linear-gradient(180deg, #fff8f1, #f4ebe2);
  color: var(--brand-dark);
  font-size: .84rem;
}

.filter-toggle-chip {
  flex: 0 0 auto;
  width: 34px;
  min-height: var(--touch);
  border: 1px solid rgba(184, 151, 123, .25);
  border-radius: var(--pill);
  background: rgba(255,255,255,.8);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.filter-tabs-expand,
.filter-tabs-collapse {
  display: contents;
}

.filter-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 0 0;
}

.tag-groups {
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

.tag-group {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.tag-label {
  color: var(--ink);
  font-size: .86rem;
  font-weight: 850;
  line-height: 32px;
}

.tags,
.tabs,
.category-tabs,
.order-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tags::-webkit-scrollbar,
.tabs::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar {
  display: none;
}

.chip-btn,
.tab-btn,
.category-btn,
.order-tab,
.order-mode-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #eee4db;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .9);
  color: var(--ink-soft);
  font-size: .84rem;
  font-weight: 800;
  white-space: nowrap;
}

.add-owned-tab {
  margin-left: auto;
  border-style: dashed;
  border-color: rgba(184, 151, 123, .45);
  background: rgba(184, 151, 123, .06);
  color: var(--brand-dark);
}

.filter-toggle-btn {
  flex-shrink: 0;
  min-width: 34px;
  padding: 0 8px;
}

.chip-btn.active,
.tab-btn.active,
.category-btn.active,
.order-tab.active,
.order-mode-tab.active {
  border-color: rgba(255, 106, 31, .38);
  background: #fff4ea;
  color: var(--action);
  box-shadow: 0 2px 9px rgba(184, 151, 123, .12);
}

.tab-bar {
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid #eee4db;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 3px 12px rgba(118, 82, 52, .045);
}

.tab-btn {
  min-width: 58px;
  border: 0;
  background: transparent;
}

.tab-btn.active {
  background: #fff8f1;
  color: var(--brand-dark);
}

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

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #f0ebe5;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1.18;
  background: #f4eee8;
}

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

.corner-tags {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  max-width: calc(100% - 16px);
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.product-tag,
.outfit-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(126, 100, 77, .9);
  color: #fff;
  font-size: .68rem;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-tag.material {
  background: rgba(82, 78, 70, .82);
}

.product-tag.status-label {
  background: rgba(255, 106, 31, .9);
}

.cart-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 106, 31, .85);
  color: #fff;
  margin-left: auto;
}

.cart-status-badge.status-pending {
  background: rgba(33, 150, 243, .85);
}

.cart-status-badge.status-done,
.cart-status-badge.status-owned {
  background: rgba(76, 175, 80, .85);
}

.cart-status-badge.status-refunding {
  background: rgba(255, 152, 0, .85);
}

.cart-status-badge.status-refund {
  background: rgba(158, 158, 158, .85);
}

.badge-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.remove-from-cart-btn {
  display: inline-block;
  padding: 2px 8px;
  border: none;
  border-radius: 4px;
  background: rgba(229, 57, 53, .12);
  color: rgba(229, 57, 53, .7);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.closet-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.closet-selected-tag {
  position: absolute;
  bottom: 6px;
  right: 6px;
  z-index: 3;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--success);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

.closet-outfit-count {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: .72rem;
}

.edit-tags-corner {
  position: absolute;
  bottom: 6px;
  left: 6px;
  z-index: 3;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px dashed rgba(126, 100, 77, .5);
  background: rgba(255,255,255,.85);
  color: var(--brand-dark);
  font-size: 13px;
  cursor: pointer;
}

.extra-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.member-capsule {
  padding: 2px 6px;
  border-radius: var(--pill);
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.edit-img-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.4);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.test-actions {
  display: flex;
  gap: 4px;
  padding: 4px 16px 8px;
  flex-wrap: wrap;
  border-top: 1px dashed rgba(255, 106, 31, .25);
  margin-top: 4px;
}

.test-btn {
  padding: 2px 6px;
  border: 1px solid rgba(159, 118, 88, .3);
  border-radius: 3px;
  background: none;
  color: rgba(159, 118, 88, .6);
  font-size: 10px;
  cursor: pointer;
  transition: all .15s;
}

.test-btn:hover {
  border-color: rgba(255, 106, 31, .6);
  color: rgba(255, 106, 31, .9);
  background: rgba(255, 106, 31, .08);
}

.test-btn.disabled {
  opacity: .25;
  pointer-events: none;
  cursor: not-allowed;
}

.add-owned-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1.5px dashed rgba(159, 118, 88, .35);
  border-radius: 10px;
  background: none;
  color: rgba(159, 118, 88, .65);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}

.add-owned-btn:hover {
  border-color: rgba(159, 118, 88, .7);
  color: rgba(159, 118, 88, .9);
  background: rgba(159, 118, 88, .04);
}

.add-owned-sheet {
  max-width: 420px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.add-owned-sheet .sheet-body {
  overflow-y: auto;
  flex: 1;
  padding-bottom: 8px;
}

.add-owned-sheet .sheet-actions {
  display: flex;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.add-owned-sheet .sheet-actions button {
  flex: 1;
}

.add-owned-sheet label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--brand-dark);
}

.add-owned-sheet input,
.add-owned-sheet select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  color: var(--brand-deep);
}

.add-owned-sheet .required::after {
  content: " *";
  color: var(--danger);
}

.owned-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.owned-chip {
  flex: 0 0 auto;
  transition: all .15s;
}

.owned-chip.active {
  border-color: rgba(255, 106, 31, .38);
  background: #fff4ea;
  color: var(--action);
}

/* 已拥有图片上传 */
.owned-image-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.owned-image-name {
  font-size: 12px;
  color: var(--brand-dark);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.owned-image-hint {
  font-size: 11px;
  color: var(--muted);
  width: 100%;
}

/* 身材尺寸区域 */
.owned-measure-section {
  margin: 16px 0 12px;
  padding: 12px;
  background: rgba(253, 245, 236, .5);
  border-radius: 10px;
  border: 1px solid rgba(159, 118, 88, .15);
}
.owned-measure-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 10px;
}
.owned-measures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.measure-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--brand-dark);
  margin-bottom: 0 !important;
}
.measure-field span:first-child {
  min-width: 36px;
  text-align: right;
}
.measure-field input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px !important;
  margin-top: 0 !important;
  font-size: 13px !important;
}
.measure-unit {
  font-size: 11px;
  color: var(--muted);
  min-width: 20px;
}
.owned-measure-none {
  font-size: 12px;
  color: var(--muted);
}

.edit-tags {
  min-width: 24px;
  min-height: 22px;
  padding: 3px 7px;
  border: 1.4px dashed rgba(126, 100, 77, .88);
  border-radius: 6px;
  background: rgba(255, 253, 250, .86);
  color: var(--brand-dark);
  font-size: .8rem;
  font-weight: 900;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.product-name {
  min-height: 2.5em;
  margin-bottom: 6px;
  overflow: hidden;
  color: var(--ink);
  display: -webkit-box;
  font-size: .88rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  min-height: 24px;
  margin-bottom: 12px;
}

.current-price {
  color: var(--action-dark);
  font-size: 1.05rem;
  font-weight: 850;
}

.original-price {
  color: var(--muted);
  font-size: .78rem;
  text-decoration: line-through;
}

.discount-tag {
  padding: 1px 5px;
  border: 1px solid #ffccc7;
  border-radius: 5px;
  background: #fff7f6;
  color: var(--danger);
  font-size: .68rem;
  font-weight: 800;
}

.product-actions {
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding: 0 12px 12px;
}

.action-btn {
  flex: 1;
  min-height: 36px;
  border-radius: var(--r-md);
  font-size: .76rem;
  font-weight: 800;
}

.action-btn.secondary {
  background: var(--bg);
  color: var(--brand-dark);
}

.action-btn.primary {
  background: linear-gradient(180deg, var(--action), var(--action-dark));
}
.action-btn.disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  opacity: .5;
}

/* SKU 颜色按钮行 */
.sku-cart-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.sku-cart-btn {
  flex: 1;
  min-width: 60px;
  min-height: 28px;
  border-radius: 6px;
  border: 1px solid var(--action);
  background: none;
  color: var(--action);
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  padding: 4px 6px;
}
.sku-cart-btn.primary {
  border-color: var(--action);
  color: var(--action);
}
.sku-cart-btn.primary:hover {
  background: rgba(255,106,31,.08);
}
.sku-cart-btn.matched {
  border-color: var(--success);
  background: rgba(32,168,90,.1);
  color: var(--success);
}
  color: #fff;
}

.closet-preview {
  margin: 0 18px 14px;
}

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

.slot {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  place-items: center;
  border: 1px solid #f0e5dc;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffaf6, #fff);
  box-shadow: 0 2px 8px rgba(118, 82, 52, .035);
}

.slot.empty {
  opacity: .62;
}

.slot.add {
  border: 1.5px dashed rgba(255, 106, 31, .48);
  background: #fffaf6;
  color: var(--brand-dark);
  font-size: .72rem;
  font-weight: 850;
  text-align: center;
}

.slot img,
.mini-item img,
.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: .68rem;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(118, 82, 52, .08);
}

.status-dot::before {
  content: "✓";
}

.status-dot.owned,
.status-dot.done,
.status-pill.all {
  background: var(--success);
}

.status-dot.pending,
.status-pill.partial {
  background: var(--warning);
}

.status-dot.refunding {
  background: var(--warning);
}

.status-dot.unbought,
.status-dot.refund,
.status-pill.none {
  background: var(--danger);
}

.outfit-input {
  width: 100%;
  min-height: var(--touch);
  margin-top: 12px;
  padding: 0 14px;
  border: 1px solid #eadfd4;
  border-radius: var(--r-lg);
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: .92rem;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 10px;
  margin-top: 10px;
}

.secondary-btn,
.primary-btn {
  min-height: 46px;
  border-radius: var(--r-lg);
  font-size: .9rem;
}

.secondary-btn {
  border: 1px solid rgba(255, 106, 31, .28);
  background: #fff;
  color: #b55324;
}

.primary-btn {
  background: linear-gradient(180deg, var(--action), var(--action-dark));
  color: #fff;
  box-shadow: 0 8px 18px rgba(238, 106, 29, .2);
}

.view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 12px 16px 10px;
  padding: 4px;
  border: 1px solid #eee4db;
  border-radius: 18px;
  background: rgba(255, 255, 255, .76);
}

.view-tab {
  min-height: 40px;
  border-radius: 14px;
  color: #7a6358;
  font-weight: 850;
}

.view-tab.active {
  background: #fff8f1;
  color: var(--action);
  box-shadow: 0 2px 9px rgba(184, 151, 123, .12);
}

.panel-inner {
  padding: 0 16px 16px;
}

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

.outfit-card {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(112px, .9fr) 86px;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid #efe2d7;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 4px 14px rgba(118, 82, 52, .055);
}

.collage {
  position: relative;
  overflow: hidden;
  height: 96px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8f1, #fff);
}

.mini-item {
  position: absolute;
  overflow: hidden;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(80, 54, 34, .12);
  cursor: pointer;
}

.mini-item:hover {
  filter: brightness(.92);
  transform: scale(1.03);
  transition: .18s ease;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: .25s ease;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.lightbox-overlay.show {
  background: rgba(0, 0, 0, .88);
  opacity: 1;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 94vw;
  max-height: 94vh;
}

.lightbox-img {
  max-width: 94vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .45);
  pointer-events: none;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 12px;
  padding: 8px 4px;
  color: rgba(255, 255, 255, .75);
  font-size: .85rem;
}

.lightbox-name {
  overflow: hidden;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lightbox-hint {
  flex-shrink: 0;
  margin-left: 12px;
  opacity: .5;
  font-size: .78rem;
}

.share-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #f1ded0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: var(--brand-dark);
  box-shadow: 0 3px 9px rgba(80, 54, 34, .08);
}

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

.outfit-title {
  overflow: hidden;
  color: #30221c;
  font-size: .95rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date {
  margin: 3px 0;
  color: #8d827c;
  font-size: .78rem;
}

.status-text {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 850;
}

.status-pill {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.outfit-actions {
  display: grid;
  gap: 8px;
}

.small-btn {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #f0ddd0;
  border-radius: var(--r-md);
  background: #fff;
  color: #924f31;
  font-size: .76rem;
}

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

.item-card {
  display: grid;
  grid-template-columns: 45% minmax(0, 1fr);
  gap: 8px;
  min-height: 128px;
  padding: 9px;
  border: 1px solid #efe2d7;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.closet-product-card {
  cursor: pointer;
}

.closet-product-card:focus-visible {
  outline: 2px solid rgba(255, 106, 31, .42);
  outline-offset: 3px;
}

.item-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  background: #fff8f1;
}

.item-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.item-title {
  overflow: hidden;
  color: #3c2b22;
  font-size: .88rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mini-tag {
  padding: 2px 6px;
  border-radius: 7px;
  background: #f7eee6;
  color: #80675b;
  font-size: .66rem;
}

.add-to {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--action);
  font-size: .8rem;
  font-weight: 850;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  border: 3px solid rgba(184, 151, 123, .65);
  border-radius: 50%;
  background-position: center;
  background-size: cover;
  box-shadow: 0 5px 14px rgba(121, 83, 55, .16);
}

.profile-info {
  min-width: 0;
}

.profile-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.profile-title {
  color: #5f3c34;
  font-size: 1.2rem;
  font-weight: 850;
}

.profile-pill {
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(184, 151, 123, .24);
  border-radius: var(--pill);
  background: #fff4e9;
  color: var(--brand-dark);
  font-size: .72rem;
  font-weight: 850;
}

.profile-pill.dirty {
  border-color: rgba(221, 145, 57, .28);
  background: #fff1df;
  color: #b06b21;
}

.profile-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--ink-soft);
  font-size: .94rem;
}

.profile-metrics strong {
  color: #806853;
}

.profile-metrics em {
  color: var(--muted);
  font-size: .78rem;
  font-style: normal;
  font-weight: 700;
}

.notice {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-radius: 18px;
  background: rgba(245, 236, 226, .68);
}

.notice-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 850;
}

.notice p {
  color: #846d5b;
  font-size: .88rem;
}

.measurement-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(234, 223, 212, .92);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 248, 241, .92), rgba(255, 253, 250, .98));
}

.visual-copy strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-deep);
  font-size: .94rem;
  font-weight: 900;
}

.visual-copy span {
  display: block;
  color: #9a8574;
  font-size: .78rem;
}

.measure-figure {
  overflow: hidden;
  border: 1px solid rgba(220, 204, 188, .78);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
}

.measure-line {
  fill: none;
  stroke: var(--brand-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.measure-guide {
  fill: none;
  stroke: #c7ad95;
  stroke-dasharray: 3 3;
  stroke-linecap: round;
  stroke-width: 1.2;
}

.measure-label {
  fill: #7d6652;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  font-weight: 800;
}

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

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

.field label {
  display: block;
  margin-bottom: 6px;
  color: #7d6652;
  font-size: .92rem;
  font-weight: 850;
}

.field label .required::after {
  content: " *";
  color: var(--danger);
}

.control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border: 1.5px solid #d4c1ae;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .94);
}

.control:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(184, 151, 123, .12);
}

.control input,
.control select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #594437;
}

.unit {
  flex: 0 0 auto;
  color: #b2a392;
  font-size: .82rem;
  font-weight: 850;
}

.underwear-panel {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(234, 223, 212, .95);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 248, 241, .78), rgba(255, 253, 250, .9));
}

.underwear-panel[hidden] {
  display: none;
}

.cup-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(92, 159, 103, .18);
  border-radius: var(--pill);
  background: rgba(92, 159, 103, .1);
  color: var(--success);
  font-size: .84rem;
  font-weight: 900;
}

.order-tabs {
  padding: 5px 0 14px;
}

.order-mode-header {
  align-items: stretch;
  padding-right: 56px;
}

.order-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: min(360px, 100%);
  max-width: 100%;
  padding: 5px;
  border: 1px solid #eee4db;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 3px 12px rgba(118, 82, 52, .055);
}

.order-mode-tab {
  min-width: 0;
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: #7a6358;
  font-size: .92rem;
  font-weight: 900;
}

.order-mode-tab.active {
  background: #fff8f1;
  color: var(--action);
  box-shadow: 0 2px 8px rgba(255, 106, 31, .12);
}

.order-filters {
  padding-bottom: 12px;
}

.order-filter-body {
  display: grid;
  gap: 10px;
  padding: 8px 18px 0;
}

.order-filter-body .order-tabs {
  padding: 0;
}

.order-member-filter {
  overflow: hidden;
  border: 1px solid #eadfd4;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 253, 250, .98), rgba(255, 250, 245, .95));
  box-shadow: 0 6px 18px rgba(118, 82, 52, .055);
}

.order-member-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 9px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.order-member-row::-webkit-scrollbar {
  display: none;
}

.filter-member {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 5px 12px 5px 6px;
  border: 1px solid #eee4db;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .9);
  color: var(--ink-soft);
  font-size: .82rem;
  font-weight: 850;
  white-space: nowrap;
}

.filter-member.active {
  border-color: rgba(255, 106, 31, .42);
  background: #fff4ea;
  color: var(--action);
  box-shadow: 0 3px 10px rgba(255, 106, 31, .1);
}

.filter-member.clear-filter {
  padding-right: 14px;
  padding-left: 14px;
  border-style: dashed;
  color: var(--brand-dark);
}

.filter-member.clear-filter.disabled {
  opacity: .55;
}

.filter-member.active::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 2px;
  left: 32px;
  height: 2px;
  border-radius: var(--pill);
  background: var(--action);
}

.filter-avatar {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, .94);
  border-radius: 50%;
  background-position: center;
  background-size: cover;
  box-shadow: 0 2px 7px rgba(80, 54, 34, .1);
}

.orders-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0 12px;
}

.order-card {
  overflow: hidden;
  padding: 16px;
  border: 1px solid #f1e7df;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255, 253, 250, .99), rgba(255, 252, 249, .98));
  box-shadow: var(--shadow);
}

.cart-card .order-head {
  margin-bottom: 12px;
}

.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.member-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5a291b;
  font-size: 1.02rem;
  font-weight: 850;
}

.shop-icon {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--brand);
}

.shop-icon::before {
  content: "";
  position: absolute;
  top: -3px;
  right: 4px;
  left: 4px;
  height: 7px;
  border-radius: 4px 4px 2px 2px;
  background: #c9ad94;
}

.order-status {
  color: var(--action);
  font-weight: 850;
  white-space: nowrap;
}

.order-status.success {
  color: var(--success);
}

.product-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.cart-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.cart-tag-row .mini-tag {
  padding: 4px 8px;
  border-radius: 9px;
  font-size: .72rem;
  font-weight: 800;
}

.product-thumb {
  overflow: hidden;
  width: 104px;
  height: 104px;
  border: 1px solid #f0e6dc;
  border-radius: var(--r-lg);
  background: #f5eee8;
}

.order-product-title {
  overflow: hidden;
  margin-bottom: 8px;
  color: #1f1a18;
  font-size: .98rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-size {
  color: #7e716a;
  font-size: .9rem;
}

.price-box {
  min-width: 72px;
  text-align: right;
}

.price {
  color: #2f2520;
  font-size: 1.08rem;
  font-weight: 850;
}

.shipping {
  margin-top: 3px;
  color: #9a8e88;
  font-size: .78rem;
  white-space: nowrap;
}

.info-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, rgba(249, 239, 230, .78), rgba(255, 249, 244, .9));
  color: #8b5d43;
  font-size: .9rem;
}

.outfit-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 14px 2px 6px;
  color: #35231c;
  font-size: .92rem;
}

.outfit-line strong {
  color: #5a291b;
}

.outfit-chip {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(184, 151, 123, .34);
  border-radius: var(--pill);
  background: linear-gradient(180deg, rgba(255, 250, 246, .98), rgba(255, 246, 239, .96));
  color: #5a291b;
  font-size: .84rem;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.order-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #ead9cf;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .9);
  color: #6d3b29;
  font-size: .84rem;
  font-weight: 850;
}

.order-btn.primary {
  border-color: transparent;
  background: linear-gradient(180deg, var(--action), var(--action-dark));
  color: #fff;
}

.order-btn.danger {
  border-color: transparent;
  background: rgba(229, 57, 53, .12);
  color: var(--danger);
}

.order-btn.matched {
  border: 1px solid var(--success);
  background: rgba(32, 168, 90, .08);
  color: var(--success);
}

.order-btn.outline {
  border-color: #ffb28a;
  background: #fffaf7;
  color: var(--action);
}

.empty-state {
  padding: 34px 0 44px;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

.navbar {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  left: max(14px, env(safe-area-inset-left, 0px));
  z-index: 100;
  display: grid;
  height: 68px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(234, 223, 212, .92);
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 34px rgba(80, 54, 34, .16), 0 2px 8px rgba(80, 54, 34, .06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 18px;
  color: #9b897d;
  font-size: .72rem;
  line-height: 1.2;
  text-decoration: none;
}

.nav-item.active {
  background: linear-gradient(180deg, #fff8f1, #f7eee5);
  color: var(--action);
  font-weight: 850;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  top: 5px;
  width: 18px;
  height: 3px;
  border-radius: var(--pill);
  background: var(--action);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.nav-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  z-index: 160;
  max-width: calc(100vw - 56px);
  padding: 10px 16px;
  border-radius: var(--pill);
  background: rgba(66, 42, 29, .94);
  box-shadow: 0 8px 22px rgba(49, 34, 24, .22);
  color: #fff;
  font-size: .84rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
}

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

.modal-mask,
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  background: rgba(0, 0, 0, .28);
}

.modal-mask.show,
.sheet-mask.show {
  display: flex;
}

.modal-mask {
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal {
  width: 100%;
  max-width: 330px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(118, 82, 52, .15);
  text-align: center;
}

.modal h3 {
  margin-bottom: 7px;
  font-size: 1.05rem;
}

.modal p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: .88rem;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet-mask {
  align-items: flex-end;
}

.sheet {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 18px max(env(safe-area-inset-bottom, 0px), 18px);
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -8px 30px rgba(118, 82, 52, .1);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 850;
  color: var(--brand-dark);
}

.sheet-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-head strong {
  font-size: 1rem;
}

.close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f4eee8;
  font-size: 1.2rem;
}

.sheet-tip {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .82rem;
}

.editor-group {
  margin-top: 12px;
}

.editor-group-title {
  margin-bottom: 8px;
  font-size: .86rem;
  font-weight: 850;
}

.editor-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-option {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #eee6de;
  border-radius: var(--pill);
  background: #faf8f5;
  color: #666;
  font-size: .84rem;
}

.editor-option.active {
  border-color: var(--brand);
  background: #fff8f1;
  color: var(--brand-dark);
  font-weight: 800;
}

.sheet-save {
  width: 100%;
  min-height: var(--touch);
  margin-top: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--action), var(--action-dark));
  color: #fff;
  font-weight: 850;
}

@media (min-width: 768px) {
  .navbar {
    left: 50%;
    right: auto;
    width: calc(100% - 32px);
    max-width: 648px;
    transform: translateX(-50%);
  }
}

@media (max-width: 430px) {
  .page-main {
    padding: 0 14px;
  }

  .order-filter-body {
    padding-right: 14px;
    padding-left: 14px;
  }

  .member-context,
  .closet-preview {
    margin-right: 14px;
    margin-left: 14px;
  }

  .action-row {
    grid-template-columns: 1fr 1fr 1.45fr;
  }

  .secondary-btn,
  .primary-btn {
    font-size: .82rem;
  }

  .outfit-card {
    grid-template-columns: 1.25fr 104px 78px;
    gap: 7px;
  }

  .outfit-title {
    font-size: .84rem;
  }

  .small-btn {
    font-size: .7rem;
  }

  .collage {
    height: 88px;
  }

  .product-row {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .product-thumb {
    width: 88px;
    height: 88px;
  }

  .price {
    font-size: .98rem;
  }
}

@media (max-width: 360px) {
  .product-grid,
  .item-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

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

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

  .collage {
    height: 118px;
  }

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

  .measurement-visual {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ── 产品详情弹窗 ── */

.product-card { cursor: pointer; }

.product-detail-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 0; background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.product-detail-overlay.show { opacity: 1; pointer-events: auto; }

.detail-card {
  position: relative; width: 100%; max-width: 480px; max-height: 92vh;
  display: flex; flex-direction: column;
  border-radius: 18px; background: var(--card); overflow: hidden;
  box-shadow: 0 24px 60px rgba(66,42,24,.25);
  transform: translateY(12px); transition: transform .22s ease;
}
.product-detail-overlay.show .detail-card { transform: translateY(0); }

.detail-close {
  position: absolute; top: 12px; right: 12px; z-index: 10;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.48); backdrop-filter: blur(6px);
  color: #fff; font-size: 1.2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.detail-close:active { transform: scale(.92); }

.detail-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }

.detail-images-list { display: flex; flex-direction: column; gap: 4px; background: #f0e5da; }
.detail-images-list img { width: 100%; display: block; }

.detail-info { padding: 18px 18px max(env(safe-area-inset-bottom,0px), 18px); }

.detail-name { margin-bottom: 8px; font-size: 1.05rem; font-weight: 850; line-height: 1.35; color: var(--ink); }

.detail-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.detail-price { color: var(--action-dark); font-size: 1.15rem; font-weight: 850; }
.detail-price-original { color: var(--muted); font-size: .8rem; text-decoration: line-through; }

.detail-tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.detail-section { margin-bottom: 10px; }
.detail-section-title { margin-bottom: 4px; font-size: .76rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.detail-section-body { font-size: .88rem; color: var(--ink-soft); }
.size-rec-panel {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(32, 168, 90, .22);
  border-radius: var(--r-md);
  background: rgba(239, 250, 244, .86);
}
.size-rec-panel.medium {
  border-color: rgba(221, 145, 57, .28);
  background: rgba(255, 247, 237, .92);
}
.size-rec-panel.low {
  border-color: rgba(139, 113, 93, .22);
  background: rgba(250, 247, 244, .92);
}
.size-rec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 850;
}
.size-rec-head strong {
  color: var(--action-dark);
}
.size-rec-meta,
.size-rec-line {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: .78rem;
  line-height: 1.55;
}
.size-rec-line.risk {
  color: #a7661f;
}
.style-advice {
  padding: 12px;
  border: 1px solid rgba(184, 151, 123, .24);
  border-radius: var(--r-md);
  background: rgba(255, 250, 244, .92);
}
.style-advice.good {
  border-color: rgba(32, 168, 90, .24);
  background: rgba(239, 250, 244, .88);
}
.style-advice.caution {
  border-color: rgba(221, 145, 57, .28);
  background: rgba(255, 247, 237, .92);
}
.style-advice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: .84rem;
  font-weight: 850;
}
.style-advice-head span {
  color: var(--brand-dark);
}
.style-advice-head strong {
  color: var(--action-dark);
}
.style-advice-goal {
  margin-top: 6px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
}
.style-advice-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.style-advice-tags .mini-tag.good {
  background: rgba(32, 168, 90, .12);
  color: var(--success);
}
.style-advice-tags .mini-tag.caution {
  background: rgba(221, 145, 57, .12);
  color: #a7661f;
}
.member-style-advice {
  box-shadow: var(--shadow-soft);
}
.member-style-advice .style-advice-head {
  margin-bottom: 8px;
}

.detail-actions { display: flex; gap: 10px; margin-top: 16px; }

.detail-btn { flex: 1; min-height: var(--touch); border-radius: var(--r-md); font-size: .88rem; font-weight: 800; }
.detail-btn.secondary { border: 1px solid var(--line); background: var(--bg); color: var(--brand-dark); }
.detail-btn.primary { background: linear-gradient(180deg, var(--action), var(--action-dark)); color: #fff; }
.detail-btn.matched { border: 1px solid var(--success); background: rgba(32,168,90,.12); color: var(--success); }

.fit-preference-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.fit-preference-control button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--card);
  color: var(--ink-soft);
  font-size: .76rem;
  font-weight: 850;
}

.fit-preference-control button.active {
  border-color: rgba(184, 151, 123, .45);
  background: rgba(184, 151, 123, .14);
  color: var(--brand-dark);
}

/* ── 采购中按钮 ── */
.action-btn.matched { border: 1px solid var(--success); background: rgba(32,168,90,.1); color: var(--success); }

@media (max-width: 430px) {
  .product-detail-overlay { align-items: flex-end; padding: 0; }
  .detail-card { max-width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(circle at 50% 0%, #fff 0%, var(--bg) 44%, var(--bg-deep) 100%);
}

.auth-card {
  width: min(100%, 390px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.auth-brand h1 {
  margin: 0;
  color: var(--brand-deep);
  font-size: 1.5rem;
}

.auth-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: .86rem;
  font-weight: 800;
}

.auth-form input {
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.auth-form input:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(184, 151, 123, .16);
}

.auth-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(229, 57, 53, .22);
  border-radius: var(--r-md);
  background: rgba(229, 57, 53, .08);
  color: var(--danger);
  font-size: .84rem;
  font-weight: 800;
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
  border-radius: var(--r-md);
}

.auth-submit:disabled {
  opacity: .65;
  cursor: wait;
}

.auth-switch {
  width: 100%;
  margin-top: 14px;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 850;
}

.auth-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px 2px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
}

.auth-status span {
  max-width: 56vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-status button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(184, 151, 123, .28);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--brand-dark);
  font-size: .72rem;
  font-weight: 850;
}

/* ── 深色模式细节覆盖 ── */
@media (prefers-color-scheme: dark) {
  body { background: var(--bg); }
  .card { background: var(--card); }
  .frozen-stack { background: rgba(26, 24, 22, .94); border-bottom-color: rgba(51, 48, 44, .78); }
  .page-header { background: rgba(26, 24, 22, .94); border-bottom-color: rgba(51, 48, 44, .78); }
  .header-content h1, .header-content .order-title { color: var(--ink); }
  .member { border-color: #333; background: linear-gradient(180deg, #2a2826, #242220); }
  .member.active { border-color: rgba(196, 170, 140, .4); background: linear-gradient(180deg, #302820, #282420); }
  .member-avatar.add { background: #2a2826; color: #c9a88a; }
  .sheet { background: #2a2826; }
  .sheet-close { background: var(--bg); }
  .order-btn { background: rgba(255,255,255,.05); border-color: #333; color: #b0a49a; }
  .order-btn.primary { color: #fff; }
  .profile-card { background: linear-gradient(180deg, #2a2418, var(--card)); }
  .notice { background: #242018; }
  .search-bar { background: rgba(255,255,255,.04); }
  .navbar { background: rgba(24, 22, 20, .94); border-top-color: #333; }
  input, select, .control { background: rgba(255,255,255,.04); color: var(--ink); }
  .chip-btn { background: rgba(255,255,255,.04); border-color: #333; color: var(--ink-soft); }
  .chip-btn.active { background: rgba(255, 122, 58, .12); border-color: rgba(255, 122, 58, .3); color: var(--action); }
  .order-tab, .order-mode-tab { background: rgba(255,255,255,.04); border-color: #333; }
  .order-tab.active, .order-mode-tab.active { background: rgba(255, 122, 58, .1); border-color: rgba(255, 122, 58, .25); }
  .tab-btn { background: rgba(255,255,255,.04); border-color: #333; }
  .tab-btn.active { background: rgba(196, 170, 140, .12); }
  .category-btn { background: rgba(255,255,255,.04); }
  .category-btn.active { background: rgba(196, 170, 140, .12); }
  .outfit-chip { background: rgba(255,255,255,.04); }
  .detail-btn { border-color: #333; }
  .member-context span { color: var(--muted); }
  .context-sub span { color: var(--muted); }
  .test-btn { color: rgba(196, 170, 140, .5); border-color: rgba(196, 170, 140, .2); }
  .remove-from-cart-btn { background: rgba(229, 57, 53, .12); }
  .product-card { background: var(--card); border-color: #302c28; }
  .product-image { background: #1e1c18; }
  .outfit-card { background: var(--card); border-color: #302c28; }
  .outfit-title { color: var(--ink); }
  .share-btn { background: rgba(255,255,255,.06); border-color: #333; }
  .small-btn { background: rgba(255,255,255,.04); border-color: #333; color: var(--ink-soft); }
  .status-text { color: var(--ink-soft); }
  .date { color: var(--muted); }
  .closet-preview.card { background: var(--card); }
  .panel { background: var(--card); border-color: #302c28; }
  .panel-inner { background: transparent; }
  .order-card { background: var(--card); border-color: #302c28; }
  .cart-card .order-head { border-bottom-color: #302c28; }
  .discount-tag { background: rgba(229, 57, 53, .15); }
  .product-tag { background: rgba(62, 58, 52, .6); }
  .product-tag.material { background: rgba(62, 58, 52, .6); }
  .product-tag.status-label { background: rgba(255, 106, 31, .5); }
  .mini-tag { background: rgba(255,255,255,.04); border-color: #333; color: var(--ink-soft); }
  .price { color: var(--action); }
  .shipping { color: var(--muted); }
  .profile-title { color: var(--ink); }
  .profile-metrics { color: var(--ink-soft); }
  .profile-metrics strong { color: var(--ink); }
  .profile-pill { background: rgba(32, 168, 90, .15); }
  .profile-pill.dirty { background: rgba(240, 138, 36, .15); }
  .notice { color: var(--ink-soft); background: rgba(62, 58, 52, .4); }


}
.edit-owned-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 穿着偏好选择器 */
.pref-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.pref-row:last-child { margin-bottom: 0; }
.pref-label { font-size: 0.78rem; color: var(--muted); min-width: 36px; padding-top: 6px; flex-shrink: 0; }
.pref-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.outfit-rationale { font-size: 0.82rem; color: var(--brand-dark); text-align: center; padding: 8px 0 4px; }
.pref-toggle { display: flex; align-items: center; gap: 6px; background: none; border: 1px solid #eee4db; border-radius: var(--pill); padding: 6px 14px; font-size: 0.8rem; color: var(--ink-soft); cursor: pointer; } .pref-toggle svg { width: 16px; height: 16px; } .pref-panel { margin-top: 8px; }
.version-tag { position: absolute; top: 4px; right: 12px; font-size: 0.62rem; color: var(--muted); opacity: 0.5; } .header-content { position: relative; }
