:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-strong: #f3efea;
  --ink: #2c2c2c;
  --muted: #949494;
  --line: #eee9e3;
  --line-strong: #ded7cf;
  --teal: #dde5d4;
  --teal-dark: #65785f;
  --rose: #9f8ee9;
  --rose-dark: #7865cf;
  --coral: #e8c1c1;
  --blue: #9f8ee9;
  --lime: #dde5d4;
  --yellow: #d8bd7a;
  --champagne: #efe2c4;
  --berry: #2c2c2c;
  --danger: #b7535d;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-dark: rgba(44, 44, 44, 0.58);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    "Avenir Next", "Helvetica Neue", Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

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

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgba(234, 223, 217, 0.82);
  background: rgba(255, 250, 248, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #ffffff;
  border-radius: 8px;
  background: var(--berry);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: 0;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-button,
.icon-button,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.nav-button {
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
}

.nav-button:hover,
.nav-button.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--line);
}

.primary-button {
  padding: 10px 14px;
  color: #ffffff;
  background: var(--berry);
  border-color: var(--berry);
  font-weight: 700;
}

.primary-button:hover {
  background: var(--rose-dark);
  border-color: var(--rose-dark);
  transform: translateY(-1px);
}

.secondary-button {
  padding: 10px 14px;
  color: var(--rose-dark);
  background: #fff1f2;
  border-color: #f0cbd3;
  font-weight: 700;
}

.ghost-button {
  padding: 9px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.danger-button {
  padding: 9px 12px;
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
  font-weight: 700;
}

.icon-button {
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button-row.end {
  justify-content: flex-end;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  color: #74512b;
  border: 1px solid #ead29c;
  border-radius: 999px;
  background: #fff7e5;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  gap: clamp(24px, 6vw, 74px);
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
}

.auth-copy {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4.2vw, 3.55rem);
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.auth-copy p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.04rem;
}

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

.proof-item {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.72);
  box-shadow: 0 14px 35px rgba(58, 23, 38, 0.07);
}

.proof-item strong {
  display: block;
  margin-bottom: 6px;
}

.proof-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-card,
.panel,
.filter-bar,
.detail-panel,
.form-panel,
.timeline-panel,
.admin-row,
.swap-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.82);
  box-shadow: 0 16px 42px rgba(58, 23, 38, 0.08);
}

.auth-card {
  padding: 22px;
  min-width: 0;
  background: rgba(255, 253, 250, 0.82);
  backdrop-filter: blur(18px);
}

.auth-card h2,
.form-panel h2,
.panel h2,
.timeline-panel h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.auth-card > p,
.form-panel > p,
.panel > p,
.timeline-panel > p {
  margin: 0 0 18px;
  color: var(--muted);
}

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

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

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

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

.field label,
.field-label {
  color: #4b3d43;
  font-size: 0.88rem;
  font-weight: 700;
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

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

.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(200, 111, 131, 0.18);
  border-color: var(--rose);
}

.field input[type="checkbox"],
.field input[type="radio"] {
  width: auto;
  min-height: auto;
  padding: 0;
}

.hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.check-row,
.radio-row,
.tag-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-row label,
.radio-row label,
.tag-checks label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #4b3d43;
  font-size: 0.88rem;
}

.check-row input,
.radio-row input,
.tag-checks input {
  accent-color: var(--rose);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.section-head p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
}

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

.metric {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.metric strong {
  display: block;
  font-size: 1.35rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.84rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  margin-bottom: 18px;
}

.market-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.market-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.7rem);
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: 0;
}

.market-hero p {
  margin: 6px 0 0;
  color: var(--muted);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0;
  margin-bottom: 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}

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

.filter-bar .field {
  gap: 4px;
}

.filter-bar label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filter-bar select {
  min-height: 36px;
  width: auto;
  min-width: 96px;
  padding: 7px 28px 7px 12px;
  border-radius: 999px;
  border-color: #ead7d5;
  background: rgba(255, 255, 255, 0.72);
  color: var(--berry);
  font-size: 0.86rem;
}

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

.market-wall {
  margin-top: 0;
}

.cloth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(234, 223, 217, 0.9);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(58, 23, 38, 0.11);
  isolation: isolate;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.cloth-card:hover,
.cloth-card:focus-within,
.cloth-card:focus {
  border-color: rgba(200, 111, 131, 0.38);
  box-shadow: 0 28px 70px rgba(58, 23, 38, 0.17);
  transform: translateY(-3px);
  outline: 0;
}

.card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-strong);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.cloth-card:hover .card-media img,
.cloth-card:focus-within .card-media img,
.cloth-card:focus .card-media img {
  transform: scale(1.035);
}

.floating-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.badge,
.status-chip,
.tag,
.level-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge {
  color: var(--berry);
  background: rgba(255, 253, 250, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(12px);
}

.badge.warehouse {
  color: #ffffff;
  background: rgba(82, 111, 98, 0.86);
}

.status-chip {
  color: var(--rose-dark);
  background: #fff0f2;
}

.status-chip.pending {
  color: #63430d;
  background: #fff4cc;
}

.status-chip.accepted {
  color: var(--teal-dark);
  background: #e7f6f1;
}

.status-chip.completed {
  color: #314e8a;
  background: #e9f0ff;
}

.status-chip.rejected {
  color: #8a3030;
  background: #fde7e7;
}

.tag {
  color: #46383e;
  background: rgba(255, 253, 250, 0.72);
  border: 1px solid rgba(234, 223, 217, 0.7);
}

.tag.coral {
  color: #8a3d34;
  background: #fff0ec;
}

.tag.blue {
  color: #445d82;
  background: #eef3fb;
}

.level-chip {
  color: #244b83;
  background: #e9f0ff;
}

.level-chip.s {
  color: #704a00;
  background: #fff0c4;
}

.level-chip.a {
  color: #125442;
  background: #e3f6ef;
}

.level-chip.b {
  color: #5a3f90;
  background: #efe8ff;
}

.card-title {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.card-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.82), rgba(255, 247, 244, 0.72));
  box-shadow: 0 10px 28px rgba(58, 23, 38, 0.12);
  backdrop-filter: blur(14px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.card-caption p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #4f4247;
  font-size: 0.68rem;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-actions {
  position: absolute;
  top: 52px;
  right: 12px;
  z-index: 6;
  display: grid;
  gap: 8px;
  opacity: 0;
  transform: translateX(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.cloth-card:hover .card-actions,
.cloth-card:focus-within .card-actions,
.cloth-card:focus .card-actions,
.cloth-card.expanded .card-actions {
  opacity: 1;
  transform: translateX(0);
}

.round-action {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--berry);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.82);
  box-shadow: 0 8px 22px rgba(58, 23, 38, 0.13);
  backdrop-filter: blur(14px);
}

.round-action.active {
  color: #ffffff;
  background: var(--rose);
}

.round-action.primary {
  color: #ffffff;
  background: var(--berry);
}

.card-reveal {
  position: absolute;
  inset: auto 10px 10px 10px;
  z-index: 5;
  display: grid;
  gap: 10px;
  max-height: calc(100% - 20px);
  padding: 14px;
  overflow: auto;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 10px;
  background: rgba(255, 250, 248, 0.86);
  box-shadow: 0 18px 50px rgba(58, 23, 38, 0.18);
  opacity: 0;
  transform: translateY(14px);
  backdrop-filter: blur(18px);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.cloth-card:hover .card-reveal,
.cloth-card:focus-within .card-reveal,
.cloth-card:focus .card-reveal,
.cloth-card.expanded .card-reveal {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cloth-card:hover .card-caption,
.cloth-card:focus-within .card-caption,
.cloth-card:focus .card-caption,
.cloth-card.expanded .card-caption {
  opacity: 0;
  transform: translateY(10px);
}

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

.reveal-head strong {
  color: var(--berry);
  font-size: 0.76rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reveal-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.card-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
}

.wishlist {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.75);
  color: #4f4247;
  font-size: 0.9rem;
}

.match-box,
.notice-box,
.flaw-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.74);
}

.match-box {
  border-color: #f0cbd3;
  background: #fff4f5;
}

.match-score {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.match-score strong {
  font-size: 1.5rem;
  color: var(--rose-dark);
}

.empty-state {
  display: grid;
  gap: 10px;
  place-items: center;
  min-height: 240px;
  padding: 34px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.empty-state p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(39, 29, 34, 0.52);
  backdrop-filter: blur(6px);
}

.modal {
  width: min(980px, 100%);
  max-height: min(90vh, 920px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--shadow);
}

.lookbook-modal {
  width: min(1080px, 100%);
}

.modal.small {
  width: min(620px, 100%);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(234, 223, 217, 0.82);
  background: rgba(255, 253, 250, 0.88);
  backdrop-filter: blur(16px);
}

.modal-head h2 {
  margin: 0;
  font-size: 1.12rem;
}

.modal-body {
  padding: 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(320px, 0.82fr);
  gap: 20px;
}

.detail-image {
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-strong);
  aspect-ratio: 3 / 4;
  box-shadow: 0 20px 50px rgba(58, 23, 38, 0.12);
}

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

.detail-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.detail-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 740;
  line-height: 1.08;
  letter-spacing: 0;
}

.lookbook-kicker {
  margin: 0 0 8px;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lookbook-wish {
  padding: 14px;
  border-color: #f0cbd3;
  background: #fff4f5;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.info-tile {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.info-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.info-tile strong {
  display: block;
  margin-top: 3px;
}

.thumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-thumbs {
  margin-top: 10px;
}

.thumb {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

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

.form-panel,
.panel,
.timeline-panel {
  padding: 18px;
}

.form-panel + .form-panel,
.panel + .panel,
.timeline-panel + .timeline-panel {
  margin-top: 16px;
}

.publish-layout,
.warehouse-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.helper-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.helper-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.helper-list i {
  flex: 0 0 auto;
  color: var(--teal);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 700;
}

.tab-button.active {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.swap-list,
.admin-list,
.application-list,
.ticket-grid {
  display: grid;
  gap: 12px;
}

.swap-row,
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
}

.swap-row h3,
.admin-row h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.swap-row p,
.admin-row p {
  margin: 4px 0;
  color: var(--muted);
}

.candidate-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.candidate-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: min(220px, 100%);
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.candidate-card img {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
}

.candidate-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.ticket-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.ticket-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.timeline-step .dot {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: var(--teal);
  font-weight: 800;
}

.timeline-step h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.timeline-step p {
  margin: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  color: #ffffff;
  background: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar .nav {
    display: none;
  }

  .auth-page,
  .detail-layout,
  .publish-layout,
  .warehouse-layout {
    grid-template-columns: 1fr;
  }

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

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

  .filter-bar .button-row {
    grid-column: 1 / -1;
  }

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

  .mobile-nav {
    position: fixed;
    left: 50%;
    bottom: 12px;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    width: min(92vw, 390px);
    height: 58px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
  }

  .mobile-nav .nav-button {
    flex-direction: column;
    gap: 2px;
    min-height: 46px;
    padding: 6px 2px;
    border-radius: 999px;
    font-size: 0.68rem;
    background: transparent;
    border: 0;
  }

  .mobile-nav .nav-button.active {
    color: var(--rose);
    background: rgba(159, 142, 233, 0.12);
  }
}

@media (max-width: 680px) {
  .app-shell .topbar {
    display: none;
  }

  .topbar {
    gap: 8px;
    padding: 8px 10px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
  }

  .brand-name {
    font-size: 0.92rem;
  }

  .brand-subtitle {
    display: none;
  }

  .page {
    width: min(100% - 12px, 1180px);
    padding: 6px 0 22px;
  }

  .route-market .page {
    width: 100%;
    padding: 0 6px 22px;
  }

  .auth-page {
    width: min(100% - 22px, 1120px);
    padding: 22px 0;
  }

  .route-publish .section-head,
  .route-profile .section-head {
    margin-bottom: 12px;
  }

  .route-publish .section-head h1,
  .route-profile .section-head h1 {
    font-size: 1.45rem;
  }

  .route-publish .section-head p,
  .route-profile .section-head p {
    font-size: 0.82rem;
  }

  .route-publish .timeline-panel {
    display: none;
  }

  .route-publish .form-panel,
  .route-profile .form-panel,
  .auth-card,
  .panel {
    border-radius: 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  }

  .route-publish .form-panel > h2,
  .route-publish .form-panel > p {
    display: none;
  }

  .route-publish .form-grid,
  .route-profile .form-grid {
    gap: 12px;
  }

  .route-publish .field input:not([type="checkbox"]):not([type="radio"]),
  .route-publish .field select,
  .route-publish .field textarea,
  .route-profile .field input:not([type="checkbox"]):not([type="radio"]),
  .route-profile .field select,
  .route-profile .field textarea {
    min-height: 40px;
    border-radius: 12px;
    font-size: 0.86rem;
  }

  .route-publish .tag-checks label,
  .route-publish .radio-row label,
  .route-profile .tag-checks label,
  .route-profile .radio-row label {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
  }

  .auth-copy h1 {
    font-size: 2rem;
    word-break: break-all;
  }

  .auth-copy p {
    word-break: break-all;
  }

  .auth-page {
    align-content: start;
    gap: 18px;
  }

  .auth-copy {
    gap: 10px;
    padding-top: 18px;
  }

  .auth-copy .brand,
  .auth-copy .proof-grid {
    display: none;
  }

  .auth-card h2 {
    font-size: 1rem;
  }

  .proof-grid,
  .metric-strip,
  .form-grid,
  .two-col,
  .ticket-grid {
    grid-template-columns: 1fr;
  }

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

  .route-market .closet-grid {
    gap: 4px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .filter-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 8px -8px 10px;
    padding: 0 8px 2px;
    overflow-x: auto;
  }

  .filter-chips .field {
    flex: 0 0 auto;
  }

  .market-hero {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 6px;
  }

  .market-hero h1 {
    font-size: 1.6rem;
  }

  .market-hero p {
    margin-top: 2px;
    font-size: 0.86rem;
  }

  .market-hero .button-row {
    justify-content: flex-start;
    gap: 6px;
  }

  .market-hero .button-row > button {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 0.84rem;
  }

  .filter-bar select {
    min-height: 34px;
    min-width: 88px;
    padding: 6px 24px 6px 10px;
    font-size: 0.82rem;
  }

  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .swap-row,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 0;
  }

  .modal {
    max-height: 100vh;
  }

  .modal-head,
  .modal-body {
    padding: 12px;
  }

  .lookbook-modal {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
    background: var(--surface);
  }

  .lookbook-modal .modal-head {
    position: absolute;
    inset: 0 0 auto;
    z-index: 8;
    padding: 24px 14px 8px;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0));
  }

  .lookbook-modal .modal-head h2 {
    display: none;
  }

  .lookbook-modal .modal-head .icon-button {
    color: #ffffff;
    border: 0;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
  }

  .lookbook-modal .modal-body {
    padding: 0 0 86px;
  }

  .lookbook-modal .detail-layout {
    display: block;
  }

  .lookbook-modal .detail-image {
    aspect-ratio: 4 / 5;
    border-radius: 0;
    box-shadow: none;
  }

  .lookbook-modal .detail-stack {
    gap: 12px;
    padding: 18px 20px 0;
  }

  .lookbook-modal .lookbook-kicker {
    margin-bottom: 7px;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
  }

  .lookbook-modal .detail-title {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .lookbook-modal .two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .lookbook-modal .info-tile,
  .lookbook-modal .wishlist,
  .lookbook-modal .flaw-box,
  .lookbook-modal .notice-box,
  .lookbook-modal .match-box {
    padding: 11px;
    border-radius: 12px;
    font-size: 0.78rem;
  }

  .detail-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 12px;
    padding: 10px 16px 16px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
  }

  .detail-action-bar .ghost-button,
  .detail-action-bar .secondary-button {
    width: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
  }

  .detail-action-bar .primary-button {
    min-height: 52px;
    border-radius: 999px;
    font-size: 0.86rem;
  }

  .swap-drawer-modal {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-height: 84vh;
    border: 0;
    border-radius: 24px 24px 0 0;
    background: var(--surface);
  }

  .swap-drawer-modal .modal-head {
    border-radius: 24px 24px 0 0;
    padding-top: 18px;
  }

  .swap-drawer-modal .candidate-card {
    display: grid;
    grid-template-columns: 24px 58px minmax(0, 1fr);
    min-width: 0;
    padding: 9px;
    align-items: center;
  }

  .swap-drawer-modal .candidate-card img {
    width: 58px;
    height: 58px;
    border-radius: 10px;
  }

  .swap-drawer-modal .candidate-card strong {
    font-size: 0.82rem;
  }

  .button-row,
  .button-row.end {
    justify-content: stretch;
  }

  .button-row > button,
  .button-row > .primary-button,
  .button-row > .secondary-button,
  .button-row > .ghost-button,
  .button-row > .danger-button {
    flex: 1 1 160px;
  }

  .closet-grid .card-media {
    aspect-ratio: 1 / 1.3;
    border-radius: 6px;
  }

  .route-market .cloth-card {
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
  }

  .route-market .cloth-card:hover,
  .route-market .cloth-card:focus {
    box-shadow: none;
    transform: none;
  }

  .route-market .card-media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    height: 44%;
    background: linear-gradient(180deg, rgba(39, 29, 34, 0), rgba(39, 29, 34, 0.58));
    pointer-events: none;
  }

  .closet-grid .floating-badges {
    top: 5px;
    left: 5px;
    right: 5px;
  }

  .route-market .floating-badges {
    display: none;
  }

  .closet-grid .badge {
    min-height: 18px;
    padding: 2px 6px;
    font-size: 0.56rem;
  }

  .closet-grid .card-caption {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    gap: 1px;
    padding: 24px 7px 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .closet-grid .card-title {
    color: #ffffff;
    font-size: 0.58rem;
    line-height: 1.08;
    text-shadow: 0 1px 6px rgba(39, 29, 34, 0.45);
  }

  .closet-grid .card-caption p {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.48rem;
    line-height: 1.12;
    -webkit-line-clamp: 1;
    text-shadow: 0 1px 5px rgba(39, 29, 34, 0.42);
  }

  .card-actions {
    top: 28px;
    right: 5px;
    gap: 4px;
    opacity: 1;
    transform: none;
  }

  .route-market .card-actions {
    display: none;
  }

  .round-action {
    width: 26px;
    height: 26px;
  }

  .card-reveal {
    inset: auto 5px 5px 5px;
    gap: 4px;
    padding: 6px;
    max-height: calc(100% - 10px);
  }

  .route-market .card-reveal {
    display: none;
  }

  .reveal-head {
    gap: 6px;
  }

  .reveal-head strong {
    font-size: 0.58rem;
  }

  .tag-cloud {
    gap: 4px;
  }

  .tag-cloud .tag,
  .card-reveal .tag,
  .card-reveal .status-chip {
    min-height: 17px;
    padding: 2px 4px;
    font-size: 0.5rem;
  }

  .reveal-note {
    display: none;
  }
}

/* Gemini-inspired continuous mobile MVP */

body {
  min-height: 100vh;
  background: #e5e5e5;
}

.mvp-page {
  display: flex;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #e5e5e5;
}

.mvp-phone {
  position: relative;
  width: min(100vw, 430px);
  height: 100dvh;
  max-height: 920px;
  overflow: hidden;
  color: #2c2c2c;
  background: #faf9f6;
  box-shadow: 0 24px 80px rgba(25, 23, 20, 0.18);
}

.mvp-phone button,
.mvp-phone input,
.mvp-phone select,
.mvp-phone textarea {
  font: inherit;
}

.mvp-phone button {
  border: 0;
}

.mvp-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.mvp-scroll::-webkit-scrollbar {
  display: none;
}

.mvp-scroll.has-nav {
  padding-bottom: 108px;
}

.market-header {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 20px 12px;
  background: rgba(250, 249, 246, 0.84);
  backdrop-filter: blur(16px);
}

.market-header h1 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1;
  letter-spacing: 0;
}

.market-header h1 span {
  color: #9f8ee9;
}

.market-header p {
  margin: 5px 0 0;
  color: #949494;
  font-size: 0.72rem;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  max-width: 142px;
  padding: 6px 10px;
  color: #777;
  background: #fff;
  border: 1px solid #f0ece6;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(30, 28, 24, 0.05);
  font-size: 0.72rem;
}

.mini-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-chips {
  position: sticky;
  top: 59px;
  z-index: 24;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 0 20px 14px;
  background: linear-gradient(180deg, #faf9f6 66%, rgba(250, 249, 246, 0));
  scrollbar-width: none;
}

.market-chips::-webkit-scrollbar {
  display: none;
}

.market-chips button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 14px;
  color: #8c8c8c;
  background: #fff;
  border: 1px solid #f1ece7;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(30, 28, 24, 0.045);
  font-size: 0.79rem;
}

.market-chips button.active {
  color: #fff;
  background: #9f8ee9;
  border-color: #9f8ee9;
}

.market-chips {
  display: grid;
  overflow: visible;
}

.market-filter-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.market-filter-row button {
  flex: initial;
  justify-content: center;
  min-width: 0;
  padding: 6px 9px;
  white-space: nowrap;
}

.market-filter-row button span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-filter-row .category-filter {
  justify-content: space-between;
}

.category-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f0ece6;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(32, 29, 24, 0.08);
}

.category-menu button {
  min-height: 34px;
  padding: 7px 8px;
  box-shadow: none;
}

.masonry-grid {
  column-count: 2;
  column-gap: 14px;
  padding: 0 16px 0;
}

.market-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
  break-inside: avoid;
  color: inherit;
  text-align: left;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(32, 29, 24, 0.055);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.market-card:active {
  transform: scale(0.985);
}

.market-card.locked {
  opacity: 0.74;
}

.market-photo {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f4f2ef;
}

.market-card.regular .market-photo {
  aspect-ratio: 4 / 5;
}

.market-card.tall .market-photo {
  aspect-ratio: 3 / 4;
}

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

.photo-badge,
.lock-badge {
  position: absolute;
  left: 9px;
  top: 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 18px);
  min-height: 24px;
  padding: 4px 8px;
  color: #8c75df;
  background: rgba(255, 255, 255, 0.91);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(29, 24, 18, 0.12);
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

.lock-badge {
  color: #fff;
  background: #d65a6a;
}

.market-copy {
  display: grid;
  gap: 8px;
  padding: 11px;
}

.market-copy strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 34px;
  color: #2c2c2c;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.36;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mini-tags span {
  min-height: 20px;
  padding: 3px 7px;
  color: #8b8b8b;
  background: #faf9f6;
  border-radius: 6px;
  font-size: 0.62rem;
}

.mini-tags span:nth-child(2) {
  color: #8c75df;
  background: #f0edfc;
}

.owner-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  color: #949494;
  font-size: 0.68rem;
}

.owner-row img {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  object-fit: cover;
}

.owner-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-row em {
  max-width: 66px;
  overflow: hidden;
  padding: 3px 6px;
  color: #66765f;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(221, 229, 212, 0.62);
  border-radius: 999px;
  font-size: 0.56rem;
  font-style: normal;
}

.end-note {
  margin: 16px 0 4px;
  color: #a5a0a0;
  text-align: center;
  font-size: 0.75rem;
}

.floating-nav {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 55;
  display: grid;
  width: min(88%, 372px);
  height: 64px;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 10px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(30, 27, 24, 0.12);
  backdrop-filter: blur(20px);
}

.floating-nav button {
  display: grid;
  width: 100%;
  height: 52px;
  place-items: center;
  color: #8d8d8d;
  background: transparent;
  border-radius: 999px;
}

.floating-nav button.active {
  color: #9f8ee9;
}

.floating-nav .nav-plus {
  width: 50px;
  height: 50px;
  justify-self: center;
  color: #fff;
  background: #9f8ee9;
  box-shadow: 0 10px 24px rgba(159, 142, 233, 0.36);
}

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

.auth-screen {
  display: grid;
  align-content: start;
  overflow-y: auto;
  background: #faf9f6;
}

.loading-card {
  display: grid;
  min-height: 100%;
  place-items: center;
  gap: 12px;
  color: #777;
  text-align: center;
}

.loading-card strong {
  font-size: 0.9rem;
}

.setup-card pre {
  overflow-x: hidden;
  margin: 0;
  padding: 12px;
  color: #2c2c2c;
  background: #faf9f6;
  border: 1px solid #f0ece6;
  border-radius: 12px;
  font-size: 0.72rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.setup-card p {
  margin: 0;
  color: #777;
  font-size: 0.76rem;
  line-height: 1.55;
}

.detail-screen {
  position: relative;
  padding-bottom: 88px;
  background: #fff;
}

.detail-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  padding: 22px 16px 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent);
}

.glass-icon,
.plain-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

.plain-icon {
  color: #2c2c2c;
  background: transparent;
  backdrop-filter: none;
}

.detail-hero {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #f3f1ee;
}

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

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.hero-dots span,
.hero-dots i {
  display: block;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.56);
  border-radius: 999px;
}

.hero-dots span {
  width: 18px;
  background: #fff;
}

.pending-ribbon {
  position: absolute;
  left: 16px;
  bottom: 42px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(44, 44, 44, 0.76);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.detail-content {
  display: grid;
  gap: 16px;
  padding: 20px 20px 24px;
}

.detail-content h1 {
  margin: 0;
  color: #2c2c2c;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0;
}

.detail-tags,
.checkbox-pills,
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tags span,
.choice span,
.checkbox-pills span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  color: #777;
  background: #faf9f6;
  border: 1px solid #eee9e3;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.1;
}

.detail-tags .accent {
  color: #8c75df;
  background: #f6f3ff;
  border-color: rgba(159, 142, 233, 0.34);
}

.wish-box,
.flaw-card,
.owner-card,
.match-card,
.form-card,
.request-card,
.ticket-panel,
.warehouse-form,
.warehouse-exchange {
  background: #fff;
  border: 1px solid #f0ece6;
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(32, 29, 24, 0.045);
}

.wish-box {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  padding: 13px;
  color: #2c2c2c;
  background: rgba(232, 193, 193, 0.13);
  border-color: rgba(232, 193, 193, 0.35);
}

.wish-box svg {
  color: #c98995;
}

.wish-box strong,
.flaw-card strong,
.owner-card strong,
.match-card strong {
  font-size: 0.82rem;
}

.wish-box p,
.flaw-card p,
.owner-card p,
.match-card p {
  margin: 4px 0 0;
  color: #868686;
  font-size: 0.74rem;
  line-height: 1.55;
}

.flaw-card {
  padding: 14px;
  background: #f3efea;
  border-color: #e8e2d9;
}

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

.section-title svg {
  color: #9f8ee9;
}

.flaw-thumb {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  margin-top: 10px;
  overflow: hidden;
  place-items: center;
  color: #fff;
  background: #ded7cf;
  border-radius: 10px;
}

.flaw-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flaw-thumb svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.owner-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 0;
  box-shadow: none;
}

.owner-card > img {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
}

.owner-card div {
  min-width: 0;
}

.owner-card p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-card > span {
  max-width: 82px;
  overflow: hidden;
  padding: 5px 8px;
  color: #66765f;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(221, 229, 212, 0.68);
  border-radius: 999px;
  font-size: 0.61rem;
  font-weight: 650;
}

.match-card {
  display: grid;
  gap: 9px;
  padding: 15px;
  text-align: center;
  background: rgba(250, 249, 246, 0.72);
}

.match-card svg {
  justify-self: center;
  color: #949494;
}

.match-card.muted {
  color: #777;
  font-size: 0.78rem;
  text-align: left;
}

.match-score {
  justify-self: center;
  padding: 5px 13px;
  color: #8c75df;
  background: rgba(159, 142, 233, 0.12);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  text-align: left;
}

.match-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
}

.match-grid small,
.match-grid em {
  color: #949494;
  font-size: 0.64rem;
  font-style: normal;
}

.match-grid strong {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.detail-footer,
.submit-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px 16px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid #f0ece6;
  backdrop-filter: blur(18px);
}

.primary-pill,
.secondary-pill,
.ghost-pill,
.like-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.primary-pill {
  flex: 1;
  color: #fff;
  background: #2c2c2c;
}

.primary-pill.wide {
  width: 100%;
}

.primary-pill.compact,
.secondary-pill,
.ghost-pill {
  flex: 0 1 auto;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.76rem;
}

.primary-pill.tiny,
.ghost-pill.tiny {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 0.7rem;
}

.primary-pill.disabled,
.primary-pill:disabled {
  color: #aaa;
  background: #e8e8e8;
}

.secondary-pill {
  color: #8c75df;
  background: #f2efff;
}

.ghost-pill {
  color: #777;
  background: #f4f3f1;
}

.like-pill {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  padding: 0;
  color: #9c9c9c;
  background: #fff;
  border: 1px solid #e9e5df;
}

.like-pill.active {
  color: #e24f63;
  border-color: rgba(226, 79, 99, 0.22);
  background: rgba(226, 79, 99, 0.08);
}

.simple-header,
.welcome-header {
  position: sticky;
  top: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  padding: 22px 16px 12px;
  background: rgba(250, 249, 246, 0.92);
  border-bottom: 1px solid #f0ece6;
  backdrop-filter: blur(16px);
}

.simple-header h1,
.welcome-header h1 {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  letter-spacing: 0;
}

.publish-screen,
.profile-screen {
  display: grid;
  align-content: start;
  gap: 16px;
  padding-bottom: 104px;
}

.photo-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 16px 20px 0;
  scrollbar-width: none;
}

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

.upload-tile,
.sample-photo {
  position: relative;
  display: grid;
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  overflow: hidden;
  place-items: center;
  color: #949494;
  background: #fff;
  border: 1px dashed #ddd6cf;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(30, 27, 24, 0.05);
  font-size: 0.62rem;
}

.upload-tile input,
.flaw-upload input,
.avatar-upload input {
  display: none;
}

.upload-tile svg {
  color: #9f8ee9;
}

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

.sample-photo span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px;
  color: #fff;
  text-align: center;
  background: rgba(0, 0, 0, 0.45);
}

.form-card {
  display: grid;
  gap: 14px;
  margin: 0 20px;
  padding: 16px;
}

.form-card h2,
.ticket-panel h2,
.warehouse-form h2,
.warehouse-exchange h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0;
}

.form-card h2 i {
  display: block;
  width: 6px;
  height: 18px;
  background: #2c2c2c;
  border-radius: 999px;
}

.form-card h3 {
  margin: 0 0 8px;
  color: #949494;
  font-size: 0.72rem;
  font-weight: 600;
}

.form-card hr {
  width: 100%;
  height: 1px;
  margin: 2px 0;
  background: #f2eee8;
  border: 0;
}

.choice input,
.hidden-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice input:checked + span {
  color: #fff;
  background: #2c2c2c;
  border-color: #2c2c2c;
}

.choice-group.accent .choice input:checked + span,
.checkbox-pills .choice input:checked + span {
  color: #fff;
  background: #9f8ee9;
  border-color: #9f8ee9;
}

.choice-group.square span {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}

.choice-group.stack {
  display: grid;
  gap: 8px;
}

.choice-group.stack span {
  width: 100%;
}

.two-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.9fr);
  gap: 16px;
}

.blush-card {
  border-color: rgba(232, 193, 193, 0.36);
}

.flaw-form-card {
  background: rgba(243, 239, 234, 0.64);
}

.flaw-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.flaw-choice-row label {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: #777;
  text-align: center;
  background: #fff;
  border: 1px solid #e8e1d9;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 650;
}

#publishFlawNo:checked ~ .flaw-choice-row label[for="publishFlawNo"] {
  color: #66765f;
  background: rgba(221, 229, 212, 0.62);
  border-color: rgba(101, 120, 95, 0.28);
}

#publishFlawYes:checked ~ .flaw-choice-row label[for="publishFlawYes"] {
  color: #8c75df;
  background: rgba(159, 142, 233, 0.13);
  border-color: rgba(159, 142, 233, 0.38);
}

.flaw-panel {
  display: grid;
  max-height: 0;
  gap: 12px;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.26s ease, opacity 0.2s ease;
}

#publishFlawYes:checked ~ .flaw-panel {
  max-height: 360px;
  opacity: 1;
}

.text-field {
  display: grid;
  gap: 6px;
}

.text-field span {
  color: #949494;
  font-size: 0.68rem;
}

.text-field input,
.text-field textarea,
.warehouse-form input,
.warehouse-form select,
.warehouse-form textarea,
.profile-screen select,
.advanced-profile input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: #2c2c2c;
  background: #faf9f6;
  border: 1px solid #f0ece6;
  border-radius: 12px;
  outline: none;
}

.text-field textarea,
.warehouse-form textarea {
  min-height: 78px;
  resize: vertical;
}

.text-field small {
  color: #9f8ee9;
  font-size: 0.62rem;
}

.flaw-upload {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  color: #b7535d;
  background: rgba(255, 239, 241, 0.72);
  border: 1px dashed rgba(183, 83, 93, 0.28);
  border-radius: 12px;
}

.flaw-upload svg {
  justify-self: center;
}

.flaw-upload span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.flaw-upload small {
  color: #c87884;
  font-size: 0.64rem;
}

.publish-spacer {
  height: 8px;
}

.profile-summary {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 40px 20px 24px;
  background: #fff;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 10px 26px rgba(32, 29, 24, 0.05);
}

.settings-button {
  position: absolute;
  top: 24px;
  right: 20px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #2c2c2c;
  background: transparent;
}

.profile-summary > img {
  width: 66px;
  height: 66px;
  border-radius: 999px;
  object-fit: cover;
}

.profile-summary h1 {
  margin: 0 0 7px;
  font-size: 1.22rem;
  letter-spacing: 0;
}

.profile-summary p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.profile-summary p span {
  padding: 3px 7px;
  color: #777;
  background: #faf9f6;
  border-radius: 6px;
  font-size: 0.66rem;
}

.cred-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cred-row span {
  padding: 3px 6px;
  color: #66765f;
  background: rgba(221, 229, 212, 0.62);
  border-radius: 5px;
  font-size: 0.58rem;
}

.mine-tabs {
  position: sticky;
  top: 0;
  z-index: 22;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 18px 20px 10px;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(15px);
  scrollbar-width: none;
}

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

.mine-tabs button {
  flex: 0 0 auto;
  min-height: 32px;
  color: #949494;
  background: transparent;
  border-bottom: 2px solid transparent;
  font-size: 0.86rem;
  font-weight: 700;
}

.mine-tabs button.active {
  color: #2c2c2c;
  border-color: #2c2c2c;
}

.mine-content {
  display: grid;
  gap: 14px;
  padding: 10px 20px 0;
}

.request-card {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.request-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid #f4f1ec;
}

.request-card strong,
.published-list strong,
.warehouse-item strong,
.warehouse-record strong {
  font-size: 0.83rem;
}

.request-card p {
  margin: 3px 0 0;
  color: #858585;
  font-size: 0.73rem;
  line-height: 1.5;
}

.status {
  align-self: start;
  flex: 0 0 auto;
  min-height: 23px;
  padding: 4px 8px;
  color: #8c75df;
  background: rgba(159, 142, 233, 0.12);
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
}

.status.accepted,
.status.completed,
.status.listed {
  color: #66765f;
  background: rgba(221, 229, 212, 0.72);
}

.status.rejected {
  color: #9a6a6a;
  background: #f3e6e6;
}

.candidate-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.candidate-strip span {
  display: grid;
  flex: 0 0 66px;
  gap: 4px;
}

.candidate-strip img {
  width: 66px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
}

.candidate-strip small {
  overflow: hidden;
  color: #8c8c8c;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.58rem;
}

.contact-unlocked {
  padding: 8px 10px;
  color: #66765f;
  background: rgba(221, 229, 212, 0.42);
  border-radius: 10px;
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.muted-line,
.hint-line {
  color: #949494;
  font-size: 0.73rem;
}

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

.published-list article,
.warehouse-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(32, 29, 24, 0.045);
}

.published-list img,
.warehouse-item img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
}

.published-list p,
.warehouse-item p {
  margin: 4px 0 0;
  color: #949494;
  font-size: 0.72rem;
}

.published-list button {
  min-height: 34px;
  padding: 7px 10px;
  color: #2c2c2c;
  background: #faf9f6;
  border: 1px solid #eee9e3;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.soft-empty {
  display: grid;
  gap: 8px;
  padding: 22px;
  color: #777;
  text-align: center;
  background: #fff;
  border: 1px solid #f0ece6;
  border-radius: 18px;
}

.soft-empty strong {
  color: #2c2c2c;
}

.soft-empty p {
  margin: 0;
  font-size: 0.76rem;
}

.ticket-panel,
.warehouse-form,
.warehouse-exchange {
  display: grid;
  gap: 13px;
  padding: 16px;
}

.ticket-panel {
  color: #fff;
  background: #2c2c2c;
  border-color: #2c2c2c;
}

.ticket-panel h2 {
  color: rgba(255, 255, 255, 0.84);
}

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

.ticket-grid span {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 13px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.ticket-grid strong {
  color: #fff;
  font-size: 1.12rem;
}

.ticket-grid small,
.ticket-panel p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.66rem;
}

.ticket-panel p {
  margin: 0;
  text-align: center;
}

.warehouse-form p {
  margin: 0;
  color: #949494;
  font-size: 0.72rem;
  line-height: 1.55;
}

.warehouse-form label {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.warehouse-form label span {
  color: #777;
  font-size: 0.74rem;
}

#warehousePhotos {
  width: 100%;
  color: #777;
  font-size: 0.72rem;
}

.warehouse-records {
  display: grid;
  gap: 10px;
  padding-bottom: 6px;
}

.warehouse-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
}

.warehouse-record p {
  grid-column: 1 / -1;
  margin: 0;
  color: #949494;
  font-size: 0.7rem;
}

.admin-screen {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-bottom: 108px;
}

.admin-card {
  gap: 12px;
}

.review-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 11px;
  padding: 12px;
  background: #faf9f6;
  border: 1px solid #f0ece6;
  border-radius: 14px;
}

.review-card img {
  width: 64px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
}

.review-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.83rem;
}

.review-card p {
  margin: 0 0 4px;
  color: #858585;
  font-size: 0.7rem;
  line-height: 1.45;
}

.review-card .request-actions {
  grid-column: 1 / -1;
}

.welcome-header {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  padding: 28px 20px 10px;
  border-bottom: 0;
}

.welcome-header h1,
.welcome-header p {
  grid-column: 1 / -1;
  text-align: left;
}

.welcome-header h1 {
  margin-top: 8px;
  font-size: 1.55rem;
}

.welcome-header p {
  margin: 0;
  color: #949494;
  font-size: 0.82rem;
  line-height: 1.6;
}

.avatar-card {
  justify-items: stretch;
}

.avatar-upload {
  position: relative;
  justify-self: center;
  width: 82px;
  height: 82px;
  overflow: hidden;
  border: 1px dashed #d7d0c8;
  border-radius: 999px;
}

.avatar-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.profile-grid label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: #faf9f6;
  border-radius: 12px;
}

.profile-grid label span,
.profile-grid label small {
  color: #949494;
  font-size: 0.72rem;
}

.profile-grid input {
  width: 100%;
  min-width: 0;
  padding: 0;
  text-align: right;
  background: transparent;
  border: 0;
  outline: none;
}

.advanced-profile {
  margin: 0 20px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #f0ece6;
  border-radius: 16px;
}

.advanced-profile summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.advanced-profile .profile-grid {
  margin-top: 14px;
}

.share-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  color: #777;
  font-size: 0.74rem;
}

.reset-demo-button {
  display: inline-flex;
  width: calc(100% - 40px);
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 20px;
  color: #777;
  background: #fff;
  border: 1px solid #f0ece6;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(8px);
}

.drawer-overlay.dark {
  background: rgba(0, 0, 0, 0.7);
}

.swap-drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 90;
  display: grid;
  width: min(100vw, 430px);
  max-height: 86dvh;
  overflow: hidden;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.18);
}

.swap-drawer header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 20px 12px;
  border-bottom: 1px solid #f4f1ec;
}

.swap-drawer header > span {
  grid-column: 1 / -1;
  justify-self: center;
  width: 42px;
  height: 5px;
  background: #dedede;
  border-radius: 999px;
}

.swap-drawer h2 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.swap-drawer p {
  margin: 0;
  color: #949494;
  font-size: 0.72rem;
  line-height: 1.5;
}

.swap-drawer header button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #777;
  background: transparent;
}

.swap-drawer form {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 20px;
}

.target-line {
  padding: 10px 12px;
  color: #777;
  background: #faf9f6;
  border-radius: 12px;
  font-size: 0.75rem;
}

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

.drawer-candidate {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 24px;
  gap: 11px;
  align-items: center;
  padding: 10px;
  background: #faf9f6;
  border: 2px solid transparent;
  border-radius: 16px;
}

.drawer-candidate input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.drawer-candidate img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 12px;
}

.drawer-candidate span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.drawer-candidate strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.drawer-candidate small {
  color: #949494;
  font-size: 0.7rem;
}

.drawer-candidate i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: transparent;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  font-style: normal;
}

.drawer-candidate input:checked ~ i {
  color: #fff;
  background: #9f8ee9;
  border-color: #9f8ee9;
}

.drawer-candidate:has(input:checked) {
  background: rgba(159, 142, 233, 0.1);
  border-color: #9f8ee9;
}

.swap-drawer textarea {
  width: 100%;
  min-height: 68px;
  padding: 10px 12px;
  background: #faf9f6;
  border: 1px solid #f0ece6;
  border-radius: 12px;
  outline: none;
  resize: vertical;
}

.image-preview {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 95;
  display: grid;
  width: min(88vw, 360px);
  gap: 12px;
  transform: translate(-50%, -50%);
  color: #fff;
}

.image-preview button {
  justify-self: end;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.image-preview img {
  width: 100%;
  max-height: 70dvh;
  object-fit: contain;
  border-radius: 16px;
}

.image-preview p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (min-width: 431px) {
  .mvp-page {
    padding: 18px;
  }

  .mvp-phone {
    height: min(100dvh - 36px, 880px);
    border-radius: 28px;
  }
}

@media (max-width: 360px) {
  .market-copy {
    padding: 9px;
  }

  .market-copy strong {
    font-size: 0.76rem;
  }

  .owner-row {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .owner-row em {
    display: none;
  }

  .two-fields,
  .profile-grid,
  .match-grid {
    grid-template-columns: 1fr;
  }

  .detail-footer,
  .submit-footer {
    padding-inline: 12px;
  }
}

/* Self-hosted pilot app */
.auth-page.single {
  grid-template-columns: minmax(280px, 720px);
  justify-content: center;
}

.auth-copy code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.92em;
}

.profile-card {
  width: min(720px, 100%);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 40;
  display: none;
  width: min(420px, calc(100% - 24px));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(234, 223, 217, 0.9);
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: 0 18px 60px rgba(58, 23, 38, 0.16);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.chip {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.chip.active,
.chip:hover {
  color: #fff;
  background: var(--berry);
  border-color: var(--berry);
}

.card-body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.owner-line {
  padding-top: 2px;
}

.like-button {
  flex: 0 0 auto;
  color: #b7535d;
}

.like-button.active {
  color: #fff;
  background: #b7535d;
  border-color: #b7535d;
}

.checkbox-field {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.checkbox-field input {
  accent-color: var(--rose);
}

.modal-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: min(90vh, 920px);
  overflow: auto;
  padding: 18px;
  background: rgba(255, 253, 250, 0.96);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1fr);
  gap: 18px;
}

.detail-gallery {
  display: grid;
  gap: 10px;
}

.detail-gallery img {
  width: 100%;
  max-height: 68vh;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-strong);
}

.detail-copy {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding-right: 34px;
}

.detail-copy h2,
.swap-form h3 {
  margin: 0;
}

.detail-copy p,
.swap-form p {
  margin: 0;
  color: var(--muted);
}

.swap-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.candidate-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(250, 249, 246, 0.85);
}

.candidate-list input {
  accent-color: var(--rose);
}

.swap-form textarea {
  width: 100%;
  min-height: 78px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  resize: vertical;
}

.swap-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin-top: 10px;
  box-shadow: none;
}

.swap-row p {
  margin: 4px 0 0;
}

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

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.inline-form select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.contact-box {
  padding: 10px 12px;
  border: 1px solid #ead29c;
  border-radius: 8px;
  background: #fff7e5;
  color: #74512b !important;
  font-weight: 700;
}

.admin-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  margin-top: 10px;
  box-shadow: none;
}

.admin-row.text-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-row img {
  width: 92px;
  height: 116px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-strong);
}

.admin-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.simple-card {
  box-shadow: 0 10px 28px rgba(58, 23, 38, 0.08);
}

.timeline-panel,
.form-panel {
  padding: 16px;
  margin-bottom: 18px;
}

.field.full button,
button.field.full {
  width: 100%;
}

@media (max-width: 820px) {
  .auth-page {
    grid-template-columns: 1fr;
    padding-bottom: 72px;
  }

  .proof-grid,
  .metric-strip,
  .closet-grid {
    grid-template-columns: 1fr;
  }

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

  .desktop-nav {
    display: none;
  }

  .bottom-nav {
    display: grid;
  }

  .page {
    width: min(100% - 24px, 430px);
    padding-bottom: 92px;
  }

  .market-hero,
  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

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

  .detail-copy {
    padding-right: 0;
  }

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

  .swap-row,
  .admin-row,
  .admin-row.text-row {
    grid-template-columns: 1fr;
  }

  .admin-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .swap-actions,
  .inline-form,
  .button-row.end {
    justify-content: stretch;
  }

  .swap-actions > *,
  .inline-form > *,
  .button-row.end > * {
    flex: 1 1 100%;
  }
}
