/* ============ 居民端 H5 ============ */
:root {
  --brand: #1f5bd8;
  --brand-600: #1849b3;
  --brand-50: #eef3fe;
  --brand-100: #dce6fd;
  --red: #d93a2f;
  --red-50: #fdeeec;
  --orange: #e8710a;
  --orange-50: #fef3e6;
  --green: #14915a;
  --green-50: #e7f6ee;
  --purple: #7048c8;
  --purple-50: #f2edfb;
  --teal: #0e8a8a;
  --teal-50: #e4f5f5;
  --amber: #b7791f;
  --amber-50: #fcf5e6;

  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #1c2433;
  --text-2: #5b6576;
  --text-3: #8d96a5;
  --line: #e7eaf0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 32, 60, .04), 0 4px 16px rgba(20, 32, 60, .05);
  --nav-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-size: 15px;
}
html.elder { font-size: 18.5px; }
html.elder .grid-8 { grid-template-columns: repeat(3, 1fr); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: #e6e9ef;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.ico { flex-shrink: 0; display: block; }

#app {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(20, 32, 60, .08);
}
.page { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); min-height: 100vh; }
.page.no-nav { padding-bottom: calc(var(--safe-b) + 24px); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 8px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { flex: 1; margin: 0; font-size: 1.07rem; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .icon-btn { width: 40px; height: 40px; }
.topbar .spacer { width: 40px; }
.icon-btn {
  display: inline-grid; place-items: center;
  border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--text);
}
.icon-btn:active { background: rgba(0, 0, 0, .05); }

/* ---------- 首页头部 ---------- */
.hero {
  position: relative;
  padding: 18px 16px 64px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .16) 0, transparent 55%),
    linear-gradient(155deg, #1a4fc4 0%, #2463e0 55%, #3a7bf0 100%);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -10px; bottom: 10px; width: 220px; height: 90px; opacity: .13;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 90' fill='%23fff'%3E%3Crect x='0' y='40' width='22' height='50'/%3E%3Crect x='26' y='20' width='28' height='70'/%3E%3Crect x='58' y='50' width='18' height='40'/%3E%3Crect x='80' y='8' width='30' height='82'/%3E%3Crect x='114' y='34' width='24' height='56'/%3E%3Crect x='142' y='24' width='20' height='66'/%3E%3Crect x='166' y='46' width='26' height='44'/%3E%3Crect x='196' y='30' width='24' height='60'/%3E%3C/svg%3E") no-repeat right bottom / contain;
}
.hero-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.hero-logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
}
.hero-title { flex: 1; min-width: 0; }
.hero-title b { display: block; font-size: 1.2rem; letter-spacing: .5px; }
.hero-title span { font-size: .8rem; opacity: .85; }
.elder-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px; font-size: .8rem; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .3);
}
.elder-btn.on { background: #fff; color: var(--brand); }
.hero-greet { position: relative; z-index: 1; margin: 16px 0 0; font-size: .92rem; opacity: .95; }

.ask-card {
  position: relative; z-index: 2;
  margin: -48px 12px 0; padding: 14px;
  background: var(--card); border-radius: 18px; box-shadow: 0 8px 28px rgba(24, 60, 150, .14);
}
.ask-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bot-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #3a7bf0, #1a4fc4);
  box-shadow: 0 2px 8px rgba(31, 91, 216, .3);
}
.bot-avatar.sm { width: 30px; height: 30px; }
.ask-head b { font-size: 1rem; }
.ask-head p { margin: 0; font-size: .8rem; color: var(--text-2); }
.ask-input {
  display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 6px 0 14px; border-radius: 12px;
  background: var(--brand-50); border: 1px solid var(--brand-100); cursor: text; color: var(--text-3);
}
.ask-input span { flex: 1; font-size: .92rem; }
.ask-input .go { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  padding: 5px 11px; border-radius: 999px; font-size: .8rem; cursor: pointer; white-space: nowrap;
  background: #f4f6fa; color: var(--text-2); border: 1px solid var(--line);
}
.chip:active { background: var(--brand-50); color: var(--brand); }

/* ---------- 通用区块 ---------- */
.section { margin: 12px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 14px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px; }
.sec-head h2 { margin: 0; font-size: 1.02rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sec-head h2::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--brand); }
.sec-head a, .more { font-size: .8rem; color: var(--text-3); display: inline-flex; align-items: center; }

.ticker {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin: 12px; cursor: pointer;
}
.ticker .tag { flex-shrink: 0; }
.ticker .txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }

.grid-8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 12px 6px 8px; }
.grid-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px; border-radius: 12px; cursor: pointer; }
.grid-item:active { background: #f4f6fa; }
.grid-item .gi {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
}
.grid-item span { font-size: .8rem; color: var(--text); text-align: center; line-height: 1.3; }

.c-blue { background: var(--brand-50); color: var(--brand); }
.c-red { background: var(--red-50); color: var(--red); }
.c-orange { background: var(--orange-50); color: var(--orange); }
.c-green { background: var(--green-50); color: var(--green); }
.c-purple { background: var(--purple-50); color: var(--purple); }
.c-teal { background: var(--teal-50); color: var(--teal); }
.c-amber { background: var(--amber-50); color: var(--amber); }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px; }
.duo-item { padding: 14px; border-radius: var(--radius); cursor: pointer; position: relative; overflow: hidden; min-height: 86px; }
.duo-item b { display: block; font-size: .98rem; }
.duo-item p { margin: 2px 0 0; font-size: .78rem; opacity: .85; }
.duo-item .ico { position: absolute; right: 10px; bottom: 10px; opacity: .35; }
.duo-item.vote { background: linear-gradient(140deg, #fff1ec, #ffe3d8); color: #b43d1b; }
.duo-item.act { background: linear-gradient(140deg, #e9f7ef, #d5f0e1); color: #11704a; }

/* 列表 */
.list { list-style: none; margin: 0; padding: 0; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; cursor: pointer; position: relative;
}
.list-item + .list-item::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; background: var(--line); }
.list-item:active { background: #f7f8fb; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-size: .95rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-item .li-sub { font-size: .78rem; color: var(--text-3); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.list-item .li-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.list-item .chev { color: #c3c9d3; }

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px;
  font-size: .72rem; font-weight: 500; white-space: nowrap;
}
.tag.blue { background: var(--brand-50); color: var(--brand); }
.tag.red { background: var(--red-50); color: var(--red); }
.tag.orange { background: var(--orange-50); color: var(--orange); }
.tag.green { background: var(--green-50); color: var(--green); }
.tag.purple { background: var(--purple-50); color: var(--purple); }
.tag.gray { background: #f0f2f5; color: var(--text-2); }
.tag.teal { background: var(--teal-50); color: var(--teal); }

.hot-q { display: flex; align-items: center; gap: 10px; }
.hot-q .rank { width: 20px; height: 20px; border-radius: 6px; font-size: .75rem; font-weight: 700; display: grid; place-items: center; background: #f0f2f5; color: var(--text-3); flex-shrink: 0; }
.hot-q .rank.top { background: var(--orange-50); color: var(--orange); }

.contact-card { display: flex; gap: 10px; margin: 12px; }
.contact-card a { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px; }
.contact-card b { display: block; font-size: .88rem; }
.contact-card span { font-size: .75rem; color: var(--text-3); }

.foot-note { text-align: center; font-size: .72rem; color: var(--text-3); padding: 8px 16px 4px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 30;
  width: 100%; max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .7rem; color: var(--text-3); }
.tabbar a.on { color: var(--brand); }
.tabbar a.ai .ai-dot {
  width: 44px; height: 44px; margin-top: -18px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #3a7bf0, #1a4fc4); box-shadow: 0 4px 14px rgba(31, 91, 216, .4); border: 3px solid #fff;
}

/* ---------- 分类 Tab ---------- */
.tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; scrollbar-width: none;
  position: sticky; top: 52px; z-index: 10; background: var(--bg);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex-shrink: 0; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: .85rem; color: var(--text-2); cursor: pointer;
}
.tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.search-bar {
  display: flex; align-items: center; gap: 8px; margin: 12px; height: 42px; padding: 0 12px;
  background: #fff; border-radius: 12px; border: 1px solid var(--line); color: var(--text-3);
}
.search-bar input { flex: 1; border: 0; outline: 0; background: transparent; font-size: .92rem; color: var(--text); min-width: 0; }

/* ---------- 文章详情 ---------- */
.article { padding: 18px 16px; }
.article h2 { font-size: 1.22rem; line-height: 1.45; margin: 0 0 10px; }
.article .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: .78rem; color: var(--text-3); padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.article p { margin: 0 0 12px; font-size: .97rem; line-height: 1.85; text-align: justify; }
.article h3 { font-size: 1rem; margin: 18px 0 8px; color: var(--brand-600); }
.article ul { padding-left: 1.2em; margin: 0 0 12px; }
.article li { margin-bottom: 6px; line-height: 1.75; }
.summary-box { padding: 12px 14px; border-radius: 10px; background: var(--brand-50); color: var(--brand-600); font-size: .9rem; margin-bottom: 16px; line-height: 1.7; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

/* ---------- FAQ ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px; }
html.elder .cat-grid { grid-template-columns: repeat(2, 1fr); }
.cat-item { padding: 14px 10px; text-align: center; cursor: pointer; }
.cat-item .gi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin: 0 auto 6px; }
.cat-item b { display: block; font-size: .9rem; }
.cat-item span { font-size: .72rem; color: var(--text-3); }

.qa-answer { white-space: pre-line; font-size: .97rem; line-height: 1.85; }
.source { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .8rem; color: var(--text-3); display: flex; gap: 6px; }
.helpful { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; font-size: .85rem; color: var(--text-2); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font-size: .95rem; font-weight: 500; background: var(--brand); color: #fff; white-space: nowrap;
}
.btn:active { filter: brightness(.94); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: #fff; color: var(--brand); border-color: var(--brand-100); }
.btn.light { background: var(--brand-50); color: var(--brand); }
.btn.danger { background: var(--red); }
.btn.sm { height: 32px; padding: 0 12px; font-size: .82rem; border-radius: 9px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ---------- 聊天 ---------- */
.chat-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding-bottom: 0; }
.chat-page .topbar h1 small { display: block; font-size: .68rem; font-weight: 400; color: var(--text-3); line-height: 1; margin-top: 2px; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px 12px 8px; position: relative; }
.chat-disclaimer { text-align: center; font-size: .72rem; color: var(--text-3); margin: 0 12px 12px; }
.msg { display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start; }
.msg.me { flex-direction: row-reverse; }
.bubble { max-width: 82%; padding: 10px 13px; border-radius: 16px; font-size: .95rem; line-height: 1.7; word-break: break-word; }
.msg.me .bubble { background: var(--brand); color: #fff; border-top-right-radius: 5px; white-space: pre-wrap; }
.msg.bot .bubble { background: #fff; border-top-left-radius: 5px; box-shadow: var(--shadow); }
.msg.bot .bubble.emergency { background: #fff5f4; border: 1px solid #f6c7c2; }
.bubble .txt { white-space: pre-line; }
.bubble .src { margin-top: 8px; font-size: .75rem; color: var(--text-3); display: flex; gap: 4px; align-items: flex-start; }
.bubble .blk { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.bubble .blk-t { font-size: .75rem; color: var(--text-3); margin-bottom: 6px; }
.bubble .q-link { display: flex; align-items: center; gap: 4px; padding: 5px 0; color: var(--brand); font-size: .88rem; cursor: pointer; }
.bubble .ref-link { display: flex; align-items: center; gap: 6px; padding: 7px 10px; margin-top: 6px; border-radius: 9px; background: #f5f7fb; font-size: .82rem; cursor: pointer; }
.bubble .ref-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bubble .fb { display: flex; justify-content: flex-end; gap: 4px; margin-top: 6px; }
.bubble .fb button { border: 0; background: transparent; color: #b4bac5; padding: 4px; cursor: pointer; border-radius: 6px; }
.bubble .fb button.on { color: var(--brand); }
.bubble .mode { font-size: .68rem; color: var(--text-3); display: inline-flex; align-items: center; gap: 3px; }
.typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: #b4bac5; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.chat-foot { background: #fff; border-top: 1px solid var(--line); padding: 8px 10px calc(8px + var(--safe-b)); }
.chat-foot .chips { margin: 0 0 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chat-foot .chips::-webkit-scrollbar { display: none; }
.chat-input { display: flex; align-items: flex-end; gap: 8px; }
.chat-input textarea {
  flex: 1; resize: none; max-height: 110px; min-height: 42px; padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: #f6f7fa; outline: 0; font-size: .95rem; line-height: 1.5;
}
.chat-input textarea:focus { border-color: var(--brand); background: #fff; }
.chat-input .icon-btn { width: 42px; height: 42px; background: #f2f4f8; }
.chat-input .send { background: var(--brand); color: #fff; }
.chat-input .send:disabled { opacity: .45; }
.chat-input .icon-btn.rec { background: var(--red); color: #fff; }

/* ---------- 表单 ---------- */
.form-intro { display: flex; gap: 12px; align-items: flex-start; padding: 14px; margin: 12px; }
.form-intro .gi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.form-intro b { font-size: 1rem; }
.form-intro p { margin: 2px 0 0; font-size: .8rem; color: var(--text-2); line-height: 1.6; }
.field { padding: 12px 14px; }
.field + .field { border-top: 1px solid var(--line); }
.field > label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 8px; }
.field > label .req { color: var(--red); margin-left: 2px; }
.field > label .hint { font-weight: 400; color: var(--text-3); font-size: .75rem; margin-left: 6px; }
.field input[type=text], .field input[type=tel], .field input[type=date], .field input[type=datetime-local], .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfc; outline: 0; font-size: .93rem;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); background: #fff; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.opt-group { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: .85rem; cursor: pointer; color: var(--text-2);
}
.opt.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand); font-weight: 500; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photo, .photo-add {
  width: 76px; height: 76px; border-radius: 10px; position: relative; overflow: hidden; flex-shrink: 0;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.photo-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1.5px dashed #cdd3dd; color: var(--text-3); font-size: .72rem; cursor: pointer; background: #fafbfc; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; color: var(--text-2); cursor: pointer; line-height: 1.6; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex-shrink: 0; }
.privacy { font-size: .75rem; color: var(--text-3); padding: 0 16px; line-height: 1.7; }
.form-actions { padding: 16px 12px; }

/* ---------- 工单 ---------- */
.status { font-size: .75rem; font-weight: 500; }
.st-pending { color: var(--orange); }
.st-processing { color: var(--brand); }
.st-done { color: var(--green); }
.st-closed { color: var(--text-3); }
.timeline { list-style: none; margin: 0; padding: 4px 0 0 4px; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: #cdd3dd; }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li:first-child::before { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.timeline b { font-size: .9rem; }
.timeline p { margin: 2px 0 0; font-size: .82rem; color: var(--text-2); }
.timeline time { font-size: .72rem; color: var(--text-3); }
.kv { display: grid; grid-template-columns: 5.5em 1fr; gap: 8px 12px; font-size: .88rem; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; word-break: break-all; }
.stars { display: flex; gap: 6px; }
.stars button { border: 0; background: none; padding: 2px; cursor: pointer; color: #d5dae2; }
.stars button.on { color: #f5a524; }
.stars button.on svg { fill: #f5a524; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 4px; }
.stat-row a { text-align: center; }
.stat-row b { display: block; font-size: 1.2rem; }
.stat-row span { font-size: .75rem; color: var(--text-3); }

/* ---------- 物业费 ---------- */
.bill-head { padding: 18px 16px; color: #fff; border-radius: var(--radius); background: linear-gradient(145deg, #1a4fc4, #3a7bf0); }
.bill-head p { margin: 0; font-size: .8rem; opacity: .85; }
.bill-head b { font-size: 1.8rem; display: block; margin: 4px 0; letter-spacing: .5px; }

/* ---------- 投票 / 活动 ---------- */
.poll-opt { position: relative; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; overflow: hidden; }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: var(--brand-50); z-index: 0; transition: width .5s; }
.poll-opt .row { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.poll-opt.mine { border-color: var(--brand); }
.poll-opt.sel { border-color: var(--brand); background: var(--brand-50); }
.progress { height: 6px; border-radius: 3px; background: #edf0f4; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 3px; }

/* ---------- 我的 ---------- */
.me-head { padding: 22px 16px 54px; color: #fff; background: linear-gradient(155deg, #1a4fc4 0%, #3a7bf0 100%); display: flex; align-items: center; gap: 12px; }
.me-head .avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, .4); }
.me-head b { font-size: 1.1rem; }
.me-head p { margin: 2px 0 0; font-size: .8rem; opacity: .85; }
.overlap { margin-top: -40px; position: relative; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 13px; background: #d5dae2; border: 0; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch.on { background: var(--brand); }
.switch.on::after { left: 21px; }

/* ---------- 服务总览 ---------- */
.svc-group { margin: 12px; }
.svc-group h3 { margin: 0; padding: 14px 14px 4px; font-size: .95rem; }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 6px 6px 10px; }
html.elder .svc-grid { grid-template-columns: repeat(3, 1fr); }

/* ---------- 空状态 / Toast / 弹层 ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); font-size: .88rem; }
.empty .ico { margin: 0 auto 10px; opacity: .5; }
.toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 100;
  max-width: 78%; padding: 11px 18px; border-radius: 12px; background: rgba(28, 36, 51, .92); color: #fff;
  font-size: .9rem; text-align: center; animation: fadein .2s;
}
@keyframes fadein { from { opacity: 0; transform: translate(-50%, -40%); } }
.sheet-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 90; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 480px; background: #fff; border-radius: 18px 18px 0 0; padding: 18px 16px calc(16px + var(--safe-b)); max-height: 82vh; overflow-y: auto; animation: up .25s; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet h3 { margin: 0 0 12px; font-size: 1.05rem; text-align: center; }
.success { text-align: center; padding: 36px 20px 20px; }
.success .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--green-50); color: var(--green); display: grid; place-items: center; margin: 0 auto 14px; }
.success h2 { margin: 0 0 6px; font-size: 1.15rem; }
.success p { margin: 0; font-size: .88rem; color: var(--text-2); }

.mode-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: var(--green-50); color: var(--green); }
.mode-badge.local { background: #f0f2f5; color: var(--text-2); }

@media (min-width: 520px) {
  body { padding: 0; }
}

/* ---------- 折叠问答 ---------- */
.acc { border-top: 1px solid var(--line); }
.acc:first-child { border-top: 0; }
.acc summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px; cursor: pointer; font-size: .95rem; line-height: 1.5;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary span { flex: 1; }
.acc summary .ico { color: #c3c9d3; transition: transform .2s; }
.acc[open] summary { color: var(--brand); font-weight: 500; }
.acc[open] summary .ico { transform: rotate(180deg); }
.acc-body { padding: 0 14px 14px; }
.acc-body .qa-answer { font-size: .92rem; background: #f7f9fc; border-radius: 10px; padding: 12px; }
