/* 见匠 · 视觉系统
   暖纸、陶土、墨绿 —— 像一本手作目录 */

:root {
  --bg: #F6F1E7;
  --surface: #FFFCF6;
  --surface-2: #F1E8D8;
  --ink: #221D16;
  --ink-2: #4B4338;
  --muted: #857968;
  --line: rgba(34, 29, 22, 0.11);
  --clay: #A94E2E;
  --clay-deep: #8A3A1F;
  --moss: #33513E;
  --gold: #B58A33;
  --shadow: 0 18px 40px -30px rgba(45, 33, 20, 0.5);
  color-scheme: light;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 12% -8%, #EFE4D0 0%, transparent 62%),
    #E7DDCB;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

body.sheet-open,
body.overlay-open { overflow: hidden; }

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p, figure, ol, ul {
  margin: 0;
}

ol, ul { padding: 0; }

svg { display: block; }

::selection {
  background: rgba(169, 78, 46, 0.2);
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.shell {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  background:
    radial-gradient(520px 300px at 92% 0%, rgba(181, 138, 51, 0.1), transparent 66%),
    radial-gradient(420px 280px at 4% 38%, rgba(169, 78, 46, 0.045), transparent 70%),
    var(--bg);
}

@media (min-width: 600px) {
  .shell {
    box-shadow:
      0 0 0 1px rgba(34, 29, 22, 0.06),
      0 50px 100px -60px rgba(40, 30, 18, 0.65);
  }
}

main { outline: none; }

#app > * {
  animation: rise 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* 固定定位元素自己负责入场，避免动画覆盖它们的 translateX(-50%) 居中 */
#app > .chat-screen,
#app > .cta-bar {
  animation: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheetUp {
  from { opacity: 0.6; transform: translate(-50%, 100%); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 通用 ---------- */

.ic {
  width: 20px;
  height: 20px;
  flex: none;
}

.ic.filled {
  fill: currentColor;
  stroke: currentColor;
}

.accent { color: var(--clay); }

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--clay);
}

.lede {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.avatar {
  --a: #C2603F;
  --b: #7A2E1C;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--a), var(--b));
  color: #FFF8EC;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 6px 14px -10px rgba(0, 0, 0, 0.55);
}

.avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 74% 12%, rgba(255, 255, 255, 0.35), transparent 52%);
  pointer-events: none;
}

.avatar.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 25px; }
.avatar.xl { width: 68px; height: 68px; border-radius: 21px; font-size: 30px; }
.avatar.md { width: 48px; height: 48px; border-radius: 16px; font-size: 21px; }
.avatar.sm { width: 38px; height: 38px; border-radius: 12px; font-size: 17px; }
.avatar.xs { width: 28px; height: 28px; border-radius: 9px; font-size: 13px; }
.avatar.logo { border-radius: 13px; }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(150deg, #B95633, #8A3A1F);
  color: #FFF3E1;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 8px 18px -10px rgba(138, 58, 31, 0.85);
}

.brand-mark.xl {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--clay);
  color: #FFF7EA;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 14px 26px -16px rgba(138, 58, 31, 0.95);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn .ic { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn.grow { flex: 1; }
.btn.btn-lg { min-height: 56px; font-size: 16px; border-radius: 17px; }
.btn.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}
.btn.danger { background: #9C3527; }
.btn.danger:hover { background: #872C20; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--ink);
  transition: background 0.16s ease;
}

.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn:hover { background: rgba(34, 29, 22, 0.05); }

.icon-btn.big {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow);
}

.icon-btn.big.on { color: var(--clay); }
.icon-btn.big.on .ic { fill: rgba(169, 78, 46, 0.16); }

.glass-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.16);
  color: #FFF8EC;
  backdrop-filter: blur(8px);
}

.glass-btn .ic { width: 20px; height: 20px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status.open { background: rgba(51, 81, 62, 0.1); color: var(--moss); }
.status.busy { background: rgba(133, 121, 104, 0.14); color: var(--muted); }

.v-badge {
  display: inline-flex;
  align-items: center;
  color: var(--moss);
}

.v-badge .ic { width: 14px; height: 14px; }

.empty {
  padding: 42px 26px;
  text-align: center;
}

.empty-ic {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 252, 246, 0.7);
  color: var(--muted);
}

.empty-ic .ic { width: 26px; height: 26px; }
.empty h3 { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.empty p { margin-top: 6px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.empty .btn { margin-top: 18px; min-height: 46px; font-size: 14px; }

.home-foot {
  padding: 30px 20px 12px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.8;
}

/* ---------- 启动页 ---------- */

body[data-route="onboarding"] .shell,
body[data-route="auth"] .shell { padding-bottom: 0; }

.onboard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100dvh;
  padding: calc(30px + env(safe-area-inset-top)) 22px calc(26px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.onboard-glow {
  position: absolute;
  top: -110px;
  right: -150px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(169, 78, 46, 0.16), transparent 66%);
  pointer-events: none;
}

.onboard-top { position: relative; }
.onboard-top .eyebrow { margin-top: 22px; }
.onboard-top h1 {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.onboard-sub {
  margin-top: 13px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

.role-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.role-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.role-card.selected {
  border-color: rgba(169, 78, 46, 0.55);
  background: #FFF9EE;
  box-shadow: 0 16px 30px -26px rgba(169, 78, 46, 0.8);
}

.rc-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  background: rgba(169, 78, 46, 0.1);
  color: var(--clay);
}

.rc-icon .ic { width: 21px; height: 21px; }

.rc-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.rc-body strong { font-size: 14.5px; }
.rc-body em {
  font-style: normal;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}

.rc-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
  transition: 0.16s ease;
}

.rc-check .ic { width: 13px; height: 13px; }

.role-card.selected .rc-check {
  border-color: var(--clay);
  background: var(--clay);
  color: #fff;
}

.onboard-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.value-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px 0;
}

.value-list > div {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
}

.value-list .ic {
  width: 18px;
  height: 18px;
  padding: 3px;
  flex: none;
  border-radius: 50%;
  background: rgba(51, 81, 62, 0.09);
  color: var(--moss);
}

.onboard-note {
  text-align: center;
  font-size: 10.5px;
  line-height: 1.75;
  color: var(--muted);
  opacity: 0.85;
}

.share-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(169, 78, 46, 0.08);
  color: var(--clay);
  font-size: 11px;
}

.share-hint .ic { width: 14px; height: 14px; }

/* ---------- 顶栏 / 标题 ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 4px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }

.brand-word {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 46%;
  padding: 7px 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.65);
  color: var(--ink-2);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.role-pill i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--moss);
}

.screen-head {
  padding: calc(26px + env(safe-area-inset-top)) 20px 12px;
}

.screen-head.tight { padding-bottom: 8px; }

.screen-head h1 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.01em;
}

.screen-head .lede {
  max-width: 92%;
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.65;
}


/* ---------- 登录 / 注册 ---------- */

.auth {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100dvh;
  padding: calc(28px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.auth-top { position: relative; }
.auth-top .eyebrow { margin-top: 20px; }

.auth-top h1 {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.auth .onboard-sub { margin-top: 12px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: none;
  gap: 3px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(34, 29, 22, 0.05);
}

.auth-tab {
  padding: 9px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(34, 29, 22, 0.07);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 2px;
}

.auth-error {
  min-height: 17px;
  margin: 0;
  color: #9C3527;
  font-size: 12px;
  line-height: 1.5;
}

.auth-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
  text-align: center;
}

.demo-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 246, 0.55);
}

.demo-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10.5px;
}

.demo-head em { font-style: normal; }

.demo-account {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 11px;
  text-align: left;
}

.demo-account:hover { background: rgba(169, 78, 46, 0.05); }

.demo-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: linear-gradient(145deg, #C2603F, #7A2E1C);
  color: #FFF6E7;
  font-family: var(--serif);
  font-size: 15px;
}

.demo-account > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.demo-account strong { font-size: 12.5px; }
.demo-account em {
  font-style: normal;
  color: var(--muted);
  font-size: 10.5px;
}
.demo-account .ic { width: 14px; height: 14px; color: var(--muted); }

.role-cards.compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.role-cards.compact .role-card { padding: 10px; gap: 9px; }
.role-cards.compact .rc-icon { width: 34px; height: 34px; border-radius: 10px; }
.role-cards.compact .rc-icon .ic { width: 17px; height: 17px; }
.role-cards.compact .rc-body strong { font-size: 12.5px; }
.role-cards.compact .rc-body em { display: none; }
.role-cards.compact .rc-check { width: 18px; height: 18px; }
.role-cards.compact .rc-check .ic { width: 11px; height: 11px; }

.mini-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(169, 78, 46, 0.08);
  color: var(--clay);
  font-size: 11.5px;
}

.mini-action .ic { width: 13px; height: 13px; }

/* ---------- 发现页 ---------- */

.hero {
  position: relative;
  padding: 24px 20px 20px;
  overflow: hidden;
}

.hero h1 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.01em;
}

.hero .lede {
  max-width: 84%;
  margin-top: 10px;
  font-size: 13px;
}

.hero-orbit {
  position: absolute;
  top: -34px;
  right: -50px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(169, 78, 46, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px dashed rgba(51, 81, 62, 0.2);
  border-radius: 50%;
}

.search-wrap { padding: 6px 20px 0; }

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 26px -24px rgba(45, 33, 20, 0.7);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search:focus-within {
  border-color: rgba(169, 78, 46, 0.42);
  box-shadow: 0 0 0 4px rgba(169, 78, 46, 0.07);
}

.search > .ic { color: var(--muted); width: 19px; height: 19px; }

.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 16px; }

/* 搜索框里的分类按钮 */
.search-cat {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 1px;
  max-width: 44%;
  height: 100%;
  padding: 0 8px 0 0;
  border-right: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-cat .cat-chev { width: 14px; height: 14px; color: var(--muted); }

/* 发布表单里的分类选择 */
.cat-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

.cat-custom {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  outline: none;
  font-size: 13.5px;
}

.cat-custom:focus { border-color: var(--clay); }

.filter-tag em {
  margin-left: 6px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

/* 全局搜索结果 */
.search-block { margin-top: 22px; padding: 0 20px; }

.search-rows { display: grid; gap: 8px; }

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
}

.search-row-body { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.search-row-body strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-row-body em { color: var(--muted); font-size: 11.5px; font-style: normal; }

.search-thumb {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: var(--sand);
}

.search-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 15px;
}

.row-chev { width: 16px; height: 16px; flex: none; color: var(--muted); }

/* 自动归类建议 */
.cat-suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.cat-suggest .tag-pill { font-size: 11px; }

.search input::placeholder { color: #A79B8B; }
.search input::-webkit-search-cancel-button { display: none; }

.search-clear {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: rgba(34, 29, 22, 0.06);
  color: var(--muted);
  transition: opacity 0.15s ease;
}

.search-clear .ic { width: 13px; height: 13px; }

.search input:placeholder-shown ~ .search-clear {
  opacity: 0;
  pointer-events: none;
}

.chips {
  display: flex;
  gap: 8px;
  padding: 14px 20px 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar { display: none; }

/* 弹层里的 chip 直接换行，全部可见，不用滑 */
.sheet .chips {
  flex-wrap: wrap;
  overflow: visible;
  row-gap: 8px;
}

.chips-wrap { position: relative; }
.chips-wrap .chips { scroll-behavior: smooth; }

.chips-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 252, 246, 0.95);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 6px 14px -8px rgba(40, 30, 18, 0.5);
  translate: 0 -50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.chips-nav.prev { left: 6px; }
.chips-nav.next { right: 6px; }

.chips-wrap.can-left .chips-nav.prev,
.chips-wrap.can-right .chips-nav.next {
  opacity: 1;
  pointer-events: auto;
}

.chips-label {
  padding: 12px 20px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.chips-label b { color: var(--clay); font-weight: 600; }

.chips.wrap {
  flex-wrap: wrap;
  overflow: visible;
  row-gap: 8px;
  padding-bottom: 10px;
}

.chips-label.intent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  color: var(--moss);
}

.chips-label.intent .tag-pill {
  border-color: rgba(51, 81, 62, 0.32);
  background: rgba(51, 81, 62, 0.1);
  color: var(--moss);
  font-size: 11px;
}

.chip {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  transition: 0.16s ease;
}

.chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #FBF4E6;
}

.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 12px;
}

#result-count {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.sort {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(34, 29, 22, 0.05);
}

.sort-btn {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
}

.sort-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.creator-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px;
}

.creator-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.creator-card:active { transform: scale(0.995); }

@media (hover: hover) {
  .creator-card:hover {
    border-color: rgba(169, 78, 46, 0.24);
    box-shadow: 0 26px 48px -38px rgba(45, 33, 20, 0.75);
  }
}

.cc-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cc-top {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.cc-top strong { font-size: 15.5px; font-weight: 600; }

.rate {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  color: var(--gold);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.rate .ic { width: 12px; height: 12px; fill: currentColor; stroke: currentColor; }

.cc-title {
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cc-tags i { font-style: normal; opacity: 0.5; }

.cc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}

.price {
  font-size: 14px;
  font-weight: 700;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
}

.price em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- 匠人主页 ---------- */

.detail-cover {
  position: relative;
  height: 208px;
  padding-top: calc(14px + env(safe-area-inset-top));
  overflow: hidden;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(145deg, var(--a), var(--b));
}

.cover-bar {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
}

.cover-actions {
  display: flex;
  gap: 8px;
}

.cover-glyph {
  position: absolute;
  right: 10px;
  bottom: -34px;
  font-family: var(--serif);
  font-size: 156px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.cover-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 22px),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.28), transparent 48%);
  pointer-events: none;
}

.detail-panel {
  position: relative;
  z-index: 2;
  margin: -34px 14px 0;
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 26px 50px -40px rgba(40, 30, 18, 0.7);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.detail-id { flex: 1; min-width: 0; }

.detail-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-name h1 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-id > p {
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 12.5px;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.mini {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.mini .ic { width: 12px; height: 12px; }

.bio {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.72;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 10.5px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.stats-row > div {
  text-align: center;
  border-right: 1px solid var(--line);
}

.stats-row > div:last-child { border-right: 0; }

.stats-row strong {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.stats-row span { font-size: 10.5px; color: var(--muted); }

.section { padding: 24px 20px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section-head > span {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.guest-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 20px 0;
  padding: 11px 13px;
  border: 1px solid rgba(169, 78, 46, 0.16);
  border-radius: 12px;
  background: rgba(169, 78, 46, 0.06);
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.55;
}

.guest-note .ic {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  color: var(--clay);
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.work {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(150deg, var(--a), var(--b));
  text-align: left;
  color: #fff;
}

.work::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.46), transparent 46%),
    radial-gradient(circle at 16% 92%, rgba(0, 0, 0, 0.24), transparent 54%),
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.17) 0 1px, transparent 1px 18px);
  pointer-events: none;
}

.work.has-image::before { display: none; }
.work.has-image .work-glyph { display: none; }

.work-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-glyph {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.work-cap {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 26px 10px 9px;
  background: linear-gradient(transparent, rgba(24, 17, 11, 0.58));
}

.work-cap strong { font-size: 12px; font-weight: 600; }

.work-cap em {
  font-style: normal;
  font-size: 10px;
  color: rgba(255, 248, 235, 0.72);
}

.info-card {
  padding: 2px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}

.info-row:last-child { border-bottom: 0; }

.info-row > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.info-row > span .ic { width: 15px; height: 15px; }
.info-row strong { font-size: 13px; font-weight: 600; text-align: right; }
.info-row strong em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted);
}

.flow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.flow-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.flow-grid b {
  font-family: var(--serif);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--clay);
}

.flow-grid strong { font-size: 13px; font-weight: 600; }

.flow-grid em {
  font-style: normal;
  color: var(--muted);
  font-size: 10.5px;
}

.contact-card {
  padding: 3px 14px;
  border-radius: 18px;
  background: var(--surface-2);
}

.contact-chat { width: 100%; margin-top: 12px; }

/* 需求参考图 */
.brief-img {
  margin: 10px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.brief-img img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.brief-img.detail img { max-height: 260px; }

.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(34, 29, 22, 0.08);
}

.contact-row:last-child { border-bottom: 0; }

.ci {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: rgba(255, 252, 246, 0.8);
  color: var(--ink-2);
}

.ci .ic { width: 16px; height: 16px; }

.contact-row > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.contact-row em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
}

.contact-row strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.copy-btn {
  flex: none;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.7);
  color: var(--ink-2);
  font-size: 11px;
}

.fineprint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.fineprint .ic { width: 14px; height: 14px; margin-top: 1px; }

.fineprint.local-warn { color: var(--clay); }

.cta-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 36;
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(246, 241, 231, 0.9);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

/* ---------- 需求广场 ---------- */

.publish-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 40px);
  margin: 2px 20px 0;
  padding: 14px;
  text-align: left;
  border: 1.5px dashed rgba(169, 78, 46, 0.42);
  border-radius: 18px;
  background: rgba(169, 78, 46, 0.045);
  color: var(--clay);
}

.publish-card > .ic { width: 17px; height: 17px; opacity: 0.7; }

.pc-plus {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: rgba(169, 78, 46, 0.12);
}

.pc-plus .ic { width: 19px; height: 19px; }

.pc-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pc-text strong { color: var(--ink); font-size: 14px; }

.pc-text em {
  font-style: normal;
  color: var(--muted);
  font-size: 11.5px;
}

.publish-card.slim {
  margin: 0;
  width: 100%;
}

.role-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 20px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(51, 81, 62, 0.07);
  color: var(--moss);
  font-size: 11.5px;
}

.role-hint .ic { width: 14px; height: 14px; }

.brief-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 20px 0;
}

.brief-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.brief-card:active { transform: scale(0.995); }

@media (hover: hover) {
  .brief-card:hover { border-color: rgba(169, 78, 46, 0.24); }
}

.brief-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brief-who {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.brief-who strong { font-size: 13px; font-weight: 600; }

.brief-who span {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mine-badge {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(169, 78, 46, 0.1);
  color: var(--clay);
  font-size: 10px;
}

.brief-time {
  flex: none;
  align-self: flex-start;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.brief-card h3 {
  margin-top: 11px;
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
}

.brief-card > p {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.brief-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

.brief-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.brief-meta .ic { width: 12px; height: 12px; }

.brief-meta .budget {
  color: var(--clay);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- 消息 ---------- */

.conv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 20px 0;
}

.conv {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 0.16s ease;
}

.conv:hover { border-color: rgba(169, 78, 46, 0.2); }

.conv-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.conv-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.conv-top strong { font-size: 14px; font-weight: 600; }

.conv-top em {
  flex: none;
  font-style: normal;
  color: var(--muted);
  font-size: 10px;
}

.conv-ctx {
  overflow: hidden;
  color: var(--clay);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.conv-last {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.conv.unread .conv-last { color: var(--ink-2); font-weight: 500; }

.unread-dot {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  flex: none;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-size: 10px;
}

/* ---------- 聊天 ---------- */

body[data-route="chat"] .shell { padding-bottom: 0; }

.chat-screen {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  height: 100dvh;
  background: var(--bg);
  transform: translateX(-50%);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.9);
  backdrop-filter: blur(14px);
}

.chat-peer {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 2px 4px 2px 0;
  border-radius: 12px;
  text-align: left;
}

.chat-peer:active { background: rgba(34, 29, 22, 0.04); }

/* 气泡旁的头像也可以点，进对方主页 */
.msg-avatar {
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
}

.msg-avatar:active { opacity: 0.75; }

.chat-peer .peer-chev {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted);
}

.chat-who {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.chat-who strong { font-size: 14.5px; }

.chat-who span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-context {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  width: calc(100% - 28px);
  margin: 10px 14px 0;
  padding: 9px 12px;
  border: 1px solid rgba(169, 78, 46, 0.14);
  border-radius: 12px;
  background: rgba(169, 78, 46, 0.06);
  color: var(--ink-2);
  font-size: 11.5px;
  text-align: left;
}

.chat-context > span {
  flex: none;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--clay);
  color: #fff;
  font-size: 9.5px;
}

.chat-context strong {
  flex: 1;
  overflow: hidden;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-context .ic { width: 14px; height: 14px; flex: none; }

.chat-scroll {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-intro {
  padding: 10px 0 20px;
  text-align: center;
  color: var(--muted);
}

.chat-intro > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.03em;
}

.chat-intro .ic { width: 12px; height: 12px; }

.chat-intro p {
  margin-top: 5px;
  font-size: 10.5px;
  opacity: 0.8;
}

.chat-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 100%;
  margin: 7px 0;
}

.msg-row.me { justify-content: flex-end; }

.bubble {
  max-width: 76%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 8px 16px -18px rgba(0, 0, 0, 0.6);
}

.msg-row.other .bubble { border-bottom-left-radius: 5px; }

.msg-row.me .bubble {
  border-color: transparent;
  border-bottom-right-radius: 5px;
  background: var(--clay);
  color: #FFF7EC;
}

.day-sep {
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}

.day-sep span {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(34, 29, 22, 0.05);
}

.quick-row {
  display: flex;
  flex: none;
  gap: 7px;
  padding: 8px 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-row::-webkit-scrollbar { display: none; }

.quick {
  flex: none;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11.5px;
}

.composer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 9px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.composer input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: var(--bg);
  font-size: 16px;
}

.composer input:focus { border-color: rgba(169, 78, 46, 0.5); }

.send-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: var(--clay);
  color: #FFF7EC;
  box-shadow: 0 8px 16px -10px rgba(138, 58, 31, 0.9);
}

.send-btn .ic { width: 19px; height: 19px; }

/* ---------- 我的 ---------- */

.profile-hero {
  position: relative;
  margin: 4px 20px 0;
  padding: 20px 18px 16px;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(140deg, #3F5D48, #1E2C22);
  color: #FFF6E8;
}

.profile-hero.buyer { background: linear-gradient(140deg, #8A4326, #3A2114); }

.ph-orb {
  position: absolute;
  top: -60px;
  right: -50px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 65%);
  pointer-events: none;
}

.ph-avatar { position: relative; flex: none; }

.avatar-edit {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.avatar-edit .ic { width: 14px; height: 14px; }

.avatar.has-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-hero .avatar {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 10px 24px -14px rgba(0, 0, 0, 0.65);
}

.profile-hero.buyer .avatar {
  background: linear-gradient(145deg, #F3DEC0, #D5A46D);
  color: #6F2F18;
}

.ph-id {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.ph-role {
  align-self: flex-start;
  margin-bottom: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: rgba(255, 246, 232, 0.72);
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.ph-id strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ph-id > span:last-child {
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255, 246, 232, 0.72);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-hero .glass-btn {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
}

.ph-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.ph-stats > div { text-align: center; }

.ph-stats strong {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.ph-stats span { color: rgba(255, 246, 232, 0.65); font-size: 10.5px; }

.status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 20px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.status-card strong { display: block; font-size: 13.5px; }

.status-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.switch {
  position: relative;
  width: 46px;
  height: 27px;
  flex: none;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch > span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(34, 29, 22, 0.16);
  transition: background 0.2s ease;
  pointer-events: none;
}

.switch > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch input:checked + span { background: var(--moss); }
.switch input:checked + span::after { transform: translateX(19px); }

.my-brief-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.my-brief {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.mb-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mb-main strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mb-main em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}

.my-brief .ic { width: 16px; height: 16px; color: var(--muted); }

.menu-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.menu-item:last-child { border-bottom: 0; }
.menu-item:hover { background: rgba(34, 29, 22, 0.02); }

.mi-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  background: rgba(169, 78, 46, 0.08);
  color: var(--clay);
}

.mi-icon .ic { width: 17px; height: 17px; }

.mi-label { flex: 1; }

.mi-value {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.mi-chev { width: 15px; height: 15px; color: var(--muted); }

.menu-item.danger { color: #9C3527; }
.menu-item.danger .mi-icon {
  background: rgba(156, 53, 39, 0.08);
  color: #9C3527;
}
.menu-item.danger .mi-chev { color: rgba(156, 53, 39, 0.6); }

/* ---------- 底部导航 ---------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr 64px 1fr 1fr;
  gap: 2px;
  width: 100%;
  max-width: 560px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(252, 247, 238, 0.93);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 0;
  border-radius: 12px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.tab-ic {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 26px;
  border-radius: 999px;
  transition: background 0.18s ease;
}

.tab .ic { width: 22px; height: 22px; }
.tab.active { color: var(--clay); }
.tab.active .tab-ic { background: rgba(169, 78, 46, 0.1); }

.tab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border: 1.5px solid #FCF7EE;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-size: 9px;
}

/* 底部中间的发布按钮 */
.tab-compose {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: -20px auto 0;
  border: 3px solid #FCF7EE;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--clay), var(--clay-deep));
  color: #FFF7EA;
  box-shadow: 0 14px 26px -12px rgba(138, 58, 31, 0.85);
  transition: transform 0.15s ease;
}

.tab-compose .ic { width: 26px; height: 26px; }
.tab-compose:active { transform: scale(0.94); }

/* 发布选择 */
.compose-list { display: grid; gap: 10px; }

.compose-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
}

.compose-item .ci {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: rgba(169, 78, 46, 0.1);
  color: var(--clay-deep);
}

.compose-item .ci .ic { width: 20px; height: 20px; }
.compose-item strong { display: block; font-size: 14px; }
.compose-item em { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; font-style: normal; }
.compose-item > .ic { margin-left: auto; width: 18px; height: 18px; color: var(--muted); }

.topbar-spacer { width: 40px; height: 40px; flex: none; }

body[data-route="creator"] .tabbar,
body[data-route="chat"] .tabbar,
body[data-route="onboarding"] .tabbar,
body[data-route="auth"] .tabbar { display: none; }

body[data-route="chat"] { overflow: hidden; }


/* ---------- 作品上传 ---------- */

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 148px;
  padding: 16px;
  overflow: hidden;
  border: 1.5px dashed rgba(169, 78, 46, 0.35);
  border-radius: 16px;
  background: #FBF6EA center / cover no-repeat;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease;
}

.upload-box:hover { border-color: rgba(169, 78, 46, 0.55); }

.upload-box em {
  font-style: normal;
  font-size: 10px;
  opacity: 0.8;
}

.upload-plus {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(169, 78, 46, 0.1);
  color: var(--clay);
  font-size: 18px;
}

.upload-plus .ic { width: 18px; height: 18px; }

.upload-box.has-image {
  justify-content: flex-end;
  min-height: 190px;
  padding: 10px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.2);
}

.upload-box.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 48%, rgba(20, 14, 10, 0.5));
}

.upload-change {
  position: relative;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: #FFF6E7;
  font-size: 10.5px;
  backdrop-filter: blur(4px);
}

/* ---------- 弹层 / 表单 ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(26, 20, 14, 0.46);
  backdrop-filter: blur(2px);
  animation: fade 0.22s ease both;
}

.sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 91;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  box-shadow: 0 -24px 70px rgba(30, 20, 10, 0.32);
  animation: sheetUp 0.32s cubic-bezier(0.2, 0.85, 0.25, 1) both;
}

.sheet-grab {
  width: 38px;
  height: 4px;
  margin: 9px auto 0;
  flex: none;
  border-radius: 999px;
  background: rgba(34, 29, 22, 0.16);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 12px 18px 12px 20px;
}

.sheet-head h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.sheet-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.sheet-body {
  padding: 2px 20px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet-body .btn { width: 100%; }

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #FBF6EA;
  font-size: 16px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field select {
  padding-right: 34px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23857968' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.field textarea {
  min-height: 92px;
  line-height: 1.55;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(169, 78, 46, 0.55);
  background: #FFFDF7;
  box-shadow: 0 0 0 4px rgba(169, 78, 46, 0.08);
}

.field input::placeholder,
.field textarea::placeholder { color: #A79B8B; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.form-hint .ic { width: 14px; height: 14px; margin-top: 1px; flex: none; color: var(--moss); }

.chip-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-check {
  position: relative;
  display: inline-flex;
}

.chip-check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip-check span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 12.5px;
  transition: 0.14s ease;
}

.chip-check input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: #FBF4E4;
}

.chip-check input:focus-visible + span {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.sheet-text {
  margin-bottom: 16px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}

.brief-quote {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
}

.brief-quote > strong {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.4;
}

.brief-quote > p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.65;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(34, 29, 22, 0.09);
}

.detail-meta-grid div { display: flex; flex-direction: column; gap: 2px; }
.detail-meta-grid span { color: var(--muted); font-size: 10px; }
.detail-meta-grid strong { font-size: 13px; font-weight: 600; }

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.mini-card > span {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.mini-card strong { font-size: 13.5px; }
.mini-card em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}
.mini-card .ic { width: 15px; height: 15px; color: var(--muted); }

.share-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
}

.share-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.share-who strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.share-who span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.share-url {
  margin-top: 12px;
  padding: 10px 12px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(34, 29, 22, 0.05);
  color: var(--ink-2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.share-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.share-actions .btn {
  flex: 1;
  width: auto;
  min-height: 48px;
  padding: 0 12px;
  font-size: 14px;
}

.about p {
  margin-bottom: 11px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.75;
}

.about .about-lead {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}

.about h3 {
  margin: 18px 0 8px;
  font-size: 13.5px;
}

.about .about-meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 10.5px;
}

.install-steps p {
  margin-bottom: 10px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.7;
}

.install-steps ol {
  margin: 0 0 14px 18px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.8;
}

.install-steps li { margin-bottom: 6px; }

/* ---------- 作品预览 ---------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: #14100C;
  color: #FFF6E7;
  animation: fade 0.2s ease both;
}

.viewer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: calc(14px + env(safe-area-inset-top)) 16px 10px;
  color: rgba(255, 246, 231, 0.7);
  font-size: 12px;
}

.viewer .glass-btn { background: rgba(255, 255, 255, 0.1); }

.viewer-stage {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  margin: 0 16px;
}

.viewer-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(20, 16, 12, 0.38);
  color: #FFF6E7;
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
}

.viewer-arrow .ic { width: 20px; height: 20px; }
.viewer-arrow.prev { left: 10px; }
.viewer-arrow.next { right: 10px; }

.viewer-art {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(150deg, var(--a), var(--b));
}

.viewer-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.4), transparent 46%),
    radial-gradient(circle at 18% 92%, rgba(0, 0, 0, 0.26), transparent 55%),
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 22px);
}

.viewer-art .work-glyph {
  position: static;
  transform: none;
  font-size: 118px;
  color: rgba(255, 255, 255, 0.3);
}

.viewer footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 15px 22px calc(20px + env(safe-area-inset-bottom));
}

.viewer footer > div { min-width: 0; }

.viewer-delete {
  flex: none;
  padding: 8px 12px;
  border: 1px solid rgba(240, 130, 105, 0.35);
  border-radius: 9px;
  background: rgba(156, 53, 39, 0.16);
  color: #F0A48E;
  font-size: 11px;
}

/* 预览层是深色底，普通浅色按钮在这里要反色 */
.viewer-actions .btn,
.viewer-actions .btn.btn-ghost {
  border-color: rgba(255, 246, 231, 0.42);
  background: rgba(255, 246, 231, 0.12);
  color: #FFF6E7;
}

.viewer-actions .btn:active { background: rgba(255, 246, 231, 0.24); }

.viewer-art.has-image { background: #0C0906; }

.viewer-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.viewer footer h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}

.viewer footer p {
  margin-top: 3px;
  color: rgba(255, 246, 231, 0.6);
  font-size: 12px;
}

/* ---------- 提示 ---------- */

#toast-root {
  position: fixed;
  right: 0;
  bottom: calc(98px + env(safe-area-inset-bottom));
  left: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  pointer-events: none;
}

.toast {
  max-width: 90%;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(28, 22, 16, 0.95);
  color: #FFF6E7;
  font-size: 12.5px;
  text-align: center;
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.7);
  animation: toastIn 0.22s ease both;
}

/* ---------- 市场（货架） ---------- */

.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }

.market-entry {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid rgba(169, 78, 46, 0.28);
  border-radius: 999px;
  background: rgba(169, 78, 46, 0.08);
  color: var(--clay-deep);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.market-entry .ic { width: 15px; height: 15px; }
.market-entry:active { transform: translateY(1px); }

.market-heading { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.market-heading strong { font-family: var(--serif); font-size: 20px; letter-spacing: 0.08em; }
.market-heading em { font-style: normal; font-size: 10.5px; color: var(--muted); letter-spacing: 0.04em; }

.btn.compact { min-height: 38px; padding: 0 12px; border-radius: 11px; font-size: 12.5px; }
.btn.compact .ic { width: 15px; height: 15px; }

.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 20px 8px;
}

.listing-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.listing-card:active { transform: scale(0.985); }

.listing-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, var(--a), var(--b));
}

.listing-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.listing-glyph { color: rgba(255, 252, 244, 0.82); font-family: var(--serif); font-size: 34px; }
.listing-glyph.big { font-size: 56px; }

.listing-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px 12px 12px; }
.listing-body strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.listing-body em { color: var(--clay); font-size: 13px; font-style: normal; font-weight: 700; }
.listing-meta,
.listing-seller {
  overflow: hidden;
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.listing-meta { color: var(--muted); }
.listing-seller { color: var(--ink-2); opacity: 0.8; }

.listing-hero {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--a), var(--b));
}
.listing-hero img { width: 100%; height: 100%; object-fit: cover; }

.listing-price { margin-bottom: 10px; color: var(--clay); font-family: var(--serif); font-size: 22px; }
.listing-price em { color: var(--muted); font-size: 12px; font-style: normal; }

.listing-card { cursor: pointer; }
.listing-card:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

/* 交易标签 */
.tag-chips { margin-top: -6px; }
.chip.tag { padding: 5px 10px; border-style: dashed; font-size: 11.5px; }
.chip.tag.active { border-style: solid; }

.listing-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.detail-tags { margin-bottom: 12px; }

.tag-pill {
  padding: 2px 7px;
  border: 1px solid rgba(169, 78, 46, 0.24);
  border-radius: 999px;
  background: rgba(169, 78, 46, 0.07);
  color: var(--clay-deep);
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
}
.tag-pill:active { background: rgba(169, 78, 46, 0.16); }

.tag-pill.on {
  border-color: var(--clay);
  background: var(--clay);
  color: #FFF7EA;
}

.tag-pill.ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

/* 搜索 + 筛选 */
.market-search-row { display: flex; align-items: center; gap: 8px; }
.market-search-row .search { flex: 1; min-width: 0; }

.filter-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 26px -24px rgba(45, 33, 20, 0.7);
}

.filter-btn.on {
  border-color: rgba(169, 78, 46, 0.45);
  background: rgba(169, 78, 46, 0.08);
  color: var(--clay-deep);
}

.filter-btn .ic { width: 16px; height: 16px; }

.filter-btn b {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}

.active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 20px 0;
}

/* 筛选面板 */
.filter-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

.filter-tag {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 13px;
  transition: 0.16s ease;
}

.filter-tag.on {
  border-color: var(--clay);
  background: rgba(169, 78, 46, 0.1);
  color: var(--clay-deep);
  font-weight: 600;
}

.filter-ops { display: flex; gap: 10px; }

.filter-reset,
.filter-apply {
  flex: 1;
  min-height: 48px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
}

.filter-reset { border: 1px solid var(--line); background: transparent; color: var(--ink-2); }
.filter-apply { background: var(--clay); color: #FFF7EA; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-opt { position: relative; display: inline-flex; }
.tag-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tag-opt span {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
}
.tag-opt input:checked + span {
  border-color: var(--clay);
  background: rgba(169, 78, 46, 0.1);
  color: var(--clay-deep);
  font-weight: 600;
}
.tag-opt input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 2px; }

@media (min-width: 480px) {
  .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .topbar .brand-word { display: none; }
}

@media (max-width: 370px) {
  .market-entry { padding: 7px 9px; }
  .market-entry span { display: none; }
}

/* ---------- 协议勾选 / 危险操作 ---------- */

.agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.agree input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--clay);
}

.agree a {
  color: var(--clay);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.menu-item.danger .mi-label,
.menu-item.danger .mi-icon { color: #9C3527; }

.danger-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(156, 53, 39, 0.08);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.65;
}

.danger-note strong {
  display: block;
  margin-bottom: 4px;
  color: #9C3527;
  font-size: 13px;
}

.danger-note p + p { margin-top: 6px; }

/* ---------- 细节 ---------- */

.pad { padding: 0 20px; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 私信附件 */
.attach-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink-2);
}

.attach-btn .ic { width: 20px; height: 20px; }

.attach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.attach-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
}

.attach-item .ic { width: 22px; height: 22px; color: var(--clay); }

.msg-media img {
  display: block;
  max-width: 230px;
  max-height: 260px;
  border-radius: 14px;
  object-fit: cover;
}

.msg-video { max-width: 240px; border-radius: 14px; background: #000; }

.msg-file, .msg-loc {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.msg-file span, .msg-loc span { display: flex; flex-direction: column; min-width: 0; }
.msg-file strong, .msg-loc strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-file em, .msg-loc em { color: var(--muted); font-size: 10.5px; font-style: normal; }
.msg-file .ic, .msg-loc .ic { width: 22px; height: 22px; flex: none; color: var(--clay); }

/* 作品报价与出价 */
.switch-row { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--clay); }

.work-price { margin-top: 4px; color: var(--clay); font-size: 13px; font-weight: 600; }

.viewer-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.btn.sm { padding: 8px 14px; font-size: 12.5px; }

.offer-list { display: flex; flex-direction: column; gap: 10px; }

.offer-row {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.offer-body { flex: 1; min-width: 0; }
.offer-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.offer-status { padding: 2px 8px; border-radius: 999px; background: var(--sand); color: var(--muted); font-size: 10.5px; }
.offer-status.accepted { background: #E4F0E4; color: #2F6B3A; }
.offer-status.declined { background: #F3E3DE; color: #8C3B2A; }
.offer-price { margin-top: 4px; color: var(--clay); font-weight: 600; }
.offer-note { margin-top: 4px; color: var(--muted); font-size: 12px; }
.offer-actions { display: flex; gap: 8px; margin-top: 8px; }

.work-desc { margin-top: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.55; max-width: 420px; }

.work-status {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(181, 138, 51, 0.92);
  color: #fff;
  font-size: 10.5px;
}

.work-status.rejected { background: rgba(169, 78, 46, 0.92); }
.work { position: relative; }

/* 举报证据 */
.upload-box.slim { min-height: 64px; flex-direction: row; gap: 10px; }
.evidence-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.evidence-thumb { position: relative; width: 72px; height: 72px; }
.evidence-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.evidence-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--clay); color: #fff; font-size: 12px; line-height: 1; }

.locate-row { display: flex; gap: 8px; align-items: center; }
.locate-row input { flex: 1; }
.work-loc { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.work-loc .ic { width: 13px; height: 13px; }

/* 冻结只读提示 */
#restricted-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 95;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  background: #8A6A2F;
  color: #FFF7E6;
  font-size: 12.5px;
  text-align: center;
  line-height: 1.5;
}

body.has-restricted .shell { padding-top: 46px; }
body.has-restricted .topbar { top: 46px; }

/* 举报与申诉 */
.mi-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #A94E2E; color: #fff; font-size: 10.5px; display: inline-grid; place-items: center; }
.notice-list { display: grid; gap: 8px; }
.notice-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.notice-row strong { font-size: 13px; }
.notice-row p { margin: 4px 0 2px; color: var(--muted); font-size: 12px; }
.notice-row em { font-style: normal; color: var(--muted); font-size: 10.5px; }
.report-line { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.report-line-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.report-line p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.report-state { padding: 2px 8px; border-radius: 999px; background: var(--sand); color: var(--muted); font-size: 10.5px; }
.report-state.resolved { background: #E4F0E4; color: #2F6B3A; }
.report-state.dismissed { background: #F3E3DE; color: #8C3B2A; }
.appeal-state { color: #8A6A2F; font-size: 11.5px; }

#restricted-banner button {
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 247, 230, 0.55);
  background: transparent;
  color: #FFF7E6;
  font-size: 11.5px;
}

.frozen-hint {
  margin: 6px 14px 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.frozen-hint button {
  color: var(--clay);
  font-size: 12px;
  text-decoration: underline;
}

#restricted-banner a {
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 247, 230, 0.55);
  color: #FFF7E6;
  font-size: 11.5px;
  text-decoration: none;
}

/* 商品多规格 */
.variant-row { display: flex; gap: 8px; margin-bottom: 8px; }
.variant-row input { flex: 1; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; }
.variant-row input[name="variantPrice"] { max-width: 120px; }
.variant-remove { width: 34px; flex: none; border-radius: 10px; background: var(--sand); color: var(--muted); font-size: 16px; }
.variant-table { margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.variant-line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; font-size: 13px; }
.variant-line + .variant-line { border-top: 1px dashed var(--line); }
.variant-line span { color: var(--ink-2); }
.variant-line strong { color: var(--clay); font-weight: 600; }

.unit-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

.locate-row select { flex: 1; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; }
.city-custom { margin-top: 8px; }

.price-row { display: flex; gap: 8px; }
.price-row input[name="price"] { flex: 1; }
.price-row input[name="unit"] { width: 84px; flex: none; }
.city-select { flex: 1; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; text-align: left; }
.city-grid { display: flex; flex-wrap: wrap; gap: 8px; max-height: 60vh; overflow: auto; }

#city-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(34, 29, 22, 0.45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.city-overlay-panel { width: 100%; max-width: 520px; max-height: 68vh; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: 0 18px 48px rgba(34, 29, 22, 0.28); }
.city-overlay-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.city-overlay-head strong { font-size: 16px; }
.city-overlay-head button { width: 30px; height: 30px; border-radius: 50%; background: var(--sand); font-size: 16px; }
.locate-row { display: flex; gap: 8px; align-items: stretch; }
.city-select { flex: 1; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; text-align: left; white-space: nowrap; }
.locate-btn { flex: none; padding: 0 14px; min-width: 64px; }

/* 订单 */
.seg-row { display: flex; gap: 8px; padding: 12px 20px 0; }
.seg { padding: 7px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.seg.on { background: var(--clay); border-color: var(--clay); color: #FFF7E6; }
.order-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 12px 14px; margin-bottom: 10px; }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-head strong { font-size: 14px; }
.order-status { padding: 2px 9px; border-radius: 999px; background: var(--sand); color: var(--muted); font-size: 11px; white-space: nowrap; }
.order-status.pending { background: #F3E3DE; color: #8C3B2A; }
.order-status.paid, .order-status.confirmed { background: #F7EBD0; color: #8A6A2F; }
.order-status.shipped { background: #E3ECF5; color: #2F5A7A; }
.order-status.completed { background: #E4F0E4; color: #2F6B3A; }
.order-meta { margin: 6px 0 0; color: var(--ink-2); font-size: 12.5px; }
.order-meta b { color: var(--clay); }
.order-time { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.order-ops { display: flex; gap: 8px; margin-top: 10px; }
.order-total { margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--clay); font-size: 15px; font-weight: 600; }
.upload-box.small { min-height: 74px; padding: 12px; }

.order-status.submitted, .order-status.received { background: #F7EBD0; color: #8A6A2F; }
.order-status.held { background: #E3ECF5; color: #2F5A7A; }
.order-status.settled { background: #E4F0E4; color: #2F6B3A; }
.order-status.refunded { background: #F3E3DE; color: #8C3B2A; }

/* 实名认证 */
.verify-card { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 12px; }
.verify-card strong { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.verify-card p { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }
.verify-card.ok { border-color: #BFD9BF; background: #EDF5ED; }
.verify-card.pending { border-color: #E6D3A8; background: #FAF3E2; }
.verify-card.bad { border-color: #E3C2B8; background: #F9EDE9; }

.ph-stats > .ph-stat { text-align: center; background: none; border: 0; color: inherit; padding: 0; font: inherit; }
button.ph-stat { cursor: pointer; }
button.ph-stat:active { opacity: 0.7; }

/* 会话左滑删除 + 星标 */
.conv-swipe { position: relative; overflow: hidden; border-radius: 16px; }
.conv-swipe .conv { position: relative; z-index: 1; transition: transform 0.18s ease; background: var(--surface); }
.conv-swipe .conv-del { position: absolute; right: 0; top: 0; bottom: 0; width: 88px; border: 0; background: #A94E2E; color: #fff; font-size: 13px; }
.conv-swipe.open .conv { transform: translateX(-88px); }
.conv-star { display: inline-flex; color: #C9922E; margin-right: 4px; }
.conv-star .ic { width: 13px; height: 13px; }

/* 首页信任区 */
.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 20px 6px; }
.trust-strip div { padding: 10px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.trust-strip strong { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink); }
.trust-strip .ic { width: 13px; height: 13px; color: var(--clay); }
.trust-strip span { display: block; margin-top: 4px; font-size: 10.5px; color: var(--muted); line-height: 1.35; }

/* 应征列表 */
.application-row { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.application-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.application-head strong { font-size: 14px; }
.application-head span { color: var(--clay); font-size: 12px; }
.application-row p { margin: 5px 0 8px; color: var(--ink-2); font-size: 12.5px; }

/* 安全区兜底 */
.sheet { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.chat-compose, .composer { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }

/* 新手三步 */
.start-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 12px 14px; }
.start-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.start-head strong { font-size: 14px; }
.start-head span { color: var(--muted); font-size: 11.5px; }
.start-step { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.start-step .start-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: #2F6B3A; }
.start-step.done .start-dot { background: #E4F0E4; border-color: #BFD9BF; }
.start-step > div { flex: 1; min-width: 0; }
.start-step strong { display: block; font-size: 13px; }
.start-step em { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-style: normal; }
.start-step.done strong { color: var(--muted); text-decoration: line-through; }

.profile-cat-custom { width: 100%; margin-top: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }

/* hidden 属性优先：避免被 display 规则覆盖 */
[hidden] { display: none !important; }

.search-more { margin-top: 8px; width: 100%; }

.profile-uid { display: flex; align-items: center; gap: 8px; margin: 4px 0 0 !important; color: var(--muted); font-size: 12px; }
.uid-copy { padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--clay); font-size: 10.5px; }

.release-list { margin: 6px 0 12px; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.release-block { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.release-block strong { display: block; margin-bottom: 4px; }
