/* ==========================================================================
   二手交易 · 样式
   移动端优先（钉钉 H5）。设计目标：一眼看清"卖"还是"求"，价格最醒目。
   ========================================================================== */

:root {
  --sell: #F2622E;          /* 出售：暖橙，主动、热情 */
  --buy: #2E7DF2;           /* 求购：冷蓝，与出售一眼区分 */
  --done: #12B76A;          /* 成交：绿 */
  --warn: #F79009;
  --danger: #D92D20;        /* 出错、需要立刻处理的事（部署没生效之类） */

  --ink: #1A1D24;
  --ink-2: #5B6472;
  --ink-3: #98A1B0;
  --line: #E8EAEF;
  --bg: #F4F5F7;
  --card: #FFFFFF;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;

  --sh-1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --sh-2: 0 4px 12px rgba(16, 24, 40, .08);
  --sh-up: 0 -1px 0 var(--line), 0 -8px 24px rgba(16, 24, 40, .06);

  --nav-h: 58px;
  /* 底部操作条给内容区预留的高度。提成变量是为了让"紧凑模式"只改一处，
     原来 84px 在下面写死了两遍，改一处漏一处就会出现内容被盖住。 */
  --action-h: 84px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* 内容区底部留白：由"页面实际有哪些固定底栏"决定，避免内容被盖住。
   （.no-nav 只作为初始标记，真正的间距全交给 has-tabbar / has-actionbar 这两个类） */
body { padding-bottom: 0; }
body.has-tabbar { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); }
body.has-actionbar { padding-bottom: calc(var(--action-h) + env(safe-area-inset-bottom, 0px)); }
/* 同时有底部导航和操作条时，两者叠加，内容区要留出双份高度 */
body.has-tabbar.has-actionbar {
  padding-bottom: calc(var(--nav-h) + var(--action-h) + env(safe-area-inset-bottom, 0px));
}

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

/* ------------------------------- 顶部栏 ------------------------------- */

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
}
.appbar h1 { font-size: 17px; font-weight: 650; margin: 0; flex: 1; }
.appbar .sub { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.appbar .back {
  width: 32px; height: 32px; margin-left: -6px;
  display: grid; place-items: center;
  border: 0; background: transparent; border-radius: 50%;
  font-size: 20px; color: var(--ink-2); line-height: 1;
}
.appbar .back:active { background: var(--bg); }

/* ------------------------------- 容器 ------------------------------- */

.wrap { padding: 12px 14px; }
.wrap-tight { padding: 8px 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); font-size: 12.5px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ------------------------------- 卡片 ------------------------------- */

.card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.card-pad { padding: 14px; }
.card + .card { margin-top: 10px; }

/* ------------------------------ 信息卡片 ------------------------------ */

.item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  margin-bottom: 10px;
  position: relative;
  transition: transform .12s ease;
}
.item:active { transform: scale(.985); }

.item .thumb {
  width: 92px; height: 92px; flex: none;
  border-radius: 10px; background: #EEF0F4;
  object-fit: cover;
}
.item .thumb-empty {
  width: 92px; height: 92px; flex: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #EEF0F4, #E2E6ED);
  display: grid; place-items: center;
  font-size: 22px; color: #B9C0CC;
}

/* 独立的图片占位块（详情页大图、成交记录缩略图等）。
   必须自带 display:grid，否则只靠内联 style 的宽高，emoji 会缩在左上角。 */
.thumb-empty {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #EEF0F4, #E2E6ED);
  color: #B9C0CC;
  border-radius: var(--r);
  font-size: 34px;
}
.item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item .title {
  font-size: 15px; font-weight: 560; line-height: 1.4;
  margin: 2px 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item .desc { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.item .foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

.price { color: var(--sell); font-weight: 700; font-size: 17px; letter-spacing: -.2px; }
.price .sym { font-size: 12px; margin-right: 1px; }
.price-muted { color: var(--ink-2); font-weight: 600; font-size: 15px; }

/* -------------------------------- 徽标 -------------------------------- */

.badge {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 7px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
  line-height: 1;
}
.badge-sell { background: rgba(242, 98, 46, .12); color: var(--sell); }
.badge-buy  { background: rgba(46, 125, 242, .12); color: var(--buy); }
.badge-done { background: rgba(18, 183, 106, .12); color: var(--done); }
.badge-dealing { background: rgba(247, 144, 9, .14); color: var(--warn); }
.badge-closed { background: #EEF0F4; color: var(--ink-3); }
.badge-plain { background: #F2F4F7; color: var(--ink-2); }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #F2F4F7; color: var(--ink-2); font-size: 12px;
}

/* ------------------------------- 按钮 ------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 18px;
  border: 1px solid var(--line);
  background: #fff; color: var(--ink);
  border-radius: 11px;
  font-size: 15px; font-weight: 560;
  transition: transform .1s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }

.btn-primary { background: var(--sell); border-color: var(--sell); color: #fff; box-shadow: 0 2px 8px rgba(242,98,46,.28); }
.btn-buy { background: var(--buy); border-color: var(--buy); color: #fff; box-shadow: 0 2px 8px rgba(46,125,242,.26); }
.btn-ok { background: var(--done); border-color: var(--done); color: #fff; }
.btn-ghost { background: #F4F5F7; border-color: transparent; color: var(--ink-2); }
.btn-danger { background: #fff; border-color: #FBD5D5; color: #D92D20; }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-lg { height: 48px; font-size: 16px; border-radius: 13px; }

/* ------------------------------- 表单 ------------------------------- */

.field { margin-bottom: 16px; }
.field > label {
  display: block; font-size: 13.5px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 7px;
}
.field .hint { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 4px; }

.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 11px 13px;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--sell);
  box-shadow: 0 0 0 3px rgba(242, 98, 46, .12);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: #B9C0CC; }

/* 类型选择：两个大按钮，出售/求购一眼可分 */
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-pick button {
  height: 62px; border-radius: var(--r);
  border: 1.5px solid var(--line); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  transition: all .15s;
}
.type-pick button .em { font-size: 17px; }
.type-pick button.on[data-type="SELL"] { border-color: var(--sell); background: rgba(242,98,46,.07); color: var(--sell); }
.type-pick button.on[data-type="BUY"]  { border-color: var(--buy);  background: rgba(46,125,242,.07); color: var(--buy); }

/* 分类/筛选 chip */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 2px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 32px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2);
  font-size: 13.5px; display: inline-flex; align-items: center;
  transition: all .15s;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 560; }

/* Tab 切换 */
.tabs {
  display: flex; gap: 4px; background: #EDEFF3;
  padding: 3px; border-radius: 11px;
}
.tabs button {
  flex: 1; height: 34px; border: 0; background: transparent;
  border-radius: 8px; font-size: 14.5px; font-weight: 560; color: var(--ink-2);
  transition: all .18s;
}
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }

/* 图片上传 */
.picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
/* 图片格子用 padding-top:100% 撑成正方形。
   不用 aspect-ratio：那是 Chrome 88+ 的属性，老 WebView 不支持时
   格子高度会塌成 0，图片就完全看不见了。 */
.picker .ph {
  position: relative; height: 0; padding-top: 100%;
  border-radius: 11px; background: #EEF0F4; overflow: hidden;
}
.picker .ph img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.picker .ph .del {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; border: 0;
  font-size: 14px; line-height: 1; display: grid; place-items: center;
}
.picker .add {
  position: relative; height: 0; padding-top: 100%;
  border-radius: 11px;
  border: 1.5px dashed #D3D8E0; background: #FAFBFC;
  color: var(--ink-3); font-size: 12px;
}
.picker .add .in {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.picker .add .plus { font-size: 22px; line-height: 1; }

/* ------------------------------ 还价气泡 ------------------------------ */

.chat { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 8px; align-items: flex-start; max-width: 86%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .av {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: #E4E8EE; display: grid; place-items: center;
  font-size: 12px; color: var(--ink-2); font-weight: 600; overflow: hidden;
}
.msg .av img { width: 100%; height: 100%; object-fit: cover; }
.msg .bubble {
  background: #fff; border-radius: 4px 14px 14px 14px;
  padding: 10px 13px; box-shadow: var(--sh-1);
}
.msg.mine .bubble { background: #FFF1EA; border-radius: 14px 4px 14px 14px; }
.msg .who { font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; }
.msg .amt { font-size: 18px; font-weight: 700; color: var(--sell); letter-spacing: -.3px; }
.msg .txt { font-size: 14px; margin-top: 3px; word-break: break-word; }
.msg .meta { font-size: 11px; color: var(--ink-3); margin-top: 5px; }
.msg .state { font-size: 11.5px; font-weight: 600; margin-top: 4px; }
.state-ok { color: var(--done); }
.state-no { color: #D92D20; }
.state-off { color: var(--ink-3); }

/* 系统提示条 */
.sysnote {
  align-self: center; background: rgba(0,0,0,.05);
  color: var(--ink-2); font-size: 12px;
  padding: 5px 12px; border-radius: 999px; text-align: center;
}

/* 底部固定操作条 */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 8px; align-items: center;
}
.actionbar .btn { flex: 1; }

/* 有底部导航时，操作条必须抬到导航栏之上。
   否则两条都固定在 bottom:0，导航栏 z-index 更高，会把操作条整个盖住 ——
   表现为"出价"按钮凭空消失，功能不可达。 */
body.has-tabbar .actionbar {
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: 10px;
}

/* ------------------------------ 底部导航 ------------------------------ */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
  box-shadow: var(--sh-up);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--ink-3); font-size: 10.5px; position: relative;
  text-decoration: none;
}
.tabbar a .ico { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: .55; }
.tabbar a.on { color: var(--sell); font-weight: 600; }
.tabbar a.on .ico { filter: none; opacity: 1; }
.tabbar .dot {
  position: absolute; top: 6px; left: 50%; margin-left: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #F04438; color: #fff; border-radius: 999px;
  font-size: 10px; line-height: 16px; text-align: center; font-weight: 600;
}

/* ------------------------------ 空状态 ------------------------------ */

.empty { text-align: center; padding: 56px 24px; color: var(--ink-3); }
.empty .em { font-size: 44px; opacity: .5; margin-bottom: 10px; }
.empty .t { font-size: 15px; color: var(--ink-2); font-weight: 560; margin-bottom: 5px; }
.empty .d { font-size: 13px; line-height: 1.6; }

.loading { text-align: center; padding: 40px; color: var(--ink-3); font-size: 13.5px; }

/* ------------------------------ 提示条 ------------------------------ */

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px);
  background: rgba(26,29,36,.94); color: #fff;
  padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 200; max-width: 82vw; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 顶部横幅提示（例如"当前是模拟身份"） */
.banner {
  background: linear-gradient(90deg, #FFF4E5, #FFEEDD);
  border: 1px solid #FFE0B8; color: #8A5A00;
  border-radius: 11px; padding: 9px 12px;
  font-size: 12.5px; line-height: 1.5; margin-bottom: 12px;
  display: flex; gap: 8px; align-items: flex-start;
}
.banner .x { margin-left: auto; border: 0; background: transparent; color: #8A5A00; font-size: 15px; line-height: 1; padding: 0 2px; }

/* ------------------------------ 登录遮罩 ------------------------------ */

.mask {
  /* 不要写 inset: 0 —— 那是 Chrome 87 才有的简写，
     老 WebView 会整条忽略，fixed 元素会退回文档流位置、露出一截背景。 */
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 300;
  background: linear-gradient(160deg, #FFF6F0 0%, #F4F5F7 45%, #EEF2F9 100%);
  display: flex; flex-direction: column;
  padding: 0 26px calc(26px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.mask .hero { padding: 64px 0 28px; }
.mask .logo {
  width: 66px; height: 66px; border-radius: 20px;
  background: linear-gradient(135deg, #FF8A5B, #F2622E);
  display: grid; place-items: center; font-size: 32px;
  box-shadow: 0 10px 26px rgba(242,98,46,.32);
  margin-bottom: 18px;
}
.mask h2 { font-size: 25px; margin: 0 0 8px; font-weight: 700; letter-spacing: -.4px; }
.mask .lead { color: var(--ink-2); font-size: 14.5px; line-height: 1.65; margin: 0; }
.mask .feats { margin: 22px 0 0; display: grid; gap: 9px; }
.mask .feat { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.mask .feat .d { color: var(--done); font-weight: 700; }
.mask .form { margin-top: auto; padding-top: 26px; }

/* ------------------------------ 详情页 ------------------------------ */

.gallery {
  display: flex; gap: 8px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  border-radius: var(--r); overflow-y: hidden;
}
.gallery img {
  width: 100%; flex: none; scroll-snap-align: center;
  height: 280px;              /* 固定高度，不依赖 aspect-ratio，老 WebView 同样正常 */
  object-fit: cover; background: #EEF0F4;
}
.gallery.one img { border-radius: var(--r); }
.gallery.multi img { width: 88%; border-radius: var(--r); }

.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; }

.section-title {
  font-size: 13px; font-weight: 650; color: var(--ink-2);
  margin: 18px 0 9px; display: flex; align-items: center; gap: 7px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* 还价线程摘要行 */
.thread-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.thread-row:last-child { border-bottom: 0; }
.thread-row .av {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: #E4E8EE; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: var(--ink-2); overflow: hidden;
}
.thread-row .av img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------ 通知列表 ------------------------------ */

.notice {
  display: flex; gap: 11px; padding: 13px 14px;
  background: #fff; border-radius: var(--r);
  box-shadow: var(--sh-1); margin-bottom: 9px;
  position: relative;
}
.notice.unread::before {
  content: ''; position: absolute; left: 5px; top: 50%; margin-top: -3px;
  width: 6px; height: 6px; border-radius: 50%; background: #F04438;
}
.notice .ico { font-size: 21px; line-height: 1.3; flex: none; }
.notice .t { font-size: 14.5px; font-weight: 580; margin-bottom: 2px; }
.notice .b { font-size: 13px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.notice .time { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.notice .cnt {
  display: inline-block; margin-left: 6px; padding: 0 6px; height: 17px;
  background: #F04438; color: #fff; border-radius: 999px;
  font-size: 11px; line-height: 17px; vertical-align: 1px;
}

/* ------------------------------ 设置页 ------------------------------ */

.kv { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--ink-2); }
.kv .v { font-weight: 600; }
.dot-ok { color: var(--done); }
.dot-no { color: var(--ink-3); }

.help { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.help code {
  background: #F2F4F7; padding: 1px 5px; border-radius: 4px;
  font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* ------------------------------ 骨架屏 ------------------------------ */

.sk { background: linear-gradient(90deg, #EEF0F4 25%, #E4E8EE 37%, #EEF0F4 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }
.sk-item { height: 92px; margin-bottom: 10px; border-radius: var(--r); }

/* ------------------------------ 工具类 ------------------------------ */

.mt-0 { margin-top: 0 } .mt-6 { margin-top: 6px } .mt-10 { margin-top: 10px }
.mt-16 { margin-top: 16px } .mt-24 { margin-top: 24px }
.mb-0 { margin-bottom: 0 } .mb-6 { margin-bottom: 6px } .mb-10 { margin-bottom: 10px }
.mb-16 { margin-bottom: 16px }
.tc { text-align: center } .tr { text-align: right }
.fs-12 { font-size: 12px } .fs-13 { font-size: 13px } .fs-16 { font-size: 16px }
.bold { font-weight: 650 }
.hide { display: none !important }

.divider { height: 1px; background: var(--line); margin: 14px 0; }

@media (min-width: 620px) {
  /* 桌面/平板浏览时把内容收窄到手机宽度，并保持居中。
     注意：固定定位元素的居中要用 left:0 + right:0 + margin:auto，
     不要用 left:50% + transform —— 稍后被重置的 left 会让元素挤成一条缝。 */
  body { background: #EBEDF1; }
  .wrap, .wrap-tight { max-width: 460px; margin-left: auto; margin-right: auto; }
  .appbar { max-width: 460px; margin-left: auto; margin-right: auto; }
  .tabbar, .actionbar, .mask {
    max-width: 460px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------------------- 矮容器：钉钉半浮层 / 群右侧栏 ---------------------- */
/*
 * 为什么需要这一档：
 *   「群快捷入口」在移动端是**半浮层**打开的（官方文档原文：
 *   「钉钉移动端固定为半浮层打开」），高度大约只有屏幕的 60%。
 *   以 800px 高的手机算就是 ~480px —— 而底部导航 58px + 操作条 84px
 *   一共吃掉 142px，只剩 ~340px 给内容，非常挤。
 *   这一档只做一件事：**把固定的那两条栏压薄**，把纵向空间还给内容。
 *
 * 为什么用 max-height 而不是 max-width：
 *   半浮层的特点是**矮**，宽度基本还是整屏宽。按宽度判断完全抓不到它。
 *
 * 为什么用媒体查询而不是 JS 量 innerHeight 再挂 class：
 *   半浮层可以折叠/展开，横竖屏也会切换，高度随时在变。
 *   媒体查询会自己跟上，不需要监听 resize，也就少了一处
 *   "状态和界面不同步"的可能 —— 那类 bug 特别难查。
 *
 * 阈值取 640px：比它矮才压缩。正常全屏手机（700~900px）不受任何影响。
 * 这一档刻意**只动固定栏，不动卡片内边距** —— 内容留白突然变小
 * 会让界面显得局促，而收益远不如把被固定栏吃掉的 30px 抢回来明显。
 */
@media (max-height: 640px) {
  :root {
    --nav-h: 48px;
    --action-h: 76px;
  }
  .tabbar a { font-size: 10px; }
  .tabbar a .ico { font-size: 17px; }
  .tabbar .dot { top: 4px; }
  /* 操作条自身的内边距也要跟着收，否则预留的 76px 对不上真实高度，
     会出现"操作条盖住最后一条内容"或"底部多出一段空白" */
  .actionbar { padding-top: 8px; padding-bottom: 8px; }
  body.has-tabbar .actionbar { padding-bottom: 8px; }
}
