/* ==========================================================================
   浙江大有 · 农村资源性资产流转交易平台 — H5 原型设计系统
   视觉基准：甲方参考图（以「贝壳二手房」为主，辅以「地合网」「土地详情」）
   —— 中性灰底 + 纯白卡片 + 收敛圆角 + 暖橙强调色
   ========================================================================== */

:root {
  /* ── six tokens — 取参考图的中性灰阶 + 暖橙强调 ──────────────────── */
  --bg:      oklch(96.8% 0 0);          /* 参考图页面底色（≈#f4f4f4） */
  --surface: oklch(100% 0 0);
  --fg:      oklch(21% 0 0);
  --muted:   oklch(50% 0 0);
  --border:  oklch(91% 0 0);
  --accent:  oklch(62% 0.18 45);        /* 暖橙（参考图主色系） */

  /* ── derived — never hardcode another colour ───────────────────── */
  --accent-text: oklch(54% 0.16 45);    /* accent as text, 4.9:1 on --bg   */
  --accent-fill: oklch(56% 0.16 45);    /* filled button, white text 5.0:1 */
  --accent-soft:   color-mix(in oklch, var(--accent) 12%, transparent);
  --accent-soft-2: color-mix(in oklch, var(--accent) 22%, transparent);
  --fg-soft:       color-mix(in oklch, var(--fg) 6%, transparent);
  --muted-2:       color-mix(in oklch, var(--muted) 80%, var(--fg));   /* 小字专用，保证 ≥4.5:1 */
  --warn:      oklch(52% 0.17 27);      /* 与暖橙拉开色相的报错红，5.5:1 */
  --warn-soft: color-mix(in oklch, var(--warn) 12%, transparent);

  --font-display: 'Söhne', 'Avenir Next', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-h1: 21px;  --fs-h2: 17px;  --fs-h3: 15px;
  --fs-body: 15px; --fs-sm: 13px; --fs-xs: 12px; --fs-2xs: 11px;

  --gap-xs: 6px; --gap-sm: 10px; --gap-md: 16px; --gap-lg: 24px; --gap-xl: 32px;
  --radius: 10px; --radius-lg: 12px; --radius-pill: 999px;
  --shadow-card: 0 1px 2px color-mix(in oklch, var(--fg) 5%, transparent);

  --appbar-h: 56px;
  --tabbar-h: 60px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --shadow-pop:  0 14px 34px color-mix(in oklch, var(--fg) 16%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
p { text-wrap: pretty; margin: 0; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1, h2, h3, .h1, .h2 { font-family: var(--font-display); }
ul { margin: 0; padding: 0; list-style: none; }

/* ── screen shell ──────────────────────────────────────────────────── */
.screen {
  max-width: 480px;
  margin-inline: auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}
.view { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px); }
.view--bar { padding-bottom: calc(var(--tabbar-h) + 76px + env(safe-area-inset-bottom, 0px)); }

/* ── layout primitives ─────────────────────────────────────────────── */
.stack { display: flex; flex-direction: column; gap: var(--gap-md); }
.row { display: flex; align-items: center; gap: var(--gap-sm); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-sm); }

.appbar {
  display: flex; align-items: center; gap: var(--gap-sm);
  height: var(--appbar-h);
  padding-inline: var(--gap-md);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.appbar-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.appbar-spacer { flex: 1; }
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-pill);
  color: var(--fg);
  transition: background 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}
.icon-btn:hover { background: var(--fg-soft); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn svg { width: 19px; height: 19px; }

/* ── brand lockup — 浙江 / 大有 same size, differ in colour + weight ── */
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.brand-mark svg { width: 17px; height: 17px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 17px; letter-spacing: -0.01em; }
.brand-name .p1 { font-weight: 500; color: var(--fg); }
.brand-name .p2 { font-weight: 800; color: var(--accent-text); }
.brand-sub { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--muted); letter-spacing: 0.02em; margin-top: 3px; }

/* ── sticky search + filter header ─────────────────────────────────── */
.headblock {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.searchrow { display: flex; align-items: center; gap: var(--gap-sm); padding: var(--gap-sm) var(--gap-md); }
.region-pick {
  display: inline-flex; align-items: center; gap: 4px;
  flex: none;
  height: 44px; padding: 0 10px 0 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: var(--fs-sm); font-weight: 500;
  max-width: 132px;
  transition: border-color 0.15s var(--ease-out);
}
.region-pick:hover { border-color: var(--accent); }
.region-pick svg { width: 13px; height: 13px; flex: none; color: var(--muted); }
.region-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchbox {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: var(--gap-xs);
  height: 44px; padding: 0 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
.searchbox:focus-within { border-color: var(--accent); }
.searchbox svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.searchbox input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: var(--fs-sm); color: var(--fg);
}
.searchbox input::placeholder { color: var(--muted); }
.search-go {
  flex: none; height: 44px; padding: 0 16px;
  background: var(--accent-fill); color: var(--surface);
  border: 1px solid var(--accent-fill); border-radius: var(--radius);
  font-size: var(--fs-sm); font-weight: 600;
  transition: background 0.15s var(--ease-out);
}
.search-go:hover { background: color-mix(in oklch, var(--accent-fill) 86%, black); }

/* ── category menu (2 × 4) ─────────────────────────────────────────── */
/* 分类菜单 —— 参考图用「圆形图标 + 文字」，无边框卡片 */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px var(--gap-xs); padding: var(--gap-xs) var(--gap-md) var(--gap-sm); }
.cat {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 2px 0; background: none; border: 0;
  font-size: var(--fs-xs); font-weight: 500; color: var(--fg);
}
.cat-ico {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent-text);
  transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}
.cat-ico svg { width: 20px; height: 20px; }
.cat:hover .cat-ico { background: var(--accent-soft-2); }
.cat.is-on .cat-ico { background: var(--accent-fill); color: var(--surface); }
.cat.is-on .cat-name { color: var(--accent-text); font-weight: 600; }
.cat:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius); }

/* ── filter bar ────────────────────────────────────────────────────── */
.filterbar { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--border); }
.filter-item {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  height: 46px; background: transparent; border: 0;
  font-size: var(--fs-sm); color: var(--fg);
}
.filter-item svg { width: 11px; height: 11px; color: var(--muted); transition: transform 0.15s var(--ease-out); }
.filter-item.is-on { color: var(--accent-text); font-weight: 600; }
.filter-item.is-on svg { color: var(--accent-text); transform: rotate(180deg); }
.filter-item:hover { background: var(--fg-soft); }
.filter-item .dot {
  position: absolute; top: 8px; right: 12px;
  min-width: 15px; height: 15px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--accent-fill); color: var(--surface);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 9px;
}

/* ── dropdown panel under the bar ──────────────────────────────────── */
.dw {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 50;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-pop);
  max-height: 62vh; overflow-y: auto;
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity 0.14s var(--ease-out), transform 0.14s var(--ease-out);
}
.dw.is-open { opacity: 1; transform: none; pointer-events: auto; transition-duration: 0.2s; }
.dw-body { padding: var(--gap-md); display: flex; flex-direction: column; gap: var(--gap-md); }
.dw-block { display: flex; flex-direction: column; gap: var(--gap-sm); }
.dw-title { font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.dw-title b { color: var(--accent-text); font-weight: 600; }
.dw-chips { display: flex; flex-wrap: wrap; gap: var(--gap-xs); }
.dw-scroll { max-height: 172px; overflow-y: auto; }
.dw-foot {
  position: sticky; bottom: 0;
  display: flex; gap: var(--gap-sm);
  padding: var(--gap-sm) var(--gap-md) var(--gap-md);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.dw-levels { position: sticky; top: 0; z-index: 1; background: var(--surface); display: flex; gap: var(--gap-xs); overflow-x: auto; padding-bottom: 2px; }
.lvl {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius-pill);
  background: var(--bg); border: 1px solid var(--border);
  font-size: var(--fs-xs); color: var(--muted);
}
.lvl.is-on { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.crumb { display: flex; flex-wrap: wrap; gap: 4px; font-size: var(--fs-xs); color: var(--muted); }
.crumb i { font-style: normal; color: var(--border); }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 0 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-pill);
  font-size: var(--fs-xs); color: var(--fg);
  transition: border-color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}
.chip:hover { border-color: var(--accent); }
.chip.is-on { background: var(--accent-soft); border-color: var(--accent-soft-2); color: var(--accent-text); font-weight: 600; }
.chip.is-locked { background: var(--fg); border-color: var(--fg); color: var(--surface); font-weight: 500; }

.seg { display: inline-flex; padding: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.seg button {
  min-height: 42px; padding: 0 14px;
  background: transparent; border: 0; border-radius: 9px;
  font-size: var(--fs-xs); color: var(--muted);
  transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}
.seg button.is-on { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: var(--shadow-card); }
.seg--block { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg--block button { width: 100%; }

.price-custom { display: flex; align-items: center; gap: var(--gap-xs); }
.price-custom input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: var(--fs-xs); outline: none;
}
.price-custom input:focus { border-color: var(--accent); }
.price-custom span { color: var(--muted); font-size: var(--fs-xs); flex: none; }

.sortlist { display: flex; flex-direction: column; }
.sortrow {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap-md);
  padding: 13px 0; border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm); text-align: left;
  background: transparent; border-inline: 0; border-top: 0;
}
.sortrow:last-child { border-bottom: 0; }
.sortrow svg { width: 16px; height: 16px; color: var(--accent-text); opacity: 0; flex: none; }
.sortrow.is-on { color: var(--accent-text); font-weight: 600; }
.sortrow.is-on svg { opacity: 1; }

/* ── toolbar over list ─────────────────────────────────────────────── */
.listhead {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap-sm);
  padding: var(--gap-md) var(--gap-md) var(--gap-sm);
}
.listhead .n { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.listhead .n b { color: var(--fg); font-weight: 600; }
.tagbar { display: flex; gap: var(--gap-xs); overflow-x: auto; padding: 0 var(--gap-md) var(--gap-sm); }
.tagbar .chip { flex: none; }

/* ── listing card — 图左文右（横排） ───────────────────────────────── */
.list { display: flex; flex-direction: column; gap: var(--gap-sm); padding: 0 var(--gap-md) var(--gap-md); }
.lc {
  display: grid; grid-template-columns: 124px 1fr; gap: var(--gap-sm);
  padding: var(--gap-sm);
  background: var(--surface);
  border: 1px solid transparent;   /* 参考图：灰底上的白卡，不用描边 */
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out), transform 0.15s var(--ease-out);
}
.lc:hover { border-color: var(--accent-soft-2); box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.lc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lc-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.lc .ph { aspect-ratio: auto; height: 100%; min-height: 98px; }   /* 列表缩略图：跟随卡片高度，后续换真图用 object-fit: cover */
.lc-title { font-size: var(--fs-h3); font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }
.lc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.lc-loc { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--muted); }
.lc-loc svg { width: 12px; height: 12px; flex: none; }
.lc-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--gap-sm); margin-top: auto; padding-top: 4px; }
.price { display: flex; align-items: baseline; gap: 2px; color: var(--accent-text); }
.price .v { font-family: var(--font-display); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.025em; }
.price .u { font-size: var(--fs-2xs); }
.lc-extra { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--muted); text-align: right; }

/* ── placeholder block（占位色块，待替换真实素材） ─────────────────── */
.ph {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--fg-soft), transparent 70%), var(--surface);
  color: var(--muted);
  font-family: var(--font-mono); font-size: 10px; line-height: 1.35;
  letter-spacing: 0.02em; text-align: center; padding: 6px;
  overflow: hidden;
}
.ph span { max-width: 100%; }
.ph--wide { aspect-ratio: 16 / 9; border-radius: 0; border: 0; border-bottom: 1px solid var(--border); }
.ph--tall { aspect-ratio: 3 / 4; }

/* ── section ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid transparent;   /* 参考图：灰底上的白卡，不用描边 */
  border-radius: var(--radius-lg);
  padding: var(--gap-md);
  box-shadow: var(--shadow-card);
}
.sec { padding: 0 var(--gap-md) var(--gap-md); }
.sec + .sec { padding-top: var(--gap-lg); }
.sec-title { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.015em; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--gap-sm); margin-bottom: var(--gap-sm); }
.sec-head .more { font-size: var(--fs-xs); color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.sec-head .more:hover { color: var(--accent-text); }
.rule { border: 0; border-top: 1px solid var(--border); margin: 0; }

.eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.meta { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* 概况字段 —— 参考图把数值放在上、字段名在下 */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-md); }
.fact { display: flex; flex-direction: column-reverse; gap: 3px; min-width: 0; }
.fact dt { font-size: var(--fs-2xs); color: var(--muted); letter-spacing: 0.02em; }
.fact dd { margin: 0; font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; }

/* ── tags / pills ──────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--radius-pill);
  background: var(--fg-soft); color: var(--fg);
  font-size: var(--fs-2xs); white-space: nowrap;
}
.pill {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent-text);
  font-size: var(--fs-2xs); font-weight: 600;
}
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--off  { background: var(--fg-soft); color: var(--muted); }

/* ── buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: var(--fs-body); font-weight: 600;
  transition: background 0.15s var(--ease-out), border-color 0.15s var(--ease-out), transform 0.06s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--surface); }
.btn-primary:hover { background: color-mix(in oklch, var(--accent-fill) 88%, black); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--fg); }
.btn-secondary:hover { border-color: var(--fg); background: var(--surface); }
.btn-dark { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.btn-dark:hover { background: color-mix(in oklch, var(--fg) 84%, black); }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: var(--fs-sm); border-radius: 10px; }
.btn-block { width: 100%; }

/* ── empty state ───────────────────────────────────────────────────── */
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--gap-sm); padding: 56px var(--gap-lg); text-align: center; }
.empty-mark {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--muted);
}
.empty-mark svg { width: 20px; height: 20px; }
.empty h3 { font-size: var(--fs-h3); font-weight: 600; }
.empty p { font-size: var(--fs-sm); color: var(--muted); max-width: 30ch; }

/* ── form ──────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: var(--gap-md); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: var(--fs-sm); font-weight: 500; }
.field .hint { font-size: var(--fs-2xs); color: var(--muted); }
.field .req { color: var(--accent-text); }
.input, .textarea {
  width: 100%; min-height: 44px; padding: 11px 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: var(--fs-body); color: var(--fg); outline: none;
  transition: border-color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .textarea:focus { border-color: var(--accent); background: var(--surface); }
.textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
.field.has-error .input, .field.has-error .textarea { border-color: var(--warn); background: var(--warn-soft); }
.err { display: none; font-size: var(--fs-2xs); color: var(--warn); font-weight: 500; }
.field.has-error .err { display: block; }

.picker {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap-sm);
  min-height: 44px; width: 100%; padding: 0 13px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: var(--fs-sm);
  transition: border-color 0.15s var(--ease-out);
}
.picker:hover { border-color: var(--accent); }
.picker .val { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .val.is-set { color: var(--fg); font-weight: 500; }
.picker .val.is-set::after { content: ''; }
.picker svg { width: 15px; height: 15px; color: var(--muted); flex: none; }

.uploader { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-sm); }
.slot {
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius);
  color: var(--muted); font-size: var(--fs-2xs);
  transition: border-color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}
.slot:hover { border-color: var(--accent); }
.slot svg { width: 18px; height: 18px; }
.slot.is-filled {
  border-style: solid; border-color: var(--border);
  background: linear-gradient(135deg, var(--accent-soft), var(--fg-soft)), var(--surface);
  color: var(--muted);
}
.slot .cover { font-family: var(--font-mono); font-size: 9px; color: var(--accent-text); }

.typecards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-sm); }
.typecard {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 13px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}
.typecard:hover { border-color: var(--accent); }
.typecard.is-on { background: var(--accent-soft); border-color: var(--accent-soft-2); }
.typecard b { font-size: var(--fs-sm); font-weight: 600; }
.typecard span { font-size: var(--fs-2xs); color: var(--muted); }
.typecard.is-on b { color: var(--accent-text); }

/* ── bottom sheet ──────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: color-mix(in oklch, var(--fg) 34%, transparent);
  opacity: 0; pointer-events: none;
  transition: opacity 0.14s var(--ease-out);
}
.overlay.is-open { opacity: 1; pointer-events: auto; transition-duration: 0.2s; }
.overlay--under { z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-width: 480px; margin-inline: auto;
  max-height: 76vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-pop);
  transform: translateY(102%); opacity: 0.4;
  transition: transform 0.14s var(--ease-out), opacity 0.14s var(--ease-out);
}
.sheet.is-open { transform: none; opacity: 1; transition-duration: 0.2s; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap-sm);
  padding: var(--gap-md); border-bottom: 1px solid var(--border);
}
.sheet-head h3 { font-size: var(--fs-h2); font-weight: 700; }
.sheet-body { overflow-y: auto; padding: var(--gap-md); display: flex; flex-direction: column; gap: var(--gap-md); }
.sheet-foot { padding: var(--gap-sm) var(--gap-md) calc(var(--gap-md) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); }

/* ── bottom tab bar ────────────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  max-width: 480px; margin-inline: auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in oklch, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: var(--fs-2xs);
  transition: color 0.15s var(--ease-out);
}
.tab:hover { color: var(--fg); }
.tab svg { width: 21px; height: 21px; }
.tab.is-active { color: var(--fg); font-weight: 600; }
.tab-dot {
  width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--fg); color: var(--surface); border-radius: var(--radius-pill);
}
.tab-dot svg { width: 15px; height: 15px; }

/* ── fixed action bar (detail / form) ──────────────────────────────── */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 46;
  max-width: 480px; margin-inline: auto;
  display: flex; align-items: center; gap: var(--gap-sm);
  padding: var(--gap-sm) var(--gap-md) calc(var(--gap-sm) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in oklch, var(--surface) 96%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.actionbar .btn { flex: 1; }
.actionbar .btn-iconish { flex: none; width: 62px; padding: 0; flex-direction: column; gap: 2px; font-size: 10px; white-space: nowrap; min-height: 44px; }
.actionbar .btn-iconish svg { width: 16px; height: 16px; }

/* ── toolbar tabs (profile) ────────────────────────────────────────── */
.tabs { display: flex; gap: var(--gap-lg); padding: 0 var(--gap-md); border-bottom: 1px solid var(--border); }
.tabs button {
  position: relative; padding: 12px 0; background: transparent; border: 0;
  font-size: var(--fs-sm); color: var(--muted);
}
.tabs button.is-on { color: var(--fg); font-weight: 600; }
.tabs button.is-on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.tabs button:hover { color: var(--fg); }

/* ── timeline / flow ───────────────────────────────────────────────── */
.flow { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 26px 1fr; gap: var(--gap-sm); padding-bottom: var(--gap-md); position: relative; }
.step:last-child { padding-bottom: 0; }
.step-n {
  width: 24px; height: 24px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--accent-soft-2); border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--accent-text);
}
.step:not(:last-child) .step-n::after {
  content: ''; position: absolute; left: 11px; top: 26px; bottom: 0;
  border-left: 1px dashed var(--border);
}
.step-b { display: flex; flex-direction: column; gap: 2px; }
.step-b b { font-size: var(--fs-sm); font-weight: 600; }
.step-b span { font-size: var(--fs-xs); color: var(--muted); }
.step.is-done .step-n { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--surface); }

/* ── notice list（无左侧色条 —— 用分隔线与 mono 标签） ─────────────── */
.notes { display: flex; flex-direction: column; }
.note { display: flex; flex-direction: column; gap: 3px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.note:last-child { border-bottom: 0; padding-bottom: 0; }
.note:first-child { padding-top: 0; }
.note b { font-size: var(--fs-sm); font-weight: 600; }
.note span { font-size: var(--fs-xs); color: var(--muted); }

/* ── certificate (locked / unlocked) ───────────────────────────────── */
.cert-lock {
  display: flex; flex-direction: column; align-items: center; gap: var(--gap-sm);
  padding: var(--gap-lg) var(--gap-md); text-align: center;
}
.cert-lock .empty-mark { border-style: dashed; }
.cert-lock p { font-size: var(--fs-xs); color: var(--muted); max-width: 32ch; }
.cert-item { display: flex; align-items: center; gap: var(--gap-sm); padding: 12px 0; border-bottom: 1px solid var(--border); }
.cert-item:last-child { border-bottom: 0; }
.cert-item .cert-ico {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); border-radius: 10px;
}
.cert-item .cert-ico svg { width: 17px; height: 17px; }
.cert-item .cert-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cert-item b { font-size: var(--fs-sm); font-weight: 600; }
.cert-item span { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--muted); }

/* ── poi list (周边) ───────────────────────────────────────────────── */
.poi { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-sm); padding: 11px 0; border-bottom: 1px solid var(--border); }
.poi:last-child { border-bottom: 0; padding-bottom: 0; }
.poi-l { display: flex; align-items: center; gap: var(--gap-sm); min-width: 0; }
.poi-l .tag { flex: none; }
.poi-l b { font-size: var(--fs-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poi .d { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--muted); flex: none; }

/* ── gallery ───────────────────────────────────────────────────────── */
.gallery { position: relative; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track > * { flex: 0 0 100%; scroll-snap-align: center; }
.gallery-count {
  position: absolute; right: var(--gap-sm); bottom: var(--gap-sm);
  padding: 3px 9px; border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--fg) 62%, transparent);
  color: var(--surface); font-family: var(--font-mono); font-size: var(--fs-2xs);
}
.gallery-note {
  position: absolute; left: var(--gap-sm); bottom: var(--gap-sm);
  padding: 3px 9px; border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--surface) 88%, transparent);
  color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-2xs);
}

/* ── profile header ────────────────────────────────────────────────── */
.me { display: flex; align-items: center; gap: var(--gap-md); padding: var(--gap-md); background: var(--surface); border-bottom: 1px solid var(--border); }
.avatar {
  width: 54px; height: 54px; flex: none; display: grid; place-items: center;
  background: var(--fg-soft); border-radius: var(--radius-pill);
  font-family: var(--font-display); font-size: 19px; font-weight: 700;
}
.me-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.me-name { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.01em; }
.me-row { display: flex; flex-wrap: wrap; gap: 5px; }
.counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); background: var(--surface); border-bottom: 1px solid var(--border); }
.count { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 13px 0; }
.count b { font-family: var(--font-mono); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.count span { font-size: var(--fs-2xs); color: var(--muted); }

.menu { display: flex; flex-direction: column; }
.menu-item {
  display: flex; align-items: center; gap: var(--gap-sm);
  min-height: 48px; padding: 0 var(--gap-md);
  background: var(--surface); border: 0; border-bottom: 1px solid var(--border);
  text-align: left; font-size: var(--fs-body);
  transition: background 0.15s var(--ease-out);
}
.menu-item:hover { background: var(--fg-soft); }
.menu-item svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.menu-item .chev { margin-left: auto; }
.menu-item .val { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); }

/* ── manage row (我的发布) ────────────────────────────────────────── */
.mrow { display: flex; gap: var(--gap-sm); padding: var(--gap-md); background: var(--surface); border-bottom: 1px solid var(--border); }
.mrow .ph { aspect-ratio: 1 / 1; align-self: flex-start; }
.mrow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mrow-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--gap-sm); }
.mrow-acts { display: flex; gap: var(--gap-sm); margin-top: 4px; }

/* ── toast ─────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px);
  z-index: 90;
  transform: translate(-50%, 12px);
  max-width: 88vw;
  padding: 10px 16px;
  background: var(--fg); color: var(--surface);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  opacity: 0; pointer-events: none;
  transition: opacity 0.14s var(--ease-out), transform 0.14s var(--ease-out);
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); transition-duration: 0.2s; }

/* ── success state ─────────────────────────────────────────────────── */
.done { display: flex; flex-direction: column; align-items: center; gap: var(--gap-md); padding: 72px var(--gap-lg); text-align: center; }
.done-mark {
  width: 62px; height: 62px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); border-radius: var(--radius-pill);
}
.done-mark svg { width: 28px; height: 28px; }
.done h2 { font-size: var(--fs-h1); font-weight: 700; }
.done p { font-size: var(--fs-sm); color: var(--muted); max-width: 30ch; }

/* ── 11px 及以下的等宽小字加深一档，保证对比度 ≥4.5:1 ───────────────── */
.fact dt, .lc-extra, .note span, .poi .d, .cert-item span,
.gallery-note, .dw-title, .brand-sub, .count span, .tab, .ph { color: var(--muted-2); }

/* ── overview page (index.html) ────────────────────────────────────── */
.ov-wrap { max-width: 1180px; margin-inline: auto; padding: 40px 24px 64px; }
.ov-head { max-width: 62ch; margin-bottom: 36px; }
.ov-head .eyebrow { color: var(--accent-text); }
.ov-head h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin: 10px 0 12px; }
.ov-head p { color: var(--muted); font-size: 16px; }
.ov-frames { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; }
.frame { width: 390px; flex: none; }
.frame-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.frame-cap b { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.frame-cap span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.frame-cap a { font-size: 12px; color: var(--accent-text); font-weight: 600; }
.device {
  width: 390px; height: 844px;
  border: 1px solid var(--border); border-radius: 22px;
  overflow: hidden; background: var(--surface);
  box-shadow: 0 18px 44px color-mix(in oklch, var(--fg) 13%, transparent);
}
.device iframe { width: 390px; height: 844px; border: 0; display: block; }
.ov-note {
  margin-top: 44px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  max-width: 78ch;
}
.ov-note h2 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.ov-note ul { display: flex; flex-direction: column; gap: 7px; }
.ov-note li { font-size: 14px; color: var(--muted); padding-left: 16px; position: relative; }
.ov-note li::before { content: '·'; position: absolute; left: 4px; color: var(--accent-text); font-weight: 700; }
.ov-note li b { color: var(--fg); font-weight: 600; }

@media (max-width: 860px) {
  .frame, .device, .device iframe { width: 100%; max-width: 390px; }
  .device { height: 720px; }
  .device iframe { height: 720px; }
}
