/* ============ 设计变量 ============ */
:root {
  --paper: #f6f3ec;
  --card: #ffffff;
  --ink: #1f1b16;
  --ink-2: #4a423a;
  --muted: #8b8278;
  --line: #e6dfd3;
  --brand: #a8452f;
  --brand-soft: #f6e8e3;
  --green: #2f6b52;
  --gold: #b8873a;
  --shadow: 0 1px 2px rgba(31, 27, 22, 0.04), 0 8px 24px -12px rgba(31, 27, 22, 0.18);
  --radius: 14px;
  --tabh: 58px;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: calc(var(--tabh) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 14px; }

/* ============ 顶栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 243, 236, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.brand b {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 2px;
  font-weight: 700;
}
.brand i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.topbar .spacer { flex: 1; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-2);
  flex: none;
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 17px; height: 17px; }

/* ============ 搜索 ============ */
.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  margin: 10px 0 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.searchbar svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
}
.searchbar input::placeholder { color: #b0a79b; }
.searchbar .go {
  border: 0; background: transparent; color: var(--brand);
  font-size: 13px; font-weight: 600; padding: 0 2px;
}

/* ============ 分类 chips ============ */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 10px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 13px;
  transition: 0.15s;
}
.chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fdfbf6;
}
.chip:active { transform: scale(0.96); }

/* 区域筛选：比分类更次要，虚线小胶囊，避免两行都抢眼 */
.chips.regions {
  padding: 0 0 10px;
  gap: 6px;
  align-items: center;
}
.chips.regions::before {
  content: "区域";
  flex: none;
  font-size: 11.5px;
  color: var(--muted);
  margin-right: 2px;
}
.chips.regions .chip {
  padding: 3px 11px;
  font-size: 12px;
  background: transparent;
  border-style: dashed;
  border-color: #ded5c6;
}
.chips.regions .chip.on {
  background: var(--brand-soft);
  border-color: var(--brand);
  border-style: solid;
  color: var(--brand);
  font-weight: 600;
}

/* ============ 工具条 ============ */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 10px;
  font-size: 12.5px; color: var(--muted);
}
.toolbar .sorts { display: flex; gap: 4px; }
.toolbar .sorts button {
  border: 0; background: transparent; padding: 3px 6px;
  color: var(--muted); font-size: 12.5px; border-radius: 6px;
}
.toolbar .sorts button.on { color: var(--brand); font-weight: 600; background: var(--brand-soft); }

/* ============ 书卡网格 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 820px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.book {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(230, 223, 211, 0.7);
  display: flex; flex-direction: column;
  transition: transform 0.16s ease;
}
.book:active { transform: scale(0.985); }

.cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #eee9e0;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; padding: 14px; text-align: center;
}
.cover .ph span {
  font-family: var(--serif);
  font-size: 15px; line-height: 1.35;
  color: rgba(31, 27, 22, 0.72);
  font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cover .ph i {
  font-style: normal; font-size: 10.5px;
  color: rgba(31, 27, 22, 0.42);
  letter-spacing: 1px;
}
.tag-abs {
  position: absolute; left: 8px; top: 8px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-2);
  backdrop-filter: blur(4px);
}
.tag-abs.reserved { color: #8a5a12; background: rgba(255, 244, 224, 0.95); }
.tag-abs.sold { color: #7a7267; }
.tag-abs.offline { color: #7a7267; }

.book .info { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.book .t {
  font-size: 13.5px; line-height: 1.38; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.76em;
}
.book .meta { font-size: 11px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.book .meta .dot { width: 2px; height: 2px; background: currentColor; border-radius: 50%; }
.price-row { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.price { color: var(--brand); font-weight: 700; font-size: 17px; letter-spacing: -0.3px; }
.price small { font-size: 11px; font-weight: 600; margin-right: 1px; }
.price-old { font-size: 11px; color: #b3aa9e; text-decoration: line-through; }

/* ============ 空态 / 骨架 ============ */
.empty {
  text-align: center; padding: 56px 20px; color: var(--muted);
}
.empty .big { font-family: var(--serif); font-size: 17px; color: var(--ink-2); margin-bottom: 6px; }
.empty .sub { font-size: 13px; }

.sk { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.sk .s1 { aspect-ratio: 3/4; background: #eee9e0; }
.sk .s2 { height: 12px; margin: 10px; border-radius: 4px; background: #efeae1; }
.sk .s3 { height: 12px; width: 55%; margin: 0 10px 12px; border-radius: 4px; background: #efeae1; }
.sk > div { animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ============ 底部导航 ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabh) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 10.5px; letter-spacing: 0.3px;
}
.tabbar a svg { width: 21px; height: 21px; }
.tabbar a.on { color: var(--brand); }
.tabbar .plus svg { width: 25px; height: 25px; }

/* ============ 按钮 ============ */
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 11px;
  background: var(--ink); color: #fdfbf6;
  font-size: 15px; font-weight: 600;
  transition: 0.15s;
}
.btn:active { transform: scale(0.98); opacity: 0.92; }
.btn.brand { background: var(--brand); }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--ink-2); }
.btn.block { width: 100%; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ============ 表单 ============ */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.field { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field label {
  display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px;
  letter-spacing: 0.3px;
}
.field label em { font-style: normal; color: var(--brand); }
.field input, .field textarea, .field select {
  width: 100%; border: 0; outline: 0; background: transparent;
  font-size: 15px; color: var(--ink); font-family: inherit;
  padding: 2px 0;
}
.field textarea { resize: vertical; min-height: 74px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #b7aea2; }
.field-row { display: flex; gap: 0; }
.field-row .field { flex: 1; }
.field-row .field + .field { border-left: 1px solid var(--line); }

.hint { font-size: 12px; color: var(--muted); padding: 10px 14px 0; line-height: 1.6; }

/* ============ 弹层 ============ */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(31, 27, 22, 0.42);
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.overlay.center { align-items: center; justify-content: center; padding: 16px; }
.sheet {
  width: 100%; max-width: 460px; margin: 0 auto;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(14px); transition: transform 0.22s ease;
  max-height: 88vh; overflow-y: auto;
}
.overlay.show .sheet { transform: translateY(0); }
.overlay.center .sheet { border-radius: 18px; max-width: 380px; }
.sheet h3 {
  margin: 0 0 4px; font-size: 17px; font-family: var(--serif);
  letter-spacing: 0.5px;
}
.sheet .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.sheet .close { position: absolute; right: 14px; top: 12px; }

/* 登录/注册切换 */
.tabs2 {
  display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.tabs2 button {
  border: 0; background: transparent; padding: 0 0 10px;
  font-size: 15px; color: var(--muted); position: relative;
}
.tabs2 button.on { color: var(--ink); font-weight: 600; }
.tabs2 button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--brand); border-radius: 2px;
}

/* 登录弹层底部的小链接（忘记密码 / 返回登录） */
.auth-links {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.auth-links a { color: var(--brand); text-decoration: none; white-space: nowrap; }
.auth-links a:active { opacity: 0.7; }
.field label.sec-q { color: var(--ink-2); font-weight: 600; }
/* 密保问题：只读展示（不可编辑），但视觉上要和可填的输入框区分开 */
.field .sec-q {
  font-size: 15px; color: var(--ink); line-height: 1.5; padding: 3px 0;
  display: flex; align-items: center; gap: 6px;
}
.field .sec-q::after {
  content: "固定"; font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 0 5px; line-height: 1.6; flex: none;
}

/* ============ Toast ============ */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabh) + 26px);
  transform: translate(-50%, 10px);
  background: rgba(31, 27, 22, 0.92); color: #fdfbf6;
  padding: 9px 16px; border-radius: 999px;
  font-size: 13.5px; z-index: 90; max-width: 82vw; text-align: center;
  opacity: 0; pointer-events: none; transition: 0.22s;
  backdrop-filter: blur(6px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ 详情页 ============ */
.detail-wrap { max-width: 860px; margin: 0 auto; padding: 0 14px 90px; }
.hero {
  position: relative; margin: 12px 0 0; border-radius: 16px; overflow: hidden;
  aspect-ratio: 4 / 3; background: #eee9e0;
  box-shadow: var(--shadow);
}
@media (min-width: 700px) { .hero { aspect-ratio: 16 / 9; } }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .ph { width: 100%; height: 100%; display: grid; place-items: center; padding: 24px; }
.hero .ph span {
  font-family: var(--serif); font-size: 26px; line-height: 1.4; text-align: center;
  color: rgba(31, 27, 22, 0.68); font-weight: 600;
}

.d-title {
  font-family: var(--serif); font-size: 21px; line-height: 1.4;
  margin: 16px 0 8px; font-weight: 700; letter-spacing: 0.2px;
}
.d-price { display: flex; align-items: baseline; gap: 9px; margin-bottom: 12px; }
.d-price .price { font-size: 28px; }
.d-price .price small { font-size: 14px; }
.d-price .price-old { font-size: 13px; }
.d-price .save {
  margin-left: auto; font-size: 11.5px; color: var(--green);
  background: #eaf2ed; padding: 3px 8px; border-radius: 6px;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tags span {
  font-size: 12px; color: var(--ink-2);
  background: #f1ece3; border-radius: 6px; padding: 4px 9px;
}
.tags span.hl { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.sec {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
.sec h4 {
  margin: 0 0 10px; font-size: 12px; color: var(--muted);
  font-weight: 600; letter-spacing: 1px;
}
.seller { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  font-family: var(--serif); font-size: 17px; font-weight: 700;
}
.seller .n { font-size: 14.5px; font-weight: 600; }
.seller .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.seller .c { margin-left: auto; text-align: right; font-size: 11.5px; color: var(--muted); }
.seller .c b { display: block; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }

.desc { font-size: 14px; line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; }

.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
}
.buybar .p { line-height: 1.2; }
.buybar .p .price { font-size: 20px; }
.buybar .p .lb { font-size: 10.5px; color: var(--muted); }
.buybar .btn { flex: 1; max-width: 220px; margin-left: auto; }

/* ============ 我的 ============ */
.profile {
  display: flex; align-items: center; gap: 13px;
  padding: 16px; margin: 12px 0;
}
.profile .avatar { width: 52px; height: 52px; font-size: 21px; }
.profile .nm { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.profile .st { font-size: 12px; color: var(--muted); margin-top: 3px; }
.profile .edit { margin-left: auto; }

.seg {
  display: flex; gap: 6px; padding: 4px;
  background: #eee9e0; border-radius: 11px; margin-bottom: 12px;
}
.seg button {
  flex: 1; border: 0; background: transparent; padding: 9px 0;
  font-size: 13.5px; color: var(--ink-2); border-radius: 8px; transition: 0.15s;
}
.seg button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.07); }

.row-item {
  display: flex; gap: 12px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 10px;
}
.row-item .thumb {
  width: 62px; height: 82px; border-radius: 8px; overflow: hidden; flex: none;
  background: #eee9e0;
}
.row-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-item .thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; padding: 6px; }
.row-item .thumb .ph span {
  font-family: var(--serif); font-size: 11px; line-height: 1.3; text-align: center;
  color: rgba(31,27,22,0.7); -webkit-line-clamp: 4; display: -webkit-box;
  -webkit-box-orient: vertical; overflow: hidden;
}
.row-item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-item .tt {
  font-size: 14px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-item .mm { font-size: 11.5px; color: var(--muted); }
.row-item .acts { display: flex; gap: 7px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.badge {
  display: inline-block; padding: 2px 7px; border-radius: 5px;
  font-size: 11px; font-weight: 600;
}
.badge.pending { background: #fdf1e0; color: #96631a; }
.badge.confirmed { background: #e8f1f8; color: #2a6286; }
.badge.completed { background: #e9f2ec; color: var(--green); }
.badge.cancelled { background: #f0ece5; color: #8b8278; }

/* 上传 */
.up {
  aspect-ratio: 3/4; max-width: 118px;
  border: 1.5px dashed #d6cec0; border-radius: 11px;
  display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: 11.5px; overflow: hidden;
  background: #fbf9f5; position: relative;
}
.up img { width: 100%; height: 100%; object-fit: cover; }
.up .del {
  position: absolute; right: 4px; top: 4px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(31,27,22,0.6); color: #fff;
  display: grid; place-items: center; font-size: 13px; line-height: 1;
}
.up .plus { font-size: 20px; color: #c0b6a8; line-height: 1; margin-bottom: 3px; }

.footer {
  text-align: center; font-size: 11.5px; color: #a9a094;
  padding: 26px 0 30px; line-height: 1.9;
}

/* 详情页有自己的底部操作条，不显示 tabbar */
body.no-tab { padding-bottom: 0; }
body.no-tab .detail-wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- 公告铃铛 / 面板 / 确认弹窗（2026-11-02） ---------- */
.notice-btn { position: relative; }
.notice-btn svg { width: 18px; height: 18px; }
.notice-badge {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px;
  padding: 0 4px; border-radius: 8px; background: #c0392b; color: #fff;
  font-size: 10px; line-height: 15px; text-align: center; font-weight: 600;
}
.notice-list { max-height: 52vh; overflow-y: auto; margin-bottom: 4px; }
.notice-item { padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.notice-item:last-child { border-bottom: 0; }
.notice-item .nt { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.notice-item .nc { font-size: 13px; color: var(--ink-2); line-height: 1.7; margin-top: 4px; white-space: pre-wrap; }
.notice-item .nd { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.lev { display: inline-block; padding: 1px 7px; border-radius: 8px; font-size: 10.5px; font-weight: 600; flex: none; }
.lev.normal { background: #f0ece5; color: #8b8278; }
.lev.important { background: #fdf1e0; color: #96631a; }
.lev.urgent { background: #fbe4e4; color: #c0392b; }
.confirm-acts { display: flex; gap: 10px; margin-top: 18px; }
.confirm-acts .btn { flex: 1; }
.btn.danger { background: #c0392b; color: #fff; border-color: #c0392b; }

/* ---------- 公告管理后台 ---------- */
.admin-wrap { max-width: 720px; margin: 0 auto; }
.admin-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 2px; border-bottom: 1px dashed var(--line); }
.admin-item .grow { flex: 1; min-width: 0; }
.admin-item .t { font-size: 14px; font-weight: 600; }
.admin-item .m { font-size: 12px; color: var(--muted); margin-top: 3px; }
.admin-item .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.switch { font-size: 11px; padding: 2px 8px; border-radius: 8px; font-weight: 600; }
.switch.on { background: #e9f2ec; color: var(--green); }
.switch.off { background: #f0ece5; color: #8b8278; }

/* ---------- 私信（2026-11-02） ---------- */
.msg-btn { position: relative; }
.msg-btn svg { width: 18px; height: 18px; }
.msg-badge {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px;
  padding: 0 4px; border-radius: 8px; background: #c0392b; color: #fff;
  font-size: 10px; line-height: 15px; text-align: center; font-weight: 600;
}
.conv-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px dashed var(--line); }
.conv-item:last-child { border-bottom: 0; }
.conv-item .grow { flex: 1; min-width: 0; }
.conv-item .nm { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.conv-item .last { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .tm { font-size: 11px; color: var(--muted); flex: none; text-align: right; }
.conv-item .dot { min-width: 18px; height: 18px; border-radius: 9px; background: #c0392b; color: #fff; font-size: 11px; line-height: 18px; text-align: center; padding: 0 5px; }

.chat-main { padding-bottom: 78px; }
.chat-list { padding: 8px 0 12px; min-height: 40vh; }
.chat-day { text-align: center; font-size: 11px; color: var(--muted); margin: 10px 0 6px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 15px; font-size: 14px; line-height: 1.65; margin: 6px 0; white-space: pre-wrap; word-break: break-word; }
.bubble.me { margin-left: auto; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.bubble.other { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.chat-input {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line);
}
.chat-input textarea {
  flex: 1; min-height: 42px; max-height: 100px; resize: none; font-family: inherit; font-size: 14px;
  padding: 11px 13px; border-radius: 13px; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.chat-input .btn { height: 42px; }
.chat-tip { text-align: center; font-size: 11.5px; color: var(--muted); padding: 14px 0 4px; }

/* ============ 空结果页 / 搜索无结果 ============ */
.empty-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.hot-title {
  font-size: 12.5px; color: var(--muted); text-align: left;
  margin: 22px 2px 10px; padding-top: 16px; border-top: 1px dashed var(--line);
}

/* ============ 下单留言快捷短语 ============ */
.quick-phrases { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.quick-phrases button {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2);
  font-size: 12px; line-height: 1; padding: 8px 11px; border-radius: 999px;
}
.quick-phrases button:active { background: var(--brand-soft); border-color: #e3c9c0; }

/* ============ 举报入口 ============ */
.report-row { text-align: center; padding: 16px 0 4px; }
.report-link {
  border: 0; background: transparent; color: var(--muted);
  font-size: 12.5px; padding: 8px 12px; text-decoration: underline; text-underline-offset: 3px;
}
.report-link:active { color: var(--brand); }

/* ============ 管理端：数据看板 ============ */
.admin-tabs { display: flex; gap: 6px; margin: 14px 0 12px; flex-wrap: wrap; }
.admin-tabs button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  font-size: 13px; padding: 8px 14px; border-radius: 999px;
}
.admin-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.admin-tabs button .n {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  padding: 0 4px; margin-left: 4px; border-radius: 8px;
  background: #c0392b; color: #fff; font-size: 10px; font-weight: 600; vertical-align: 1px;
}
.admin-tabs button.on .n { background: rgba(255, 255, 255, 0.28); }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 620px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; box-shadow: var(--shadow);
}
.stat .k { font-size: 11.5px; color: var(--muted); letter-spacing: 0.3px; }
.stat .v { font-family: var(--serif); font-size: 23px; font-weight: 700; line-height: 1.25; margin-top: 2px; }
.stat .d { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.stat .d b { color: var(--green); font-weight: 600; }
.stat.warn .v { color: var(--brand); }

/* 近 7 天柱状图：纯 CSS，不引图表库 */
.trend { display: flex; align-items: flex-end; gap: 8px; height: 108px; padding: 10px 2px 0; }
.trend .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; height: 100%; }
.trend .bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; width: 100%; justify-content: center; }
.trend .bar { width: 26%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--brand); }
.trend .bar.b2 { background: var(--gold); }
.trend .bar.b3 { background: var(--green); }
.trend .lb { font-size: 10px; color: var(--muted); white-space: nowrap; }
.trend-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.trend-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

/* 管理端列表里的小信息行 */
.admin-sec-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; margin: 18px 0 8px;
}
.admin-sec-title .spacer2 { flex: 1; }
.muted-line { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.acts-inline { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
