/* ════════════════════════════════════════════
   校园鲜集 — 样式表
   配色：暖米白纸面 / 深墨青 / 金黄 / 墨绿
   ════════════════════════════════════════════ */

:root {
  /* 纸面 */
  --paper:     #f7f5ef;
  --paper-2:   #efebe1;
  --card:      #ffffff;

  /* 墨青 */
  --ink:       #14323e;
  --ink-800:   #1b3d4b;
  --ink-2:     #445d6a;
  --ink-3:     #5f747d;
  --ink-4:     #8a9aa1;

  /* 金黄 */
  --gold:      #f2c14e;
  --gold-600:  #d9a52f;
  --gold-soft: #fbf2da;
  --gold-line: #ecd9a6;

  /* 状态 */
  --green:     #2e9e6b;
  --green-soft:#e7f4ec;
  --warm:      #c8562f;

  /* 线与阴影 */
  --line:      #e6e1d6;
  --line-2:    #f0ece3;
  --sh-1:      0 1px 2px rgba(20, 50, 62, .04), 0 2px 10px rgba(20, 50, 62, .04);
  --sh-2:      0 8px 26px rgba(20, 50, 62, .09);
  --sh-3:      0 22px 60px rgba(20, 50, 62, .18);

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;

  --ease: cubic-bezier(.16, .84, .28, 1);
  --topbar-h: 68px;

  /* 兼容旧变量名 */
  --brand:      var(--gold);
  --brand-600:  var(--gold-600);
  --brand-soft: var(--gold-soft);
  --bg:         var(--paper);
  --mint:       var(--green);
  --mint-soft:  var(--green-soft);
}

* { box-sizing: border-box; }

/* hidden 属性必须压过组件自身的 display 规则 */
[hidden] { display: none !important; }

/* 整页滚动条槽位常驻：筛选到条目变少时，页面不会因为滚动条消失而横向跳动 */
html {
  scrollbar-gutter: stable;
  -webkit-tap-highlight-color: transparent;
}

html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb {
  background: #d9d3c6;
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
html::-webkit-scrollbar-thumb:hover { background: #c2b9a5; background-clip: content-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* 四层色晕：卡片毛玻璃需要有颜色可模糊，这里给足对比 */
  background:
    radial-gradient(760px 560px at 2% 2%, rgba(242, 166, 48, .42), transparent 66%),
    radial-gradient(700px 520px at 99% 8%, rgba(44, 138, 198, .38), transparent 66%),
    radial-gradient(900px 660px at 64% 98%, rgba(44, 170, 112, .34), transparent 68%),
    radial-gradient(640px 480px at 16% 90%, rgba(198, 84, 45, .20), transparent 70%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 0;
}

h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
input[type="search"]::-webkit-search-cancel-button { display: none; }

::selection { background: var(--gold); color: var(--ink); }

/* 英文小标：参考风格里的 EDITORIAL 小字 */
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ══════════ 顶栏 ══════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 245, 239, .92);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
  position: relative;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.16; }

.brand-text b {
  font-size: 17px;
  letter-spacing: .06em;
  font-weight: 800;
  color: var(--ink);
}

/* ── 会动的字标 ── */
.brand-word {
  display: inline-flex;
  perspective: 420px;
}

.brand-word span {
  display: inline-block;
  transform-origin: 50% 70%;
  animation: wordWave 6s var(--ease) infinite;
}

.brand-word span:nth-child(2) { animation-delay: .07s; }
.brand-word span:nth-child(3) { animation-delay: .14s; }
.brand-word span:nth-child(4) { animation-delay: .21s; }

/* 每 6 秒一波 4px 小跳，像磁带走带 */
@keyframes wordWave {
  0%, 90%, 100% { transform: translateY(0); }
  93%           { transform: translateY(-4px); }
  96%           { transform: translateY(0); }
}

/* 悬停：每个字翻一圈，逐个错开 */
.brand:hover .brand-word span {
  animation: wordSpin .58s var(--ease);
}

.brand:hover .brand-word span:nth-child(1) { animation-delay: 0s; }
.brand:hover .brand-word span:nth-child(2) { animation-delay: .045s; }
.brand:hover .brand-word span:nth-child(3) { animation-delay: .09s; }
.brand:hover .brand-word span:nth-child(4) { animation-delay: .135s; }

@keyframes wordSpin {
  0%   { transform: rotateY(0deg) translateY(0); }
  50%  { transform: rotateY(180deg) translateY(-3px); }
  100% { transform: rotateY(360deg) translateY(0); }
}

/* 悬停时扫过一条金线 */
.brand::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .34s var(--ease);
}

.brand:hover::after { transform: scaleX(1); }

.brand-text i {
  font-style: normal;
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* 搜索 */
.search {
  position: relative;
  flex: 1 1 auto;
  max-width: 440px;
  display: flex;
  align-items: center;
}

.search svg {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  outline: none;
  transition: .2s var(--ease);
}

.search input::placeholder { color: var(--ink-4); }

.search input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 50, 62, .08);
}

.search-clear {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 3px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: 10px;
  display: grid;
  place-items: center;
  line-height: 1;
}
.search-clear:hover { background: var(--ink); color: #fff; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* 按钮 */
/* ───── ARC 方块按钮体系：4px 圆角 / 1px 硬边 / 实心色块 ───── */
.btn {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 18px;
  height: 40px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color .12s linear, border-color .12s linear,
              box-shadow .06s linear, transform .06s linear;
}

/* 主操作：琥珀橙块 */
.btn-primary {
  background: #e8a03a;
  color: #2b2419;
  border-color: #c2812a;
}
.btn-primary:hover { background: #f2b055; border-color: #c2812a; }
.btn-primary:active {
  background: #c9862a;
  border-color: #a56c1f;
  box-shadow: inset 0 2px 6px rgba(90, 58, 8, .35);
  transform: translateY(1px);
}

/* 次操作：暖灰米块 */
.btn-ghost {
  background: #e4ddcd;
  border-color: #c9c0ad;
  color: #3a3128;
}
.btn-ghost:hover { background: #efe8d8; border-color: #b4a992; color: #2b2419; }
.btn-ghost:active {
  background: #cfc6b2;
  border-color: #a4977c;
  box-shadow: inset 0 2px 6px rgba(58, 49, 40, .3);
  transform: translateY(1px);
}

/* 危险操作：暗陶土块 */
.btn-danger {
  background: #b85a3a;
  color: #fdf3ec;
  border-color: #95452a;
}
.btn-danger:hover { background: #c96a48; border-color: #95452a; }
.btn-danger:active {
  background: #95452a;
  border-color: #7a3620;
  box-shadow: inset 0 2px 6px rgba(40, 14, 4, .4);
  transform: translateY(1px);
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-ghost:disabled:hover { border-color: #c9c0ad; color: #3a3128; background: #e4ddcd; }

.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }

.plus { font-size: 18px; font-weight: 700; margin-top: -1px; }

/* ══════════ 顶栏动作：大胆一点 ══════════ */
.topbar-actions .btn,
.topbar-actions .msg-btn,
.topbar-actions .avatar-btn {
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .14s linear, border-color .14s linear;
}

.topbar-actions .btn:hover { transform: translateY(-2px); }
.topbar-actions .btn:active { transform: translateY(2px) scale(.97); }

/* 发布闲置：金色扫光 + 加号旋转 + 周期闪烁 */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -70%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: skewX(-16deg);
  pointer-events: none;
}

.btn-primary:hover::after { animation: sheen .62s var(--ease); }

@keyframes sheen {
  from { left: -70%; }
  to   { left: 130%; }
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  pointer-events: none;
  box-shadow: inset 0 0 0 0 rgba(255, 240, 200, 0);
  animation: goldBlink 7s ease-out 2.6s infinite;
}

@keyframes goldBlink {
  0%, 84%, 100% { box-shadow: inset 0 0 0 0 rgba(255, 240, 200, 0); }
  88%           { box-shadow: inset 0 0 0 3px rgba(255, 244, 214, .9); }
  94%           { box-shadow: inset 0 0 0 0 rgba(255, 240, 200, 0); }
}

.plus {
  display: inline-block;
  transition: transform .3s var(--ease);
}
.btn-primary:hover .plus { transform: rotate(90deg) scale(1.15); }

/* 消息按钮：图标歪一下 */
.msg-ico {
  display: inline-flex;
  transition: transform .24s var(--ease);
}
.msg-btn:hover .msg-ico { transform: scale(1.16) rotate(-7deg); }
.msg-btn:active { transform: translateY(2px) scale(.94); }

/* 头像按钮：歪头 */
.avatar-btn:hover { transform: rotate(-9deg) scale(1.1); }
.avatar-btn:active { transform: rotate(-9deg) scale(.95); }

/* 未读角标弹出 */
.msg-badge:not([hidden]) { animation: badgePop .36s var(--ease) both; }

@keyframes badgePop {
  0%   { transform: scale(0); }
  62%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  border: 1px solid #c9c0ad;
  background: #e4ddcd;
  font-size: 19px;
  display: grid;
  place-items: center;
  transition: background-color .12s linear, border-color .12s linear;
}
.avatar-btn:hover { background: #efe8d8; border-color: #b4a992; }

.search-mobile { display: none; padding: 0 16px 12px; }

/* ══════════ 页面容器 ══════════ */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 80px;
}

/* ══════════ 今日出摊（深色块） ══════════ */
.board {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 150% at 100% -10%, rgba(242, 193, 78, .34), transparent 58%),
    radial-gradient(90% 130% at -8% 112%, rgba(78, 170, 200, .24), transparent 60%),
    linear-gradient(135deg, #061c26 0%, #0f2f3b 42%, #1b4d5f 100%);
  border: 1px solid rgba(242, 193, 78, .22);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 24px;
  color: #fff;
  box-shadow:
    0 20px 48px rgba(6, 28, 38, .32),
    inset 0 1px 0 rgba(255, 255, 255, .1);
}

.board::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(242, 193, 78, .32);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 193, 78, .14), transparent 70%);
  pointer-events: none;
}

.board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.board-head .eyebrow { color: rgba(255, 255, 255, .42); display: block; margin-bottom: 8px; }

.board-head h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--ink);
  background: var(--gold);
  padding: 4px 8px;
  border-radius: 4px;
}

.live .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .3; transform: scale(.7); }
}

.board-head p { font-size: 13px; color: rgba(255, 255, 255, .5); margin-top: 7px; }

/* ───── 求购墙标题：逐字升起 + 打字机眉标 + 金线周期扫过 ───── */
.wanted-head .wanted-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-bottom: 8px;
}

.wanted-eyebrow .eb-c {
  display: inline-block;
  opacity: 0;
  transform: translateY(-4px);
}

.wanted-head.play .wanted-eyebrow .eb-c {
  animation: ebIn .26s var(--ease) forwards;
}

.wanted-head.play .wanted-eyebrow .eb-c:nth-child(1)  { animation-delay: .02s; }
.wanted-head.play .wanted-eyebrow .eb-c:nth-child(2)  { animation-delay: .06s; }
.wanted-head.play .wanted-eyebrow .eb-c:nth-child(3)  { animation-delay: .10s; }
.wanted-head.play .wanted-eyebrow .eb-c:nth-child(4)  { animation-delay: .14s; }
.wanted-head.play .wanted-eyebrow .eb-c:nth-child(5)  { animation-delay: .18s; }
.wanted-head.play .wanted-eyebrow .eb-c:nth-child(6)  { animation-delay: .22s; }
.wanted-head.play .wanted-eyebrow .eb-c:nth-child(7)  { animation-delay: .26s; }
.wanted-head.play .wanted-eyebrow .eb-c:nth-child(8)  { animation-delay: .30s; }
.wanted-head.play .wanted-eyebrow .eb-c:nth-child(9)  { animation-delay: .34s; }
.wanted-head.play .wanted-eyebrow .eb-c:nth-child(10) { animation-delay: .38s; }

.wanted-eyebrow .eb-cursor {
  display: inline-block;
  width: 5px;
  height: 9px;
  margin-left: 4px;
  background: var(--gold);
  opacity: 0;
}

.wanted-head.play .wanted-eyebrow .eb-cursor {
  animation: ebBlink 1s steps(1, end) infinite;
  animation-delay: .46s;
  opacity: 1;
}

@keyframes ebIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ebBlink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.board-head .wanted-title {
  position: relative;
  display: inline-flex;
  gap: 0;
  padding-bottom: 8px;
}

.wanted-title .bt-w {
  display: inline-block;
  overflow: hidden;
  padding: 0 1.5px;
}

.wanted-title .bt-c {
  display: inline-block;
  transform: translateY(115%);
}

.wanted-head.play .wanted-title .bt-c {
  animation: btRise .5s cubic-bezier(.2, .9, .25, 1) forwards;
}

.wanted-head.play .wanted-title .bt-w:nth-child(1) .bt-c { animation-delay: .04s; }
.wanted-head.play .wanted-title .bt-w:nth-child(2) .bt-c { animation-delay: .09s; }
.wanted-head.play .wanted-title .bt-w:nth-child(3) .bt-c { animation-delay: .14s; }
.wanted-head.play .wanted-title .bt-w:nth-child(4) .bt-c { animation-delay: .19s; }
.wanted-head.play .wanted-title .bt-w:nth-child(5) .bt-c { animation-delay: .24s; }
.wanted-head.play .wanted-title .bt-w:nth-child(6) .bt-c { animation-delay: .29s; }
.wanted-head.play .wanted-title .bt-w:nth-child(7) .bt-c { animation-delay: .34s; }

.wanted-head.play .wanted-title .bt-w:nth-child(8) .bt-c {
  color: var(--gold);
  animation: btRise .5s cubic-bezier(.2, .9, .25, 1) .4s forwards,
             qGlow 3.6s ease-in-out 1.3s infinite;
}

@keyframes btRise {
  from { transform: translateY(115%); }
  to   { transform: translateY(0); }
}

@keyframes qGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(242, 193, 78, 0); }
  50%      { text-shadow: 0 0 16px rgba(242, 193, 78, .8); }
}

.wanted-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
}

.wanted-head.play .wanted-title::after {
  animation: btSweep 7s var(--ease) 1.6s infinite;
}

@keyframes btSweep {
  0%, 72%   { transform: scaleX(0); }
  78%       { transform: scaleX(1); }
  88%       { transform: scaleX(1); }
  94%, 100% { transform: scaleX(0); }
}

.wanted-sub { opacity: 0; }

.wanted-head.play .wanted-sub {
  animation: subIn .55s var(--ease) .46s forwards;
}

@keyframes subIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.board-stats {
  display: flex;
  gap: 26px;
  flex: 0 0 auto;
  padding-top: 4px;
}

/* ───── 外卖小电车（求购墙的循环彩蛋） ───── */
.delivery {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 560px;
  margin: 0 26px;
  align-self: center;
}

.dlv {
  width: 100%;
  height: 92px;
  display: block;
}

.dlv line,
.dlv circle,
.dlv path,
.dlv rect,
.dlv polygon {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dlv-ground { stroke: rgba(237, 233, 221, .24); stroke-width: 1.4; }

.dlv-road {
  stroke: rgba(237, 233, 221, .15);
  stroke-width: 1.4;
  stroke-dasharray: 18 42;
  animation: dlvRoad 13s linear infinite;
}

.dlv-frame { stroke: rgba(237, 233, 221, .6); stroke-width: 1.7; }
.dlv-wheel circle { stroke: rgba(237, 233, 221, .6); stroke-width: 1.7; }
.dlv-wheel circle:last-of-type { stroke-width: 1.3; }
.dlv-wheel line { stroke: rgba(237, 233, 221, .28); stroke-width: 1; }
.dlv-lamp { stroke: var(--gold); stroke-width: 1.7; }

.dlv-head circle,
.dlv-limb { stroke: rgba(237, 233, 221, .94); stroke-width: 2.2; }
.dlv-helmet { stroke: var(--gold); stroke-width: 1.9; }
.dlv-visor { stroke: rgba(237, 233, 221, .55); stroke-width: 1.4; }

.dlv .dlv-box rect { stroke: rgba(242, 193, 78, .8); stroke-width: 1.4; fill: rgba(242, 193, 78, .1); }
.dlv .dlv-box path { stroke: rgba(242, 193, 78, .55); stroke-width: 1.2; }

.dlv .dlv-flag {
  fill: var(--gold);
  stroke: none;
  transform-box: view-box;
  transform-origin: 58px 19px;
  animation: dlvFlag .66s ease-in-out infinite;
}

/* 轮子飞转 */
.dlv-wheel {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: dlvWheel 1.1s linear infinite;
}

/* 整车：匀速横穿 → 中段小跳 → 完全出场 → 停一秒 */
.dlv-path {
  transform-box: view-box;
  transform-origin: 0 0;
  animation: dlvPath 13s linear infinite;
}

/* 悬挂上下颠 */
.dlv-bob {
  transform-box: view-box;
  transform-origin: 0 0;
  animation: dlvBob .58s ease-in-out infinite;
}

/* 车身轻微俯仰 */
.dlv-tilt {
  transform-box: view-box;
  transform-origin: 52px 86px;
  animation: dlvTilt .87s ease-in-out infinite;
}

/* 骑手自己也在晃 */
.dlv-rider {
  transform-box: view-box;
  transform-origin: 68px 58px;
  animation: dlvRiderBob .71s ease-in-out infinite;
}

/* 脑袋点头 */
.dlv-head {
  transform-box: view-box;
  transform-origin: 78px 40px;
  animation: dlvHeadNod .53s ease-in-out infinite;
}

/* 货箱跟着颠 */
.dlv-box {
  transform-box: view-box;
  transform-origin: 48px 62px;
  animation: dlvBoxWob 1.03s ease-in-out infinite;
}

@keyframes dlvRoad {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: 480; }
}

@keyframes dlvWheel {
  to { transform: rotate(360deg); }
}

/* 全程匀速：约 5.6px / 1%，进场与出场同速 */
@keyframes dlvPath {
  0%    { transform: translate(-130px, 0); }
  20%   { transform: translate(-17px, 0); }
  40%   { transform: translate(96px, 0); }
  44%   { transform: translate(118px, 0); }
  47%   { transform: translate(135px, -6px); }
  50%   { transform: translate(152px, -14px); }
  53%   { transform: translate(169px, -6px); }
  56%   { transform: translate(185px, 0); }
  58%   { transform: translate(196px, 2px); }
  62%   { transform: translate(219px, 0); }
  80%   { transform: translate(320px, 0); }
  92.3% { transform: translate(390px, 0); }
  100%  { transform: translate(390px, 0); }
}

@keyframes dlvBob {
  0%, 100% { transform: translateY(0); }
  22%      { transform: translateY(-1.6px); }
  48%      { transform: translateY(.4px); }
  74%      { transform: translateY(-1px); }
}

@keyframes dlvTilt {
  0%, 100% { transform: rotate(-1.2deg); }
  50%      { transform: rotate(1.2deg); }
}

@keyframes dlvRiderBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  28%      { transform: translateY(-2px) rotate(-2deg); }
  62%      { transform: translateY(.5px) rotate(1.2deg); }
}

@keyframes dlvHeadNod {
  0%, 100% { transform: rotate(-2.5deg); }
  50%      { transform: rotate(2.5deg); }
}

@keyframes dlvBoxWob {
  0%, 100% { transform: rotate(-2.2deg); }
  50%      { transform: rotate(2.2deg); }
}

@keyframes dlvFlag {
  0%, 100% { transform: rotate(-18deg); }
  50%      { transform: rotate(14deg); }
}

@media (max-width: 1080px) {
  .delivery { display: none; }
}

.stat { text-align: center; }
.stat b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat span { font-size: 11px; color: rgba(255, 255, 255, .45); letter-spacing: .04em; }

.stalls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 10px;
  position: relative;
  z-index: 1;
}

.stall {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .1);
  text-align: left;
  color: #fff;
  transition: .2s var(--ease);
}

.stall:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(242, 193, 78, .45);
  transform: translateY(-2px);
}

.stall-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 19px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .1);
}

.stall-info { min-width: 0; flex: 1; }
.stall-info b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stall-info span {
  display: block;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}

.stall-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(242, 193, 78, .12);
  padding: 4px 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

/* ══════════ 分类 ══════════ */
.cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }

.cat {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: .18s var(--ease);
}

.cat:hover { border-color: var(--ink-4); color: var(--ink); }

.cat.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 50, 62, .2);
}

.cat .ico svg { stroke-width: 1.7; }
.cat .num {
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  opacity: .5;
  font-weight: 700;
}
.cat.on .num { color: var(--gold); opacity: .85; }

/* ══════════ 工具栏 ══════════ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-right .sel-sm,
.toolbar-right .segmented { flex: 0 0 auto; }

.count { font-size: 12.5px; color: var(--ink-3); letter-spacing: .02em; }
.count b { color: var(--ink); font-weight: 800; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }

.switch-track {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #ddd8cc;
  position: relative;
  transition: .2s var(--ease);
  flex: 0 0 auto;
}

.switch-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 50, 62, .25);
  transition: .2s var(--ease);
}

.switch input:checked + .switch-track { background: var(--ink); }
.switch input:checked + .switch-track .switch-knob { transform: translateX(14px); background: var(--gold); }

.segmented {
  display: inline-flex;
  background: var(--paper-2);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.segmented button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0 14px;
  height: 30px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  transition: .18s var(--ease);
}

.segmented button:hover { color: var(--ink-2); }

.segmented button.on {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 6px rgba(20, 50, 62, .18);
}

/* ══════════ 商品网格 ══════════ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(226px, 1fr));
  gap: 18px;
}

.card {
  background: rgba(255, 255, 255, .74);
  -webkit-backdrop-filter: blur(9px) saturate(1.15);
  backdrop-filter: blur(9px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(20, 50, 62, .05),
    0 8px 24px rgba(20, 50, 62, .07),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  transform: perspective(760px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg))
             translateY(var(--lift, 0px));
  transition: transform .3s var(--ease), box-shadow .24s var(--ease), border-color .24s linear;
}

.card:hover {
  --lift: -4px;
  box-shadow: var(--sh-2);
  border-color: var(--gold-line);
}

/* 跟手倾斜：进入时缩短过渡，跟手更紧 */
.card.tilting,
.want-card.tilting {
  transition: transform .06s linear, box-shadow .24s var(--ease), border-color .24s linear;
  will-change: transform;
}

.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 8px 8px 0;
  border-radius: 12px;
}

/* ── 线条图标 ── */
.ico { display: inline-flex; align-items: center; flex: 0 0 auto; }
.ico svg { display: block; }
.tag .ico { margin-right: 5px; vertical-align: -2px; }
.cat .ico { color: inherit; }
.cat .ico svg { stroke-width: 1.7; }

/* 卡片封面上的大号线稿 */
.card-ico {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  color: rgba(20, 50, 62, .72);
  filter: drop-shadow(0 12px 20px rgba(20, 50, 62, .16));
  transition: transform .3s var(--ease);
}
.card-ico svg { width: 62px; height: 62px; stroke-width: 1.15; }
.card:hover .card-ico { transform: scale(1.06); }

.d-ico { z-index: 2; }
.d-ico svg { width: 102px; height: 102px; }
.d-hero .d-ico { animation: floatIn .5s var(--ease) both; }

.want-emoji svg { width: 22px; height: 22px; stroke-width: 1.6; }

.mine-thumb,
.match-thumb,
.cs-ava,
.want-emoji { color: rgba(20, 50, 62, .68); }

/* 封面斜纹，压掉「纯色块」的廉价感（有照片时不上纹） */
.card-media:not(.has-img)::before,
.d-hero:not(.has-img)::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, .2) 0 1px,
    transparent 1px 8px
  );
  pointer-events: none;
}

.card-media .corner-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .86);
  color: var(--ink-2);
  backdrop-filter: blur(6px);
}

.card-media .out-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: .05em;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-media .out-tag .dot {
  width: 4px; height: 4px; border-radius: 50%; background: #fff;
  animation: pulse 1.6s infinite;
}

.card-body { padding: 12px 14px 14px; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
  color: var(--ink);
}

.card-price {
  margin-top: 9px;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.card-price b {
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.card-price b .cur {
  font-size: 12px;
  font-weight: 700;
  margin-right: 2px;
  color: var(--gold-600);
}

.card-price s {
  font-size: 11.5px;
  color: var(--ink-4);
  text-decoration-thickness: 1px;
}

.card-meta {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #52656f;
  white-space: nowrap;
  overflow: hidden;
}

.card-meta .seller-ava {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  background: #e4efe1;
  border: 1px solid #d3e2cf;
}

.card-meta .wants { color: #b0784a; font-weight: 700; }
.card-meta .sep { color: #cdc5b2; }
.card-meta .spacer { margin-left: auto; }
.card-meta .loc { overflow: hidden; text-overflow: ellipsis; }

.card.sold { opacity: .6; }
.card.sold .card-media::after {
  content: "已出手";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .3em;
  color: var(--ink);
  background: rgba(247, 245, 239, .62);
  backdrop-filter: blur(1.5px);
}

/* ══════════ 空状态 ══════════ */
.empty {
  text-align: center;
  padding: 70px 20px 60px;
}
.empty-emoji { font-size: 50px; opacity: .5; margin-bottom: 12px; }
.empty h3 { font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.empty p { color: var(--ink-3); font-size: 13.5px; margin: 8px 0 22px; }

/* ══════════ 页脚 ══════════ */
.foot {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .04em;
}
.foot b { color: var(--ink); font-weight: 800; letter-spacing: .1em; }
.foot-sub { margin-top: 6px; color: var(--ink-4); }

/* ══════════ 遮罩 ══════════ */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 50, 62, .42);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .24s var(--ease);
}
.scrim.show { opacity: 1; }

/* 从聊天里打开商品详情时，抽屉要盖在聊天面板之上 */
#drawer.over-chat { z-index: 63; }

/* ══════════ 详情抽屉 ══════════ */
.drawer {
  position: fixed;
  z-index: 60;
  top: 0; right: 0; bottom: 0;
  width: min(480px, 100vw);
  background: var(--paper);
  box-shadow: var(--sh-3);
  transform: translateX(102%);
  transition: transform .34s var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer.open { transform: translateX(0); }

.drawer-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 3;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 13px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(20, 50, 62, .18);
  transition: .18s;
}
.drawer-close:hover { background: var(--ink); color: #fff; transform: rotate(90deg); }

.drawer-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer-body > * { flex: 0 0 auto; }

/* 详情内容 */
.d-hero {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(16px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.d-main { padding: 22px 24px 0; }

.d-main .eyebrow { display: block; margin-bottom: 10px; }

.d-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.d-price b {
  font-size: 34px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.d-price b .cur { font-size: 17px; margin-right: 3px; color: var(--gold-600); }
.d-price s { font-size: 12.5px; color: var(--ink-4); }
.d-price .save {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--gold);
  padding: 3px 8px;
  border-radius: 4px;
}

.d-title {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.42;
  margin-top: 14px;
  letter-spacing: .01em;
}

.d-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }

.tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: .02em;
}
.tag.mint { background: var(--green-soft); color: #1f7a52; }
.tag.warn { background: var(--gold-soft); color: #8a6410; }

.d-section { margin-top: 24px; }
.d-section h4 {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-3);
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.d-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.d-out {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
}
.d-out .ico { font-size: 21px; }
.d-out b { display: block; font-size: 13.5px; color: var(--ink); }
.d-out span { font-size: 12px; color: #8a6410; }

.d-seller {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}
.d-seller-ava {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 22px;
  background: var(--paper-2);
  flex: 0 0 auto;
}
.d-seller-info { flex: 1; min-width: 0; }
.d-seller-info b { font-size: 14.5px; display: flex; align-items: center; gap: 6px; letter-spacing: .02em; }
.d-seller-info .verified {
  font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
  color: #1f7a52; background: var(--green-soft);
  padding: 2px 6px; border-radius: 4px;
}
.d-seller-info span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.d-seller-credit { text-align: right; font-size: 10.5px; color: var(--ink-3); letter-spacing: .02em; }
.d-seller-credit b {
  display: block;
  font-size: 16px;
  color: var(--gold-600);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  margin-bottom: 2px;
}

.d-stats {
  display: flex;
  gap: 18px;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  letter-spacing: .02em;
}

/* 抽屉底部操作条（吸附在滚动区底部） */
.d-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(247, 245, 239, .94);
  backdrop-filter: blur(10px);
  display: flex;
  gap: 10px;
  align-items: center;
}

.want-btn {
  border: 1px solid #c9c0ad;
  background: #e4ddcd;
  border-radius: 4px;
  height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 13.5px;
  color: #3a3128;
  transition: background-color .12s linear, border-color .12s linear,
              box-shadow .06s linear, transform .06s linear;
  flex: 0 0 auto;
}
.want-btn:hover { background: #efe8d8; border-color: #b4a992; }
.want-btn:active { background: #cfc6b2; box-shadow: inset 0 2px 6px rgba(58, 49, 40, .3); transform: translateY(1px); }
.want-btn.on {
  background: #e8a03a;
  border-color: #c2812a;
  color: #2b2419;
}
.want-btn.on:hover { background: #f2b055; }
.want-btn .heart { display: inline-flex; color: #8a6a3a; }
.want-btn.on .heart { color: #7a2f18; }
.want-btn.on .heart svg { fill: currentColor; }

.replies .ico { margin-right: 3px; vertical-align: -1px; }

/* ══════════ 弹窗 ══════════ */
.modal {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  background: rgba(20, 50, 62, .38);
  backdrop-filter: blur(3px);
  transition: opacity .22s var(--ease);
}
.modal.open { opacity: 1; pointer-events: auto; }

.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  transform: translateY(14px) scale(.985);
  transition: transform .26s var(--ease);
  border: 1px solid var(--line);
}
.modal.open .modal-card { transform: none; }

.modal-sm .modal-card { width: min(420px, 100%); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 14px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.modal-head h2 { font-size: 18px; font-weight: 800; letter-spacing: .03em; }

.icon-btn {
  width: 32px; height: 32px;
  border: 1px solid #d6ccb8;
  border-radius: 4px;
  background: #efe9db;
  color: var(--ink-2);
  font-size: 13px;
  display: grid;
  place-items: center;
  transition: background-color .12s linear, border-color .12s linear, color .12s linear;
}
.icon-btn:hover { background: #f7f1e4; border-color: #b4a992; color: var(--ink); }
.icon-btn:active { background: #ded5c2; box-shadow: inset 0 2px 5px rgba(58, 49, 40, .3); }

/* 表单 */
.form { padding: 4px 22px 22px; display: flex; flex-direction: column; gap: 15px; }

.form-lead { font-size: 13px; color: var(--ink-3); line-height: 1.65; }
.form-lead b { color: var(--ink-2); }

.field { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.field label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  color: var(--ink-3);
}
.field label em { color: var(--warm); font-style: normal; }

.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 13px;
  background: #fff;
  outline: none;
  transition: .16s var(--ease);
  font-size: 14px;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 50, 62, .08);
}
.field input.bad { border-color: var(--warm); background: #fff8f6; }

.hint { font-size: 11.5px; color: var(--ink-4); }
.hint.bad { color: var(--warm); }

.row { display: flex; gap: 12px; }

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}
.check input { width: 16px; height: 16px; accent-color: var(--ink); cursor: pointer; }

/* ══════════ 自定义下拉 ══════════ */
.sel { position: relative; }

.sel-btn {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  transition: border-color .12s linear, box-shadow .12s linear;
}
.sel-btn:hover { border-color: var(--ink-4); }
.sel.open .sel-btn { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 50, 62, .08); }

.sel-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sel-caret { flex: 0 0 auto; color: var(--ink-3); transition: transform .18s var(--ease); }
.sel.open .sel-caret { transform: rotate(180deg); }

.sel-menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--sh-2);
  max-height: 176px;
  overflow-y: auto;
  display: none;
}
.sel.open .sel-menu { display: block; animation: selIn .14s var(--ease); }

@keyframes selIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sel-opt {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 4px;
  background: none;
  text-align: left;
  font-size: 13.5px;
  color: var(--ink-2);
}
.sel-opt:hover { background: var(--paper-2); }
.sel-opt.on { background: var(--ink); color: #fff; font-weight: 700; }

/* 工具栏里的紧凑版 */
.sel-sm {
  flex: 0 0 auto;
}

.sel-sm .sel-btn {
  height: 34px;
  padding: 0 11px;
  font-size: 12.5px;
  border-radius: 999px;
  width: auto;
}
.sel-sm .sel-label { font-weight: 700; }
.sel-sm .sel-menu {
  right: auto;
  min-width: 168px;
}

/* ══════════ 搜索历史 ══════════ */
.search-history {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--sh-2);
}

.sh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 6px;
  font-size: 11px;
  color: var(--ink-3);
}

.sh-clear {
  border: 0;
  background: none;
  padding: 0;
  font-size: 11px;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sh-clear:hover { color: var(--warm); }

.sh-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: none;
  text-align: left;
  font-size: 13px;
  color: var(--ink-2);
}
.sh-item:hover { background: var(--paper-2); }



/* ══════════ 封面图案选择器 ══════════ */
.cover-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cover-opt {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: rgba(20, 50, 62, .68);
  display: grid;
  place-items: center;
  transition: transform .12s var(--ease), border-color .12s linear, background-color .12s linear;
}
.cover-opt svg { width: 22px; height: 22px; stroke-width: 1.5; }
.cover-opt:hover { border-color: var(--ink-4); transform: translateY(-1px); }
.cover-opt.on {
  border-color: var(--ink);
  background: var(--gold-soft);
  color: var(--ink);
  box-shadow: 0 0 0 2px var(--gold);
}

/* 详情里的实拍图条 */
.d-shots {
  display: flex;
  gap: 8px;
  padding: 12px 24px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.d-shots::-webkit-scrollbar { display: none; }

.d-shot {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: var(--paper-2);
}
.d-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-shot:hover { border-color: var(--ink-4); }

.form-error {
  font-size: 12.5px;
  color: var(--warm);
  background: #fdf1ec;
  border: 1px solid #f3d4c6;
  border-radius: var(--r-sm);
  padding: 9px 12px;
}

.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 6px;
}
.modal-foot .btn-block { flex: 1; }

/* 分享图卡 */
.share-body { padding: 0 22px 14px; }

.share-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  max-height: 56vh;
  aspect-ratio: 3 / 4;
}

.share-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.share-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
}

/* 二次确认 */
.confirm-body { padding: 0 22px 22px; }
.confirm-body p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 20px;
}

/* 聊天内的二次确认 */
.chat-confirm {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 50, 62, .38);
  backdrop-filter: blur(3px);
  animation: fadeIn .16s var(--ease) both;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.chat-confirm-card {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(20, 50, 62, .26);
}

.chat-confirm-card h3 { font-size: 15px; font-weight: 800; line-height: 1.5; }
.chat-confirm-card p {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.7;
  margin: 8px 0 16px;
}

.chat-confirm-actions { display: flex; gap: 8px; }
.chat-confirm-actions .btn { flex: 1; height: 42px; }

/* 联系方式交换卡片 */
.contact-card {
  width: min(78%, 320px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
}
.contact-card.done { border-color: #c6e3d3; background: var(--green-soft); }
.contact-card.refused { border-color: var(--line); background: var(--paper-2); }

.contact-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--ink-3);
  margin-bottom: 7px;
}

.contact-card-main { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.5; }

.contact-card-hint {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 7px;
  line-height: 1.5;
}
.contact-card-hint.clickable { color: var(--gold-600); font-weight: 700; }

.contact-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.contact-value b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.contact-copy {
  flex: 0 0 auto;
  border: 1px solid #d6ccb8;
  background: #efe9db;
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #3a3128;
}
.contact-copy:hover { background: #f7f1e4; }
.contact-copy:active { background: #ded5c2; box-shadow: inset 0 2px 5px rgba(58, 49, 40, .28); }

/* 下拉出来的操作区 */
.contact-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: msgIn .18s var(--ease) both;
}

.contact-actions .row-btns { display: flex; gap: 8px; }
.contact-actions .btn { flex: 1; height: 36px; font-size: 12.5px; padding: 0 10px; }

.contact-actions input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
  font-size: 13.5px;
  outline: none;
  background: #fff;
}
.contact-actions input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 50, 62, .08);
}

/* ══════════ 我的摊位 ══════════ */
.sheet {
  position: fixed;
  z-index: 65;
  inset: 0;
  background: var(--paper);
  transform: translateY(100%);
  transition: transform .3s var(--ease);
  display: flex;
  flex-direction: column;
}
.sheet.open { transform: translateY(0); }

.sheet-head {
  height: 60px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  padding: 0 16px;
  background: rgba(247, 245, 239, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
  margin: 0;
  text-align: center;
  justify-self: center;
}
.sheet-head > *:first-child { justify-self: start; }
.sheet-head > *:last-child { justify-self: end; }
.sheet-head span { width: 32px; }

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 20px 60px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

.profile {
  background: var(--ink);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.profile::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -60px;
  width: 160px; height: 160px;
  border: 1px solid rgba(242, 193, 78, .18);
  border-radius: 50%;
}

.profile-ava {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 29px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  flex: 0 0 auto;
}

.profile-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.profile-info h3 {
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  letter-spacing: .02em;
}
.profile-info p { font-size: 11.5px; color: rgba(255, 255, 255, .5); margin-top: 5px; letter-spacing: .03em; }

.profile-info .verified {
  font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
  color: var(--ink); background: var(--gold);
  padding: 2px 6px; border-radius: 4px;
}
.profile-info .tag.warn {
  background: rgba(242, 193, 78, .15);
  color: var(--gold);
}

.profile-edit {
  border: 1px solid #c9c0ad;
  background: #e4ddcd;
  border-radius: 4px;
  padding: 9px 15px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .03em;
  color: #2b2419;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  transition: background-color .12s linear, border-color .12s linear;
}
.profile-edit:hover { background: #efe8d8; border-color: #b4a992; }
.profile-edit:active { background: #cfc6b2; box-shadow: inset 0 2px 6px rgba(58, 49, 40, .3); }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 14px;
}
.profile-stat { background: #fff; padding: 14px 8px; text-align: center; }
.profile-stat b {
  display: block;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -.02em;
}
.profile-stat span {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .02em;
}

.tabs {
  display: flex;
  gap: 26px;
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: 0;
  background: none;
  padding: 0 0 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-3);
  position: relative;
  transition: .16s;
  letter-spacing: .03em;
  white-space: nowrap;
  flex: 0 0 auto;
}
.tabs button:hover { color: var(--ink-2); }
.tabs button.on { color: var(--ink); }
.tabs button.on::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.mine-list { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }

.mine-row {
  display: flex;
  align-items: center;
  gap: 13px;
  row-gap: 0;
  flex-wrap: wrap;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px;
  transition: .18s var(--ease);
}
.mine-row:hover { border-color: var(--gold-line); box-shadow: var(--sh-1); }
.mine-row.open { border-color: var(--gold-line); }

.mine-row-expand { cursor: pointer; }
.mine-row-expand:focus-visible { outline: 2px solid var(--ink-3); outline-offset: 2px; }
.mine-caret { margin-left: auto; width: 18px; text-align: center; color: var(--ink-3); font-size: 11px; }

/* 消息行内展开的操作条：整行换行，卡片自然变高，下面的行被推下去 */
.mine-drop {
  flex: 0 0 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: msgIn .18s var(--ease) both;
}
.mine-drop .btn { height: 34px; padding: 0 14px; font-size: 12.5px; }

.mine-thumb {
  width: 58px; height: 58px;
  border-radius: 9px;
  overflow: hidden;
  display: grid; place-items: center;
  font-size: 25px;
  flex: 0 0 auto;
}

.mine-info { flex: 1; min-width: 0; }
.mine-info b { font-size: 13.5px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine-info .sub { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 9px; align-items: center; }
.mine-info .sub .preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}
.mine-info .price { color: var(--ink); font-weight: 800; font-size: 13.5px; }

.mine-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}
.mini-btn {
  border: 1px solid #d6ccb8;
  background: #efe9db;
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #3a3128;
  transition: background-color .12s linear, border-color .12s linear, color .12s linear;
  white-space: nowrap;
}
.mini-btn:hover { background: #f7f1e4; border-color: #b4a992; color: var(--ink); }
.mini-btn:active { background: #ded5c2; box-shadow: inset 0 2px 5px rgba(58, 49, 40, .28); }
.mini-btn.danger:hover { border-color: #d3a08d; color: #a5431f; background: #fbeee8; }
.mini-btn.danger:active { background: #f3ddd2; box-shadow: inset 0 2px 5px rgba(120, 50, 20, .25); }
.mini-btn.primary {
  background: #e8a03a;
  border-color: #c2812a;
  color: #2b2419;
}
.mini-btn.primary:hover { background: #f2b055; }

.mine-empty {
  text-align: center;
  padding: 54px 20px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.7;
}
.mine-empty .e {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  opacity: .55;
}

.reserve-tag svg { vertical-align: -2px; margin-right: 2px; }

/* ══════════ Toast ══════════ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 16px);
  z-index: 90;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 12px 22px;
  border-radius: 9px;
  box-shadow: 0 14px 34px rgba(20, 50, 62, .34);
  opacity: 0;
  transition: .26s var(--ease);
  pointer-events: none;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 9px;
  vertical-align: 2px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ══════════ 消息入口 ══════════ */
.msg-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  border: 1px solid #c9c0ad;
  background: #e4ddcd;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex: 0 0 auto;
  transition: background-color .12s linear, border-color .12s linear;
}
.msg-btn:hover { background: #efe8d8; border-color: #b4a992; }

.msg-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--warm);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--paper);
  font-variant-numeric: tabular-nums;
}

/* ══════════ 聊天面板 ══════════ */
.chat {
  position: fixed;
  z-index: 62;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(780px, 100vw);
  background: var(--paper);
  box-shadow: var(--sh-3);
  transform: translateX(102%);
  transition: transform .32s var(--ease);
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
.chat.open { transform: none; }

/* 左栏：会话列表 */
.chat-side {
  width: 268px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.chat-side-head {
  flex: 0 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.chat-side-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-gutter: stable;
}

.cs-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color .12s linear, border-color .12s linear;
}
.cs-row:hover { background: var(--paper); }
.cs-row.on { background: var(--paper-2); border-color: var(--gold-line); }

.cs-ava {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex: 0 0 auto;
}

.cs-main { flex: 1; min-width: 0; }

.cs-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-prev {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.cs-time {
  font-size: 10px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

.cs-del {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink-4);
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  visibility: hidden;
}
.cs-row:hover .cs-del { visibility: visible; }
.cs-del:hover { background: #fbeee8; color: var(--warm); }

.cs-dot {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--warm);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
}

.cs-empty {
  padding: 26px 12px;
  font-size: 11.5px;
  color: var(--ink-4);
  text-align: center;
  line-height: 1.7;
}

/* 右栏：对话 */
.chat-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-head {
  flex: 0 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: rgba(247, 245, 239, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.chat-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.chat-ava {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: #e9dec9;
  border: 0;
  flex: 0 0 auto;
}

.chat-who-txt { min-width: 0; }
.chat-who-txt b { display: block; font-size: 14px; font-weight: 800; letter-spacing: .02em; cursor: pointer; }
.chat-who-txt b:hover { text-decoration: underline; text-underline-offset: 3px; }
.chat-who-txt span {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overscroll-behavior: contain;
}

.chat-day {
  align-self: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-4);
  background: var(--paper-2);
  padding: 3px 10px;
  border-radius: 999px;
  margin: 6px 0;
  letter-spacing: .04em;
}

.chat-empty {
  margin: auto;
  padding: 20px;
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-4);
}

.msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 100%;
  animation: msgIn .24s var(--ease) both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.msg-row.me { justify-content: flex-end; }

.msg-face {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 2px;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
  background: #e9dec9;
  color: #5b4a33;
  border: 0;
}

.msg-row.me .msg-face { background: #efe4cc; }

.bubble {
  position: relative;
  max-width: 71%;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
}

.msg-row.them .bubble {
  background: #fff;
  border: 1px solid #ecebe6;
  color: var(--ink);
}

.msg-row.me .bubble {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
}

/* 图片消息 */
.bubble-img { padding: 4px; }

.bubble-img img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  border-radius: 5px;
  cursor: zoom-in;
}

.msg-row.them .bubble-img { background: #fff; border: 1px solid #ecebe6; }
.msg-row.me .bubble-img { background: var(--ink); border: 1px solid var(--ink); }

/* 时间在气泡外，与气泡底边对齐 */
.msg-time {
  flex: 0 0 auto;
  font-size: 10.5px;
  color: var(--ink-4);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  white-space: nowrap;
}

.msg-sys {
  align-self: center;
  font-size: 11px;
  color: var(--ink-3);
  background: var(--paper-2);
  padding: 5px 12px;
  border-radius: 999px;
  text-align: center;
  max-width: 88%;
  line-height: 1.5;
}

/* 预约卡片 */
.appt {
  width: min(72%, 320px);
  border: 1px solid var(--gold-line);
  background: var(--gold-soft);
  border-radius: 8px;
  padding: 12px 14px;
}
.msg-row.me .appt { background: var(--gold-soft); }

.appt-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #8a6410;
  margin-bottom: 8px;
}

.appt-when {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
}
.appt-where { font-size: 12px; color: #8a6410; margin-top: 3px; }

.appt-agree {
  width: 100%;
  height: 38px;
  margin-top: 10px;
  font-size: 13px;
}

.appt-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--gold-line);
  font-size: 11px;
  font-weight: 700;
}
.appt-status.pending { color: #8a6410; }
.appt-status.ok { color: #1f7a52; }
.appt-status.no { color: var(--warm); }

/* 输入中 */
.typing {
  display: flex;
  gap: 4px;
  padding: 14px;
  background: #fff;
  border: 1px solid #ecebe6;
  border-radius: 8px;
  width: fit-content;
}
.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-4);
  animation: tdot 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }

@keyframes tdot {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30%           { opacity: 1; transform: translateY(-3px); }
}

/* 快捷话术 */
.chat-quick {
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 8px 16px 2px;
  scrollbar-width: none;
}
.chat-quick::-webkit-scrollbar { display: none; }

.chat-quick button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: .16s;
}
.chat-quick button:hover { border-color: var(--ink); color: var(--ink); }

/* 输入栏 */
.chat-input {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(247, 245, 239, .94);
  backdrop-filter: blur(10px);
}

.chat-input input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 0 16px;
  outline: none;
  font-size: 14px;
}
.chat-input input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 50, 62, .07); }

.chat-ico {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  border: 1px solid #c9c0ad;
  background: #e4ddcd;
  font-size: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: background-color .12s linear, border-color .12s linear, box-shadow .06s linear;
}
.chat-ico:hover { background: #efe8d8; border-color: #b4a992; }
.chat-ico:active { background: #cfc6b2; box-shadow: inset 0 2px 6px rgba(58, 49, 40, .3); }

/* 预约入口移到聊天顶栏后，锁定样式跟着换到 icon-btn */
.icon-btn.locked { opacity: .4; cursor: not-allowed; }
.icon-btn.locked:hover { background: #efe9db; border-color: #d6ccb8; color: var(--ink-2); }

.chat-send {
  border: 1px solid #c2812a;
  border-radius: 4px;
  background: #e8a03a;
  color: #2b2419;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: .03em;
  height: 42px;
  padding: 0 18px;
  flex: 0 0 auto;
  transition: background-color .12s linear, border-color .12s linear,
              box-shadow .06s linear, transform .06s linear;
}
.chat-send:hover { background: #f2b055; }
.chat-send:active {
  background: #c9862a;
  border-color: #a56c1f;
  box-shadow: inset 0 2px 6px rgba(90, 58, 8, .35);
  transform: translateY(1px);
}
.chat-send:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ══════════ 日期选择 ══════════ */
.days { display: flex; gap: 7px; }

.day-opt {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  padding: 9px 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  transition: .16s;
}
.day-opt small {
  display: block;
  font-size: 10px;
  color: var(--ink-4);
  font-weight: 600;
  margin-top: 2px;
}
.day-opt:hover { border-color: var(--ink-4); }
.day-opt.on {
  border-color: var(--ink);
  background: var(--gold-soft);
  color: var(--ink);
  box-shadow: 0 0 0 2px var(--gold);
}

/* ══════════ 卡片上的预约标记 ══════════ */
.card-media .reserve-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--ink);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 详情页预约提示 */
.d-out.booked {
  background: var(--green-soft);
  border-color: #c6e3d3;
}
.d-out.booked b { color: #1f7a52; }
.d-out.booked span { color: #2b7d57; }

/* 预约列表 */
.booking-status {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--green-soft);
  color: #1f7a52;
}
.booking-status.pending { background: var(--gold-soft); color: #8a6410; }
.booking-status.no { background: #fbeee9; color: var(--warm); }

/* ══════════ 模式切换 ══════════ */
.mode-tabs {
  position: relative;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--paper-2);
  border-radius: 999px;
  margin-bottom: 20px;
}

/* 会滑动的选中底色 */
.mode-indicator {
  position: absolute;
  top: 4px;
  left: 0;
  height: 36px;
  width: 0;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 2px 8px rgba(20, 50, 62, .2);
  pointer-events: none;
  z-index: 0;
  transition: transform .34s var(--ease), width .34s var(--ease);
}

.mode-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  height: 36px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-3);
  transition: color .26s linear;
}
.mode-tab:hover { color: var(--ink-2); }

.mode-tab.on {
  background: transparent;
  color: #fff;
  box-shadow: none;
}

/* ══════════ 求购卡片 ══════════ */
.want-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.want-card {
  background: rgba(255, 255, 255, .76);
  -webkit-backdrop-filter: blur(9px) saturate(1.15);
  backdrop-filter: blur(9px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow:
    0 0 0 1px rgba(20, 50, 62, .05),
    0 8px 24px rgba(20, 50, 62, .06),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  border-radius: var(--r-lg);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: perspective(760px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg))
             translateY(var(--lift, 0px));
  transition: transform .3s var(--ease), box-shadow .22s var(--ease), border-color .22s linear;
}
.want-card:hover {
  --lift: -3px;
  box-shadow: var(--sh-2);
  border-color: var(--gold-line);
}
.want-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.want-card.closed { opacity: .66; }

.want-top { display: flex; align-items: center; gap: 10px; }

.want-emoji {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex: 0 0 auto;
}

.want-budget {
  font-size: 10px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: .04em;
  color: #8a6410;
  background: var(--gold-soft);
  padding: 3px 8px;
  border-radius: 4px;
}
.want-budget.any { color: var(--ink-3); background: var(--paper-2); }

.want-status {
  margin-left: auto;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--green-soft);
  color: #1f7a52;
}
.want-status.closed { background: var(--paper-2); color: var(--ink-3); }

.want-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.want-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.want-meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
}
.want-meta .spacer { margin-left: auto; }
.want-meta .replies { color: var(--ink-2); font-weight: 600; }

/* 求购详情 */
.d-want-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.d-want-emoji {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  flex: 0 0 auto;
}
.d-budget {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.d-budget small {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  margin-left: 4px;
  letter-spacing: .02em;
}

/* 回应 */
.reply-list { display: flex; flex-direction: column; gap: 10px; }

.reply-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
}

.reply-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 7px;
}
.reply-head .face {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: #e9dec9;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex: 0 0 auto;
}
.reply-head b { color: var(--ink); font-size: 12.5px; font-weight: 700; }

.reply-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* 可展开的回应 */
.reply-item.can-open {
  cursor: pointer;
  transition: border-color .14s linear, background-color .14s linear;
}
.reply-item.can-open:hover { border-color: var(--gold-line); background: #fffdf8; }
.reply-item.open { border-color: var(--gold-line); background: #fffdf8; }

.reply-time { margin-left: auto; }

/* 展开后新增的操作行，把后面的回应自然往下推 */
.reply-actions {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: msgIn .18s var(--ease) both;
}
.reply-actions .btn { height: 34px; padding: 0 14px; font-size: 12.5px; }

.reply-hint { font-size: 11px; color: var(--ink-4); }

.reply-empty {
  font-size: 12.5px;
  color: var(--ink-3);
  background: var(--paper-2);
  border-radius: var(--r);
  padding: 16px;
  text-align: center;
}

/* ══════════ 图片上传 ══════════ */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.upload-tile {
  aspect-ratio: 1;
  border: 1px dashed #d6ccb8;
  border-radius: 4px;
  background: #fffdf8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 700;
  transition: border-color .14s linear, background-color .14s linear;
}
.upload-tile:hover { border-color: #b4a992; background: #fff; color: var(--ink-2); }
.upload-tile .upload-ico { font-size: 19px; line-height: 1; }

.upload-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
}
.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-cover {
  position: absolute;
  left: 4px;
  bottom: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(20, 50, 62, .8);
  color: #fff;
}

.upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  font-size: 10px;
  display: grid;
  place-items: center;
  line-height: 1;
}
.upload-remove:hover { background: #fff; }

/* 详情页图片切换条 */
.d-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 24px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.d-thumbs::-webkit-scrollbar { display: none; }

.d-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-2);
  opacity: .62;
  transition: opacity .14s linear, border-color .14s linear;
}
.d-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-thumb:hover { opacity: 1; }
.d-thumb.on { opacity: 1; border-color: var(--ink); }

/* 真实照片：卡片 / 详情 / 列表缩略图 */
.card-img,
.d-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mine-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* ══════════ 求购 ↔ 集市 互推 ══════════ */
.match-list { display: flex; flex-direction: column; gap: 8px; }

.match-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px 10px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  text-align: left;
  transition: border-color .14s linear, background-color .14s linear;
}
.match-row:hover { border-color: var(--gold-line); background: #fffdf8; }

.match-thumb {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: 0 0 auto;
  overflow: hidden;
}
.match-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.match-info { flex: 1; min-width: 0; }
.match-info b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-info span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-go { color: var(--ink-4); font-size: 16px; flex: 0 0 auto; line-height: 1; }

/* ══════════ 抽屉右上角菜单 ══════════ */
.drawer-menu {
  position: absolute;
  top: 16px;
  right: 58px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(20, 50, 62, .18);
  transition: .18s;
}
.drawer-menu:hover { background: var(--ink); color: #fff; }

.drawer-menu-list {
  position: absolute;
  top: 58px;
  right: 16px;
  z-index: 4;
  min-width: 158px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(20, 50, 62, .18);
  display: flex;
  flex-direction: column;
  animation: fadeIn .12s var(--ease) both;
}

.dm-item {
  border: 0;
  background: none;
  text-align: left;
  padding: 9px 11px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background-color .12s linear, color .12s linear;
}
.dm-item:hover { background: var(--paper); color: var(--ink); }
.dm-item:disabled { color: var(--ink-4); cursor: default; background: none; }

.dm-sep { height: 1px; background: var(--line); margin: 4px 2px; }

/* 交易评价 */
.rate-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--gold-line);
}

.rate-head {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  color: #8a6410;
  margin-bottom: 8px;
  line-height: 1.5;
}

.rate-actions { display: flex; gap: 8px; }
.rate-actions .btn { flex: 1; height: 34px; font-size: 12.5px; padding: 0 10px; }

.rate-done {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.75;
}
.rate-done b { color: var(--ink); font-weight: 700; }

/* 评价选择 */
.rate-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.rate-opt {
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  transition: transform .06s ease, background-color .12s linear, border-color .12s linear;
}
.rate-opt:hover { border-color: #bfb6a2; }
.rate-opt.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 3px 0 rgba(20, 50, 62, .25);
}
.rate-opt.on:active { transform: translateY(3px); box-shadow: none; }

/* 评价语句与申诉 */
.rate-comment {
  margin-top: 8px;
  padding: 8px 10px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.appeal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-3);
}

.link-mini {
  border: 0;
  background: none;
  padding: 0;
  color: var(--warm);
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.appeal-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.appeal-form textarea {
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.appeal-form textarea:focus { border-color: var(--ink); }
.appeal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.appeal-img { margin-top: 9px; }

button.appeal-img {
  display: block;
  border: 0;
  padding: 0;
  background: none;
  width: auto;
}
.appeal-img img {
  max-width: 140px;
  max-height: 140px;
  border-radius: 5px;
  border: 1px solid var(--line);
  display: block;
}

.appeal-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-3);
}
.appeal-note.ok { color: var(--green); }
.appeal-note.no { color: var(--warm); }

/* ══════════ 管理后台 ══════════ */
.admin-note {
  font-size: 11.5px;
  color: #8a6410;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  padding: 9px 12px;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* 后台入口的红点（用伪元素，避免被 .sheet-head span 之类的规则拉变形） */
.admin-btn { position: relative; }

.admin-btn.has-alert::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 0 2px var(--paper);
  pointer-events: none;
  animation: dotPulse 1.8s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: .7; }
}

/* 审核日志 */
.audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.audit-thumb {
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--ink-3);
  background: var(--paper-2);
}
.audit-thumb.danger { color: var(--warm); background: #fbeee8; }
.audit-thumb.ok { color: var(--green); background: #eaf6ef; }

.audit-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 4px;
}
.audit-tag.danger { color: var(--warm); background: #fbeee8; }
.audit-tag.ok { color: var(--green); background: #eaf6ef; }
.audit-tag.muted { color: var(--ink-3); background: var(--paper-2); }

/* 限制用户弹窗里的说明 */
.ban-note {
  font-size: 12px;
  line-height: 1.7;
  color: #a2422a;
  background: #fbeee8;
  border: 1px solid #f0d3c8;
  border-radius: 6px;
  padding: 10px 12px;
}

/* 卖家主页上的封禁提示 */
.ban-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid #ecc4b6;
  border-radius: 8px;
  background: #fbeee8;
  color: #a2422a;
}
.ban-banner b { font-size: 14px; font-weight: 800; }
.ban-banner span { font-size: 12.5px; line-height: 1.65; color: #b3553a; }
.ban-banner .mini-btn { align-self: flex-start; }

.admin-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
}

.admin-search {
  flex: 1 1 200px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
  font-size: 13.5px;
  outline: none;
  background: #fff;
}
.admin-search:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 50, 62, .08);
}

.admin-tool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.admin-tool > span { min-width: 0; }
.admin-tool b { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.admin-tool span span { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }
.admin-tool .segmented { flex: 0 0 auto; }

/* ══════════ 卖家主页 ══════════ */
.seller-card {
  background: var(--ink);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.seller-ava {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  flex: 0 0 auto;
}

.seller-main { flex: 1; min-width: 0; }
.seller-main h3 {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.seller-main p { font-size: 11.5px; color: rgba(255, 255, 255, .5); margin-top: 5px; }
.seller-main .verified {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--ink);
  background: var(--gold);
  padding: 2px 6px;
  border-radius: 4px;
}

.seller-score { text-align: right; flex: 0 0 auto; }
.seller-score b {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.seller-score span { font-size: 10px; color: rgba(255, 255, 255, .45); }

.seller-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 12px;
}
.seller-stats > div { background: #fff; padding: 13px 8px; text-align: center; }
.seller-stats b {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.seller-stats span { font-size: 11px; color: var(--ink-3); }

.seller-h {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--ink-3);
  margin: 24px 0 10px;
}

/* 可点的卖家卡片 */
.d-seller[data-seller] { cursor: pointer; transition: border-color .14s linear, background-color .14s linear; }
.d-seller[data-seller]:hover { border-color: var(--gold-line); background: #fffdf8; }

/* ══════════ 后台内容预览 ══════════ */
.modal-lg .modal-card { width: min(680px, 100%); }

.preview-body {
  padding: 0 22px 14px;
  max-height: 66vh;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.pv-hero {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 52px;
  margin-bottom: 12px;
}
.pv-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pv-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.pv-thumbs::-webkit-scrollbar { display: none; }

.pv-thumb {
  width: 54px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  opacity: .6;
  flex: 0 0 auto;
  background: var(--paper-2);
}
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-thumb.on { opacity: 1; border-color: var(--ink); }

.pv-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pv-price b {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.pv-price s { font-size: 12px; color: var(--ink-4); }
.pv-price .save {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  background: var(--gold);
  padding: 2px 7px;
  border-radius: 4px;
}

.pv-title { font-size: 17px; font-weight: 800; line-height: 1.45; color: var(--ink); }

.pv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }

.pv-line { font-size: 12.5px; color: var(--ink-3); line-height: 1.95; }

.pv-desc {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.pv-h {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
  letter-spacing: .04em;
  margin: 22px 0 9px;
}

.pv-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
}
.pv-user-ava {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex: 0 0 auto;
}
.pv-user-main { flex: 1; min-width: 0; }
.pv-user-main b { display: block; font-size: 15px; font-weight: 800; }
.pv-user-main i {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .5);
  margin-top: 3px;
}
.pv-user-score {
  font-size: 17px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* ══════════ 举报弹窗 ══════════ */

.reason-chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background-color .12s linear, border-color .12s linear;
}
.reason-chip:hover { border-color: #b4a992; }
.reason-chip.on {
  background: var(--gold-soft);
  border-color: var(--gold-line);
  color: var(--ink);
  font-weight: 700;
}

/* ══════════ 图片全屏查看 ══════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(8, 16, 21, .94);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .16s var(--ease) both;
}

.lb-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  background: #111;
}

.lb-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 14px;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}
.lb-close:hover { background: rgba(255, 255, 255, .22); }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}
.lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }

.lb-count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255, 255, 255, .7);
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

/* 大图可点开 */
.d-hero.has-img { cursor: zoom-in; }

/* ══════════ 响应式 ══════════ */
@media (max-width: 860px) {
  .topbar-inner { padding: 0 16px; gap: 12px; height: 60px; }
  .search { display: none; }
  .search-mobile { display: block; }
  .topbar-actions .btn-ghost { display: none; }
  .brand-text i { display: none; }
  .page { padding: 16px 14px 60px; }
  .board { padding: 20px 16px 16px; border-radius: var(--r); }
  .board-head { flex-direction: column; gap: 12px; }
  .board-stats { width: 100%; justify-content: flex-start; gap: 28px; }
  .stat { text-align: center; }
  .stat b { font-size: 21px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .want-grid { grid-template-columns: 1fr; }
  .mode-tabs { width: 100%; }
  .mode-tab { flex: 1; justify-content: center; padding: 0 12px; }
  .card { border-radius: var(--r); }
  .card-media { margin: 6px 6px 0; border-radius: 9px; }
  .card-ico svg { width: 46px; height: 46px; }
  .card-body { padding: 10px 11px 12px; }
  .card-title { font-size: 13px; min-height: 2.9em; }
  .card-price b { font-size: 17px; }
  .card-meta { font-size: 10.5px; }
  .toolbar { gap: 10px; }
  .segmented button { padding: 0 11px; font-size: 12px; }
  .drawer { width: 100vw; }
  .chat { width: 100vw; }
  .chat-side { display: none; }
  .row { flex-direction: column; }
  .profile { padding: 18px; gap: 13px; }
  .profile-ava { width: 50px; height: 50px; font-size: 24px; border-radius: 13px; }
  .profile-info h3 { font-size: 17px; }
  .profile-edit { padding: 7px 11px; font-size: 11.5px; }
  .stalls { grid-template-columns: 1fr; }
  .d-ico svg { width: 78px; height: 78px; }
  .d-price b { font-size: 29px; }
  .d-title { font-size: 19px; }
}

@media (min-width: 861px) {
  /* 宽屏有左侧会话列表，不需要返回按钮 */
  #chatBack { display: none; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
  .btn-primary { padding: 0 12px; font-size: 13px; }
  .brand-text b { font-size: 15px; }
  .topbar-inner { gap: 8px; }
}

/* 键盘用户先看到的跳转入口 */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; }

/* 滚动时不再改卡片底色或模糊，避免任何闪白/跳变 */

/* 手机上关掉模糊，但保留原来的暖色卡片底 */
@media (max-width: 760px) {
  .card,
  .want-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* 键盘焦点：统一描边 */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* 容器本身被程序化聚焦时不要画一整圈 */
#mainContent:focus-visible,
.sheet:focus-visible,
.modal:focus-visible,
#drawer:focus-visible,
#chat:focus-visible { outline: none; }

/* ══════════ 减少动态效果 ══════════ */
/* ══════════ 手机端打磨（窄屏与触控） ══════════ */
@media (max-width: 560px) {
  .page { padding: 14px 12px 72px; }

  /* 顶栏 */
  .topbar-inner { padding: 0 12px; gap: 8px; }

  /* 工具栏折成两行：上面统计，下面筛选 + 排序 */
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .toolbar-left { justify-content: space-between; }
  .toolbar-right { justify-content: space-between; gap: 8px; }
  .sel-sm .sel-btn { height: 32px; padding: 0 10px; font-size: 12px; }
  .sel-sm .sel-label { max-width: 76px; }
  .segmented button { padding: 0 9px; font-size: 11.5px; }

  /* 卡片：两列太窄，位置让给名字和想要数 */
  .grid { gap: 10px; }
  .card-body { padding: 9px 10px 11px; }
  .card-title { font-size: 12.5px; }
  .card-meta { padding: 6px 8px; gap: 5px; font-size: 10px; }
  .card-meta .sep,
  .card-meta .loc { display: none; }

  /* 触控目标：按钮别小于 34px */
  .mini-btn { min-height: 34px; padding: 0 12px; }
  .icon-btn { width: 36px; height: 36px; }

  /* 输入框 16px，避免 iOS 聚焦时页面被自动放大 */
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  textarea { font-size: 16px; }

  /* 底部安全区 */
  .sheet-body { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(28px + env(safe-area-inset-bottom)); }

  /* 弹窗底部按钮等宽，拇指更好点 */
  .modal-foot .btn { flex: 1; }
}

/* 触屏没有 hover：别让点过的卡片一直悬着 */
@media (hover: none) {
  .card:hover,
  .want-card:hover {
    --lift: 0px;
    box-shadow:
      0 0 0 1px rgba(20, 50, 62, .05),
      0 8px 24px rgba(20, 50, 62, .07);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 滚动条 */

/* 头像选择器（校园认证） */
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.avatar-opt {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .15s var(--ease);
}
.avatar-opt:hover { border-color: var(--gold-line); color: var(--ink); }
.avatar-opt.on {
  border-color: var(--gold-deep);
  background: #fdf3d9;
  color: var(--ink);
  box-shadow: 0 0 0 2px rgba(242,193,78,.22);
}
.avatar-opt svg { width: 28px; height: 28px; }

/* 校园新鲜事 */
.fresh-board {
  background:
    radial-gradient(ellipse at 88% 18%, rgba(255,170,90,.45), transparent 55%),
    radial-gradient(ellipse at 12% 90%, rgba(120,200,255,.35), transparent 55%),
    linear-gradient(135deg, #2a1c3f 0%, #3b2b52 45%, #5b3b5e 100%);
  border-color: rgba(255,190,120,.24);
}
.fresh-title { color: #fff; }
.fresh-title .live .dot { background: #ffd27a; }
.fresh-sub { color: rgba(255,255,255,.68); }
.fresh-board .stat b { color: #ffe0a8; }
.fresh-board .stat span { color: rgba(255,255,255,.6); }

.topic-chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(20,50,62,.08); color: var(--ink-2);
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.fresh-card .want-status { background: rgba(242,193,78,.18); color: #8a5a00; }
.fresh-card .want-status.anon { background: rgba(120,120,120,.14); color: #5a5a5a; }
.fresh-card .likes { color: #b0784a; }
.fresh-card .topic-chip { margin-left: auto; }

.topic-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-pick {
  border: 1px solid var(--line); background: #fffdf8; color: var(--ink-2);
  border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.topic-pick.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.fresh-reply { display: flex; gap: 8px; margin-top: 14px; }
.fresh-reply input {
  flex: 1; padding: 10px 12px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #fffdf8;
}
.fresh-reply button { flex: 0 0 auto; }

.d-like {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fffdf8; border-radius: 999px;
  padding: 6px 14px; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer;
}
.d-like.on { border-color: #e8a03a; color: #a35f00; background: #fdf1d8; }

/* 演示版 AI 标记 */
.ai-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #d9a52f;
  background: #fdf1d8;
  color: #8a5a00;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1.2;
}
.modal-head .ai-write { margin-left: auto; margin-right: 8px; white-space: nowrap; }

/* 校园新鲜事：标题逐字浮起 + 红心“此刻” */
.fresh-head .fresh-title { gap: 0; }
.fresh-title .fch {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px) rotate(3deg);
  will-change: transform, opacity;
}
.fresh-head.play .fch {
  animation: fchIn .5s var(--ease) forwards, fchFloat 4.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 55ms), calc(650ms + var(--i) * 240ms);
}
@keyframes fchIn {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}
@keyframes fchFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.fresh-title { margin-left: -1px; }
.fresh-title .fresh-live { margin-left: 10px; }
.fresh-live .heart {
  color: #ff4d5e;
  transform-origin: 50% 55%;
  animation: heartbeat 1.15s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  18% { transform: scale(1.32); }
  32% { transform: scale(.94); }
  46% { transform: scale(1.2); }
  60% { transform: scale(1); }
}
.fresh-head .fresh-sub { opacity: 0; transform: translateY(8px); }
.fresh-head.play .fresh-sub { animation: fchIn .5s var(--ease) .38s forwards; }

@media (prefers-reduced-motion: reduce) {
  .fresh-head .fch, .fresh-head .fresh-sub { opacity: 1; transform: none; animation: none !important; }
  .fresh-live .heart { animation: none; }
}

/* 抽屉底部固定回复条 */
.post-bar { gap: 12px; }
.post-bar .d-like { flex: 0 0 auto; height: 40px; }
.post-compose { flex: 1; display: flex; gap: 8px; min-width: 0; }
.post-compose input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fffdf8; font: inherit; font-size: 14px;
}
.post-compose .btn { flex: 0 0 auto; height: 40px; padding: 0 16px; }

/* 楼中楼 */
.reply-item.child { margin-left: 26px; border-left: 2px solid rgba(242,193,78,.45); padding-left: 12px; }
.reply-item.can-open { cursor: pointer; }
.reply-item .reply-to { color: #8a6a2a; font-size: 11px; }
.quick-reply { display: flex; gap: 8px; margin-top: 10px; }
.quick-reply input {
  flex: 1; min-width: 0; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; font: inherit; font-size: 13px;
}
.quick-reply .mini-btn { height: 36px; }
.reply-hint { margin-top: 10px; font-size: 11px; color: var(--ink-3); }

/* 楼中楼收纳 */
.reply-thread { padding-bottom: 2px; }
.thread-toggle {
  margin: 2px 0 6px 26px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: #8a6a2a;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.thread-toggle:hover { text-decoration: underline; }
.reply-kids[hidden] { display: none; }

/* 新鲜事作者名：点名字直接举报该用户 */
.author-link {
  border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer;
}
.author-link:hover { color: #8a5a00; text-decoration: underline dotted; }

/* 校园新鲜事：更大胆的标题动效 */
.fresh-title { position: relative; padding-bottom: 10px; }
.fresh-head.play .fch {
  animation: fchIn .55s var(--ease) forwards, fchWave 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 60ms), calc(500ms - var(--i) * 220ms);
  transform-origin: 50% 80%;
}
@keyframes fchWave {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  30%      { transform: translateY(-8px) rotate(-4deg) scale(1.06); }
  60%      { transform: translateY(1px) rotate(2deg) scale(.99); }
}
.fresh-title { animation: titleGlow 3.4s ease-in-out infinite; }
@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(242,193,78,0); }
  50%      { text-shadow: 0 0 18px rgba(255,214,120,.55), 0 0 36px rgba(255,120,160,.22); }
}
.fresh-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 42%; height: 2px;
  background: linear-gradient(90deg, transparent, #f2c14e, #ff8fa3, transparent);
  border-radius: 2px;
  animation: underlineSweep 3.8s ease-in-out infinite;
}
@keyframes underlineSweep {
  0%   { transform: translateX(-60%); opacity: 0; }
  25%  { opacity: 1; }
  70%  { transform: translateX(210%); opacity: 1; }
  100% { transform: translateX(260%); opacity: 0; }
}
.fresh-sub {
  background: linear-gradient(90deg, rgba(255,255,255,.55), #ffe2a6 35%, #ffc2d0 55%, rgba(255,255,255,.55));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: subShimmer 6s linear infinite;
}
@keyframes subShimmer { to { background-position: -220% 0; } }
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .fresh-sub { color: rgba(255,255,255,.68); background: none; animation: none; }
}
.fresh-head .eyebrow { animation: eyebrowPulse 4s ease-in-out infinite; }
@keyframes eyebrowPulse {
  0%, 100% { letter-spacing: .18em; opacity: .55; }
  50%      { letter-spacing: .3em; opacity: 1; color: #ffe0a8; }
}
.fresh-live { animation: liveBadgePulse 1.15s ease-in-out infinite; }
@keyframes liveBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,77,94,0); }
  40%      { box-shadow: 0 0 0 4px rgba(255,77,94,.18); }
}
.fresh-live .heart {
  animation: heartbeat 1.15s ease-in-out infinite, heartGlow 1.15s ease-in-out infinite;
}
@keyframes heartGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255,77,94,0)); }
  45%      { filter: drop-shadow(0 0 6px rgba(255,77,94,.75)); }
}
@media (prefers-reduced-motion: reduce) {
  .fresh-title, .fresh-title::after, .fresh-sub, .fresh-head .eyebrow,
  .fresh-live, .fresh-live .heart { animation: none !important; }
  .fresh-sub { color: rgba(255,255,255,.68); background: none; }
}

/* 副标题：入场 + 流光叠加（覆盖旧的单入场动画） */
.fresh-head.play .fresh-sub {
  animation: fchIn .5s var(--ease) .38s forwards, subShimmer 6s linear infinite;
}

/* 标题字：随机颜色闪烁（保留波浪与扫光） */
.fresh-head.play .fch {
  animation: fchIn .55s var(--ease) forwards, fchWave 2.6s ease-in-out infinite, fchColor 4.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 60ms), calc(500ms - var(--i) * 220ms), calc(-1 * var(--i) * .45s);
}
@keyframes fchColor {
  0%, 100% { color: #ffffff; }
  22%      { color: #ffe3a3; }
  48%      { color: #ffb3c7; }
  72%      { color: #bfe9ff; }
}

/* 今日出摊标题已恢复原样（静态白字） */

/* 后台举报列表：每一条都带红点 */
.report-dot {
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #e5484d;
  vertical-align: 1px;
  box-shadow: 0 0 0 3px rgba(229,72,77,.14);
  animation: reportDotPulse 1.8s ease-in-out infinite;
}
.report-dot.done { opacity: .35; animation: none; box-shadow: none; }
@keyframes reportDotPulse {
  50% { box-shadow: 0 0 0 5px rgba(229,72,77,.06); }
}
@media (prefers-reduced-motion: reduce) {
  .report-dot { animation: none; }
}

/* 防类名冲突：红点始终是正圆，不吃徽章的内边距/圆角 */
.report-dot { padding: 0; border: 0; flex: 0 0 auto; }

/* 抽屉滚动条：始终预留，平时隐藏，悬停淡入，避免收起回复时内容被挤压 */
.drawer-body {
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.drawer-body::-webkit-scrollbar { width: 8px; }
.drawer-body::-webkit-scrollbar-track { background: transparent; }
.drawer-body::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 8px;
}
.drawer-body:hover { scrollbar-color: rgba(20,50,62,.2) transparent; }
.drawer-body:hover::-webkit-scrollbar-thumb { background: rgba(20,50,62,.2); }
.drawer-body::-webkit-scrollbar-thumb:hover { background: rgba(20,50,62,.4); }

/* 楼层编号 / 同层回复 */
.floor-no {
  font-size: 10px;
  font-weight: 800;
  color: #9a6c12;
  background: rgba(242,193,78,.18);
  padding: 1px 5px;
  border-radius: 4px;
}

.reply-item.child {
  background: rgba(242,193,78,.05);
}
.reply-item.reply-flash { animation: replyFlash 1.8s ease; }
@keyframes replyFlash {
  0% { background: rgba(242,193,78,.42); }
  100% { background: transparent; }
}

/* 评论中心（复用聊天面板） */
.chat.comments-mode .chat-input,
.chat.comments-mode .chat-quick,
.chat.comments-mode #chatApptBtn,
.chat.comments-mode #chatContact,
.chat.comments-mode #chatReport { display: none; }
.chat.comments-mode .chat-body { padding: 0; }
.cm-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(247,245,239,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.cm-tab {
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.cm-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.cm-list { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 28px; }
.cm-item {
  display: flex;
  gap: 11px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fffdf8;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
}
.cm-item:hover { border-color: var(--gold-line); box-shadow: var(--sh-1); }
.cm-ava { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--paper-2); }
.cm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cm-main b { font-size: 13px; }
.cm-post { font-size: 11.5px; color: #9a6c12; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-text { font-size: 12.5px; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cm-meta { font-size: 11px; color: var(--ink-3); }
.cm-empty { padding: 48px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.cs-row.cs-comments .cs-ava { color: #8a5a00; }



/* 楼中楼：明确的「回复」入口 */
.reply-more {
  border: 1px solid rgba(242,193,78,.45);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 7px;
  margin-left: 2px;
}
.reply-more:hover { background: #fdf1d8; color: #8a5a00; }
.reply-to-link { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.reply-to-link:hover { text-decoration: underline; }

/* 回复按钮已改为「⋯」举报键，窄屏头部允许换行 */
.reply-head { flex-wrap: wrap; row-gap: 5px; }

/* 自己的回复：右下角删除，二次确认 */
.reply-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
  line-height: 1;
}
.reply-del {
  border: 1px solid rgba(192,57,43,.35);
  border-radius: 999px;
  background: transparent;
  color: #b03a2e;
  font: inherit;
  font-size: 10.5px;
  line-height: 1.5;
  padding: 0 8px;
  cursor: pointer;
}
.reply-del:hover { background: #fdecea; border-color: rgba(192,57,43,.55); }

/* 管理员名字：深酒红色，纯色显示 */
.admin-name {
  color: #7b1e2b;
  font-weight: 800;
}

/* 今日出摊：中间留白处的白描玫瑰，随风轻摆 */
.stall-roses {
  position: absolute;
  z-index: 0;
  left: 36%;
  right: 300px;
  bottom: 0;
  height: 210px;
  pointer-events: none;
  opacity: .95;
}
.stall-roses svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(255,255,255,.16)) drop-shadow(0 0 18px rgba(120,200,255,.12));
}
.rose {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: roseSway var(--dur, 6s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}
.rose .stem { stroke-width: 2.5; opacity: .82; }
.rose use { opacity: .92; }
.rose.back { opacity: .48; }
.spark {
  fill: #ffe1ad;
  stroke: none;
  animation: sparkTwinkle 3.6s ease-in-out infinite;
}
@keyframes roseSway {
  from { transform: rotate(-1.7deg) translateX(-1px); }
  to   { transform: rotate(2.1deg) translateX(2px); }
}
@keyframes sparkTwinkle {
  0%, 100% { opacity: .15; }
  50% { opacity: .9; }
}
.stall {
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
}
@media (max-width: 1100px) {
  .stall-roses { left: 42%; right: 250px; opacity: .8; }
}
@media (max-width: 900px) {
  .stall-roses { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rose, .spark { animation: none; }
}

/* 只有摊位少、中间有空位时才展示玫瑰，避免盖在摊位卡下面 */
.stall-roses { display: none; height: 86%; max-height: 210px; min-height: 150px; }
.board.rose-room .stall-roses { display: block; }

/* 玫瑰摆动幅度再明显一点 */
@keyframes roseSway {
  from { transform: rotate(-2.6deg) translateX(-2px); }
  to   { transform: rotate(3deg) translateX(3px); }
}

/* 出摊看板：铅笔玫瑰线稿，45° 斜向左上 */
.board.rose-room { min-height: 430px; }
.stall-roses {
  left: 34%;
  right: 250px;
  top: 0;
  bottom: 0;
  height: 100%;
  max-height: none;
  min-height: 0;
}
.board.rose-room .stall-roses { display: block; }
.board-rose {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 66%;
  height: auto;
  transform: translate(-50%, -50%) rotate(-45deg);
  transform-origin: 50% 50%;
  opacity: .95;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.18));
  animation: boardRoseSway 7s ease-in-out infinite alternate;
}
@keyframes boardRoseSway {
  from { transform: translate(-50%, -50%) rotate(-47deg); }
  to   { transform: translate(-50%, -50%) rotate(-42deg); }
}
@media (prefers-reduced-motion: reduce) {
  .board-rose { animation: none; }
}

/* 玫瑰：不加高看板，压到看板底边，放大并做漂浮/呼吸/扫光 */
.board.rose-room { min-height: 0; }
.board-rose-wrap {
  position: absolute;
  left: 52%;
  bottom: -9%;
  width: 92%;
  transform: translateX(-50%) rotate(-45deg);
  transform-origin: 50% 88%;
  animation: boardRoseAlive 5.8s ease-in-out infinite alternate;
}
.board-rose {
  display: block;
  width: 100%;
  height: auto;
  opacity: .95;
  filter: drop-shadow(0 0 7px rgba(255,255,255,.2)) drop-shadow(0 0 20px rgba(120,200,255,.12));
}
.rose-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url("rose-sketch.png") center / contain no-repeat;
  mask: url("rose-sketch.png") center / contain no-repeat;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.65) 50%, transparent 65%);
  background-size: 240% 100%;
  mix-blend-mode: screen;
  opacity: 0;
  animation: roseShine 6s ease-in-out infinite;
}
@keyframes boardRoseAlive {
  from { transform: translateX(-50%) translateY(0) rotate(-45deg) scale(1); }
  to   { transform: translateX(-50%) translateY(-7px) rotate(-41deg) scale(1.035); }
}
@keyframes roseShine {
  0%, 12% { background-position: 120% 0; opacity: 0; }
  22% { opacity: .55; }
  52% { background-position: -20% 0; opacity: .45; }
  66%, 100% { background-position: -40% 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .board-rose-wrap, .rose-shine { animation: none; }
}

.board-rose {
  position: static;
  left: auto;
  top: auto;
  width: 100%;
  transform: none;
  animation: none;
}

/* 玫瑰尺寸再收一档，贴合图四看板高度 */
.board.rose-room { min-height: 280px; }
.board-rose-wrap {
  width: 54%;
  left: 53%;
  bottom: -8%;
}

/* 玫瑰放大，仍保持底部贴边 */
.board-rose-wrap {
  width: 70%;
  left: 53%;
  bottom: -6%;
}

/* 再放大，接近占满中间留白 */
.board-rose-wrap {
  width: 88%;
  left: 52%;
  bottom: -14%;
}

/* 看板固定标准高度，不因玫瑰出现而自动加高 */
#board { min-height: 280px; }
.board.rose-room { min-height: 280px; }

/* 玫瑰左移，靠近摊位但不贴住；花瓣做风纹扰动与呼吸 */
.board-rose-wrap {
  left: 34%;
}
.board-rose {
  transform-origin: 45% 35%;
  filter: drop-shadow(0 0 7px rgba(255,255,255,.2)) drop-shadow(0 0 20px rgba(120,200,255,.12));
  animation: rosePetalBreathe 4.8s ease-in-out infinite alternate;
}
@keyframes rosePetalBreathe {
  from { transform: scale(1) rotate(0deg); }
  to   { transform: scale(1.014) rotate(.35deg); }
}
@media (prefers-reduced-motion: reduce) {
  .board-rose { animation: none; filter: drop-shadow(0 0 7px rgba(255,255,255,.2)); }
}

/* 玫瑰左移但和摊位卡留出空隙 */
.board-rose-wrap {
  left: 45%;
  width: 84%;
}

/* 玫瑰移到看板右侧边界附近 */
.stall-roses {
  left: auto;
  right: 0;
  width: 46%;
}
.board-rose-wrap {
  left: 55%;
  width: 100%;
  bottom: -16%;
}

.board-rose-wrap {
  bottom: -30%;
  width: 96%;
}

/* 更柔和的漂浮与花瓣呼吸 */
.board-rose-wrap {
  animation: boardRoseAlive 12s cubic-bezier(.45,.05,.55,.95) infinite;
}
@keyframes boardRoseAlive {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-45deg) scale(1); }
  28% { transform: translateX(calc(-50% + 2px)) translateY(-6px) rotate(-43.6deg) scale(1.018); }
  55% { transform: translateX(calc(-50% - 1px)) translateY(-3px) rotate(-45.2deg) scale(1.008); }
  78% { transform: translateX(calc(-50% + 1px)) translateY(-8px) rotate(-42.8deg) scale(1.028); }
}
.board-rose {
  animation: rosePetalBreathe 8s ease-in-out infinite;
}
@keyframes rosePetalBreathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(1.008) rotate(.18deg); }
  70% { transform: scale(1.016) rotate(.32deg); }
}

/* 更轻的玫瑰动态：慢漂浮 + 微弱呼吸 + 小风纹 */
.board-rose-wrap {
  animation: boardRoseAlive 16s cubic-bezier(.45,.05,.55,.95) infinite;
}
@keyframes boardRoseAlive {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-45deg) scale(1); }
  32% { transform: translateX(calc(-50% + 1px)) translateY(-2px) rotate(-44.7deg) scale(1.006); }
  64% { transform: translateX(calc(-50% - 1px)) translateY(-4px) rotate(-45.2deg) scale(1.003); }
}
.board-rose {
  animation: rosePetalBreathe 10s ease-in-out infinite;
}
@keyframes rosePetalBreathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.004) rotate(.1deg); }
  72% { transform: scale(1.007) rotate(.16deg); }
}
.rose-shine { animation-duration: 9s; opacity: 0; }

/* 只保留极轻的呼吸：关闭风纹、漂浮与扫光 */
.board-rose-wrap { animation: none; }
.board-rose {
  filter: drop-shadow(0 0 7px rgba(255,255,255,.18));
  animation: rosePetalBreathe 12s ease-in-out infinite;
}
@keyframes rosePetalBreathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  45% { transform: scale(1.004) rotate(.08deg); }
  75% { transform: scale(1.006) rotate(.12deg); }
}
.rose-shine { display: none; }

/* 新鲜事配图上传 */
.post-photo { display: flex; flex-wrap: wrap; gap: 10px; }
.post-thumb {
  position: relative;
  width: 132px; height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb .upload-remove { position: absolute; top: 5px; right: 5px; }
.post-thumb .upload-cover { position: absolute; left: 6px; bottom: 6px; }

/* 新鲜事卡片/详情配图 */
.want-emoji.has-img {
  padding: 0;
  overflow: hidden;
  background: var(--paper-2);
}
.want-emoji.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 校园日报 / 今日热榜 */
.fresh-daily {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 15px 18px 14px;
  margin-bottom: 16px;
}
.daily-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 11px;
}
.daily-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  color: #9a6c12;
}
.daily-title b { display: block; font-size: 16px; margin-top: 2px; }
.daily-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; color: var(--ink-3); }
.daily-meta b { color: var(--ink-2); font-weight: 700; }
.daily-hot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hot-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 9px 10px;
  font: inherit;
  cursor: pointer;
}
.hot-item:hover { background: #fff; border-color: var(--gold-line); }
.hot-rank {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.hot-item:first-child .hot-rank { color: #c0392b; }
.hot-main { flex: 1; min-width: 0; }
.hot-main b {
  display: block;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-main span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-fire { flex: 0 0 auto; font-size: 10px; color: #b0784a; }
.daily-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: transparent;
  padding: 12px;
  color: var(--ink-3);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.daily-empty:hover { border-color: var(--gold-line); color: var(--ink-2); }
@media (max-width: 900px) {
  .daily-hot { grid-template-columns: 1fr; }
}

.daily-sep { color: var(--ink-3); opacity: .55; }

/* 特别推荐分类 */
.cat.featured-cat .ico { color: #b0784a; }
.cat.featured-cat.on .ico { color: #ffd98a; }

.feat-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(176,120,74,.12);
  color: #9a5c2a;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}
.mini-btn.on { background: #f4e7d4; border-color: #d8b98e; color: #8a541f; }

/* 后台内容搜索：输入与搜索分离 */
.admin-search-box { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; }
.admin-search-box .admin-search { flex: 1; min-width: 0; }
.admin-search-btn { height: 38px; padding: 0 16px; flex: 0 0 auto; }

/* ══════════ 浓烈版视觉：深青 + 暖橙 + 高饱和渐变 ══════════ */
:root {
  --paper: #fff3df;
  --paper-2: #ffe7c8;
  --card: #fffaf2;
  --ink: #0b2b35;
  --ink-800: #103c4a;
  --ink-2: #2b5560;
  --ink-3: #547078;
  --ink-4: #83979b;
  --gold: #ffb21c;
  --gold-600: #e89400;
  --gold-soft: #fff0c9;
  --gold-line: #f3c96f;
  --green: #1f9d6b;
  --warm: #f05a2a;
  --line: #e9d7bd;
  --line-2: #f5e6d2;
  --sh-2: 0 10px 30px rgba(120, 60, 20, .12);
  --sh-3: 0 26px 70px rgba(70, 30, 10, .22);
}

body {
  background:
    radial-gradient(1100px 560px at 2% -8%, rgba(255, 157, 74, .55), transparent 58%),
    radial-gradient(950px 620px at 100% 0%, rgba(88, 190, 255, .42), transparent 58%),
    radial-gradient(900px 600px at 52% 112%, rgba(90, 225, 170, .30), transparent 62%),
    linear-gradient(180deg, #fff3df 0%, #ffe5c7 48%, #eef8f2 100%);
  background-attachment: fixed;
}

.topbar {
  background: rgba(255, 247, 235, .88);
  border-bottom: 1px solid rgba(220, 140, 60, .22);
  box-shadow: 0 10px 30px rgba(180, 90, 20, .08);
}

.board {
  background:
    radial-gradient(85% 130% at 100% -10%, rgba(255, 94, 54, .58), transparent 60%),
    radial-gradient(70% 120% at -10% 110%, rgba(0, 190, 220, .40), transparent 62%),
    radial-gradient(60% 100% at 62% 120%, rgba(255, 178, 28, .24), transparent 58%),
    linear-gradient(135deg, #031b26 0%, #0a3544 38%, #123d63 72%, #35203f 100%);
  border-color: rgba(255, 178, 80, .34);
  box-shadow:
    0 30px 70px -22px rgba(3, 24, 32, .72),
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 -1px 0 rgba(255, 140, 60, .12);
}

.board-stats b { color: #ffd166; }

.cat {
  background: rgba(255, 250, 242, .9);
  border-color: rgba(190, 130, 70, .24);
}
.cat:hover {
  border-color: rgba(240, 90, 36, .5);
  color: var(--warm);
  background: #fff8ec;
}
.cat.on {
  background: linear-gradient(135deg, #0a3340 0%, #155a6d 100%);
  border-color: #0a3340;
  color: #fff;
  box-shadow: 0 6px 18px rgba(11, 51, 64, .34);
}
.cat.on .num { color: #ffd166; }

.card,
.want-card {
  background: linear-gradient(160deg, rgba(255, 253, 248, .96), rgba(255, 243, 226, .92));
  border-color: rgba(220, 150, 80, .26);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 10px 26px rgba(120, 60, 20, .10);
}
.card:hover,
.want-card:hover {
  border-color: rgba(240, 90, 36, .52);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 20px 44px -18px rgba(210, 80, 20, .38),
    0 0 0 1px rgba(255, 140, 60, .18);
}

.btn-primary {
  background: linear-gradient(135deg, #ff8a2b 0%, #f0521c 100%);
  border-color: #d94713;
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(240, 82, 28, .66);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ffa04a 0%, #ff6228 100%);
  border-color: #d94713;
}
.btn-primary:active {
  background: linear-gradient(135deg, #e96f16 0%, #c93c0d 100%);
}

.modal-card {
  background: linear-gradient(180deg, #fffdf7 0%, #fff6e6 100%);
  box-shadow: 0 34px 90px rgba(40, 18, 5, .32);
}

.fresh-daily {
  background: linear-gradient(160deg, #fffdf7 0%, #fff1d9 100%);
  border-color: rgba(225, 155, 75, .3);
  box-shadow: 0 10px 30px rgba(150, 80, 20, .08);
}

input:focus,
textarea:focus,
.admin-search:focus {
  border-color: #f07a30;
  box-shadow: 0 0 0 3px rgba(240, 122, 48, .16);
}

::selection { background: #ffb04a; color: #23140a; }

/* 出摊卡：透明玻璃，不遮住背后的花，文字保持清晰 */
.stall {
  background: rgba(4, 24, 32, .10);
  border-color: rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(2px) saturate(135%);
  backdrop-filter: blur(2px) saturate(135%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .30),
    0 10px 26px rgba(0, 0, 0, .16);
}
.stall:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 209, 102, .68);
}
.stall-info b {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .72), 0 0 12px rgba(0, 0, 0, .35);
}
.stall-info span {
  color: rgba(255, 255, 255, .82);
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .68);
}
.stall-avatar {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
.stall-badge {
  background: rgba(255, 209, 102, .95);
  color: #2b1b05;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}

/* 滚动时不要因为 hover 变白：去掉白色填充与 backdrop-filter 重绘 */
.stall,
.stall:hover {
  background: rgba(4, 24, 32, .12);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.stall:hover {
  border-color: rgba(255, 209, 102, .68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .30),
    0 14px 30px rgba(0, 0, 0, .22);
  transform: translateY(-2px);
}

/* 玫瑰：日常轻微来回摆 + 周期性向右大幅阵风 */
.board-rose-wrap {
  transform-origin: 55% 94%;
  animation: roseSwayGust 14s cubic-bezier(.42, .05, .55, .95) infinite;
}
@keyframes roseSwayGust {
  0%, 100% { transform: translateX(-50%) rotate(-45deg); }
  10% { transform: translateX(calc(-50% - 2px)) rotate(-47.4deg); }
  20% { transform: translateX(calc(-50% + 1px)) rotate(-42.8deg); }
  30% { transform: translateX(calc(-50% - 1px)) rotate(-46.2deg); }
  40% { transform: translateX(-50%) rotate(-44deg); }
  50% { transform: translateX(calc(-50% + 1px)) rotate(-45.8deg); }
  56% { transform: translateX(-50%) rotate(-45deg); }
  62% { transform: translateX(calc(-50% + 34px)) rotate(-23deg) scale(1.015); }
  68% { transform: translateX(calc(-50% - 7px)) rotate(-53deg); }
  74% { transform: translateX(calc(-50% + 5px)) rotate(-40.5deg); }
  82% { transform: translateX(calc(-50% - 2px)) rotate(-46.6deg); }
  90% { transform: translateX(-50%) rotate(-44.2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .board-rose-wrap { animation: none; }
}

/* 阵风时保证看板统计文字仍在玫瑰上层 */
.board-stats { position: relative; z-index: 3; text-shadow: 0 1px 4px rgba(0, 0, 0, .35); }

/* 玫瑰分层：外层花瓣、花蕊内层各自呼吸 */
.rose-petal {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}
.rose-petal-outer {
  -webkit-mask: radial-gradient(ellipse 46% 42% at 40% 32%, transparent 0 34%, #000 44% 84%, transparent 94%);
  mask: radial-gradient(ellipse 46% 42% at 40% 32%, transparent 0 34%, #000 44% 84%, transparent 94%);
  opacity: .42;
  transform-origin: 40% 32%;
  animation: roseOuterPetal 9s ease-in-out infinite alternate;
}
.rose-petal-inner {
  -webkit-mask: radial-gradient(circle at 40% 32%, #000 0 26%, transparent 35%);
  mask: radial-gradient(circle at 40% 32%, #000 0 26%, transparent 35%);
  opacity: .38;
  transform-origin: 40% 32%;
  animation: roseInnerPetal 6.2s ease-in-out infinite alternate;
}
.rose-core-light {
  position: absolute;
  left: 40%;
  top: 32%;
  width: 20%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 226, 170, .32) 0%, rgba(255, 180, 90, .10) 42%, transparent 70%);
  mix-blend-mode: screen;
  animation: roseCorePulse 5.4s ease-in-out infinite;
}
@keyframes roseOuterPetal {
  0% { transform: rotate(-1.3deg) scale(1); }
  48% { transform: rotate(.9deg) scale(1.014); }
  100% { transform: rotate(1.7deg) scale(1.006); }
}
@keyframes roseInnerPetal {
  0% { transform: rotate(.8deg) scale(1.006); }
  52% { transform: rotate(-1.6deg) scale(1.028); }
  100% { transform: rotate(-.4deg) scale(1.012); }
}
@keyframes roseCorePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(.92); opacity: .55; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .rose-petal, .rose-core-light { animation: none; }
}

/* 花瓣层柔化，避免重影出现硬线 */
.rose-petal { filter: blur(1.3px); }
.rose-petal-outer { opacity: .46; }
.rose-petal-inner { opacity: .42; }
@keyframes roseOuterPetal {
  0% { transform: rotate(-1deg) scale(1); }
  48% { transform: rotate(.7deg) scale(1.010); }
  100% { transform: rotate(1.2deg) scale(1.004); }
}
@keyframes roseInnerPetal {
  0% { transform: rotate(.6deg) scale(1.004); }
  52% { transform: rotate(-1.2deg) scale(1.020); }
  100% { transform: rotate(-.3deg) scale(1.008); }
}
.rose-core-light {
  background: radial-gradient(circle, rgba(255, 230, 180, .42) 0%, rgba(255, 180, 90, .14) 44%, transparent 72%);
}

/* 玫瑰恢复为静态展示 */
.board-rose-wrap {
  animation: none !important;
  transform: translateX(-50%) rotate(-45deg) !important;
}
.board-rose {
  animation: none !important;
  transform: none !important;
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, .18)) !important;
}
.rose-petal,
.rose-core-light,
.rose-shine { display: none !important; }

/* 联系作者 */
.author-link {
  border: 0;
  background: none;
  padding: 8px 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #b57b08;
  cursor: pointer;
  white-space: nowrap;
}
.author-link:hover { color: #e09a12; }
.author-panel { padding: 2px 24px 24px; text-align: center; }
.author-qr {
  width: 240px;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 14px 36px rgba(80, 40, 10, .14);
}
.author-tip { margin: 14px 0 4px; font-size: 12px; color: var(--ink-3); }
.author-mail {
  display: inline-block;
  margin-top: 4px;
  color: var(--warm);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed rgba(240, 90, 42, .45);
}
.author-mail:hover { color: #c63f12; border-bottom-style: solid; }
@media (max-width: 760px) {
  .author-link { font-size: 12px; padding: 6px 2px; }
}

/* 管理员在用户主页看到的学号 */
.seller-admin-extra:empty { display: none; }
.seller-id-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 10px 14px;
  border: 1px dashed rgba(180, 120, 30, .38);
  border-radius: 10px;
  background: rgba(255, 243, 213, .72);
  font-size: 12px;
  color: var(--ink-2);
}
.seller-id-row b {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: .04em;
  color: #7b1e2b;
}
.seller-id-row em { margin-left: auto; font-style: normal; font-size: 10px; color: #9a6c12; }

/* 管理后台实时概览 */
#admin .sheet-head { grid-template-columns: 32px 1fr auto; }
.admin-live {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-live-item { display: flex; align-items: baseline; gap: 5px; }
.admin-live-item b {
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  color: #b07812;
  font-variant-numeric: tabular-nums;
}
.admin-live-item span { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 760px) {
  .admin-live { gap: 9px; }
  .admin-live-item b { font-size: 14px; }
  .admin-live-item span { font-size: 9px; }
}

/* 后台在线/注册：右侧留白双格小面板 */
#admin .sheet-head { position: relative; grid-template-columns: 32px 1fr 32px; }
.admin-live {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: stretch;
  padding: 4px 2px;
  background: rgba(255, 248, 236, .92);
  border: 1px solid rgba(190, 130, 60, .24);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
.admin-live-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 0 10px;
  line-height: 1.05;
}
.admin-live-item + .admin-live-item { border-left: 1px solid rgba(190, 130, 60, .22); }
.admin-live-item b {
  font-size: 15px;
  font-weight: 800;
  color: #b07812;
  font-variant-numeric: tabular-nums;
}
.admin-live-item span { margin-top: 2px; font-size: 9px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 560px) {
  .admin-live { right: 10px; }
  .admin-live-item { min-width: 46px; padding: 0 7px; }
  .admin-live-item b { font-size: 14px; }
  .admin-live-item span { font-size: 8px; }
}

/* 已注册一栏比当前在线更宽，容纳更多位数 */
.admin-live-item:first-child {
  min-width: 52px;
  padding: 0 9px;
}
.admin-live-item:last-child {
  min-width: 78px;
  padding: 0 14px;
}
@media (max-width: 560px) {
  .admin-live-item:first-child { min-width: 44px; padding: 0 6px; }
  .admin-live-item:last-child { min-width: 64px; padding: 0 9px; }
}

/* 手机端稳定性：关闭固定背景、毛玻璃和 3D 透视，避免滚动/打开时闪屏 */
@media (max-width: 760px) {
  html { background: #fff3df; }
  body { background-attachment: scroll; }
  .topbar { background: #fff7eb; }
  .sheet-head { background: #fff7eb; }
  *, *::before, *::after {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .card,
  .want-card,
  .card:hover,
  .want-card:hover {
    transform: none !important;
  }
}

/* 手机端：禁止横向溢出与滚动回弹，减少整页弹动 */
@media (max-width: 760px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  body {
    overscroll-behavior-y: none;
  }
  .page {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .cats {
    max-width: 100%;
    overscroll-behavior-x: contain;
  }
}
