﻿:root {
  color-scheme: light;
  --ink: #352a2a;
  --muted: #8b7777;
  --line: #f0dedb;
  --paper: #fff8f5;
  --panel: #ffffff;
  --sage: #b99682;
  --teal: #d95f75;
  --rose: #e9788c;
  --gold: #caa46d;
  --charcoal: #5a4a4a;
  --soft-pink: #fff0f2;
  --cream: #fffaf4;
  --shadow: 0 18px 48px rgba(128, 84, 74, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 0%, rgba(233, 120, 140, 0.16), transparent 30%),
    radial-gradient(circle at 92% 10%, rgba(202, 164, 109, 0.16), transparent 28%),
    linear-gradient(180deg, #fff9f6 0%, #fffaf7 48%, #f8f3ee 100%),
    var(--paper);
}

button,
input,
select {
  font: inherit;
}

button,
.upload-btn {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.admin-only {
  display: none !important;
}

body.is-admin-mode .admin-only {
  display: revert !important;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 34px;
  background:
    radial-gradient(circle at 18% 18%, rgba(233, 111, 134, 0.18), transparent 30%),
    linear-gradient(115deg, rgba(255, 246, 243, 0.96) 0 46%, rgba(255, 255, 255, 0.88) 46% 100%),
    #fff8f5;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 430px;
  width: min(1040px, 100%);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(239, 207, 201, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 86px rgba(130, 76, 65, 0.16);
}

.auth-intro {
  position: relative;
  display: grid;
  align-content: space-between;
  padding: 38px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 250, 247, 0.98) 0 44%, rgba(255, 246, 239, 0.72) 62%, rgba(255, 246, 239, 0.16) 100%),
    url("https://images.unsplash.com/photo-1558769132-cb1aea458c5e?auto=format&fit=crop&w=1300&q=86") center/cover no-repeat;
}

.auth-intro::after {
  display: none;
}

.auth-brand {
  position: relative;
  z-index: 1;
}

.auth-intro-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
  align-self: center;
}

.auth-intro-copy h2 {
  margin: 0 0 14px;
  color: #3a2825;
  font-size: clamp(34px, 3vw, 48px);
  line-height: 1.14;
}

.auth-intro-copy p:last-child {
  margin: 0;
  max-width: 460px;
  color: #7d615b;
  font-size: 16px;
  line-height: 1.8;
}

.auth-feature-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-feature-row span {
  padding: 8px 12px;
  border: 1px solid rgba(239, 207, 201, 0.82);
  border-radius: 999px;
  color: #a16e65;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
}

.auth-panel {
  display: grid;
  align-content: center;
  width: 100%;
  padding: 42px 36px;
  border-left: 1px solid rgba(239, 207, 201, 0.74);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 245, 0.88)),
    #fff;
}

.auth-panel-title {
  margin-bottom: 24px;
}

.auth-panel-title span {
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-panel-title h2 {
  margin: 7px 0 6px;
  color: #3a2825;
  font-size: 30px;
}

.auth-panel-title p {
  margin: 0;
  color: #9d837c;
  line-height: 1.6;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.auth-tabs button {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.auth-tabs button.active {
  color: #fff;
  border-color: var(--rose);
  background: linear-gradient(135deg, #e9788c, #d95f75);
}

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

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(223, 96, 123, 0.72);
  box-shadow: 0 0 0 4px rgba(233, 111, 134, 0.12);
}

.auth-form .primary-btn {
  margin-top: 2px;
  min-height: 48px;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(217, 95, 117, 0.22);
}

.auth-message {
  min-height: 22px;
  margin: 0;
  color: #a83b35;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .auth-screen {
    padding: 22px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    width: min(620px, 100%);
    min-height: auto;
  }

  .auth-intro {
    min-height: 320px;
    padding: 30px;
  }

  .auth-intro::after {
    display: none;
  }

  .auth-intro-copy h2 {
    max-width: 480px;
    font-size: 34px;
  }

  .auth-panel {
    border-left: 0;
    border-top: 1px solid rgba(239, 207, 201, 0.74);
    padding: 32px 30px;
  }
}

@media (max-width: 560px) {
  .auth-screen {
    padding: 16px;
    background:
      linear-gradient(180deg, rgba(255, 245, 245, 0.96), rgba(255, 255, 255, 0.98)),
      #fff8f5;
  }

  .auth-shell {
    display: block;
    border-radius: 18px;
  }

  .auth-intro {
    display: none;
  }

  .auth-panel {
    padding: 28px 20px;
  }

  .auth-panel-title h2 {
    font-size: 26px;
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
  padding: 30px 18px;
  border-right: 1px solid rgba(232, 191, 187, 0.72);
  background: rgba(255, 252, 250, 0.94);
  box-shadow: 18px 0 44px rgba(163, 119, 104, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ee8ca0, #d95f75);
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(217, 95, 117, 0.22);
}

.brand h1,
.topbar h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 20px;
}

.brand p,
.weather p,
.hero-copy p,
.empty-state p,
.look-card p,
.accessory-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-list a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  color: #6d5b5a;
  text-decoration: none;
  font-weight: 800;
}

.nav-list a.active,
.nav-list a:hover {
  color: var(--rose);
  background: linear-gradient(90deg, rgba(233, 120, 140, 0.18), rgba(255, 240, 242, 0.82));
}

.vip-card {
  margin-top: auto;
  padding: 18px;
  border: 1px solid #f2ded8;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff8f1, #fff0e6);
  color: #9b6d55;
  box-shadow: 0 14px 30px rgba(190, 137, 105, 0.12);
}

.vip-card strong,
.vip-card p {
  display: block;
  margin: 0;
}

.vip-card strong {
  margin-bottom: 6px;
  font-size: 13px;
}

.vip-card p {
  color: #d78772;
  font-size: 12px;
  font-weight: 800;
}

.weather {
  padding: 18px;
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0 66%, rgba(255, 246, 239, 0.72) 66%),
    url("https://images.unsplash.com/photo-1467358895199-cd8a3f063d7c?auto=format&fit=crop&w=640&q=80") right center/42% 100% no-repeat,
    #fff;
  box-shadow: 0 14px 34px rgba(128, 84, 74, 0.08);
}

.dashboard-weather {
  grid-column: 1;
  order: 2;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.weather label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.city-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.city-search input,
.city-search button {
  height: 38px;
  border-radius: 8px;
  font-weight: 800;
}

.city-search input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.city-search input::placeholder {
  color: var(--muted);
}

.city-search button {
  border: 0;
  padding: 0 12px;
  color: #fff;
  background: var(--rose);
}

.city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.city-chips button {
  min-height: 28px;
  border: 1px solid #eadbd6;
  border-radius: 999px;
  padding: 0 10px;
  color: #9a7b70;
  background: rgba(255, 244, 241, 0.86);
  font-size: 12px;
  font-weight: 800;
}

.weather strong {
  display: block;
  margin-bottom: 10px;
  color: #352a2a;
  font-size: 28px;
}

.weather p {
  max-width: 62%;
  color: var(--muted);
}

.user-box {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 14px;
  border: 1px solid rgba(250, 223, 217, 0.96);
  border-radius: 18px;
  background:
    radial-gradient(circle at 17% 18%, rgba(255, 214, 219, 0.62), transparent 34%),
    linear-gradient(145deg, rgba(255, 253, 250, 0.95), rgba(255, 247, 245, 0.9)),
    #fff;
  box-shadow:
    0 20px 42px rgba(225, 135, 140, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.92);
}

.account-avatar {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.56), transparent 28%),
    linear-gradient(145deg, #f7a0ad 0%, #e45f7b 72%);
  border: 3px solid rgba(255, 239, 240, 0.96);
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 14px 30px rgba(219, 92, 113, 0.24),
    inset 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.account-avatar::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(243, 161, 173, 0.42);
  border-radius: inherit;
}

.account-avatar.large {
  width: 54px;
  height: 54px;
  font-size: 24px;
}

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

.user-box span {
  display: inline-block;
  color: #3b2823;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.user-box strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #2f1d18;
  font-size: 24px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.user-box small {
  display: block;
  position: relative;
  margin-top: 6px;
  padding-left: 17px;
  color: #8e6d63;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.user-box small::before {
  content: "♡";
  position: absolute;
  left: 0;
  top: -1px;
  color: #ee8795;
  font-size: 14px;
}

.account-actions {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  margin-top: 12px;
}

.account-action-btn {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(246, 196, 197, 0.86);
  border-radius: 999px;
  padding: 0 14px;
  color: #3a241e;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(225, 135, 140, 0.12);
  font-weight: 900;
  cursor: pointer;
}

.account-action-btn span:nth-child(2) {
  color: #3a241e;
  font-size: 18px;
  font-family: Georgia, "Times New Roman", serif;
  text-align: left;
  line-height: 1;
  white-space: nowrap;
}

.account-action-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #df7081;
  font-size: 16px;
}

.account-action-arrow {
  color: #df7081;
  font-size: 22px;
  line-height: 1;
}

.account-action-btn.logout-action {
  border-color: rgba(235, 201, 181, 0.9);
}

.account-action-btn.logout-action .account-action-icon,
.account-action-btn.logout-action .account-action-arrow {
  color: #c98663;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr) minmax(260px, 0.72fr);
  gap: 18px;
  align-content: start;
  padding: 0 28px 28px;
}

.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar h2 {
  display: none;
}

.primary-btn,
.ghost-btn,
.upload-btn {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  white-space: nowrap;
  font-weight: 900;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #ef7f95, #d95f75);
  box-shadow: 0 12px 26px rgba(217, 95, 117, 0.24);
}

.ghost-btn,
.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(128, 84, 74, 0.08);
}

.hero {
  display: grid;
  grid-column: 1 / -1;
  order: 1;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  min-height: 306px;
  padding: 36px 36px 30px;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
  background:
    linear-gradient(90deg, rgba(255, 252, 249, 0.98) 0 42%, rgba(255, 245, 239, 0.76) 48%, rgba(255, 255, 255, 0.38) 100%),
    url("https://images.unsplash.com/photo-1523381294911-8d3cead13475?auto=format&fit=crop&w=1600&q=82") center/cover;
  box-shadow: var(--shadow);
}

.hero-copy {
  align-self: center;
  max-width: 720px;
}

.hero-kicker {
  margin-bottom: 10px !important;
  color: var(--rose) !important;
  font-size: 13px !important;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h2 {
  max-width: 680px;
  margin: 0 0 14px;
  color: #402f2f;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: clamp(34px, 3.7vw, 48px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  margin-bottom: 22px;
  color: #6e5856;
  font-size: 17px;
}

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

#photoInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.model-preview {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(310px, 100%);
  height: 276px;
  overflow: hidden;
  border: 1px solid rgba(246, 217, 213, 0.86);
  border-radius: 12px;
  background: rgba(255, 252, 248, 0.88);
  box-shadow: 0 18px 42px rgba(128, 84, 74, 0.18);
  backdrop-filter: blur(12px);
}

.model-card-title {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 14px;
  right: 122px;
  display: grid;
  gap: 2px;
  pointer-events: none;
}

.model-card-title strong {
  color: #4a3938;
  font-size: 14px;
}

.model-card-title span {
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
}

.model-preview canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.model-preview canvas:active {
  cursor: grabbing;
}

.try-on-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.try-on-layer.is-active {
  opacity: 1;
}

.styling-preview {
  position: absolute;
  left: 12px;
  bottom: 62px;
  z-index: 5;
  display: grid;
  width: 142px;
  max-height: calc(100% - 130px);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(22, 36, 38, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(39, 42, 43, 0.18);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.styling-preview-head {
  display: grid;
  gap: 2px;
}

.styling-preview-head span,
.styling-preview-card span {
  color: var(--rose);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.styling-preview-head strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.styling-preview-list {
  display: grid;
  gap: 7px;
  max-height: 172px;
  overflow: auto;
  padding-right: 2px;
}

.styling-preview-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(22, 36, 38, 0.08);
  border-radius: 7px;
  background: #f7f5ef;
}

.styling-preview-card img,
.styling-preview-swatch {
  display: block;
  width: 44px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  background: #f7f5ef;
}

.styling-preview-card div {
  min-width: 0;
}

.styling-preview-card strong {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.try-on-actions {
  position: absolute;
  top: auto;
  left: 12px;
  right: 112px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(232, 191, 187, 0.72);
  border-radius: 8px;
  background: rgba(255, 250, 248, 0.78);
  box-shadow: 0 10px 22px rgba(128, 84, 74, 0.1);
  backdrop-filter: blur(10px);
}

.try-on-actions[hidden] {
  display: none;
}

.try-on-actions button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(217, 95, 117, 0.22);
  border-radius: 7px;
  color: var(--rose);
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.try-on-actions button:first-child {
  color: #fff;
  background: var(--rose);
}

.model-preview.is-trying-on .height-tag {
  background: rgba(34, 36, 38, 0.82);
}

.model-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  width: 100px;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(232, 191, 187, 0.8);
  border-radius: 8px;
  background: rgba(255, 252, 250, 0.82);
  box-shadow: 0 12px 28px rgba(128, 84, 74, 0.12);
  backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.model-controls.is-hidden-for-tryon {
  opacity: 0 !important;
  transform: translateX(10px) !important;
  pointer-events: none !important;
}

.model-control-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.model-control-row + .model-control-row {
  padding-top: 6px;
  border-top: 1px solid rgba(232, 191, 187, 0.72);
}

.model-control-row::before {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.model-control-row:first-child::before {
  content: "姿态";
}

.model-control-row:nth-child(2)::before {
  content: "视角";
}

.model-control-row:nth-child(3)::before {
  content: "动画";
}

.model-control-btn {
  min-height: 25px;
  padding: 4px 7px;
  border: 1px solid rgba(232, 191, 187, 0.78);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(128, 84, 74, 0.06);
  cursor: pointer;
  pointer-events: auto;
  white-space: nowrap;
}

.model-control-btn:hover,
.model-control-btn.active {
  border-color: rgba(217, 95, 117, 0.45);
  color: #fff;
  background: rgba(217, 95, 117, 0.92);
}

.height-tag {
  position: absolute;
  z-index: 3;
  left: 16px;
  bottom: 58px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #fff;
  background: rgba(69, 51, 50, 0.9);
  font-weight: 800;
}

.grid-layout {
  display: grid;
  grid-column: 2;
  order: 2;
  grid-template-columns: 1fr;
  gap: 18px;
}

.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(128, 84, 74, 0.08);
  backdrop-filter: blur(10px);
}

#closet {
  min-height: 210px;
}

#profile {
  order: 10;
}

#accessories {
  grid-column: 3;
  order: 2;
  min-height: 210px;
}

#aiTryOn {
  grid-column: 1 / span 2;
  order: 3;
}

#looks {
  grid-column: 3;
  order: 3;
}

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

.panel h3 {
  font-size: 20px;
}

.panel-heading span {
  color: var(--muted);
  font-weight: 800;
}

.closet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.closet-count-pill,
.upload-current-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid #f0d4d4;
  border-radius: 9px;
  padding: 0 12px;
  color: #9b7670;
  background: rgba(255, 250, 247, 0.92);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.upload-current-pill b {
  margin-left: 6px;
  color: var(--rose);
}

.upload-mini-btn,
.upload-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #ef7f95, #d95f75);
  font-weight: 900;
  cursor: pointer;
}

.upload-mini-btn {
  min-height: 38px;
  padding: 0 16px;
  white-space: nowrap;
}

.candidate-mode-btn {
  min-height: 38px;
  border: 1px solid rgba(217, 95, 117, 0.32);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--rose);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.candidate-mode-btn.active {
  color: #fff;
  border-color: var(--rose);
  background: linear-gradient(135deg, #ef7f95, #d95f75);
  box-shadow: 0 12px 24px rgba(217, 95, 117, 0.18);
}

.upload-empty-btn {
  min-height: 42px;
  padding: 0 18px;
}

.closet-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.closet-selection-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(217, 95, 117, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 240, 242, 0.96), rgba(255, 250, 247, 0.96));
  color: var(--ink);
}

.closet-selection-banner strong {
  font-size: 14px;
}

.closet-selection-banner span {
  color: #9b7670;
  font-size: 12px;
  font-weight: 800;
}

.closet-selection-banner button {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(217, 95, 117, 0.32);
  border-radius: 8px;
  background: #fff;
  color: var(--rose);
  font-weight: 900;
  cursor: pointer;
}

#closet .closet-grid {
  max-height: 170px;
  overflow: auto;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-content: center;
  gap: 8px;
  border: 1px dashed #edc7c3;
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 246, 243, 0.72);
}

.closet-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(128, 84, 74, 0.06);
}

.closet-item.selectable-for-tryon {
  cursor: pointer;
  outline: 2px solid rgba(217, 95, 117, 0.16);
  outline-offset: -2px;
}

.closet-item.selectable-for-tryon:hover {
  border-color: rgba(217, 95, 117, 0.55);
  box-shadow: 0 14px 30px rgba(217, 95, 117, 0.14);
}

.closet-item.candidate-selectable {
  cursor: pointer;
}

.closet-item.candidate-selectable:hover {
  border-color: rgba(217, 95, 117, 0.48);
  box-shadow: 0 14px 30px rgba(217, 95, 117, 0.12);
}

.closet-item.candidate-selected {
  border-color: var(--rose);
  outline: 2px solid rgba(217, 95, 117, 0.18);
  outline-offset: -2px;
}

.candidate-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  color: #fff;
  background: rgba(34, 36, 38, 0.58);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.candidate-selected .candidate-check {
  background: var(--rose);
}

.closet-tryon-pick {
  width: 100%;
  min-height: 34px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #ef7f95, #d95f75);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.closet-category {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf7, #fff);
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}

.category-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 900;
}

.category-tab span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  background: #f1f0eb;
  font-size: 12px;
}

.category-tab.active {
  color: #fff;
  border-color: var(--rose);
  background: linear-gradient(135deg, #ef7f95, #d95f75);
}

.category-tab.active span {
  color: var(--rose);
  background: #fff;
}

.category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.category-heading strong {
  font-size: 17px;
}

.category-heading span,
.category-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.category-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 12px;
  max-height: 290px;
  overflow: auto;
  padding-right: 4px;
}

.category-empty {
  display: grid;
  min-height: 118px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #edc7c3;
  border-radius: 8px;
  background: rgba(255, 246, 243, 0.72);
}

.category-empty strong,
.category-empty p {
  margin: 0;
}

.candidate-mix-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(217, 95, 117, 0.2);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 248, 247, 0.96), #fff);
}

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

.candidate-basket {
  display: grid;
  gap: 12px;
}

.candidate-basket > div:first-child {
  display: grid;
  gap: 4px;
}

.candidate-basket strong {
  color: var(--ink);
  font-size: 18px;
}

.candidate-basket p,
.candidate-selected-empty span,
.candidate-result-empty span {
  margin: 0;
  color: #9b7670;
  font-size: 13px;
  font-weight: 800;
}

.candidate-counts,
.candidate-basket-actions,
.candidate-result-actions,
.candidate-rejects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.candidate-counts span,
.candidate-rejects span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff2f4;
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
}

.candidate-rejects span {
  border-radius: 8px;
  background: rgba(255, 248, 239, 0.95);
  color: #a57a55;
}

.candidate-selected-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.candidate-selected-strip article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.candidate-selected-strip img {
  width: 100%;
  aspect-ratio: 1 / 0.82;
  object-fit: cover;
}

.candidate-selected-strip span,
.candidate-selected-strip strong {
  display: block;
  padding: 0 8px;
  line-height: 1.35;
}

.candidate-selected-strip span {
  padding-top: 6px;
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

.candidate-selected-strip strong {
  padding-bottom: 8px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-selected-empty,
.candidate-result-empty {
  display: grid;
  min-height: 104px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #edc7c3;
  border-radius: 8px;
  background: rgba(255, 246, 243, 0.72);
  text-align: center;
}

.candidate-result-empty ul {
  margin: 0;
  padding-left: 18px;
  color: #9b7670;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

.candidate-basket-actions button,
.candidate-result-actions button {
  min-height: 36px;
  border: 1px solid rgba(217, 95, 117, 0.3);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--rose);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.candidate-basket-actions button:first-child,
.candidate-result-actions button:last-child {
  color: #fff;
  border-color: var(--rose);
  background: linear-gradient(135deg, #ef7f95, #d95f75);
}

.candidate-basket-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.candidate-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 12px;
}

.candidate-best-look,
.candidate-alt-look {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.candidate-result-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  margin-bottom: 10px;
}

.candidate-result-head span {
  grid-column: 1 / -1;
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.candidate-result-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
}

.candidate-result-head em {
  align-self: center;
  color: var(--rose);
  font-style: normal;
  font-weight: 900;
}

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

.candidate-alt-look .look-preview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.candidate-alt-look .look-basis,
.candidate-alt-look p:not(.look-basis) {
  max-height: 74px;
  overflow: auto;
}

.large-empty {
  grid-column: 1 / -1;
  min-height: 220px;
}

.delete-item {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(34, 36, 38, 0.78);
  font-size: 20px;
  line-height: 1;
}

.delete-item:hover {
  background: var(--rose);
}

.closet-preview-btn,
.closet-item img,
.sample-swatch {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.92;
  object-fit: cover;
}

.closet-preview-btn {
  border: 0;
  padding: 0;
  background: #fff;
  cursor: zoom-in;
}

.closet-preview-btn img {
  height: 100%;
}

.closet-preview-btn:focus-visible {
  outline: 3px solid rgba(217, 95, 117, 0.34);
  outline-offset: -3px;
}

.sample-swatch {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
}

.closet-item div {
  padding: 9px;
}

.closet-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.closet-name-btn {
  display: block;
  width: 100%;
  min-height: 22px;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  text-align: left;
  word-break: break-word;
  cursor: text;
}

.closet-name-btn:hover,
.closet-name-btn:focus-visible {
  color: var(--rose);
  outline: none;
}

.closet-name-input {
  display: block;
  width: 100%;
  height: 30px;
  margin-bottom: 4px;
  border: 1px solid var(--rose);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  outline: none;
}

.closet-item .garment-id-status {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.closet-price-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin-top: 7px;
}

.closet-price-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.closet-price-input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 850;
  outline: none;
}

.closet-price-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(217, 95, 117, 0.12);
}

.closet-price-display {
  display: inline-block;
  margin-top: 5px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 950;
}

.closet-item span {
  color: var(--muted);
  font-size: 12px;
}

.closet-item select {
  width: 100%;
  height: 32px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

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

.body-shape-card {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(239, 207, 201, 0.92);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 240, 242, 0.82), rgba(255, 255, 255, 0.96) 55%),
    #fff;
  box-shadow: 0 12px 28px rgba(172, 111, 94, 0.08);
}

.body-shape-card span {
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.body-shape-card strong {
  color: #3a2825;
  font-size: 18px;
  font-weight: 900;
}

.body-shape-card p {
  margin: 0;
  color: #8d746e;
  font-size: 13px;
  line-height: 1.65;
}

.profile-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.form-subtitle {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.profile-form input,
.profile-form select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.unit-input {
  position: relative;
  display: block;
}

.unit-input input {
  padding-right: 48px;
}

.unit-input span {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a8918a;
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.profile-form input[type="range"] {
  height: 28px;
  padding: 0;
  accent-color: var(--rose);
}

.look-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.look-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 246, 243, 0.82), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: 0 12px 26px rgba(128, 84, 74, 0.07);
}

.look-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.look-piece {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.look-piece-preview-btn,
.look-piece img,
.look-piece-fallback {
  display: grid;
  place-items: center;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(244, 193, 187, 0.82);
  border-radius: 7px;
  background: #fff7f4;
}

.look-piece-preview-btn {
  overflow: hidden;
  padding: 0;
  cursor: zoom-in;
}

.look-piece-preview-btn:focus-visible {
  outline: 3px solid rgba(233, 111, 134, 0.32);
  outline-offset: 2px;
}

.look-piece img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.look-piece-fallback {
  padding: 4px;
  color: #8b7069;
  font-size: 11px;
  font-weight: 900;
}

.look-piece figcaption {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.25;
}

.look-piece figcaption span {
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

.look-piece figcaption strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.look-card h4 {
  margin: 0;
  font-size: 15px;
}

.look-empty-state {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(217, 95, 117, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 240, 242, 0.72), rgba(255, 255, 255, 0.96)),
    #fff;
}

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

.look-empty-state p,
.look-empty-state li,
.look-empty-state span {
  margin: 0;
  color: #8d746e;
  font-size: 13px;
  line-height: 1.65;
}

.look-empty-state ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.look-empty-state span {
  color: var(--rose);
  font-weight: 900;
}

.look-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.look-card-head h4 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.look-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.try-look-btn,
.tryon-generate-btn {
  min-height: 32px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.try-look-btn {
  border: 1px solid rgba(217, 95, 117, 0.32);
  color: var(--rose);
  background: #fff;
}

.tryon-generate-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #ef7f95, #d95f75);
}

.look-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.look-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #a85866;
  background: #fff0f2;
  font-size: 12px;
  font-weight: 800;
}

.look-outfit {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

#looks .look-outfit,
#looks .look-meta,
#looks .look-card p {
  display: none;
}

.look-outfit li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff8f4;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ai-tryon-panel {
  border-color: rgba(232, 191, 187, 0.82);
  background:
    linear-gradient(135deg, rgba(233, 120, 140, 0.08), rgba(255, 255, 255, 0.96) 42%),
    #fff;
}

.ai-tryon-panel .panel-heading span {
  color: var(--rose);
  font-size: 13px;
  font-weight: 900;
}

.ai-tryon-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 170px;
  gap: 10px;
  align-items: stretch;
}

.ai-tryon-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.ai-tryon-form input,
.ai-tryon-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.ai-tryon-form button {
  min-height: 44px;
}

.tryon-upload-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(232, 191, 187, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.tryon-upload-title {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.tryon-upload-preview {
  position: relative;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 62px;
  min-height: 0;
  border: 1px dashed rgba(217, 95, 117, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(233, 120, 140, 0.08), rgba(255, 255, 255, 0.82)),
    #fff8f4;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  overflow: hidden;
}

.tryon-upload-preview.has-image {
  border-style: solid;
  background: #fff8f4;
}

.tryon-upload-preview.is-digital-model {
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 247, 248, 0.96), rgba(248, 238, 233, 0.86)),
    #fff8f4;
}

.tryon-upload-preview.is-digital-model::after {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 15%;
  content: "";
  background: linear-gradient(180deg, rgba(255, 248, 247, 0), #fff8f7 46%, #fff8f7 100%);
  pointer-events: none;
}

.tryon-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tryon-upload-preview .digital-model-image {
  object-fit: cover;
  object-position: center top;
  transform: translateY(var(--digital-model-y, 0%)) scaleX(var(--digital-model-width-scale, 1)) scaleY(var(--digital-model-height-scale, 1));
  transform-origin: center top;
}

.digital-model-badge {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  bottom: auto;
  min-height: 24px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #a85866;
  background: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(128, 84, 74, 0.12);
}

.digital-model-metrics {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 12px;
  left: 14px;
  display: block;
  overflow: hidden;
  min-height: 30px;
  border: 1px solid rgba(232, 191, 187, 0.78);
  border-radius: 999px;
  padding: 6px 10px;
  color: #8d746e;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(128, 84, 74, 0.08);
}

.tryon-preview-delete {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(148, 64, 51, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #944033;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(128, 84, 74, 0.14);
  cursor: pointer;
}

.tryon-upload-actions {
  grid-column: 2;
  display: flex;
  gap: 8px;
  align-items: center;
}

.tryon-person-modes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.tryon-person-modes button {
  min-height: 34px;
  border: 1px solid rgba(232, 191, 187, 0.9);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.tryon-person-modes button.active {
  border-color: transparent;
  background: linear-gradient(135deg, #ef7f95, #d95f75);
  color: #fff;
}

.tryon-category-tabs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.tryon-category-tabs button {
  min-height: 34px;
  border: 1px solid rgba(232, 191, 187, 0.9);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.tryon-category-tabs button.active {
  border-color: transparent;
  background: linear-gradient(135deg, #ef7f95, #d95f75);
  color: #fff;
}

.tryon-file-btn,
.tryon-clear-btn,
.tryon-closet-btn,
.tryon-regenerate-btn {
  min-height: 32px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.tryon-file-btn {
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid rgba(232, 191, 187, 0.9);
  background: #fff;
  color: var(--ink);
}

.tryon-clear-btn {
  border: 1px solid rgba(191, 83, 70, 0.28);
  background: rgba(191, 83, 70, 0.08);
  color: #944033;
}

.tryon-closet-btn {
  padding: 0 12px;
  border: 1px solid rgba(217, 95, 117, 0.32);
  background: rgba(233, 120, 140, 0.1);
  color: #d95f75;
}

.tryon-regenerate-btn {
  padding: 0 12px;
  border: 1px solid rgba(177, 138, 68, 0.28);
  background: rgba(250, 246, 235, 0.92);
  color: #9b6f35;
}

.tryon-regenerate-btn.is-done {
  border-color: rgba(31, 109, 112, 0.28);
  background: rgba(239, 248, 247, 0.96);
  color: #1f6d70;
}

.tryon-closet-select {
  grid-column: 1 / -1;
  min-height: 38px;
  margin-top: 2px;
  border: 1px solid rgba(232, 191, 187, 0.9);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.tryon-closet-picker {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 210px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(232, 191, 187, 0.78);
  border-radius: 10px;
  background: rgba(255, 250, 247, 0.86);
}

.tryon-closet-picker[hidden] {
  display: none !important;
}

.tryon-garment-slots {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tryon-garment-slot {
  position: relative;
  display: grid;
  grid-template-rows: auto 54px auto;
  gap: 5px;
  min-width: 0;
  min-height: 98px;
  padding: 8px;
  border: 1px solid rgba(232, 191, 187, 0.86);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.tryon-garment-slot.active {
  border-color: rgba(217, 95, 117, 0.68);
  box-shadow: 0 0 0 3px rgba(233, 120, 140, 0.12);
}

.tryon-garment-slot:hover {
  border-color: rgba(217, 95, 117, 0.62);
  background: #fff7f8;
  transform: translateY(-1px);
}

.tryon-garment-slot span {
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

.tryon-garment-slot img,
.tryon-garment-slot em {
  width: 100%;
  height: 54px;
  border-radius: 8px;
  background: #fff8f4;
}

.tryon-garment-slot img {
  object-fit: cover;
}

.tryon-garment-slot em {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(217, 95, 117, 0.25);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.tryon-garment-slot b {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tryon-slot-delete {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #944033;
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(128, 84, 74, 0.12);
}

.tryon-closet-option {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 68px;
  padding: 7px;
  border: 1px solid rgba(232, 191, 187, 0.78);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.tryon-closet-option.active {
  border-color: rgba(217, 95, 117, 0.62);
  background: #fff3f5;
}

.tryon-closet-option img {
  grid-row: 1 / span 2;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff8f4;
}

.tryon-closet-option span {
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

.tryon-closet-option strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tryon-closet-option em {
  color: var(--rose);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.tryon-closet-option small {
  color: #a85866;
  font-size: 11px;
  font-weight: 900;
}

.tryon-closet-empty {
  grid-column: 1 / -1;
  min-height: 70px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(217, 95, 117, 0.28);
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.tryon-file-name {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tryon-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ai-tryon-result {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(232, 191, 187, 0.6);
  border-radius: 8px;
  background: rgba(255, 252, 250, 0.86);
}

.ai-tryon-result-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.ai-tryon-result-head > div {
  display: grid;
  gap: 4px;
}

.ai-tryon-result-head span {
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-tryon-result-head em {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #a85866;
  background: #fff0f2;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.ai-tryon-result-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 14px;
  align-items: stretch;
}

.ai-tryon-result-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 248, 244, 0.82);
}

.ai-tryon-result strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.35;
}

.ai-tryon-result p,
.ai-tryon-result li,
.ai-tryon-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.ai-tryon-result ul {
  margin: 0;
  padding-left: 20px;
}

.ai-tryon-image-slot {
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 16px;
  border: 1px dashed rgba(217, 95, 117, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(233, 120, 140, 0.08), rgba(255, 255, 255, 0.8)),
    #fff8f4;
  text-align: center;
}

.ai-tryon-image-slot span {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.ai-tryon-image-slot p {
  max-width: 240px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.ai-tryon-image-slot.has-image {
  display: grid;
  place-items: center;
  padding: 0;
  border-style: solid;
  background: #fff;
}

.ai-tryon-result-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding-top: 2px;
}

.tryon-result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tryon-result-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 11px;
  color: #826861;
  background: rgba(255, 240, 242, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.tryon-result-summary b {
  color: #a85866;
}

.tryon-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tryon-result-action {
  min-height: 36px;
  border: 1px solid rgba(217, 95, 117, 0.32);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--rose);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.tryon-result-action.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #ef7f95, #d95f75);
}

.tryon-result-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-tryon-progress {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(217, 95, 117, 0.12);
}

.ai-tryon-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(233, 120, 140, 0.35), rgba(217, 95, 117, 0.95));
  animation: aiTryOnLoading 1.1s ease-in-out infinite;
}

@keyframes aiTryOnLoading {
  0% {
    transform: translateX(-105%);
  }
  100% {
    transform: translateX(280%);
  }
}

.ai-tryon-result.is-pending {
  border-color: rgba(177, 138, 68, 0.42);
  background: rgba(250, 246, 235, 0.9);
}

.ai-tryon-result.is-success {
  border-color: rgba(31, 109, 112, 0.32);
  background: rgba(239, 248, 247, 0.9);
}

.ai-tryon-result.is-error {
  border-color: rgba(196, 89, 84, 0.36);
  background: rgba(255, 244, 242, 0.92);
}

.ai-tryon-output {
  display: block;
  width: 100%;
  max-height: 560px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: contain;
}

.ai-tryon-form button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.tryon-model-field {
  display: grid;
  gap: 8px;
  align-self: end;
  min-width: 180px;
  color: var(--muted);
  font-weight: 900;
}

.tryon-model-field select {
  min-height: 46px;
  border: 1px solid rgba(232, 191, 187, 0.9);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  font-weight: 900;
}

.tryon-mode-field {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 46px;
  padding: 6px;
  border: 1px solid rgba(213, 118, 134, 0.42);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 239, 0.9);
}

.tryon-mode-field button {
  min-height: 36px;
  border: 1px solid rgba(232, 191, 187, 0.72);
  border-radius: 7px;
  background: #fffaf9;
  color: #3d2925;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.tryon-mode-field button.active {
  border-color: #bf3f5c;
  background: #c83f61;
  color: #fff;
  text-shadow: 0 1px 1px rgba(74, 10, 24, 0.28);
  box-shadow: 0 8px 18px rgba(191, 63, 92, 0.28);
}

.tryon-mode-field button:focus-visible {
  outline: 3px solid rgba(191, 63, 92, 0.28);
  outline-offset: 2px;
}

.ai-tryon-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(233, 120, 140, 0.09);
  color: var(--ink);
  font-weight: 800;
}

.admin-panel {
  grid-column: 1 / -1;
  order: 2;
  border-color: rgba(217, 95, 117, 0.26);
  background:
    linear-gradient(135deg, rgba(233, 120, 140, 0.08), rgba(255, 255, 255, 0.96) 46%),
    #fff;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  align-items: end;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.admin-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(232, 191, 187, 0.9);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  font-weight: 800;
}

.admin-section-title {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(232, 191, 187, 0.58);
  color: var(--rose-deep);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-toggle-field {
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(232, 191, 187, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.admin-toggle-field input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--rose);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.admin-hint {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 800;
}

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

.accessory-list article {
  display: grid;
  min-height: 92px;
  place-content: center;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(232, 191, 187, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 246, 243, 0.9), rgba(255, 255, 255, 0.94)),
    #fff;
}

.accessory-list span {
  color: var(--rose);
  text-align: center;
  font-weight: 900;
}

.accessory-list strong {
  display: block;
  margin: 5px 0 0;
  text-align: center;
  font-size: 14px;
}

.accessory-list p {
  display: none;
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .sidebar {
    position: static;
    min-height: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-list a {
    text-align: center;
    justify-content: center;
  }

  .hero,
  .grid-layout {
    grid-column: 1;
    grid-template-columns: 1fr;
  }

  .dashboard-weather,
  #accessories,
  #aiTryOn,
  #looks,
  .grid-layout {
    grid-column: 1;
  }

  .model-preview {
    justify-self: stretch;
    width: 100%;
  }

  .look-list,
  .ai-tryon-form,
  .admin-form,
  .ai-tryon-result,
  .accessory-list,
  .category-tabs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .hero {
    min-height: auto;
    padding: 20px;
    background:
      linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
      url("https://images.unsplash.com/photo-1483985988355-763728e1935b?auto=format&fit=crop&w=1000&q=80") center/cover;
  }

  .hero-copy h2 {
    font-size: 32px;
  }

  .model-preview {
    height: 350px;
    transform: none;
  }

  .model-controls {
    top: 8px;
    right: 8px;
    width: 92px;
    gap: 6px;
    padding: 6px;
  }

  .model-control-btn {
    min-height: 26px;
    padding: 4px 6px;
    font-size: 11px;
  }

  .model-card-title {
    right: 108px;
  }

  .height-tag {
    bottom: 12px;
  }

  .try-on-actions {
    right: 12px;
    bottom: 54px;
  }

  .category-items {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }
}

/* Reference-inspired soft closet dashboard polish */
:root {
  --ink: #3b2a27;
  --muted: #9d837c;
  --line: #f4dcd8;
  --paper: #fff7f4;
  --panel: rgba(255, 255, 255, 0.92);
  --rose: #e96f86;
  --rose-deep: #d95d78;
  --rose-soft: #fff0f2;
  --cream: #fffaf6;
  --shadow: 0 18px 42px rgba(172, 111, 94, 0.12);
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 238, 239, 0.72) 0, rgba(255, 250, 247, 0.96) 230px, #fff9f6 100%),
    var(--paper);
}

.app-shell {
  grid-template-columns: 320px minmax(0, 1fr);
  background: transparent;
}

.sidebar {
  padding: 34px 18px 28px;
  border-right: 1px solid rgba(239, 207, 201, 0.82);
  background: rgba(255, 251, 249, 0.88);
  box-shadow: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #f59aae, #e96f86);
  font-size: 23px;
  box-shadow: 0 12px 24px rgba(233, 111, 134, 0.2);
}

.brand h1 {
  font-size: 19px;
  font-weight: 900;
}

.brand p {
  margin-top: 2px;
  color: #aa8b85;
  font-size: 13px;
  line-height: 1.45;
}

.nav-list {
  gap: 10px;
}

.nav-list a {
  min-height: 45px;
  border-radius: 9px;
  color: #7d6862;
  font-size: 15px;
  font-weight: 800;
}

.nav-list a.active,
.nav-list a:hover {
  color: var(--rose-deep);
  background: linear-gradient(90deg, rgba(233, 111, 134, 0.16), rgba(255, 244, 245, 0.72));
}

.workspace {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
  padding: 0 30px 34px;
}

.topbar {
  display: none;
}

.hero {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 300px 260px;
  align-items: center;
  min-height: 278px;
  padding: 36px 44px;
  border: 0;
  border-radius: 0 0 16px 16px;
  background:
    linear-gradient(90deg, rgba(255, 250, 247, 0.98) 0 39%, rgba(255, 246, 239, 0.7) 52%, rgba(255, 246, 239, 0.18) 100%),
    url("https://images.unsplash.com/photo-1558769132-cb1aea458c5e?auto=format&fit=crop&w=1800&q=86") center right/cover no-repeat;
  box-shadow: 0 18px 42px rgba(170, 110, 91, 0.1);
}

.hero-kicker {
  margin-bottom: 12px !important;
  color: var(--rose) !important;
  font-size: 12px !important;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.hero-copy h2 {
  max-width: 610px;
  margin-bottom: 14px;
  color: #3a2825;
  font-size: clamp(36px, 3.15vw, 52px);
  line-height: 1.12;
  font-weight: 800;
}

.hero-copy p {
  max-width: 650px;
  color: #7d615b;
  font-size: 16px;
  line-height: 1.85;
}

.hero-actions {
  gap: 12px;
  margin-top: 22px;
}

.primary-btn,
.ghost-btn,
.upload-btn,
.upload-mini-btn,
.upload-empty-btn {
  min-height: 42px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 800;
}

.primary-btn {
  background: linear-gradient(135deg, #f07f96, #df607b);
  box-shadow: 0 14px 28px rgba(223, 96, 123, 0.22);
}

.ghost-btn,
.upload-btn {
  border-color: rgba(239, 207, 201, 0.95);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(170, 110, 91, 0.08);
}

.model-preview {
  width: 250px;
  height: 212px;
  border-color: rgba(246, 221, 216, 0.96);
  border-radius: 12px;
  background: rgba(255, 251, 248, 0.92);
  box-shadow: 0 18px 38px rgba(150, 96, 82, 0.16);
}

.model-card-title {
  top: 14px;
  left: 14px;
  right: 94px;
}

.model-card-title strong {
  font-size: 13px;
}

.model-card-title span {
  color: var(--rose);
  font-size: 11px;
}

.model-controls {
  top: 12px;
  right: 10px;
  width: 88px;
  gap: 5px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 252, 250, 0.9);
  box-shadow: 0 10px 22px rgba(150, 96, 82, 0.12);
}

.model-control-row {
  gap: 4px;
}

.model-control-row + .model-control-row {
  padding-top: 5px;
}

.model-control-row:first-child::before {
  content: "姿态";
}

.model-control-row:nth-child(2)::before {
  content: "视角";
}

.model-control-row:nth-child(3)::before {
  content: "动画";
}

.model-control-btn {
  min-height: 25px;
  border-radius: 7px;
  padding: 3px 5px;
  font-size: 11px;
  font-weight: 800;
}

.height-tag {
  left: 16px;
  bottom: 14px;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(68, 49, 47, 0.88);
  font-size: 15px;
}

.dashboard-weather {
  grid-column: auto;
  order: initial;
  min-height: 210px;
}

.grid-layout {
  grid-column: 1 / span 13;
  order: 2;
  gap: 18px;
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.grid-layout #closet {
  grid-column: 1 / span 9;
}

.grid-layout #profile {
  grid-column: 10 / -1;
}

#accessories {
  grid-column: 14 / span 3;
  order: 2;
  min-height: 214px;
}

#aiTryOn {
  grid-column: 1 / span 7;
  order: 3;
}

#looks {
  grid-column: 8 / span 5;
  order: 3;
}

.panel,
.weather {
  border-color: rgba(244, 220, 216, 0.95);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(172, 111, 94, 0.09);
}

.panel {
  padding: 20px;
}

.panel-heading {
  margin-bottom: 14px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--rose);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.panel h3 {
  color: #3a2825;
  font-size: 21px;
  font-weight: 900;
}

.weather {
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 239, 0.78)),
    #fff;
}

.weather strong {
  color: #2e2423;
  font-size: 28px;
  line-height: 1.2;
}

.weather p {
  max-width: 100%;
  font-size: 14px;
}

.city-search input,
.city-search button {
  height: 38px;
  border-radius: 9px;
}

#closet {
  min-height: 360px;
}

#closet .closet-grid {
  max-height: 420px;
}

.category-tabs {
  gap: 8px;
}

.category-tab {
  min-height: 40px;
  border-radius: 9px;
  font-size: 14px;
}

.category-tab.active {
  background: linear-gradient(135deg, #ef7f95, #df607b);
}

.closet-category {
  padding: 13px;
  border-radius: 9px;
  background: linear-gradient(180deg, #fffaf7, #fffefd);
}

.category-items {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  max-height: 440px;
}

.closet-item {
  border-radius: 8px;
}

.closet-item img,
.sample-swatch {
  aspect-ratio: 1 / 0.7;
}

.closet-item div {
  padding: 7px;
}

.closet-name-btn {
  min-height: 18px;
  font-size: 12px;
  line-height: 1.25;
}

.closet-item .garment-id-status {
  margin-bottom: 3px;
  font-size: 10px;
}

.closet-price-field {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  margin-top: 5px;
}

.closet-price-field span {
  font-size: 11px;
}

.closet-price-input {
  height: 26px;
  border-radius: 7px;
  padding: 0 6px;
  font-size: 12px;
}

.closet-price-display {
  margin-top: 3px;
  font-size: 11px;
}

.closet-item select {
  height: 28px;
  margin-top: 5px;
  border-radius: 7px;
  padding: 0 6px;
  font-size: 12px;
}

#closet.is-tryon-selecting .closet-grid,
#closet.is-tryon-selecting .category-items {
  max-height: none;
  overflow: visible;
}

#closet.is-tryon-selecting .closet-category {
  min-height: 0;
}

#closet.is-tryon-selecting .category-items {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  align-items: start;
  padding-right: 0;
}

#closet.is-tryon-selecting .closet-item img,
#closet.is-tryon-selecting .sample-swatch {
  aspect-ratio: 1 / 0.74;
}

#closet.is-tryon-selecting .closet-item div {
  padding: 8px 10px 10px;
}

#closet.is-tryon-selecting .closet-name-btn {
  font-size: 13px;
}

#closet.is-tryon-selecting .closet-tryon-pick {
  min-height: 38px;
  margin-top: 8px;
}

#profile {
  margin-top: 0;
}

.profile-form {
  grid-template-columns: 1fr;
  gap: 12px;
}

.profile-form label,
.tryon-model-field,
.ai-tryon-form label {
  font-size: 14px;
}

.profile-form input,
.profile-form select {
  height: 40px;
  border-radius: 9px;
}

.form-subtitle {
  grid-column: 1 / -1;
}

.body-shape-card {
  grid-column: 1 / -1;
}

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

.accessory-list article {
  min-height: 86px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 246, 243, 0.84), rgba(255, 255, 255, 0.96));
}

.accessory-list strong {
  font-size: 13px;
}

.look-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: none;
}

.look-card {
  min-height: 150px;
  border-radius: 10px;
  padding: 13px;
}

#looks .look-outfit,
#looks .look-meta,
#looks .look-card p {
  display: none;
}

.look-preview {
  height: 48px;
}

.look-piece figcaption {
  display: none;
}

.look-card-head {
  display: grid;
  gap: 10px;
}

.look-card-actions {
  justify-content: start;
}

.try-look-btn,
.tryon-generate-btn {
  min-height: 30px;
  border-radius: 8px;
  font-size: 12px;
}

.ai-tryon-panel {
  background: linear-gradient(135deg, rgba(255, 240, 242, 0.72), rgba(255, 255, 255, 0.96) 45%);
}

.ai-tryon-form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) 190px 170px;
}

.ai-tryon-result {
  grid-template-columns: minmax(0, 1fr) 260px;
  border-radius: 10px;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .dashboard-weather,
  .grid-layout,
  #accessories,
  #aiTryOn,
  #looks {
    grid-column: 1 / -1;
  }

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

/* Weather card refinement: compact, soft, closer to the reference dashboard */
.dashboard-weather {
  min-height: 212px;
  max-height: none;
  padding: 16px;
  overflow: visible;
  align-self: start;
}

.weather {
  position: relative;
  display: grid;
  align-content: start;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 241, 0.82)),
    #fff;
}

.weather::before {
  display: none;
}

.weather::after {
  content: "";
  display: none;
}

.weather > * {
  position: relative;
  z-index: 1;
}

.weather label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-bottom: 10px;
  color: #8d746e;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.weather label::before {
  content: "☀";
  color: #f2b05e;
  font-size: 17px;
  line-height: 1;
}

.city-search {
  width: min(100%, 300px);
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  margin-bottom: 8px;
}

.city-search input {
  height: 36px;
  border-color: rgba(242, 213, 208, 0.92);
  border-radius: 10px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 800;
}

.city-search button {
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f08098, #df607b);
  box-shadow: none;
  font-size: 13px;
}

.city-chips {
  max-width: 300px;
  gap: 6px;
  margin: 0 0 12px;
}

.city-chips button {
  min-height: 24px;
  padding: 0 9px;
  border-color: rgba(242, 213, 208, 0.92);
  color: #a77c73;
  background: rgba(255, 247, 244, 0.92);
  font-size: 12px;
}

.weather strong {
  max-width: 100%;
  margin: 0 0 8px;
  color: #342724;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.18;
}

.weather p {
  max-width: 100%;
  margin-bottom: 0;
  color: #8d746e;
  font-size: 14px;
  line-height: 1.65;
}

.category-tab {
  gap: 4px;
  padding: 0 8px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.category-tab span {
  min-width: 20px;
  height: 20px;
  font-size: 11px;
}

/* Accessory recommendation interaction */
#accessories {
  overflow: hidden;
}

.accessory-list {
  grid-template-columns: 1fr;
  gap: 9px;
}

.accessory-await-choice {
  padding: 14px;
  border: 1px dashed rgba(233, 111, 134, 0.42);
  border-radius: 12px;
  background: rgba(255, 248, 246, 0.76);
}

.accessory-await-choice strong {
  display: block;
  color: #3a2825;
  font-size: 14px;
}

.accessory-await-choice p {
  margin: 6px 0 0;
  color: #9d837c;
  font-size: 12px;
  line-height: 1.55;
}

.accessory-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 92px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(239, 207, 201, 0.9);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 249, 247, 0.96), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: 0 10px 24px rgba(172, 111, 94, 0.06);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.accessory-card img {
  display: block;
  grid-row: 1 / span 3;
  width: 54px;
  height: 54px;
  border-radius: 9px;
  object-fit: cover;
  background: #fff7f2;
}

.accessory-card:hover,
.accessory-card:focus-visible,
.accessory-card.active {
  transform: translateY(-2px);
  border-color: rgba(233, 111, 134, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 240, 242, 0.98), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: 0 14px 30px rgba(220, 104, 126, 0.13);
  outline: none;
}

.accessory-card span {
  position: static;
  display: grid;
  grid-column: 2;
  grid-row: 1;
  width: fit-content;
  min-width: 28px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f08aa0, #df607b);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.accessory-card strong {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: #3a2825;
  text-align: left;
  font-size: 13px;
  line-height: 1.25;
}

.accessory-card p {
  display: -webkit-box;
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  overflow: hidden;
  color: #987c75;
  font-size: 11px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.accessory-card small {
  display: none;
}

.current-look-summary,
.accessory-empty-state {
  padding: 12px;
  border: 1px solid rgba(239, 207, 201, 0.86);
  border-radius: 12px;
  background: rgba(255, 250, 247, 0.82);
}

.current-look-summary span {
  display: block;
  margin-bottom: 5px;
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.current-look-summary strong,
.accessory-empty-state strong {
  display: block;
  color: #3a2825;
  font-size: 15px;
}

.current-look-summary p,
.accessory-empty-state p {
  margin: 6px 0 0;
  color: #8d746e;
  font-size: 12px;
  line-height: 1.55;
}

.accessory-detail {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(239, 207, 201, 0.86);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(255, 240, 242, 0.68), rgba(255, 255, 255, 0.96) 52%),
    #fff;
}

.accessory-detail-head {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.accessory-detail-image {
  overflow: hidden;
  border-radius: 12px;
  background: #fff7f2;
  box-shadow: inset 0 0 0 1px rgba(239, 207, 201, 0.72);
}

.accessory-detail-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.1;
  object-fit: cover;
}

.accessory-detail-head span {
  display: inline-grid;
  min-width: 32px;
  height: 24px;
  place-items: center;
  margin-bottom: 6px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f08aa0, #df607b);
  font-size: 12px;
  font-weight: 900;
}

.accessory-detail strong {
  display: block;
  margin-bottom: 5px;
  color: #3a2825;
  font-size: 16px;
}

.accessory-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

.accessory-tag-row em {
  padding: 3px 7px;
  border-radius: 999px;
  color: #d95d78;
  background: #fff0f2;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.accessory-detail p {
  margin: 0;
  color: #8d746e;
  font-size: 13px;
  line-height: 1.65;
}

.accessory-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.accessory-detail-grid section,
.accessory-tip {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.accessory-detail small,
.accessory-tip span {
  display: block;
  margin-bottom: 6px;
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.accessory-match-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.accessory-match-gallery article {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.accessory-match-gallery img,
.accessory-match-gallery span {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.86;
  border-radius: 8px;
  object-fit: cover;
  background: #fff6f3;
}

.accessory-match-gallery b {
  min-width: 0;
  overflow: hidden;
  color: #7c5f58;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accessory-add-btn {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #f08098, #df607b);
  font-weight: 900;
  cursor: pointer;
}

.accessory-add-btn:disabled {
  opacity: 0.72;
  cursor: default;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(58, 40, 37, 0.46);
  backdrop-filter: blur(10px);
}

.image-preview-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(680px, 92vw);
  max-height: 88vh;
  padding: 16px;
  border: 1px solid rgba(255, 221, 216, 0.92);
  border-radius: 16px;
  background: rgba(255, 252, 249, 0.98);
  box-shadow: 0 28px 70px rgba(76, 49, 44, 0.22);
}

.image-preview-card img {
  display: block;
  width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  object-fit: contain;
  background: #fff7f2;
}

.image-preview-close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(76, 49, 44, 0.14);
}

.image-preview-caption {
  display: grid;
  gap: 4px;
}

.image-preview-caption span {
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-preview-caption strong {
  color: var(--ink);
  font-size: 18px;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(58, 40, 37, 0.22);
  backdrop-filter: blur(8px);
}

.account-modal-card {
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid rgba(239, 207, 201, 0.95);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 240, 242, 0.72), rgba(255, 255, 255, 0.98) 42%),
    #fff;
  box-shadow: 0 28px 80px rgba(92, 53, 46, 0.2);
}

.account-modal-head {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.account-modal-head p {
  margin: 0 0 4px;
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-modal-head h3 {
  margin: 0;
  color: #3a2825;
  font-size: 22px;
}

.account-modal-head span {
  display: block;
  margin-top: 4px;
  color: #8d746e;
  font-weight: 800;
}

.modal-close-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(239, 207, 201, 0.9);
  border-radius: 50%;
  color: #9b6f66;
  background: rgba(255, 255, 255, 0.82);
  font-size: 22px;
  cursor: pointer;
}

.password-form {
  display: grid;
  gap: 13px;
}

.password-form label {
  display: grid;
  gap: 7px;
  color: #8d746e;
  font-weight: 900;
}

.password-form input {
  width: 100%;
  height: 43px;
  border: 1px solid rgba(239, 207, 201, 0.95);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.password-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 3px;
}

.account-message {
  min-height: 22px;
  margin: 0;
  color: #b45665;
  font-weight: 800;
  line-height: 1.5;
}

/* Final polish for AI try-on and look cards: stable two-column workspace */
#aiTryOn {
  grid-column: 1 / span 9;
  order: 3;
}

#looks {
  grid-column: 10 / span 7;
  order: 3;
}

#aiTryOn.ai-tryon-panel {
  padding: 22px;
}

#aiTryOn .ai-tryon-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 14px;
  align-items: stretch;
}

#aiTryOn .tryon-upload-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(112px, 1fr) auto auto;
  gap: 10px;
  align-items: stretch;
  min-height: 210px;
  padding: 14px;
}

#aiTryOn .tryon-upload-title,
#aiTryOn .tryon-upload-actions,
#aiTryOn .tryon-file-name {
  grid-column: 1;
}

#aiTryOn .tryon-upload-preview {
  display: grid;
  grid-column: 1;
  grid-row: auto;
  width: 100%;
  height: auto;
  min-height: 112px;
  margin: 8px 0 10px;
  place-items: center;
  border-radius: 12px;
}

#aiTryOn .tryon-upload-preview.is-digital-model {
  aspect-ratio: 3 / 4;
  min-height: 320px;
  max-height: 560px;
  overflow: hidden;
}

#aiTryOn .tryon-upload-preview span {
  max-width: 150px;
  text-align: center;
  line-height: 1.45;
  writing-mode: horizontal-tb;
}

#aiTryOn .tryon-upload-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#aiTryOn .tryon-file-btn,
#aiTryOn .tryon-clear-btn,
#aiTryOn .tryon-closet-btn,
#aiTryOn .tryon-regenerate-btn {
  flex: 1;
  height: 38px;
  min-height: 38px;
  writing-mode: horizontal-tb;
}

#aiTryOn .tryon-model-field {
  grid-column: 1 / 2;
  align-self: end;
}

#aiTryOn .tryon-mode-field {
  grid-column: 2 / 3;
  align-self: end;
}

#aiTryOn #submitTryOnBtn {
  grid-column: 1 / -1;
  align-self: end;
  min-height: 44px;
  border-radius: 11px;
}

#aiTryOn .ai-tryon-result {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
  min-height: 560px;
}

#aiTryOn .ai-tryon-image-slot {
  min-height: 430px;
}

#looks .look-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: none;
  overflow: visible;
}

#looks .look-card {
  min-height: 172px;
  padding: 14px;
}

#looks .look-preview {
  height: auto;
}

#looks .look-piece figcaption {
  display: grid;
}

#looks .look-card-head {
  display: grid;
  gap: 10px;
}

#looks .look-card-actions {
  justify-content: start;
}

#looks .try-look-btn,
#looks .tryon-generate-btn {
  min-height: 32px;
  padding: 0 12px;
}

#looks .look-meta,
#looks .look-outfit,
#looks .look-card p {
  display: grid;
}

#looks .look-meta {
  display: flex;
}

#looks .look-outfit {
  gap: 5px;
}

#looks .look-outfit li {
  grid-template-columns: 46px minmax(0, 1fr);
  padding: 6px 8px;
  font-size: 12px;
}

#looks .look-card p {
  margin: 0;
  color: #826861;
  font-size: 12px;
  line-height: 1.55;
}

#looks .look-basis {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 240, 242, 0.72);
  color: #a85866;
  font-weight: 800;
}

@media (max-width: 1240px) {
  #aiTryOn,
  #looks {
    grid-column: 1 / -1;
  }

  #looks .look-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #aiTryOn .ai-tryon-form,
  #aiTryOn .ai-tryon-result,
  #looks .look-list {
    grid-template-columns: 1fr;
  }

  #aiTryOn .ai-tryon-result-stage,
  #aiTryOn .ai-tryon-result-footer {
    grid-template-columns: 1fr;
  }

  #aiTryOn .ai-tryon-image-slot {
    min-height: 320px;
  }

  #aiTryOn .tryon-result-actions {
    justify-content: stretch;
  }

  #aiTryOn .tryon-result-action {
    flex: 1;
  }

  #aiTryOn .tryon-garment-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #aiTryOn .tryon-model-field,
  #aiTryOn .tryon-mode-field,
  #aiTryOn #submitTryOnBtn {
    grid-column: auto;
  }

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

  .candidate-result-grid {
    grid-template-columns: 1fr;
  }
}

.closet-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.category-tabs {
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
}

.category-tab {
  min-width: 0;
}

.upload-menu-wrap {
  position: relative;
  display: inline-flex;
}

.upload-menu-toggle {
  gap: 8px;
  min-width: 126px;
  border: 0;
  outline: none;
  box-shadow: 0 12px 24px rgba(217, 95, 117, 0.2);
}

.upload-menu-toggle span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  font-size: 18px;
  line-height: 1;
}

.upload-menu-toggle.active {
  box-shadow: 0 12px 26px rgba(217, 95, 117, 0.28);
}

.upload-menu-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(231, 103, 129, 0.22), 0 12px 26px rgba(217, 95, 117, 0.2);
}

.upload-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 184px;
  padding: 8px;
  border: 1px solid #f0c9c6;
  border-radius: 12px;
  background: rgba(255, 252, 249, 0.98);
  box-shadow: 0 20px 42px rgba(128, 84, 74, 0.16);
}

.upload-menu-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 24px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #f0c9c6;
  border-left: 1px solid #f0c9c6;
  background: rgba(255, 252, 249, 0.98);
  transform: rotate(45deg);
}

.upload-category-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-category-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}

.upload-category-option small {
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

.upload-category-option.active,
.upload-category-option:hover,
.upload-category-option:focus-visible {
  color: var(--rose);
  background: #fff0f4;
  outline: none;
}

@media (max-width: 760px) {
  .category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candidate-selected-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-menu-wrap {
    width: 100%;
  }

  .upload-menu-toggle {
    width: 100%;
  }

  .upload-menu-panel {
    left: 0;
    right: auto;
    width: min(260px, 100%);
  }
}

