/* ============================================================
   古董雅集 · 设计系统
   暖米白 #F7F3EA / 墨黑 #252622 / 深茶绿 #284A41 / 古铜金 #AE8755
   ============================================================ */
:root {
  --bg: #F7F3EA;
  --bg-soft: #F1EBDE;
  --ink: #252622;
  --ink-soft: #55544B;
  --muted: #6E6A5E;
  --green: #284A41;
  --green-soft: #E4EBE6;
  --gold: #AE8755;
  --gold-soft: #F0E6D6;
  --card: #FFFFFF;
  --line: #E6DFCD;
  --danger: #B3452F;
  --danger-soft: #F6E4DE;
  --warn: #8F5313;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(37, 38, 34, 0.07);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  /* 顶部双端切换器占用的高度：舞台需据此让位 */
  --stage-top: 52px;
}
@media (max-width: 767px) { :root { --stage-top: 46px; } }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 15px; color: var(--ink); }
img { display: block; }
::selection { background: var(--gold-soft); }

/* ---------- 无障碍：键盘焦点环 ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
  /* 焦点环必须瞬时呈现：被 transition:all 波及会淡入，
     键盘用户看不清当前焦点位置，也不利于自动化断言 */
  transition: outline-color .01s linear;
}
a:focus-visible, button:focus-visible, [data-action]:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  transition: outline-color .01s linear;
}
.input:focus-visible { box-shadow: 0 0 0 3px rgba(174, 135, 85, .14); }

/* ---------- 图标基础（内联 SVG 统一尺寸） ---------- */
.ic { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; }
.ic svg { width: 18px; height: 18px; }
.tab-icon svg { width: 22px; height: 22px; }
.msg-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; color: var(--gold); }
.msg-icon svg { width: 22px; height: 22px; }
.empty-icon svg { width: 44px; height: 44px; }
.entry-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; }
.entry-icon svg { width: 20px; height: 20px; }
.entry-arrow { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: var(--muted); }
.entry-arrow svg { width: 15px; height: 15px; }
.mini-back { display: inline-flex; align-items: center; justify-content: flex-start; width: 40px; }
.mini-back svg { width: 26px; height: 26px; }
.side-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; }
.side-icon svg { width: 17px; height: 17px; }
.section-more { display: inline-flex; align-items: center; gap: 2px; }
.section-more svg { width: 14px; height: 14px; }
.ad-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.ad-close svg { width: 18px; height: 18px; }
.img-op { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; }
.img-op svg { width: 15px; height: 15px; }
.add-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; }
.add-icon svg { width: 32px; height: 32px; }
.risk-tip svg, .pay-sim-note svg, .ad-note svg, .demo-note svg { width: 15px; height: 15px; display: inline-block; vertical-align: -0.2em; }
.expire-bar svg { width: 16px; height: 16px; display: inline-block; vertical-align: -0.2em; }
.result-icon svg { width: 34px; height: 34px; }
.extend-icon svg { width: 22px; height: 22px; }
.btn svg { width: 15px; height: 15px; display: inline-block; vertical-align: -0.2em; }
.btn.tiny svg { width: 14px; height: 14px; }
.data-table svg { width: 15px; height: 15px; display: inline-block; vertical-align: -0.2em; }
.audit-meta svg { width: 15px; height: 15px; display: inline-block; vertical-align: -0.2em; }
.ad-sim-count svg { width: 34px; height: 34px; display: inline-block; }
.myitem-remain svg { width: 14px; height: 14px; display: inline-block; vertical-align: -0.2em; }
.todo-row svg, .demo-note svg { width: 15px; height: 15px; display: inline-block; vertical-align: -0.2em; }
.tag-reco svg, .tag-status svg { width: 12px; height: 12px; }

/* ---------- 触摸目标 ≥44px（移动端主要交互） ---------- */
.btn { min-height: 40px; }
.btn.tiny { min-height: 28px; } /* 后台表格内次要操作，保持紧凑 */
.bottom-bar .btn { min-height: 44px; }
.contact-btn { min-height: 44px; }
.mini-back { min-height: 44px; }
.tab-item { min-height: 46px; justify-content: center; }
.img-add { min-height: 104px; }
.status-tab { padding: 9px 14px; }
.sort-item { padding: 9px 2px; }
.entry-row { padding: 15px 16px; }
.side-item { padding: 12px 13px; }

/* ---------- 动画减弱（用户系统偏好） ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .banner-track, .ad-sim-bar i, .bar-fill, .toast, .modal-card, .item-card { transition: none !important; }
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 500;
  /* 不使用 transition:all —— 会连带动画 outline-color，导致焦点环淡入 */
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: #1f3d35; }
.btn.gold { background: var(--gold); color: #fff; }
.btn.gold:hover { background: #96733f; }
.btn.green { background: var(--green); color: #fff; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #97392a; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.tiny { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.grow { flex: 1; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 输入 ---------- */
.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); transition: border .18s; outline: none;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(174, 135, 85, .14); }
.input.tiny { width: auto; padding: 6px 9px; font-size: 13px; border-radius: 8px; }
textarea.input { resize: vertical; line-height: 1.6; }

/* ---------- Chip ---------- */
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-size: 13px; color: var(--ink-soft); cursor: pointer;
  transition: background .18s, color .18s, border-color .18s; white-space: nowrap;
}
.chip.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 500; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 空状态 ---------- */
.empty-state { padding: 48px 20px; text-align: center; }
.empty-icon { font-size: 40px; color: var(--gold); opacity: .6; margin-bottom: 10px; }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* ============================================================
   双端切换浮层
   ============================================================ */
.stage-switch {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 90;
  display: flex; background: rgba(37,38,34,.92); border-radius: 999px; padding: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); backdrop-filter: blur(8px);
}
.stage-switch button {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #C9C4B6;
  transition: background .2s, color .2s; display: inline-flex; align-items: center; gap: 6px;
}
.stage-switch button svg { width: 15px; height: 15px; }
.stage-switch button.on { background: var(--gold); color: #fff; }

/* ============================================================
   小程序端 · 真机手机框
   桌面端：居中真机外观（机身 + 刘海 + 状态栏 + Home 条），屏幕内独立滚动
   移动端（<768px）：自动脱框为全屏，贴合真实手机
   ============================================================ */
.phone-stage {
  display: flex; justify-content: center; align-items: flex-start;
  padding: 0 16px 40px;
}
.phone-frame { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.phone-shell {
  position: relative; width: 390px; max-width: 100%;
  background: linear-gradient(160deg, #34362F 0%, #1B1C19 42%, #26271F 100%);
  border-radius: 46px; padding: 11px;
  box-shadow:
    0 0 0 2px #3A3C35,
    0 0 0 3px rgba(0,0,0,.28),
    0 34px 76px rgba(37, 38, 34, .32),
    0 10px 24px rgba(37, 38, 34, .18);
}
/* 侧边按键细节 */
.phone-shell::before, .phone-shell::after {
  content: ''; position: absolute; width: 3px; background: #3A3C35; border-radius: 2px;
}
.phone-shell::before { left: -3px; top: 132px; height: 62px; }
.phone-shell::after { right: -3px; top: 168px; height: 44px; }

/* 屏幕本体 */
.phone-body {
  position: relative; overflow: hidden;
  border-radius: 36px; background: #000;
}
.phone-screen {
  position: relative; overflow: hidden auto;
  height: 812px;                       /* iPhone 14 逻辑屏高 */
  padding-top: 44px;                   /* 状态栏留白 */
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  /* 建立独立包含块：内部 position:fixed 元素相对屏幕定位，而非视口 */
  transform: translateZ(0);
  isolation: isolate;
}
.phone-screen::-webkit-scrollbar { width: 0; height: 0; }

/* 刘海 */
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 156px; height: 30px; z-index: 80;
  background: #000; border-radius: 0 0 19px 19px;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none;
}
.notch-pill {
  width: 72px; height: 5px; border-radius: 3px;
  background: #17181A; margin-bottom: 6px;
}

/* 状态栏 */
.phone-statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 44px; z-index: 75;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; pointer-events: none;
  color: var(--ink);
}
.sb-time { font-size: 14px; font-weight: 600; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.sb-right { display: flex; align-items: center; gap: 5px; }
.sb-right svg { display: block; }

/* Home 指示条 */
.phone-homebar {
  position: absolute; bottom: 7px; left: 0; right: 0; height: 22px; z-index: 80;
  display: flex; justify-content: center; align-items: center; pointer-events: none;
}
.phone-homebar span {
  width: 134px; height: 5px; border-radius: 3px; background: rgba(37, 38, 34, .82);
}

/* 覆盖层：承载弹层 / toast / 固定底栏 */
.phone-overlay {
  position: absolute; inset: 0; z-index: 70;
  pointer-events: none;
}
.phone-overlay > * { pointer-events: auto; }

/* 底部固定层（承载 操作栏 + tabbar），自底向上堆叠，不随内容滚动 */
.phone-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; flex-direction: column; justify-content: flex-end;
  pointer-events: none;
}
.phone-bar > * { pointer-events: auto; }
/* 桌面端真机框：底部栏需为 Home 指示条让位 */
@media (min-width: 768px) {
  .phone-bar .tabbar { padding-bottom: 26px; }
  .phone-bar .bottom-bar { padding-bottom: 24px; }
}

/* ---- 移动端：脱框全屏 ---- */
@media (max-width: 767px) {
  .phone-stage { padding: 0; }
  .phone-frame { width: 100%; }
  .phone-shell {
    width: 100%; border-radius: 0; padding: 0; box-shadow: none;
    background: var(--bg);
  }
  .phone-shell::before, .phone-shell::after { display: none; }
  .phone-body { border-radius: 0; overflow: visible; }
  .phone-notch, .phone-statusbar, .phone-homebar { display: none; }
  /* 高度需扣除顶部切换器占位，否则底部 TabBar 会被挤出视口 */
  .phone-screen { height: calc(100dvh - var(--stage-top)); transform: none; padding-top: 0; }
  .phone-overlay { position: fixed; inset: 0; }
}

@media (min-width: 768px) and (max-height: 960px) {
  .phone-screen { height: min(812px, calc(100vh - 170px)); }
}

/* 内容区底部留白：由 JS 按底部固定层实际高度动态写入 --bar-h */
.mini-page { min-height: 100%; padding-bottom: calc(var(--bar-h, 76px) + 8px); }

/* 顶部导航 —— 状态栏下方 sticky */
.minibar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center;
  padding: 12px 14px 10px; background: rgba(247,243,234,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.mini-back { font-size: 26px; line-height: 1; color: var(--ink); padding: 0 10px 0 0; width: 40px; text-align: left; }
.minibar-title { flex: 1; text-align: center; font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.minibar-right { width: 40px; }

/* TabBar —— 手机框内固定于屏幕底部（随 .phone-bar 自底向上堆叠） */
.tabbar {
  position: relative; z-index: 1; flex: none;
  display: flex; background: var(--card);
  border-top: 1px solid var(--line); padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
}.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--muted); transition: color .18s; }
.tab-item.on { color: var(--green); }
.tab-icon svg { stroke-width: 1.8; }
.tab-item.on .tab-icon { transform: translateY(-1px); }
.tab-label { font-size: 11px; }

/* 机身下方说明（仅桌面端展示，移动端隐藏） */
.phone-caption {
  display: none;
  flex-direction: column; align-items: center; gap: 3px;
  margin-top: 18px; text-align: center; flex: none;
}
.phone-caption-title {
  font-family: var(--serif); font-size: 13px; font-weight: 600;
  letter-spacing: 2px; color: var(--ink-soft);
}
.phone-caption-sub { font-size: 11px; letter-spacing: .6px; color: var(--muted); }
@media (min-width: 768px) { .phone-caption { display: flex; } }

/* 首页 */
.home-head { padding: 14px 14px 4px; }
.home-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.brand-seal {
  width: 38px; height: 38px; border-radius: 9px; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--serif);
  font-size: 20px; box-shadow: 0 3px 10px rgba(40,74,65,.3);
}
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 3px; }
.brand-sub { font-size: 10px; color: var(--muted); letter-spacing: 1.5px; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 14px; }
.search-box svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search-input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; }
.search-btn { background: var(--green); color: #fff; border-radius: 999px; padding: 7px 16px; font-size: 13px; }
.search-btn:active { opacity: .85; }

/* Banner */
.banner-wrap { padding: 12px 14px 0; position: relative; }
/* 构建号角标：贴在轮播右上角，一眼确认当前跑的是哪一版 JS。
   排查「改了没变化」时，号不对 = 浏览器还在用旧代码，不用再猜。 */
.banner-build { position: absolute; right: 18px; top: 2px; z-index: 5; font-size: 9px; letter-spacing: .3px;
  color: #fff; background: rgba(37,38,34,.55); border-radius: 6px; padding: 1px 5px; pointer-events: none; }
/* 轮播裁剪窗（viewport）：只负责「框住可视区域」，自身永远不做位移。
   ⚠️ 历史 bug（用户反馈"首页没有多张轮播"的真正根因）：
   早期把 overflow:hidden 和 translateX 位变换放在了同一个元素 .banner-track 上，
   而 transform 会连同自己的裁剪框一起搬走 —— 切到第 2 张时
   track.getBoundingClientRect().left 变成 -930px（整个裁剪窗跑到屏幕左侧之外），
   结果是：第 1 张能看见，切到第 2~5 张时轮播区「整块空白」。
   正确做法是拆成两层：
     .banner-viewport  ← 只做 overflow:hidden + 圆角 + 尺寸，永不位移
     .banner-track    ← 里面那层 flex 轨道，唯一被 translateX 位移的元素
   这样裁剪窗恒定停在原位，只有内容在窗内滑动。 */
.banner-viewport { overflow: hidden; border-radius: 14px; touch-action: pan-y; cursor: pointer;
  /* 轨道底层兜底：即使一张 slide 都没渲染出来，也留一块深色，不至于露出页面米白底 */
  background: #284A41; min-height: 148px; }
/* 轨道：唯一被 translateX 位移的元素。宽度等于一张 slide（flex 容器宽度=父级内容宽），
   5 张 slide 靠 flex:0 0 100% 横向排开并溢出，由外层 viewport 裁剪。
   touch-action 也要给到轨道/卡片上，否则手势事件可能被浏览器的手势识别抢走。 */
.banner-track { display: flex; transition: transform .5s ease; touch-action: pan-y; }
/* 关键兜底：slide 自身带默认深色渐变。
   历史 bug：老数据 / 老 JS 的 banner 既没有 image 也没有 color，
   inline 样式为空 → 整块透明 → 白色标题落在米白底上完全看不见，
   表现就是「轮播区一片空白，只剩几个圆点」。
   把底色写进 CSS，就从"依赖数据"变成"无论如何都有色"。 */
.banner-slide { flex: 0 0 100%; height: 148px; display: flex; align-items: flex-end; padding: 18px; color: #fff; position: relative;
  background-size: cover; background-position: center;
  background-color: #284A41;
  background-image: linear-gradient(135deg, #3A3226 0%, #284A41 100%); }
.banner-slide::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 55%); }
.banner-slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,24,20,.30) 0%, rgba(20,24,20,.12) 38%, rgba(20,24,20,.72) 100%); }
.banner-text { position: relative; z-index: 1; padding-right: 78px; }
.banner-title { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 1px; margin-bottom: 5px; }
.banner-sub { font-size: 11.5px; opacity: .88; }
/* 右下角 CTA：暗示"这张可以点"，否则整块图文看起来只是装饰 */
.banner-cta { position: absolute; right: 16px; bottom: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 2px;
  font-size: 11px; color: #fff; padding: 4px 9px 4px 11px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.34); backdrop-filter: blur(2px); white-space: nowrap; }
/* 圆点指示器：叠在图片底部居中，不影响图片高度 */
.banner-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; z-index: 3; pointer-events: none; }
.banner-dot { width: 5px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.45); transition: width .28s ease, background .28s ease; pointer-events: auto; cursor: pointer; }
.banner-dot.on { width: 16px; background: #fff; }

/* 分类入口 */
.cat-strip { display: flex; gap: 4px; overflow-x: auto; padding: 14px; }
.cat-cell { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; padding: 2px 8px; }
.cat-icon { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--serif); font-size: 18px; }
.cat-label { font-size: 12px; color: var(--ink-soft); }

/* 区块标题 */
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 10px; }
.section-title { font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.orn { width: 14px; height: 2px; background: var(--gold); display: inline-block; border-radius: 2px; }
.section-more { font-size: 12px; color: var(--gold); }

/* 双列卡片 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 14px; }
.item-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; transition: transform .18s, box-shadow .18s;
}
.item-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(37,38,34,.12); }
.item-cover { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--bg-soft); }
.item-cover img { width: 100%; height: 100%; object-fit: cover; }
.tag-reco { position: absolute; top: 8px; left: 8px; background: var(--gold); color: #fff; font-size: 10px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.tag-status { position: absolute; top: 8px; right: 8px; color: #fff; font-size: 10px; padding: 3px 8px; border-radius: 6px; }
.tag-remain { position: absolute; bottom: 8px; left: 8px; background: rgba(37,38,34,.78); color: #fff; font-size: 10px; padding: 3px 8px; border-radius: 6px; }
.item-body { padding: 10px 11px 12px; }
.item-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: 40px; }
.item-meta { font-size: 11.5px; color: var(--muted); margin: 5px 0 6px; }
.item-price { font-size: 16px; font-weight: 700; color: var(--gold); }
.price-note { font-size: 10px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.item-owner { font-size: 11px; color: var(--muted); margin-top: 4px; }

.bottom-note { text-align: center; font-size: 11px; color: var(--muted); padding: 22px 14px 10px; }
/* 构建号：肉眼可辨地告诉用户「现在跑的是哪一版」
   —— 排查「改了但页面没变」时，号不对就说明浏览器还在用旧 JS */
.build-tag { text-align: center; font-size: 10.5px; color: var(--muted); opacity: .75; padding: 0 14px 18px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* 发现页 */
.discover-search { display: flex; gap: 8px; padding: 12px 14px 6px; align-items: center; }
.discover-search .search-input { border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 9px 16px; }
.filter-strip { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px 6px; }
.sort-strip { display: flex; align-items: center; gap: 16px; padding: 8px 14px 12px; }
.sort-item { font-size: 13px; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; cursor: pointer; }
.sort-item.on { color: var(--green); font-weight: 600; border-color: var(--green); }
.sort-count { margin-left: auto; font-size: 11.5px; color: var(--muted); }

/* 详情页 */
.gallery { position: relative; aspect-ratio: 1/1.05; background: var(--bg-soft); cursor: pointer; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery-badge { position: absolute; bottom: 12px; left: 12px; background: rgba(37,38,34,.75); color: #fff; font-size: 11px; padding: 5px 11px; border-radius: 8px; }
.detail-panel { background: var(--card); border-radius: 18px 18px 0 0; margin-top: -16px; position: relative; padding: 18px 16px 14px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.detail-title { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.4; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.d-tag { font-size: 11px; background: var(--bg-soft); color: var(--ink-soft); padding: 3px 9px; border-radius: 6px; }
.d-tag.gold { background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.fav-btn { text-align: center; color: var(--muted); padding: 6px 8px; border-radius: 10px; }
.fav-btn svg { width: 22px; height: 22px; margin: 0 auto 2px; display: block; }
.fav-btn.on { color: var(--gold); }
.fav-btn .fav-text { font-size: 10px; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin: 14px 0; padding: 12px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.price-main { font-size: 24px; font-weight: 700; color: var(--gold); }
.price-note2 { font-size: 11px; color: var(--muted); }
.info-table { margin-bottom: 8px; }
.info-row { display: flex; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid #f3efe4; }
.info-label { width: 64px; color: var(--muted); flex: none; }
.desc-block { margin-top: 14px; }
.block-title { font-family: var(--serif); font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.desc-text { font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); }
.seller-card { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px; background: var(--bg); border-radius: 12px; }
.seller-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 17px; flex: none; overflow: hidden; }
img.seller-avatar { object-fit: cover; width: 40px; height: 40px; }
.seller-name { font-weight: 600; font-size: 14px; }
.seller-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mine-tip { margin-top: 16px; padding: 12px; background: var(--green-soft); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.mine-tip .btn { align-self: flex-start; margin-top: 4px; }
.risk-tip { margin: 12px 14px; padding: 10px 12px; background: var(--danger-soft); color: var(--danger); border-radius: 10px; font-size: 12px; line-height: 1.6; }

/* 底部操作栏 —— 置于机身固定层（.phone-bar），不随内容滚动 */
.bottom-bar {
  position: relative; z-index: 1;
  display: flex; gap: 8px; align-items: center;
  background: var(--card); border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  margin: 0;
}
/* 联系按钮：允许文本收缩，避免挤压左右按钮溢出屏幕 */
.contact-btn {
  background: var(--gold); color: #fff; flex: 1 1 auto;
  font-size: 13.5px; min-width: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; padding-left: 12px; padding-right: 12px;
}
.contact-btn .ic { flex: none; }
/* 联系方式文本自身可省略 */
.contact-btn .contact-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.contact-owner { flex: 1 1 auto; text-align: center; font-size: 12px; color: var(--muted); min-width: 0; }
/* 分享 / 举报等次要按钮不参与伸缩 */
.bottom-bar .btn.ghost { flex: 0 0 auto; }
.bottom-bar .btn.primary { flex: 1 1 auto; min-width: 0; }
.bottom-bar .btn.grow { flex: 1 1 auto; }

/* 发布页 */
.publish-panel { padding: 14px; }
.form-section { margin-bottom: 18px; }
.form-label { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.form-label .req { color: var(--danger); }
.form-label .hint { font-size: 11px; color: var(--muted); font-weight: 400; }
.img-uploader { display: flex; flex-wrap: wrap; gap: 10px; }
.img-cell { position: relative; width: 104px; height: 104px; border-radius: 12px; overflow: visible; }
.img-cell img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.img-n { position: absolute; top: 5px; left: 5px; background: rgba(37,38,34,.7); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 5px; }
.img-ops { position: absolute; right: 3px; top: 3px; display: flex; gap: 3px; }
.img-op { width: 20px; height: 20px; border-radius: 6px; background: rgba(37,38,34,.75); color: #fff; font-size: 11px; line-height: 1; }
.img-op.del { background: var(--danger); }
.img-add { width: 104px; height: 104px; border: 1.5px dashed var(--gold); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--gold); cursor: pointer; }
.add-icon { font-size: 26px; line-height: 1; }
.add-text { font-size: 11px; margin-top: 4px; }
.img-hint { font-size: 11px; color: var(--muted); margin-top: 8px; }
.grid-2f { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.agree-row { margin-top: 10px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink-soft); line-height: 1.6; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--green); }

/* 结果页 */
.result-panel { padding: 40px 24px; text-align: center; }
.result-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #fff; }
.result-icon.ok { background: var(--green); }
.result-title { font-family: var(--serif); font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.result-sub { font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 12px; }
.result-note { font-size: 12px; color: var(--muted); margin-bottom: 22px; }
.result-panel .btn { margin: 6px auto; display: block; }
.order-brief { text-align: left; background: var(--bg); border-radius: 12px; padding: 14px; margin: 16px 0 20px; }
.ob-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.ob-row span { color: var(--muted); }
.gold { color: var(--gold); }

/* 我的藏品 */
.status-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 14px 4px; }
.status-tab { flex: 0 0 auto; padding: 7px 13px; font-size: 12.5px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer; }
.status-tab.on { background: var(--green); color: #fff; border-color: var(--green); font-weight: 500; }
.myitem-list { padding: 10px 14px; display: flex; flex-direction: column; gap: 10px; }
.myitem-card { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.myitem-cover { width: 84px; height: 84px; flex: none; border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.myitem-cover img { width: 100%; height: 100%; object-fit: cover; }
.myitem-info { flex: 1; min-width: 0; }
.myitem-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.m-status { font-size: 10px; color: #fff; padding: 2px 7px; border-radius: 5px; font-weight: 500; }
.myitem-meta { font-size: 12px; color: var(--muted); margin: 4px 0; }
.myitem-remain { font-size: 12px; color: var(--warn); font-weight: 600; }
.myitem-remain.warn { color: var(--danger); }
.reject-reason { font-size: 11.5px; color: var(--danger); background: var(--danger-soft); border-radius: 7px; padding: 6px 9px; margin-top: 6px; line-height: 1.5; }
.myitem-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* 展示管理 */
.display-hero { display: flex; gap: 12px; padding: 14px; }
.display-cover { width: 110px; height: 110px; flex: none; border-radius: 12px; overflow: hidden; }
.display-cover img { width: 100%; height: 100%; object-fit: cover; }
.display-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.display-title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.display-status { font-size: 12px; font-weight: 600; margin: 4px 0 8px; }
.display-time { margin-top: auto; }
.countdown { font-size: 22px; font-weight: 800; color: var(--green); font-family: var(--serif); }
.countdown.warn { color: var(--danger); }
.countdown-sub { font-size: 11px; color: var(--muted); }
.expire-bar { margin: 0 14px 12px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; background: var(--green-soft); color: var(--green); }
.expire-bar.urgent { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.expire-bar.dim { background: var(--bg-soft); color: var(--muted); }
.extend-section, .history-section { margin: 12px 14px; }
.extend-title { font-family: var(--serif); font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.extend-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.extend-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.extend-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; margin: 0 auto 8px; color: #fff; font-weight: 700; }
.extend-icon.gold { background: var(--gold); }
.extend-icon.green { background: var(--green); }
.extend-name { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.extend-desc { font-size: 10.5px; color: var(--muted); margin-bottom: 10px; min-height: 30px; }
.extend-card .btn { width: 100%; }
.ad-note { font-size: 10.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.history-list { display: flex; flex-direction: column; }
.history-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f3efe4; }
.h-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.h-dot.free { background: var(--gold); }
.h-dot.paid { background: var(--green); }
.h-dot.ad { background: var(--warn); }
.h-dot.manual { background: #7a6a9f; }
.h-label { font-size: 13px; }
.h-time { font-size: 11px; color: var(--muted); }
.h-days { margin-left: auto; font-weight: 700; color: var(--green); font-size: 13px; }

/* 套餐页 */
.plan-target { display: flex; gap: 12px; padding: 14px; align-items: center; }
.plan-target-cover { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex: none; }
.plan-target-cover img { width: 100%; height: 100%; object-fit: cover; }
.plan-target-title { font-size: 14px; font-weight: 600; }
.plan-target-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.plan-list { padding: 0 14px; display: flex; flex-direction: column; gap: 10px; }
.plan-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; position: relative; }
.plan-card.hot { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.plan-card.hot::before { content: '推荐'; position: absolute; top: -10px; left: 14px; background: var(--gold); color: #fff; font-size: 10px; padding: 2px 10px; border-radius: 6px; }
.plan-main { flex: 1; min-width: 0; }
.plan-name { font-size: 14px; font-weight: 700; }
.plan-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.plan-price { font-size: 20px; font-weight: 800; color: var(--gold); }
.plan-note { padding: 12px 14px 4px; font-size: 11px; color: var(--muted); line-height: 1.6; }

/* 订单 / 消息 */
.order-sum { display: flex; gap: 8px; margin: 10px 14px 12px; padding: 12px 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.order-sum-cell { flex: 1; text-align: center; position: relative; }
.order-sum-cell + .order-sum-cell::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.order-sum-cell b { display: block; font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.order-sum-cell b.gold { color: var(--gold); }
.order-sum-cell span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.fav-tip { margin: 10px 14px 6px; font-size: 11px; color: var(--muted); }
.order-card, .msg-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 0 14px 10px; padding: 13px; box-shadow: var(--shadow); }
.order-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.order-id { font-size: 12px; color: var(--muted); }
.order-status { font-size: 11px; color: var(--green); font-weight: 600; }
.order-status.refunded { color: var(--muted); }
.order-item { font-size: 13px; padding: 3px 0; }
.msg-list { padding: 10px 0; }
.msg-card { display: flex; gap: 12px; cursor: pointer; }
.msg-card.unread { border-left: 3px solid var(--gold); }
.msg-icon { font-size: 22px; }
.msg-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); display: inline-block; }
.msg-content { font-size: 12.5px; color: var(--ink-soft); margin: 5px 0; line-height: 1.6; }
.msg-time { font-size: 11px; color: var(--muted); }

/* 我的 */
.mine-head { display: flex; align-items: center; gap: 12px; padding: 26px 16px 16px; background: linear-gradient(160deg, var(--green), #1e3a32); color: #fff; }
.mine-avatar { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 22px; border: 2px solid rgba(255,255,255,.4); flex: none; overflow: hidden; }
img.mine-avatar { object-fit: cover; width: 52px; height: 52px; }
.mine-info { flex: 1; }
.mine-name { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.mine-phone { font-size: 11.5px; opacity: .8; margin-top: 3px; }
.mine-head .btn { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.mine-stats { display: flex; background: var(--card); margin: -10px 14px 12px; border-radius: 14px; padding: 14px 0; box-shadow: var(--shadow); position: relative; z-index: 2; }
.stat-cell { flex: 1; text-align: center; }
.stat-n { font-family: var(--serif); font-size: 18px; font-weight: 800; color: var(--green); }
.stat-l { font-size: 11px; color: var(--muted); margin-top: 2px; }
.mine-menu { background: var(--card); border-radius: 14px; margin: 0 14px 12px; border: 1px solid var(--line); overflow: hidden; }
.entry-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f3efe4; cursor: pointer; font-size: 14px; }
.entry-row:last-child { border-bottom: none; }
.entry-row:active { background: var(--bg-soft); }
.entry-row.danger { color: var(--danger); }
.entry-icon { font-size: 18px; width: 24px; text-align: center; }
.entry-label { flex: 1; }
.entry-extra { font-size: 11.5px; color: var(--gold); }
.entry-arrow { color: var(--muted); }

/* 登录 */
.login-panel { padding: 70px 30px; text-align: center; }
.login-seal { width: 72px; height: 72px; border-radius: 16px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 34px; margin: 0 auto 18px; box-shadow: 0 8px 24px rgba(40,74,65,.35); }
.login-title { font-family: var(--serif); font-size: 26px; font-weight: 800; letter-spacing: 6px; }
.login-sub { font-size: 13px; color: var(--muted); letter-spacing: 2px; margin: 8px 0 30px; }
.login-tip { font-size: 12px; color: var(--warn); background: var(--gold-soft); padding: 8px 12px; border-radius: 9px; margin-bottom: 18px; }
.login-disclaimer { font-size: 11px; color: var(--muted); margin-top: 18px; line-height: 1.7; }

/* 举报/反馈 */
.report-target { font-size: 14px; font-weight: 600; background: var(--bg); border-radius: 10px; padding: 10px 12px; }

/* 协议 */
.doc-list { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.doc-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.doc-title { font-family: var(--serif); font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.doc-body { font-size: 13px; color: var(--ink-soft); line-height: 1.8; }

/* ============================================================
   弹层 / 广告 / 支付 / 分享 / 图片预览 / Toast
   ============================================================ */
/* 弹层：后台端铺满视口，手机框内铺满机身 */
.layer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.phone-shell .layer {
  position: absolute; inset: 11px; padding: 16px;
  border-radius: 36px; overflow: hidden;
}
.modal-mask { position: absolute; inset: 0; background: rgba(37,38,34,.55); backdrop-filter: blur(2px); }
.modal-card { position: relative; background: var(--card); border-radius: 18px; width: 100%; max-width: 400px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: pop .22s ease; max-height: 84vh; overflow: auto; }
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { font-family: var(--serif); font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.modal-body { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 16px; }
.modal-body .field-label { font-size: 12.5px; color: var(--ink); margin-bottom: 8px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal-actions .btn { flex: 1; }

/* 广告模拟 */
.ad-sim { position: relative; background: var(--card); border-radius: 18px; width: 100%; max-width: 400px; overflow: hidden; animation: pop .22s ease; }
.ad-sim-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; }
.ad-badge { font-size: 10px; background: var(--danger-soft); color: var(--danger); padding: 3px 9px; border-radius: 6px; font-weight: 600; }
.ad-close { font-size: 18px; color: var(--muted); padding: 4px 8px; }
.ad-sim-stage { background: linear-gradient(160deg, var(--green), #1e3a32); color: #fff; text-align: center; padding: 26px 20px 30px; }
.ad-sim-title { font-family: var(--serif); font-size: 18px; font-weight: 700; letter-spacing: 2px; }
.ad-sim-sub { font-size: 12px; opacity: .8; margin: 5px 0 18px; }
.ad-sim-bar { height: 5px; background: rgba(255,255,255,.25); border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.ad-sim-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .9s linear; }
.ad-sim-count { font-size: 40px; font-weight: 800; font-family: var(--serif); }
.ad-sim-tip { font-size: 11.5px; opacity: .85; margin-top: 8px; }
.ad-sim-actions { display: flex; gap: 10px; padding: 14px; }
.ad-sim-actions .btn { flex: 1; }

/* 支付模拟 */
.pay-sim { background: var(--card); border-radius: 18px; width: 100%; max-width: 400px; overflow: hidden; animation: pop .22s ease; }
.pay-sim-head { background: var(--green); color: #fff; font-weight: 600; font-size: 15px; text-align: center; padding: 14px; }
.pay-sim-body { padding: 16px 18px 6px; }
.pay-sim-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; border-bottom: 1px solid #f3efe4; }
.pay-sim-row span { color: var(--muted); }
.pay-amount { font-size: 19px; color: var(--gold); font-weight: 800; }
.pay-sim-note { font-size: 11px; color: var(--warn); background: var(--gold-soft); padding: 9px 14px; margin: 12px 18px 0; border-radius: 8px; }
.pay-sim-actions { display: flex; gap: 10px; padding: 14px 18px 18px; }
.pay-sim-actions .btn { flex: 1; }

/* 分享模拟 */
.share-sim { background: var(--card); border-radius: 18px; width: 100%; max-width: 400px; padding: 18px; animation: pop .22s ease; }
.share-sim-head { font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.share-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.share-cover { height: 130px; background: linear-gradient(160deg, var(--green), #1e3a32); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.9); font-family: var(--serif); font-size: 16px; padding: 0 16px; text-align: center; }
.share-info { padding: 10px 12px; }
.share-title { font-size: 14px; font-weight: 600; }
.share-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.share-sim-note { font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.share-sim-actions { display: flex; gap: 10px; }
.share-sim-actions .btn { flex: 1; }

/* 图片预览 */
.preview-mask { position: absolute; inset: 0; background: rgba(20,20,18,.94); }
/* 灯箱内容需纵向堆叠：.layer 是 flex row（默认），若不覆盖，
   stage / bar / thumbs 会被横向排开，大图被压缩、缩略图条几乎不可见 */
.layer-preview { flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.preview-stage { position: relative; z-index: 1; width: 100%; max-width: 100%; max-height: 56vh; display:flex; align-items:center; justify-content:center; gap:8px; }
.preview-stage img { max-width: calc(100% - 76px); max-height: 56vh; object-fit: contain; border-radius: 8px; }
.preview-bar { position: relative; z-index: 1; color: rgba(255,255,255,.8); font-size: 12px; margin-top: 12px; display:flex; align-items:center; justify-content:center; gap:12px; flex-wrap: wrap; }
.preview-hint { color: rgba(255,255,255,.42); font-size: 11.5px; }

/* 灯箱左右切换按钮 */
.preview-nav {
  position: relative; z-index: 2; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.10); color: rgba(255,255,255,.92);
  font-size: 21px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, border-color .18s, transform .18s;
}
.preview-nav:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.45); }
.preview-nav:active { transform: scale(.94); }

/* 灯箱缩略图条 */
.preview-thumbs {
  position: relative; z-index: 1;
  display: flex; gap: 6px; margin-top: 12px;
  max-width: 100%; overflow-x: auto; padding: 2px 2px 6px;
  justify-content: flex-start;
}
.preview-thumb {
  flex: none; width: 44px; height: 44px; object-fit: cover;
  border-radius: 5px; cursor: pointer; opacity: .45;
  border: 2px solid transparent; transition: opacity .18s, border-color .18s;
}
.preview-thumb:hover { opacity: .8; }
.preview-thumb.on { opacity: 1; border-color: #AE8755; }

/* Toast */
#toast-box { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 200; pointer-events: none; opacity: 0; transition: opacity .25s; }
#toast-box.show { opacity: 1; }
/* 手机框内：Toast 相对机身居中，不溢出机身 */
.phone-shell #toast-box { position: absolute; top: 50%; left: 50%; }
.phone-shell .toast { max-width: 84%; }
.toast { background: rgba(37,38,34,.92); color: #fff; font-size: 14px; padding: 12px 22px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: 82vw; text-align: center; line-height: 1.6; }
.toast.ok { background: rgba(40,74,65,.95); }
.toast.warn { background: rgba(179,69,47,.95); }

/* ============================================================
   管理后台
   ============================================================ */
.admin-shell { display: flex; min-height: 100vh; background: #F3EFE6; }
.admin-side {
  width: 228px; flex: none; background: var(--ink); color: #EDEAE0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-seal { width: 36px; height: 36px; border-radius: 9px; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 18px; }
.admin-brand-name { font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: 2px; }
.admin-brand-sub { font-size: 10px; color: rgba(237,234,224,.6); letter-spacing: 1px; margin-top: 2px; }
.side-menu { flex: 1; padding: 12px 10px; overflow-y: auto; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px; font-size: 14px; color: rgba(237,234,224,.78); cursor: pointer; transition: background .15s, color .15s; margin-bottom: 2px; }
.side-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-item.on { background: var(--gold); color: #fff; font-weight: 600; }
.side-icon { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.side-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 10.5px; border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.side-foot { padding: 14px 18px; font-size: 11px; color: rgba(237,234,224,.45); line-height: 1.6; border-top: 1px solid rgba(255,255,255,.08); }

.admin-main { flex: 1; min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.top-title { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.top-right { display: flex; align-items: center; gap: 12px; }
.demo-chip { font-size: 10.5px; background: var(--gold-soft); color: var(--gold); padding: 4px 10px; border-radius: 999px; font-weight: 700; letter-spacing: 1px; }
.admin-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.avatar-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; overflow: hidden; }
img.avatar-dot { object-fit: cover; width: 28px; height: 28px; }
.admin-content { padding: 24px 26px 40px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat-card-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-card-val { font-size: 26px; font-weight: 800; font-family: var(--serif); }
.stat-card-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel.mt { margin-top: 16px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.panel-title { font-family: var(--serif); font-size: 15.5px; font-weight: 700; }
.panel-sub { font-size: 12px; color: var(--muted); }
.panel-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .panel-grid-2 { grid-template-columns: 1fr; } }

/* 柱状图 */
.chart-bars { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding: 10px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 6px; }
.bar-val { font-size: 11px; color: var(--gold); font-weight: 600; white-space: nowrap; }
.bar-track { width: 100%; max-width: 44px; height: calc(100% - 40px); background: var(--bg-soft); border-radius: 6px 6px 0 0; overflow: hidden; display: flex; align-items: flex-end; }
.bar-fill { width: 100%; background: linear-gradient(180deg, var(--gold), var(--gold) 60%, #96733f); border-radius: 6px 6px 0 0; transition: height .5s ease; }
.bar-label { font-size: 10.5px; color: var(--muted); }

/* 表格 */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid #f3efe4; vertical-align: middle; }
.data-table tr:hover td { background: #FBF8F1; }
.cell-item { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.cell-cover { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; }
.cell-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.status-pill { font-size: 11px; color: #fff; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.cat-dot { width: 28px; height: 28px; border-radius: 8px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* 工具栏/筛选 */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.search-inline { width: 240px; }

/* 审核卡片 */
.audit-card { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; background: #FBF8F1; }
.audit-cover { width: 110px; height: 110px; border-radius: 10px; overflow: hidden; flex: none; }
.audit-cover img { width: 100%; height: 100%; object-fit: cover; }
.audit-main { flex: 1; min-width: 0; }
.audit-title { font-size: 15px; font-weight: 700; }
.audit-meta { font-size: 12px; color: var(--gold); font-weight: 600; margin: 4px 0; }
.audit-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.audit-info { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.audit-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; }

/* 规则行 */
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.rule-label { font-size: 13.5px; }
.rule-control { display: flex; gap: 8px; align-items: center; }
.rule-tip { font-size: 11.5px; color: var(--muted); margin-top: 10px; line-height: 1.7; }

/* 待办 */
.todo-list { display: flex; flex-direction: column; gap: 4px; }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13px; flex-wrap: wrap; }
.todo-row b { color: var(--gold); }
.todo-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.todo-dot.warn { background: var(--warn); }
.todo-dot.gold { background: var(--gold); }
.todo-dot.gray { background: var(--muted); }
.todo-dot.green { background: var(--green); }

.demo-note { font-size: 12px; color: var(--warn); background: var(--gold-soft); padding: 10px 14px; border-radius: 10px; margin-top: 14px; line-height: 1.6; }

/* 响应式 */
@media (max-width: 760px) {
  .admin-side { width: 66px; }
  .admin-side .admin-brand-name, .admin-side .admin-brand-sub, .admin-side .side-item span:not(.side-icon), .admin-side .side-foot, .admin-side .side-badge { display: none; }
  .admin-side .admin-brand { justify-content: center; padding: 16px 8px; }
  .admin-side .side-item { justify-content: center; padding: 12px 0; }
  .side-item { font-size: 16px; }
  .admin-content { padding: 16px; }
  .admin-top { padding: 12px 16px; }
  .panel-grid-2 { grid-template-columns: 1fr; }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d5ccb8; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
