/* ==========================================================================
   速汇佳缘 · 红娘工作台
   Design tokens → layout → components
   ========================================================================== */

:root {
  --brand: #d4496a;
  --brand-strong: #b93a59;
  --brand-soft: #fdedf1;
  --brand-line: #f7d6de;
  --gold: #b98a46;
  --gold-soft: #fbf4e8;

  --bg: #f6f2ef;
  --bg-deep: #efe8e3;
  --surface: #ffffff;
  --surface-2: #fbf8f6;
  --surface-3: #f5efeb;

  --ink: #2a2226;
  --ink-2: #6f6367;
  --ink-3: #9c9095;
  --ink-4: #bfb4b6;

  --line: #ece3df;
  --line-soft: #f3ece8;

  --ok: #2f9e75;
  --ok-soft: #e9f7f1;
  --warn: #c4822a;
  --warn-soft: #fdf3e3;
  --danger: #cf4b44;
  --danger-soft: #fdeeed;
  --info: #4b7bc9;
  --info-soft: #eef3fc;

  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 9px;

  --sh-1: 0 1px 2px rgba(42, 34, 38, 0.04), 0 2px 8px -4px rgba(42, 34, 38, 0.06);
  --sh-2: 0 18px 44px -24px rgba(42, 34, 38, 0.28), 0 2px 8px rgba(42, 34, 38, 0.04);
  --sh-3: 0 32px 80px -32px rgba(42, 34, 38, 0.35);

  --sidebar: 248px;
  --tabbar: 62px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}
body.is-locked { overscroll-behavior: none; }

h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg:not([class]) { width: 1em; height: 1em; flex: none; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand-soft); color: var(--brand-strong); }

:focus-visible {
  outline: 2px solid rgba(212, 73, 106, 0.5);
  outline-offset: 2px;
}

/* ---------- boot ---------- */
.boot {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--brand);
}
.boot__mark { width: 52px; height: 52px; animation: pulse 1.8s var(--ease) infinite; }
.boot__mark svg { width: 100%; height: 100%; }
.boot__text { color: var(--ink-3); letter-spacing: 0.3em; font-size: 12px; margin-left: 0.3em; }
@keyframes pulse { 0%, 100% { opacity: 0.55; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1); } }

/* ==========================================================================
   Shell
   ========================================================================== */
.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
}

.sidebar { display: none; }

.main {
  min-width: 0;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 20px);
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  animation: pageIn 0.34s var(--ease);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* page header */
.page-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 0 12px;
  margin-bottom: 4px;
  background: linear-gradient(to bottom, var(--bg) 62%, rgba(246, 242, 239, 0.86) 88%, rgba(246, 242, 239, 0));
  backdrop-filter: blur(6px);
}
.page-head__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-head__sub {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.page-head__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.brandmark {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #e97a90);
  display: grid; place-items: center;
  color: #fff;
  flex: none;
  box-shadow: 0 4px 10px -4px rgba(212, 73, 106, 0.7);
}
.brandmark svg { width: 16px; height: 16px; }

/* ==========================================================================
   Bottom tabbar
   ========================================================================== */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line-soft);
}
.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 10.5px;
  padding: 6px 0 4px;
  position: relative;
  transition: color 0.18s;
}
.tabbar__item svg { width: 21px; height: 21px; }
.tabbar__item.is-active { color: var(--brand); font-weight: 600; }
.tabbar__item.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 18px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--brand);
}
.tabbar__item:active { opacity: 0.6; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s, opacity 0.2s;
  box-shadow: var(--sh-1);
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: linear-gradient(135deg, #db5775, var(--brand));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 20px -12px rgba(212, 73, 106, 0.9);
}
.btn--primary:hover { background: linear-gradient(135deg, #e06180, #c93f60); }
.btn--soft { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-strong); box-shadow: none; }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-3); }
.btn--danger { background: var(--danger-soft); border-color: #f7d4d1; color: var(--danger); box-shadow: none; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn--loading { position: relative; color: transparent !important; }
.btn--loading::after {
  content: "";
  position: absolute;
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn--ghost.btn--loading::after, .btn:not(.btn--primary).btn--loading::after {
  border-color: rgba(42, 34, 38, 0.2);
  border-top-color: var(--ink-2);
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 34px; height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

/* ==========================================================================
   Inputs
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.field__label .req { color: var(--brand); }
.field__hint { font-size: 11.5px; color: var(--ink-4); }

.input, .select, .textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #e5a2b3;
  box-shadow: 0 0 0 3px rgba(212, 73, 106, 0.1);
}
.field.is-error .input,
.field.is-error .select,
.field.is-error .textarea {
  border-color: var(--danger);
  background: #fff7f6;
  box-shadow: 0 0 0 3px rgba(200, 60, 60, 0.08);
}
.field.is-error .field__label { color: var(--danger); }
.range-row.is-error .input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(200, 60, 60, 0.08);
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c9095' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.form-section + .form-section { margin-top: 22px; }
.form-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.form-section__title::before {
  content: "";
  width: 3px; height: 12px;
  border-radius: 2px;
  background: linear-gradient(var(--brand), #f0a1b2);
}

/* segmented / chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 2px 16px;
}
.chips--scroll::-webkit-scrollbar { display: none; }
.chip {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s;
}
.chip:hover { border-color: #e3d3cf; }
.chip.is-active {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand-strong);
  font-weight: 600;
}
.chip__count { font-size: 11px; opacity: 0.65; }

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--surface-3);
  color: var(--ink-2);
  white-space: nowrap;
}
.badge--pending { background: var(--warn-soft); color: #a86c1d; }
.badge--deal, .badge--success { background: var(--ok-soft); color: #1f7f5c; }
.badge--after_sale { background: var(--info-soft); color: #3a67ac; }
.badge--contacted { background: var(--info-soft); color: #3a67ac; }
.badge--meeting { background: #f3eefc; color: #6a4bb5; }
.badge--fail { background: #f4f1f0; color: var(--ink-3); }
.badge--male { background: #eef4fd; color: #3c6fb5; }
.badge--female { background: #fdeff4; color: #c04b72; }
.badge--top { background: var(--gold-soft); color: var(--gold); }

.gender {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 11px;
  flex: none;
}
.gender--male { background: #eaf2fd; color: #3c6fb5; }
.gender--female { background: #fdeff4; color: #c04b72; }

/* ==========================================================================
   Avatar
   ========================================================================== */
.avatar {
  position: relative;
  flex: none;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
  user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--round { border-radius: 50%; }
.avatar__fallback {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  font-size: 0.42em;
}

/* ==========================================================================
   Cards / lists
   ========================================================================== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 4px 0 16px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  box-shadow: var(--sh-1);
  position: relative;
  overflow: hidden;
}
.stat__label { font-size: 11.5px; color: var(--ink-3); }
.stat__value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.stat__value small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.stat--brand { background: linear-gradient(135deg, #fdf1f4, #fff); border-color: var(--brand-line); }
.stat--brand .stat__value { color: var(--brand-strong); }

.toolbar {
  position: sticky;
  top: var(--head-h, 68px);
  z-index: 14;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 0 10px;
  background: linear-gradient(to bottom, var(--bg) 72%, rgba(246, 242, 239, 0));
}
.search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.search svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--ink-4);
  pointer-events: none;
}
.search .input { padding-left: 35px; height: 40px; border-radius: 12px; background: var(--surface); }
.toolbar__sort {
  height: 40px;
  width: auto;
  min-width: 96px;
  border-radius: 12px;
  background-color: var(--surface);
}

.filter-btn { height: 40px; border-radius: 12px; padding: 0 13px; position: relative; }
.filter-btn__dot {
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
  margin-left: 1px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 10px;
}
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 6px 0 9px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-2);
}
.filter-tag button {
  border: 0; background: none; padding: 0;
  width: 16px; height: 16px;
  display: grid; place-items: center;
  color: var(--ink-4);
  cursor: pointer;
  border-radius: 4px;
}
.filter-tag button:hover { background: var(--surface-3); color: var(--ink); }
.filter-tag svg { width: 11px; height: 11px; }

.list { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.list > * { min-width: 0; }

/* client card */
.client-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.client-card:active { transform: scale(0.988); }
@media (hover: hover) {
  .client-card:hover { box-shadow: var(--sh-2); border-color: #e8dcd7; transform: translateY(-1px); }
}
.client-card__cover { width: 64px; height: 64px; border-radius: 13px; font-size: 64px; }
.client-card__body { flex: 1; min-width: 0; }
.client-card__row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.client-card__name {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-card__meta {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-2);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.client-card__meta span + span::before { content: "·"; margin: 0 5px; color: var(--ink-4); }
.client-card__tags { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-3);
  border: 1px solid var(--line-soft);
  white-space: nowrap;
}
.tag--silk { background: var(--gold-soft); color: var(--gold); border-color: #f3e6cf; }
.tag--rose { background: var(--brand-soft); color: var(--brand-strong); border-color: var(--brand-line); }
.client-card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.client-card__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* 资料图入口（客户详情操作区） */
.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.score {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 11px;
  color: var(--ink-3);
}
.score b { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }

.list-foot {
  text-align: center;
  padding: 18px 0 8px;
  font-size: 12px;
  color: var(--ink-4);
}
.list-foot .btn { margin-top: 6px; }

/* matchmaker card */
.mm-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--sh-1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mm-card__top { display: flex; align-items: center; gap: 11px; }
.mm-card__id { flex: 1; min-width: 0; }
.mm-card__name { font-size: 15.5px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.mm-card__phone {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.mm-card__copy {
  width: 22px; height: 22px;
  border: 0;
  background: none;
  color: var(--ink-4);
  display: grid;
  place-items: center;
  border-radius: 6px;
}
.mm-card__copy svg { width: 13px; height: 13px; }
.mm-card__copy:hover { color: var(--brand); background: var(--brand-soft); }
.mm-card__remark { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.mm-card__login { font-size: 11px; color: var(--ink-4); margin-top: 3px; }
.mm-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 8px 0;
}
.mm-card__stat { text-align: center; }
.mm-card__stat b { display: block; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mm-card__stat span { font-size: 11px; color: var(--ink-3); }
.mm-card__actions { display: flex; gap: 8px; }

/* match card */
.match-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--sh-1);
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.2s;
}
.match-card:active { transform: scale(0.99); }
@media (hover: hover) {
  .match-card:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
}
.match-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.match-pair { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.pair-person { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.pair-person .avatar { flex: none; }
.pair-person__info { min-width: 0; flex: 1; }
.pair-person__name {
  font-size: 14.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 8em;
}
.pair-person__meta {
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.pair-person--right { flex-direction: row-reverse; text-align: right; }
.pair-heart {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #fdeef2, #fbe4ea);
  color: var(--brand);
  flex: none;
}
.pair-heart svg { width: 15px; height: 15px; }
.match-card__meta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.match-card__mms { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.match-card__mms b { color: var(--ink-2); font-weight: 500; }

/* ==========================================================================
   Section / empty / skeleton
   ========================================================================== */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 10px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
}

.empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 56px 20px;
  text-align: center;
  color: var(--ink-3);
}
.empty__art { width: 96px; height: 96px; color: var(--brand); opacity: 0.28; margin-bottom: 4px; }
.empty__title { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.empty__text { font-size: 12.5px; color: var(--ink-3); max-width: 260px; }

.skeleton {
  background: linear-gradient(90deg, #f3ece8 25%, #faf6f3 37%, #f3ece8 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.sk-card { height: 90px; border-radius: var(--r-lg); }

/* ==========================================================================
   Sheet / modal
   ========================================================================== */
/* 层级由 JS 按打开顺序动态分配（内联 z-index），这里只负责交互与动画 */
.layer { position: fixed; inset: 0; pointer-events: none; }
/* 关键：layer 自身不拦截事件，但遮罩与面板必须可点击。
   父级 pointer-events: none 会被子元素继承，之前弹层点不动的根因就在这里。 */
.layer__mask,
.layer > .sheet,
.layer > .dialog,
.layer > .lightbox { pointer-events: auto; }
.layer.is-closing,
.layer.is-closing * { pointer-events: none !important; }
.layer__mask {
  position: absolute;
  inset: 0;
  background: rgba(38, 28, 32, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
  overscroll-behavior: contain;
}
.layer.is-visible .layer__mask { opacity: 1; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 92dvh;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--sh-3);
  display: flex;
  flex-direction: column;
  transform: translateY(102%);
  transition: transform 0.36s var(--ease);
  overflow: hidden;
}
.layer.is-visible .sheet { transform: none; }
.sheet__grip {
  width: 36px; height: 4px;
  border-radius: 3px;
  background: #ded2cd;
  margin: 8px auto 0;
  flex: none;
}
.sheet__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 12px;
  flex: none;
}
.sheet__title {
  font-size: 16.5px;
  font-weight: 650;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sheet__sub { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-top: 1px; }
.sheet__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px 18px;
  -webkit-overflow-scrolling: touch;
}
.sheet__foot {
  flex: none;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-soft);
}
.sheet__foot .btn { flex: 1; height: 44px; }
.sheet__foot .btn--flex-none { flex: none; width: auto; padding: 0 18px; }
.sheet--full { height: 92dvh; }

/* detail blocks */
.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 10px;
}
.panel__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.kv { min-width: 0; }
.kv__k { font-size: 11.5px; color: var(--ink-3); }
.kv__v { font-size: 13.5px; color: var(--ink); margin-top: 1px; word-break: break-word; }
.kv--full { grid-column: 1 / -1; }
.kv__copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font: inherit;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s;
}
.kv__copy svg { width: 12px; height: 12px; }
.kv__copy:hover { background: #fbe0e8; border-color: var(--brand-line); }
.kv__copy:active { transform: scale(0.97); }
.prose {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.prose--muted { color: var(--ink-3); }

.detail-hero {
  position: relative;
  margin: 0 -16px 14px;
  padding: 0 16px 16px;
  background: linear-gradient(180deg, #fdf3f6 0%, rgba(253, 243, 246, 0) 100%);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.detail-hero__cover { width: 92px; height: 92px; border-radius: 18px; font-size: 92px; box-shadow: var(--sh-2); }
.detail-hero__main { flex: 1; min-width: 0; padding-top: 4px; }
.detail-hero__name { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 7px; }
.detail-hero__line { margin-top: 4px; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.detail-hero__badges { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px 4px;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img {
  width: 92px; height: 118px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  flex: none;
  cursor: zoom-in;
  background: var(--surface-3);
}

.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}
.timeline__item { position: relative; padding-bottom: 14px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -20px; top: 4px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-line);
}
.timeline__item:first-child .timeline__dot { border-color: var(--brand); background: var(--brand); }
.timeline__head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.timeline__head b { color: var(--ink-2); font-weight: 600; }
.timeline__text { font-size: 13px; color: var(--ink); margin-top: 2px; line-height: 1.6; word-break: break-word; }

.log-input { display: flex; gap: 8px; margin-top: 12px; }
.log-input .input { flex: 1; }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 16, 0.92);
  display: grid;
  place-items: center;
  padding: 24px;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.18s var(--ease);
}
.lightbox.is-visible { opacity: 1; }
.lightbox img {
  max-width: 100%;
  max-height: 88dvh;
  border-radius: 10px;
  transform: scale(0.97);
  transition: transform 0.2s var(--ease);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.lightbox.is-visible img { transform: none; }
.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}
.lightbox__nav svg { width: 20px; height: 20px; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__nav:active { background: rgba(255, 255, 255, 0.24); }
.lightbox__count {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

/* toast */
.toasts {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(42, 34, 38, 0.92);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.3s var(--ease);
  backdrop-filter: blur(8px);
  max-width: 100%;
}
.toast svg { width: 15px; height: 15px; flex: none; }
.toast--ok svg { color: #7ee0b4; }
.toast--err svg { color: #ff9c96; }
.toast.is-out { animation: toastOut 0.25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(0.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(0.97); } }

/* confirm dialog */
.dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(360px, calc(100vw - 40px));
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--sh-3);
  opacity: 0;
  transition: opacity 0.22s, transform 0.28s var(--ease);
}
.layer.is-visible .dialog { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.dialog__title { font-size: 16px; font-weight: 650; }
.dialog__text { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.65; white-space: pre-wrap; }
.dialog__actions { display: flex; gap: 8px; margin-top: 18px; }
.dialog__actions .btn { flex: 1; height: 40px; }

/* autocomplete（挂到 #layer 下做 fixed 定位，避免被弹层滚动区裁剪） */
.ac { position: relative; }
.ac__menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  max-height: min(280px, 42dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px;
  display: none;
}
.ac__menu.is-open { display: block; animation: acIn 0.14s var(--ease); }
@keyframes acIn { from { opacity: 0; transform: translateY(-4px); } }
.ac__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.ac__item:hover, .ac__item.is-active { background: var(--brand-soft); }
.ac__item b { font-weight: 600; }
.ac__item span { color: var(--ink-3); font-size: 11.5px; }
.ac__empty { padding: 10px; font-size: 12.5px; color: var(--ink-4); text-align: center; }

/* uploader */
.uploader { display: flex; flex-wrap: wrap; gap: 8px; }
.uploader__item { position: relative; width: 78px; height: 100px; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.uploader__item img { width: 100%; height: 100%; object-fit: cover; }
.uploader__item.is-cover { outline: 2px solid var(--brand); outline-offset: -2px; }
.uploader__item .cover-flag {
  position: absolute; left: 4px; top: 4px;
  font-size: 9.5px; padding: 1px 5px;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
}
.uploader__del {
  position: absolute; right: 3px; top: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, 0.55); color: #fff;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.uploader__del svg { width: 11px; height: 11px; }
.uploader__setcover {
  position: absolute; left: 0; right: 0; bottom: 0;
  border: 0; background: rgba(0, 0, 0, 0.45); color: #fff;
  font-size: 10px; padding: 3px 0; cursor: pointer;
}
.uploader__add {
  width: 78px; height: 100px;
  border-radius: 10px;
  border: 1px dashed #dccdc7;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--ink-3);
  font-size: 11px;
  cursor: pointer;
}
.uploader__add svg { width: 20px; height: 20px; }
.uploader__add:hover { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }

/* range row */
.range-row { display: flex; align-items: center; gap: 8px; }
.range-row .input { text-align: center; padding: 0 8px; }
.range-row__sep { color: var(--ink-4); font-size: 12px; flex: none; }

.slider { display: flex; align-items: center; gap: 10px; }
.slider input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--brand) var(--p, 50%), #eee5e1 var(--p, 50%));
  outline: none;
}
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  box-shadow: 0 2px 6px rgba(212, 73, 106, 0.3);
  cursor: pointer;
}
.slider input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  cursor: pointer;
}
.slider output {
  width: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Login
   ========================================================================== */
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  background:
    radial-gradient(120% 60% at 100% 0%, #fdeef2 0%, rgba(253, 238, 242, 0) 60%),
    radial-gradient(100% 50% at 0% 100%, #f7f0e6 0%, rgba(247, 240, 230, 0) 55%),
    var(--bg);
}
.login__panel { display: none; }
.login__form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom, 0px));
  min-height: 100dvh;
}
.login__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.login__brand-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e05f7d, #c93f60);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(212, 73, 106, 0.9);
}
.login__brand-mark svg { width: 26px; height: 26px; }
.login__brand-text b { display: block; font-size: 16px; letter-spacing: 0.04em; }
.login__brand-text span { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.12em; }
.login__title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.login__desc { color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.login__card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--sh-2);
  border: 1px solid rgba(255, 255, 255, 0.8);
  margin-top: 22px;
  display: grid;
  gap: 14px;
}
.login__hint {
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.8;
}
.login__hint b { color: var(--ink-2); font-weight: 600; }
.login__error {
  display: none;
  font-size: 12.5px;
  color: var(--danger);
  background: var(--danger-soft);
  padding: 8px 12px;
  border-radius: 9px;
}
.login__error.is-show { display: block; animation: pageIn 0.2s; }

/* ==========================================================================
   Account
   ========================================================================== */
.profile-card {
  background: linear-gradient(135deg, #fff 0%, #fdf5f7 100%);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-xl);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--sh-1);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.profile-card::after {
  content: "";
  position: absolute;
  right: -30px; top: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 73, 106, 0.1), transparent 65%);
}
.profile-card__info { min-width: 0; }
.profile-card__name { font-size: 19px; font-weight: 700; }
.profile-card__meta { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

.menu-list {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  width: 100%;
  background: none;
  text-align: left;
}
.menu-item + .menu-item { border-top: 1px solid var(--line-soft); }
.menu-item svg { width: 18px; height: 18px; color: var(--ink-3); }
.menu-item .chev { margin-left: auto; color: var(--ink-4); }
.menu-item--danger { color: var(--danger); }
.menu-item--danger svg { color: var(--danger); }

/* notice */
.notice-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 15px;
  box-shadow: var(--sh-1);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.16s var(--ease);
}
.notice-card:hover { box-shadow: var(--sh-2); }
.notice-card__title { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.notice-card__meta { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.notice-card__excerpt {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.notice-card__actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ==========================================================================
   Picker / match form / filters
   ========================================================================== */
.pick-list__inner { display: grid; gap: 6px; }
.pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, transform 0.14s var(--ease);
}
.pick-item:hover { border-color: var(--brand-line); background: #fffafb; }
.pick-item:active { transform: scale(0.99); }
.pick-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-item__name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pick-item__meta {
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-form { display: grid; gap: 10px; }
.picker-slot {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  border: 1px dashed #ddcdc7;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}
.picker-slot:hover { border-color: var(--brand-line); background: #fffbfc; }
.picker-slot.is-filled { border-style: solid; border-color: var(--line); background: var(--surface); }
.picker-slot__label {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.picker-slot__empty {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 13.5px;
}
.picker-slot__empty svg { width: 16px; height: 16px; }
.picker-slot__person { display: flex; align-items: center; gap: 10px; }
.picker-slot__person b { display: block; font-size: 14.5px; font-weight: 650; }
.picker-slot__person em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.picker-slot__action { font-size: 12px; color: var(--brand-strong); flex: none; }
.match-form__heart {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  margin: -4px auto;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}
.match-form__heart svg { width: 13px; height: 13px; }

.filter-body { display: grid; gap: 18px; }
.filter-group__label {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 7px;
}
.filter-group .range-row .input { height: 38px; background: var(--surface); }

/* match detail */
.match-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 18px;
}
.match-hero__person {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: var(--r-md);
  transition: background 0.16s;
}
.match-hero__person:hover { background: var(--surface); }
.match-hero__person b { font-size: 15px; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-hero__person span { font-size: 11.5px; color: var(--ink-3); text-align: center; }
.match-hero__person em {
  font-style: normal;
  font-size: 11px;
  color: var(--brand-strong);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}
.match-hero__person em svg { width: 12px; height: 12px; }
.match-hero__heart {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fdeef2, #fbe4ea);
  color: var(--brand);
}
.match-hero__heart svg { width: 16px; height: 16px; }

.match-card__mms span { white-space: nowrap; }

@media (min-width: 900px) {
  .login__brand { display: none; }
  .kv-grid { grid-template-columns: 1fr 1fr 1fr; }
  .match-hero__person .avatar { width: 84px !important; height: 84px !important; }
}

@media (max-width: 420px) {
  .client-card__match { padding: 0 10px; height: 30px; font-size: 12px; }
  .client-card__match svg { width: 14px; height: 14px; }
}

.nowrap { white-space: nowrap; }
.text-brand { color: var(--brand-strong); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ==========================================================================
   Desktop
   ========================================================================== */
@media (min-width: 900px) {
  .shell { grid-template-columns: var(--sidebar) 1fr; }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 22px 14px 16px;
    background: rgba(255, 255, 255, 0.72);
    border-right: 1px solid var(--line-soft);
    backdrop-filter: blur(12px);
  }
  .sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 22px;
  }
  .sidebar__brand-mark {
    width: 36px; height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e05f7d, #c93f60);
    display: grid; place-items: center;
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(212, 73, 106, 0.9);
    flex: none;
  }
  .sidebar__brand-mark svg { width: 21px; height: 21px; }
  .sidebar__brand b { display: block; font-size: 14.5px; letter-spacing: 0.04em; }
  .sidebar__brand span { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.1em; }

  .nav { display: flex; flex-direction: column; gap: 3px; }
  .nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 11px;
    border-radius: 11px;
    border: 0;
    background: none;
    color: var(--ink-2);
    font-size: 13.5px;
    cursor: pointer;
    position: relative;
    transition: background 0.16s, color 0.16s;
    text-align: left;
  }
  .nav__item svg { width: 18px; height: 18px; color: var(--ink-3); transition: color 0.16s; }
  .nav__item:hover { background: var(--surface-2); color: var(--ink); }
  .nav__item.is-active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-weight: 600;
  }
  .nav__item.is-active svg { color: var(--brand); }
  .nav__item.is-active::before {
    content: "";
    position: absolute;
    left: -14px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 18px;
    border-radius: 0 3px 3px 0;
    background: var(--brand);
  }
  .nav__count {
    margin-left: auto;
    font-size: 11px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
  }

  .sidebar__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); }
  .sidebar__user { display: flex; align-items: center; gap: 9px; padding: 6px 6px 10px; }
  .sidebar__user .avatar { width: 34px; height: 34px; font-size: 34px; }
  .sidebar__user b { display: block; font-size: 13px; font-weight: 600; }
  .sidebar__user span { font-size: 11px; color: var(--ink-3); }
  .sidebar__foot .btn { width: 100%; }

  .tabbar { display: none; }
  .main { padding-bottom: 40px; }
  .page { padding: 0 28px; }
  .page-head { padding-top: 26px; }
  .page-head__title { font-size: 25px; }

  .stat-strip { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list--one { grid-template-columns: minmax(0, 1fr); }
  .list--three { grid-template-columns: repeat(3, 1fr); }
  .client-card { padding: 14px; }
  .client-card__cover { width: 72px; height: 72px; font-size: 72px; }

  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .field--full { grid-column: 1 / -1; }

  .sheet {
    left: 50%;
    top: 50%;
    bottom: auto;
    right: auto;
    width: min(720px, calc(100vw - 80px));
    max-height: 88dvh;
    border-radius: 22px;
    transform: translate(-50%, -46%) scale(0.98);
    opacity: 0;
    transition: transform 0.32s var(--ease), opacity 0.24s;
  }
  .layer.is-visible .sheet { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet--wide { width: min(880px, calc(100vw - 80px)); }
  .sheet--narrow { width: min(480px, calc(100vw - 80px)); }
  .sheet__grip { display: none; }
  .sheet__head { padding: 18px 22px 12px; }
  .sheet__body { padding: 0 22px 20px; }
  .sheet__foot { padding: 14px 22px; }
  .sheet__foot .btn { flex: none; min-width: 96px; }
  .sheet__foot .grow { flex: 1; }

  .detail-hero { margin: 0 -22px 16px; padding: 4px 22px 18px; }
  .gallery { margin: 0 -22px; padding: 0 22px 4px; }

  .login { grid-template-columns: 1.05fr 1fr; }
  .login__panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, #c94262 0%, #d4496a 38%, #b6385a 100%);
    color: #fff;
  }
  .login__panel::before {
    content: "";
    position: absolute;
    width: 520px; height: 520px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    right: -180px; top: -160px;
  }
  .login__panel::after {
    content: "";
    position: absolute;
    width: 360px; height: 360px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    left: -120px; bottom: -140px;
  }
  .login__panel-brand { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
  .login__panel-brand svg { width: 30px; height: 30px; }
  .login__panel-brand b { font-size: 16px; letter-spacing: 0.06em; font-weight: 600; }
  .login__panel-main { position: relative; z-index: 1; max-width: 380px; }
  .login__panel-main h2 {
    font-size: 34px;
    line-height: 1.32;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  .login__panel-main h2 em {
    font-style: normal;
    position: relative;
    white-space: nowrap;
  }
  .login__panel-main h2 em::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 2px;
    height: 8px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
  }
  .login__panel-main p { margin-top: 14px; font-size: 13.5px; color: rgba(255, 255, 255, 0.78); line-height: 1.9; }
  .login__panel-foot { position: relative; z-index: 1; font-size: 12px; color: rgba(255, 255, 255, 0.6); display: flex; gap: 18px; }
  .login__form-wrap { padding: 44px max(48px, 8vw); max-width: 560px; margin: 0 auto; width: 100%; }
  .login__title { font-size: 30px; }
  .login__card { padding: 24px; }
}

@media (min-width: 1180px) {
  .list--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   细节补充
   -------------------------------------------------------------------------- */
.pwd-wrap { position: relative; }
.pwd-wrap .input { padding-right: 42px; }
.pwd-eye {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-4);
  display: grid;
  place-items: center;
}
.pwd-eye svg { width: 16px; height: 16px; }
.pwd-eye.is-on { color: var(--brand); background: var(--brand-soft); }

.profile-card__last { font-size: 11.5px; color: var(--ink-4); margin-top: 3px; }
.notice-detail__top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 11.5px;
}
.notice-detail__top svg { width: 12px; height: 12px; }
.picker-slot__mm { color: var(--brand-strong) !important; }
.uploader__add:disabled { opacity: 0.55; pointer-events: none; }
.uploader__add.is-uploading { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }

/* ==========================================================================
   客户资料图
   ========================================================================== */
.poster { display: flex; flex-direction: column; gap: 8px; }
.poster__bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 6px 0 10px;
  background: linear-gradient(to bottom, var(--surface) 76%, rgba(255, 255, 255, 0));
}
.poster-chip {
  height: 30px;
  padding: 0 11px 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.16s;
}
.poster-chip::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 4px;
  border: 1.4px solid var(--ink-4);
  background: #fff;
  box-sizing: border-box;
  transition: all 0.16s;
}
.poster-chip:active { transform: scale(0.95); }
.poster-chip.is-on {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand-strong);
  font-weight: 600;
}
.poster-chip.is-on::before {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: inset 0 0 0 2.5px var(--brand-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E");
  background-size: 11px 11px;
  background-position: center;
  background-repeat: no-repeat;
}

.poster__stage {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 14px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 50% 0%, #fff 0%, var(--surface-3) 70%);
  border: 1px solid var(--line-soft);
}
.poster__stage img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 60dvh;
  border-radius: 12px;
  box-shadow: 0 18px 44px -22px rgba(42, 34, 38, 0.45), 0 2px 8px rgba(42, 34, 38, 0.06);
  cursor: zoom-in;
  animation: pageIn 0.22s var(--ease);
}
.poster__loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 13px;
}
.poster__spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--brand-line);
  border-top-color: var(--brand);
  animation: spin 0.7s linear infinite;
}
.poster__hint {
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-4);
}
@media (min-width: 900px) {
  .poster__stage img { max-height: 66dvh; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
