/* ==========================================================================
   城市同行 / China Local Host — design system
   中英文响应式；游客端优先手机，运营后台优先桌面
   ========================================================================== */
:root {
  --ink: #17231f;
  --ink-2: #3b4743;
  --muted: #6d7b76;
  --line: #e5e0d5;
  --line-2: #efeae0;
  --paper: #fbf8f2;
  --card: #ffffff;
  --accent: #b0481f;
  --accent-ink: #7c3012;
  --teal: #0e5f56;
  --teal-soft: #e7f1ee;
  --ok: #1c7a4b;
  --warn: #9a6a10;
  --bad: #a3232c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(23, 35, 31, .05), 0 8px 28px rgba(23, 35, 31, .06);
  --shadow-lg: 0 20px 60px rgba(23, 35, 31, .16);
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", "Noto Serif SC", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.62;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
small { font-size: .82rem; }
:focus-visible { outline: 3px solid #8bbfb6; outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1140px, 100% - 2.4rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2.4rem); margin-inline: auto; }
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: .8rem; }
.muted { color: var(--muted); }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 242, .93);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  min-height: var(--header-h); display: flex; align-items: center; gap: .5rem;
  flex-wrap: wrap; row-gap: .35rem; padding: .45rem 0;
}
@media (min-width: 861px) {
  .site-header .bar { flex-wrap: nowrap; }
  .nav { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: .2rem; }
}
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); font-size: 1.11rem; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--teal); color: #fff; font-size: .95rem; font-family: var(--sans); font-weight: 700;
}
.brand small { display: block; font-family: var(--sans); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: .1rem; margin-left: auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; row-gap: .2rem; }
.nav a {
  color: var(--ink-2); text-decoration: none; padding: .45rem .55rem; border-radius: 8px;
  font-size: .9rem; white-space: nowrap;
}
.nav a.btn-sm { padding: .4rem .75rem; margin-left: .25rem; }
@media (max-width: 1180px) {
  .nav a { padding: .4rem .42rem; font-size: .86rem; }
  .city-picker { max-width: 6.6rem; font-size: .78rem; }
  .lang-switch button { padding: .26rem .5rem; font-size: .78rem; }
}
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a:not(.btn).active { color: var(--teal); background: var(--teal-soft); font-weight: 600; }
.nav-toggle { display: none; }
/* 城市选择与语言切换不允许被压缩；桌面端把「条款与隐私」收到页脚，避免导航拥挤 */
.lang-switch, .city-picker { flex: 0 0 auto; }
.nav-tools { display: inline-flex; align-items: center; gap: .35rem; flex: 0 0 auto; margin-left: .15rem; }
@media (min-width: 861px) {
  .nav a[href="#/legal"] { display: none; }
}
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.city-picker {
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
  font: inherit; font-size: .82rem; padding: .34rem .6rem; min-height: 32px; max-width: 9.5rem;
}
.lang-switch button {
  border: 0; background: transparent; padding: .3rem .68rem; font: inherit; font-size: .82rem;
  cursor: pointer; color: var(--muted);
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }

@media (max-width: 860px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem .8rem 1rem;
    gap: .1rem; display: none; max-height: calc(100vh - var(--header-h)); overflow: auto;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .7rem; font-size: 1rem; }
  .nav-toggle {
    display: inline-grid; place-items: center; margin-left: auto; width: 40px; height: 38px;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 17px; height: 2px; background: var(--ink); position: relative; }
  .nav-toggle span::before, .nav-toggle span::after {
    content: ""; position: absolute; left: 0; width: 17px; height: 2px; background: var(--ink);
  }
  .nav-toggle span::before { top: -5px; }
  .nav-toggle span::after { top: 5px; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(2.4rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.4rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(14, 95, 86, .12), transparent 70%),
    radial-gradient(700px 380px at 8% 8%, rgba(176, 72, 31, .1), transparent 65%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal); background: var(--teal-soft);
  padding: .34rem .8rem; border-radius: 999px; margin-bottom: 1rem; font-weight: 600;
}
.hero h1 { max-width: 18ch; }
.hero .lede { font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--ink-2); max-width: 46ch; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem 1.6rem;
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
}
.hero-facts div strong { display: block; font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; }
.hero-facts div span { font-size: .82rem; color: var(--muted); }

/* ---------- buttons / fields ---------- */
.btn {
  --bg: var(--ink); --fg: #fff; --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  padding: .72rem 1.15rem; border-radius: 999px; font: inherit; font-size: .94rem; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.btn:hover { transform: translateY(-1px); color: var(--fg); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn-accent { --bg: var(--accent); --bd: var(--accent); }
.btn-teal { --bg: var(--teal); --bd: var(--teal); }
.btn-ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line); }
.btn-ghost:hover { --bg: #fff; }
.btn-sm { padding: .42rem .8rem; font-size: .84rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-danger { --bg: #fff; --fg: var(--bad); --bd: #e7c9cb; }

.field { margin-bottom: .95rem; }
.field > label, .label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: .32rem; }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: .28rem; }
.field .err { font-size: .8rem; color: var(--bad); margin-top: .28rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"],
input[type="password"], input[type="search"], select, textarea {
  width: 100%; padding: .66rem .78rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font: inherit; font-size: .95rem; color: var(--ink); min-height: 44px;
}
textarea { min-height: 108px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: 2px solid rgba(14, 95, 86, .16); outline-offset: 0; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; line-height: 1.5; }
.check input { margin-top: .25rem; width: 18px; height: 18px; flex: none; accent-color: var(--teal); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; }
legend { font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 0 .4rem; }
.chipset { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .4rem .8rem;
  font: inherit; font-size: .86rem; cursor: pointer; color: var(--ink-2);
}
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- cards / sections ---------- */
.section { padding: clamp(2.2rem, 5vw, 3.6rem) 0; }
.section-head { max-width: 60ch; margin-bottom: 1.6rem; }
.section-head p { color: var(--ink-2); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
}
.card-tight { padding: .95rem; }
.card h3 { margin-bottom: .35rem; }
.service-card { display: flex; flex-direction: column; gap: .7rem; height: 100%; }
.service-card .svc-top { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.service-card .price { font-family: var(--serif); font-size: 1rem; color: var(--accent); white-space: nowrap; }
.service-card ul { margin: 0; padding-left: 1.1rem; font-size: .88rem; color: var(--ink-2); }
.service-card ul li + li { margin-top: .2rem; }
.boundary {
  border-left: 3px solid var(--accent); background: #fdf4ef; border-radius: 6px;
  padding: .6rem .8rem; font-size: .84rem; color: #6c3a22;
}
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .3rem .8rem; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.badge {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 700;
  padding: .18rem .55rem; border-radius: 999px; letter-spacing: .02em; white-space: nowrap;
  background: var(--line-2); color: var(--ink-2);
}
.badge.ok { background: #e6f4ec; color: var(--ok); }
.badge.warn { background: #fbf0da; color: var(--warn); }
.badge.bad { background: #fbe9ea; color: var(--bad); }
.badge.info { background: var(--teal-soft); color: var(--teal); }
.steps { counter-reset: s; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { position: relative; padding: 1rem 1rem 1rem 3rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: s; content: counter(s); position: absolute; left: .9rem; top: .95rem;
  width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #fff;
  display: grid; place-items: center; font-size: .82rem; font-weight: 700; font-family: var(--sans);
}
.step h4 { margin: 0 0 .2rem; font-size: .98rem; font-family: var(--sans); }
.step p { margin: 0; font-size: .86rem; color: var(--ink-2); }
.timeline { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.timeline li { position: relative; padding: 0 0 .9rem 1.2rem; border-left: 1px solid var(--line); margin-left: .35rem; }
.timeline li::before {
  content: ""; position: absolute; left: -4.5px; top: .45rem; width: 8px; height: 8px;
  border-radius: 50%; background: var(--teal);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline time { display: block; font-size: .76rem; color: var(--muted); }
.notice { border-radius: var(--radius); padding: .85rem 1rem; font-size: .88rem; border: 1px solid; }
.notice.info { background: var(--teal-soft); border-color: #cfe4df; color: #14534c; }
.notice.warn { background: #fdf6e7; border-color: #efdcae; color: #7a5306; }
.notice.bad { background: #fbecec; border-color: #eccfd1; color: #7f1d24; }
.notice.ok { background: #e9f6ef; border-color: #c9e6d5; color: #135c3a; }
.divider { height: 1px; background: var(--line); margin: 1.2rem 0; border: 0; }

/* ---------- forms ---------- */
.form-progress { display: flex; gap: .4rem; margin-bottom: 1.2rem; }
.form-progress span { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.form-progress span.done { background: var(--teal); }
.form-actions { display: flex; gap: .6rem; justify-content: space-between; margin-top: 1.2rem; flex-wrap: wrap; }
.consent-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.consent-box h4 { margin: 0 0 .4rem; font-size: .95rem; font-family: var(--sans); }
.consent-box p { font-size: .84rem; color: var(--ink-2); margin-bottom: .6rem; }

/* ---------- status page ---------- */
.status-hero { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.status-hero .code { font-family: var(--mono); font-size: 1.1rem; letter-spacing: .04em; }
.proposal { border: 1px solid var(--teal); border-radius: var(--radius); background: #f7fbfa; padding: 1.1rem; }
.proposal .price-big { font-family: var(--serif); font-size: 1.8rem; color: var(--teal); }

/* ---------- chat widget ---------- */
.chat-fab {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--teal); color: #fff;
  box-shadow: var(--shadow-lg); cursor: pointer; font-size: 1.4rem; display: grid; place-items: center;
}
.chat-fab:hover { background: #0b4d45; }
.chat-panel {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 61;
  width: min(392px, calc(100vw - 1.6rem)); height: min(578px, calc(100vh - 2.2rem));
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; background: var(--teal); color: #fff; }
.chat-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #7ce0b4; }
.chat-head button { margin-left: auto; background: transparent; border: 0; color: #fff; font-size: 1.2rem; cursor: pointer; padding: .2rem .4rem; }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem; background: var(--paper); display: flex; flex-direction: column; gap: .6rem; }
.msg { max-width: 86%; padding: .6rem .8rem; border-radius: 14px; font-size: .9rem; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.system { align-self: center; background: #fdf3e3; color: #7a5306; font-size: .8rem; text-align: center; }
.msg.ops { align-self: flex-start; background: #eef6f2; border: 1px solid #cfe4d9; border-bottom-left-radius: 4px; }
.chat-foot { border-top: 1px solid var(--line); padding: .7rem; background: #fff; }
.chat-foot form { display: flex; gap: .45rem; }
.chat-foot input { flex: 1; }
.chat-tools { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .55rem; }
.chat-tools button { font-size: .76rem; padding: .3rem .6rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2); }
.chat-tools button:hover { border-color: var(--teal); color: var(--teal); }
.draft-card { border: 1px dashed #b9cfc9; border-radius: 12px; padding: .7rem; background: #f6fbf9; font-size: .84rem; }
.draft-card b { color: var(--teal); }
.draft-card .draft-row { display: flex; justify-content: space-between; gap: .6rem; padding: .12rem 0; }
.draft-card .draft-row span:first-child { color: var(--muted); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { background: #f7f4ee; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); position: sticky; top: 0; z-index: 1; }
tbody tr:hover { background: #fcfaf6; }
tbody tr.selected { background: var(--teal-soft); }
td .code { font-family: var(--mono); font-size: .82rem; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); font-size: .9rem; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; padding: .7rem .9rem; font: inherit; font-size: .9rem;
  cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 2.2rem 0 2.6rem; margin-top: 2rem; font-size: .86rem; color: var(--ink-2); }
.site-footer .cols { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h4 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .5rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; display: block; padding: .12rem 0; }
.site-footer a:hover { color: var(--accent); }
.site-footer .legal { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }

/* ---------- console (admin/host) ---------- */
.console { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: #f6f4ee; }
.side {
  background: #141d1a; color: #cfd8d4; padding: 1rem .7rem; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; display: flex; flex-direction: column; gap: .15rem;
}
.side .brand { color: #fff; padding: .3rem .6rem 1rem; font-size: 1rem; }
.side .brand small { color: #7d8f89; }
.side a, .side button.navitem {
  display: block; width: 100%; text-align: left; color: #b9c6c1; text-decoration: none;
  padding: .55rem .7rem; border-radius: 8px; font-size: .88rem; border: 0; background: transparent;
  font-family: inherit; cursor: pointer;
}
.side a:hover, .side button.navitem:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side a.active, .side button.navitem.active { background: rgba(255, 255, 255, .13); color: #fff; font-weight: 600; }
.side .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: .6rem .3rem; }
.side .who { margin-top: auto; font-size: .78rem; color: #8fa19b; padding: .6rem; }
.main { padding: 1.4rem 1.6rem 3rem; min-width: 0; }
.page-head { display: flex; align-items: baseline; gap: 1rem; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
/* P2-2：筛选框过窄会把占位文案截断成「编号 / 姓名 / 邮箱 / 地…」 */
.toolbar input, .toolbar select { width: auto; min-width: 188px; min-height: 38px; padding: .4rem .6rem; font-size: .86rem; }
.toolbar input[type="search"] { min-width: 240px; }
.toolbar input[type="date"] { min-width: 150px; }
.stat-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); margin-bottom: 1.2rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.stat .n { font-family: var(--serif); font-size: 1.55rem; line-height: 1.2; }
.stat .l { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .sub { font-size: .74rem; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding-top: .5rem; }
.bars div { flex: 1; background: var(--teal); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars div:hover { background: var(--accent); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); background: var(--paper);
  box-shadow: var(--shadow-lg); z-index: 70; overflow-y: auto; padding: 1.2rem 1.4rem 3rem;
}
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 25, 22, .38); z-index: 69; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.drawer h2 { font-size: 1.2rem; margin: 0; }
.sec-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.3rem 0 .5rem; font-weight: 700; }
.pill-list { display: flex; gap: .3rem; flex-wrap: wrap; }
.mini-form { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.mini-form .full { grid-column: 1 / -1; }
code, .mono { font-family: var(--mono); font-size: .84rem; }
.copy-row { display: flex; gap: .4rem; align-items: center; }
.copy-row input { font-family: var(--mono); font-size: .78rem; }

@media (max-width: 900px) {
  .console { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side .brand { padding: .3rem .6rem; }
  .side a, .side button.navitem { width: auto; }
  .side .who { margin: 0; margin-left: auto; }
  .main { padding: 1rem; }
  .drawer { width: 100%; }
}

/* P2-4：移动端首屏数据条改单列、客服气泡不压正文最后一行 */
@media (max-width: 560px) {
  .hero-facts { grid-template-columns: 1fr; gap: .5rem; }
  .hero-facts div { display: flex; align-items: baseline; gap: .5rem; }
  .hero-facts div strong { font-size: 1.05rem; }
  .site-footer, .section, body { padding-bottom: 0; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .chat-fab { bottom: calc(1rem + env(safe-area-inset-bottom)); }
}

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background:
  radial-gradient(800px 400px at 70% 0%, rgba(14, 95, 86, .1), transparent 70%), var(--paper); }
.login-card { width: min(400px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.8rem; box-shadow: var(--shadow); }

/* ---------- toast ---------- */
.toast-host { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1.4rem; z-index: 99; display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.toast {
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 999px; font-size: .86rem;
  box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.skeleton { background: linear-gradient(90deg, #eee9df, #f7f4ee, #eee9df); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 1em; }
@keyframes sk { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
