/* 同窗 —— 移动优先样式。主色沿用原小程序的 #7B1E2E。 */

:root {
  --brand: #7B1E2E;
  --brand-2: #B04A3F;
  --bg: #f4f4f6;
  --card: #fff;
  --text: #222;
  --muted: #8a8a92;
  --line: #ededf0;
  --ok: #2ba471;
  --warn: #e08b2f;
  --tabh: 56px;
  --topbh: 48px;
}

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

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; }
input, textarea { font: inherit; }

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

#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: var(--topbh);
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
}
#title { font-size: 17px; font-weight: 600; margin: 0; }
.back-btn {
  position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; color: #fff; font-size: 26px; line-height: 1;
}
.back-btn[hidden] { display: none; }

#app {
  padding: calc(var(--topbh) + env(safe-area-inset-top) + 10px) 12px 20px;
  min-height: 100vh;
}
body.has-tabbar #app { padding-bottom: calc(var(--tabh) + env(safe-area-inset-bottom) + 16px); }

/* ---------------------------------------------------------------- 底栏 */

#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex;
  height: var(--tabh);
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid var(--line);
}
#tabbar[hidden] { display: none; }
.tab-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 11px;
}
.tab-item.active { color: var(--brand); }
.tab-ico { font-size: 19px; line-height: 1; }

/* ---------------------------------------------------------------- 通用块 */

.card {
  background: var(--card); border-radius: 12px;
  padding: 4px 14px; margin-bottom: 12px;
}
.card-title { font-size: 14px; font-weight: 600; padding: 12px 0 6px; }

.irow {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line);
  width: 100%; text-align: left; background: none;
}
.irow:last-child { border-bottom: none; }
.ilabel { color: var(--muted); flex: 0 0 auto; font-size: 14px; }
.ivalue { flex: 1; text-align: right; min-width: 0; word-break: break-all; }
.iinput {
  border: none; outline: none; background: none;
  text-align: right; color: var(--text); width: 100%;
}
.iinput::placeholder { color: #c4c4cb; }
.linkrow { cursor: pointer; }

.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.pad { padding: 12px 0; }

/* ---------------------------------------------------------------- 头像 */

.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto; display: inline-block;
}
.avatar-letter {
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 17px;
}
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; vertical-align: middle; }
.hero-avatar { width: 76px; height: 76px; font-size: 28px; }

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

.btn-primary {
  display: inline-block; text-align: center;
  background: var(--brand); color: #fff;
  padding: 10px 18px; border-radius: 22px; font-size: 15px;
}
.btn-primary:disabled { opacity: .5; }
.btn-ghost {
  display: inline-block; text-align: center;
  background: #fff; color: var(--brand);
  border: 1px solid var(--brand);
  padding: 9px 18px; border-radius: 22px; font-size: 15px;
}
.btn-block { display: block; width: 100%; }

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

.state-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 70px 24px; text-align: center; color: var(--muted);
}
.state-txt { margin-top: 10px; font-size: 15px; color: var(--text); }
.state-sub { margin-top: 6px; font-size: 13px; color: var(--muted); }
.empty-ico { font-size: 34px; opacity: .55; }
.state-box .btn-primary, .state-box .btn-ghost { margin-top: 18px; }

.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid #e3e3e8; border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- 地图 */

.map-wrap { position: relative; margin: -10px -12px 0; }
#map { height: calc(100vh - var(--topbh) - var(--tabh) - 10px); min-height: 380px; }
.map-stat {
  position: absolute; top: 10px; left: 12px; z-index: 500;
  background: rgba(255,255,255,.95); border-radius: 18px;
  padding: 6px 14px; font-size: 13px; color: var(--muted);
  box-shadow: 0 1px 6px rgba(0,0,0,.09);
}
.map-stat b { color: var(--brand); }

.city-label {
  background: rgba(123,30,46,.92); border: none; color: #fff;
  font-weight: 600; font-size: 11px; padding: 2px 6px; border-radius: 8px;
  box-shadow: none;
}
.city-label::before { display: none; }

.city-panel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 600;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0,0,0,.14);
  max-height: 62%; overflow-y: auto;
}
.city-panel[hidden] { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-title { font-weight: 600; }
.panel-close { font-size: 18px; color: var(--muted); padding: 4px 8px; }
.panel-members { display: flex; gap: 14px; overflow-x: auto; padding: 12px 0; }
.panel-member { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 0 0 auto; }
.panel-name { font-size: 12px; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-more { font-size: 13px; padding-bottom: 8px; }
.panel-actions { padding-top: 6px; }
.panel-actions .btn-primary { display: block; }

/* ---------------------------------------------------------------- 名录 */

.searchbar { margin-bottom: 10px; }
.searchbar input {
  width: 100%; border: none; outline: none;
  background: #fff; border-radius: 20px; padding: 10px 16px; font-size: 15px;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.chips::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto; padding: 5px 14px; border-radius: 16px;
  background: #fff; color: var(--muted); font-size: 13px;
}
.fchip.on { background: var(--brand); color: #fff; }

.mlist { background: #fff; border-radius: 12px; overflow: hidden; }
.mcard {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.mcard:last-child { border-bottom: none; }
.mcard-main { flex: 1; min-width: 0; }
.mcard-name { font-weight: 500; }
.mcard-sub { font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard-side { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; flex: 0 0 auto; }
.chip { font-size: 11px; background: #f2ecec; color: var(--brand); padding: 2px 8px; border-radius: 10px; }
.chip-dim { background: #f2f2f5; color: var(--muted); }

/* ---------------------------------------------------------------- 主页 */

.profile-hero { text-align: center; padding: 22px 0 18px; }
.hero-name { font-size: 20px; font-weight: 600; margin-top: 10px; }
.hero-sub { font-size: 13px; margin-top: 4px; }
.hero-actions { margin-top: 16px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.phone-box { display: flex; align-items: center; }
.phone-num { color: var(--brand); font-weight: 600; font-size: 17px; letter-spacing: .5px; }

.vmini {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.vmini:last-child { border-bottom: none; }
.vmini-txt { flex: 1; min-width: 0; }
.vmini-date { font-size: 12px; flex: 0 0 auto; }

/* ---------------------------------------------------------------- 打卡 */

.vtabs { display: flex; gap: 6px; margin-bottom: 12px; }
.vtab {
  flex: 1; padding: 8px 0; border-radius: 18px;
  background: #fff; color: var(--muted); font-size: 13px;
}
.vtab.on { background: var(--brand); color: #fff; }

.fab-wrap { text-align: right; margin-bottom: 10px; }
.fab {
  background: var(--brand); color: #fff;
  padding: 8px 16px; border-radius: 20px; font-size: 14px;
  box-shadow: 0 3px 10px rgba(123,30,46,.28);
}

.vcard { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.vcard-head { display: flex; align-items: center; gap: 8px; }
.vcard-person { display: flex; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.vcard-person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
.vcard-arrow { color: var(--muted); }
.vcard-note { margin-top: 10px; font-size: 14px; }
.vcard-photos { display: flex; gap: 6px; margin-top: 10px; }
.vphoto { width: 74px; height: 74px; border-radius: 8px; object-fit: cover; }
.vcard-foot {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 10px; font-size: 12px;
}

.statbar { display: flex; background: #fff; border-radius: 12px; margin-bottom: 12px; padding: 16px 0; }
.statbar.flat { background: none; padding: 0; }
.stat { flex: 1; text-align: center; }
.stat b { display: block; font-size: 20px; color: var(--brand); }
.stat span { font-size: 12px; color: var(--muted); }

.rankrow {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.rankrow:last-child { border-bottom: none; }
.rankno {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; background: #f1f1f4; color: var(--muted);
}
.rankno.top { background: var(--brand); color: #fff; }
.rankname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankcount { color: var(--brand); font-weight: 600; }

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

.ta {
  width: 100%; min-height: 84px; border: none; outline: none;
  resize: vertical; background: none; padding: 8px 0;
}
.moods { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 12px; }
.mood { padding: 7px 14px; border-radius: 18px; background: #f4f4f6; font-size: 13px; }
.mood.on { background: var(--brand); color: #fff; }

.photos { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
.photo-item { position: relative; }
.photo-item img { width: 76px; height: 76px; border-radius: 8px; object-fit: cover; display: block; }
.photo-del {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; font-size: 12px; line-height: 20px; text-align: center;
}

.notice {
  background: #fdf3f3; color: var(--brand); border-radius: 10px;
  padding: 12px 14px; font-size: 13px; margin-bottom: 12px; line-height: 1.7;
}

.levels { display: flex; flex-direction: column; padding-bottom: 10px; }
.level {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px; text-align: left; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--line); margin-bottom: 8px;
}
.level.on { border-color: var(--brand); background: #fdf3f3; }
.level-label { font-weight: 500; }
.level-desc { font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- 弹层 */

.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.42);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; width: 100%; max-width: 560px;
  border-radius: 16px 16px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 82vh; display: flex; flex-direction: column;
}
.modal-tall { height: 82vh; }
.modal-title { font-weight: 600; text-align: center; margin-bottom: 12px; }
.modal-body { color: var(--muted); font-size: 14px; text-align: center; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.modal-actions .btn-ghost, .modal-actions .btn-primary { flex: 1; }
.modal-search {
  border: 1px solid var(--line); border-radius: 20px;
  padding: 9px 14px; text-align: left; margin-bottom: 10px;
}
.modal-list { flex: 1; overflow-y: auto; }
.pkrow {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.pkrow:last-child { border-bottom: none; }
.pkname { flex: 0 0 auto; }
.pksub { font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- Toast */

#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabh) + 40px);
  transform: translateX(-50%) translateY(8px);
  z-index: 200; max-width: 78vw;
  background: rgba(0,0,0,.82); color: #fff;
  padding: 10px 18px; border-radius: 20px; font-size: 14px;
  opacity: 0; transition: opacity .18s, transform .18s;
  pointer-events: none; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast[hidden] { display: none; }

/* ------------------------------------------------- 联系方式申请（同意/拒绝） */

.tab-item { position: relative; }
.tab-badge {
  position: absolute; top: 2px; left: 50%; margin-left: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #d93025; color: #fff; border-radius: 8px;
  font-size: 10px; line-height: 16px; text-align: center; font-weight: 600;
}

.btn-sm { padding: 6px 14px; font-size: 13px; }

.creq {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.creq:last-child { border-bottom: none; }
.creq-person {
  display: flex; align-items: center; gap: 8px;
  flex: 0 0 auto; min-width: 0;
}
.creq-name { font-weight: 600; }
.creq-txt { font-size: 13px; color: var(--muted); flex: 1 1 auto; min-width: 0; }
.creq-sub { font-size: 12px; flex: 1 1 100%; padding-left: 40px; }
.creq-actions {
  flex: 1 1 100%; display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 2px;
}

.creq-out {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; background: none;
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.creq-out:last-child { border-bottom: none; }
.creq-out-txt { flex: 1; min-width: 0; }
.creq-out-st { flex: 0 0 auto; font-size: 12px; }
.creq-out-st.wait { color: var(--muted); }
.creq-out-st.no { color: #b04a3f; }
.creq-out-st.ok { color: var(--brand); font-weight: 600; }

.hero-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.hero-hint.ok { color: var(--brand); }

/* 注册页同意勾选（2026-09-29 加）。默认不勾，未勾选点「加入」会明确提示。 */
.consent-row {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 12px 0 2px; font-size: 13px; line-height: 1.65; color: #5b5b60;
}
.consent-row input[type="checkbox"] {
  width: 17px; height: 17px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--brand);
}
.consent-row a { color: var(--brand); }


/* ------------------------------------------------- 聚会活动（2026-10-08 加） */

.gtabs { display: flex; gap: 6px; margin-bottom: 12px; }
.gtab {
  flex: 1; padding: 8px 0; border-radius: 18px;
  background: #fff; color: var(--muted); font-size: 13px;
}
.gtab.on { background: var(--brand); color: #fff; }

.gcard { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.gcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gcard-title {
  font-size: 16px; font-weight: 600; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gbadge {
  flex: 0 0 auto; font-size: 11px; padding: 3px 10px; border-radius: 10px;
  background: #f0f0f2; color: var(--muted);
}
.gbadge.on { background: #e6f7ed; color: var(--ok); }

.gmetas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gmeta {
  font-size: 12px; color: #5b5b60; background: #f5f5f7;
  padding: 4px 10px; border-radius: 8px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gmeta i { font-style: normal; margin-right: 3px; }

.gcard-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px;
}
.gcard-by { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.gcard-by span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------- 聚会详情 */

.gd-title { font-size: 19px; font-weight: 600; padding: 14px 0 6px; line-height: 1.35; }
.gdrow { display: flex; gap: 8px; padding: 7px 0; align-items: flex-start; }
.gdico { flex: 0 0 auto; }
.gdtxt { flex: 1; min-width: 0; word-break: break-word; font-size: 14px; }
.gd-status {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0 6px; border-top: 1px solid var(--line); margin-top: 8px;
}
.gdcreator { padding-bottom: 10px; }
.gdpeople { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 0 12px; }
.gdperson { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 62px; }
.gdperson-name {
  font-size: 12px; max-width: 62px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* ------------------------------------------------- 消息通知 */

.msgcard { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.msgcard.unread { border-left: 3px solid var(--brand); }
.msghead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.msgsender { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.msgmeta { display: flex; flex-direction: column; min-width: 0; }
.msgname { font-weight: 500; font-size: 15px; }
.msgsub {
  font-size: 12px; max-width: 58vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msgstatus { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.msgcontent { margin-top: 10px; font-size: 14px; line-height: 1.6; word-break: break-word; }
.msgtime { margin-top: 6px; }
.msgacts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }

/* 待处理条数角标（「我的」页消息入口） */
.dot {
  display: inline-block; min-width: 18px; padding: 0 5px;
  background: #d93025; color: #fff; border-radius: 9px;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 600;
}

/* 原生 select 作为表单值时，去掉控件外观、右对齐，与 .iinput 一致 */
select.iinput {
  -webkit-appearance: none; appearance: none;
  text-align: right; color: var(--text); background: transparent;
}

/* 报名列表里标出谁是发起人。
   发起人一定也在 participants 里（createGathering 建记录时就把他塞进去了），
   所以他同时出现在上面「发起人」卡和这份列表里 —— 这个标记让重复可读。 */
.gdperson-tag {
  font-size: 10px; line-height: 1;
  background: #f2ecec; color: var(--brand);
  padding: 2px 5px; border-radius: 6px;
}

/* 发起人卡是单个人，不该沿用报名列表那种竖排头像格（会留下大片空白）。
   横排成 一张头像 + 姓名 + 发起 标记 一行。 */
.gdcreator .gdperson {
  flex-direction: row; align-items: center;
  width: auto; gap: 8px; padding: 2px 0;
}
.gdcreator .gdperson-name { max-width: none; font-size: 15px; }

/* 城市下拉：select.iinput 去掉了原生外观，必须自己补一个 ▾，
   否则那一行看起来像静态文字，用户不知道可以点。 */
.isel {
  display: flex; align-items: center; gap: 6px;
  flex: 1; min-width: 0; justify-content: flex-end;
}
.isel i { font-style: normal; color: var(--muted); font-size: 13px; }
.isel select { flex: 0 1 auto; width: auto; max-width: 100%; }

/* ================================================================ 深色模式
   2026-10-08 加。写法是**只追加**：不改上面任何一条既有规则，
   所以亮色模式的行为**逐字节不变**（有对比渲染实测）。

   ★ 为什么不是"只把 --bg/--card 换成深色"就完事：
     本文件里有 29 处**硬编码 #fff**（#tabbar/.mlist/.vcard/.gcard/.msgcard/.modal/
     .statbar/.fchip/.vtab/.gtab/.btn-ghost/.searchbar input/.city-panel …），
     它们不读 --card，光改变量会留下一片白块。所以下面必须逐个点名覆盖。

   ★ 为什么 --brand 在深色下要换值：
     #7B1E2E 压在深底上对比度只有约 1.4:1，品牌色文字直接看不清。
     但同一个变量还被当**填充色**用（.btn-primary/.fab/.mood.on，白字压在上面）。
     填充要深、文字要浅，一个值兼顾不了 ⇒ 深色下 --brand 取"填充友好"的值，
     再把**当文字用**的那几处单独提名到更亮的一档。
*/
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #16161a;
    --card: #222228;
    --text: #e9e9ee;
    --muted: #9898a4;
    --line: #2e2e37;
    /* 填充用：白字压其上 ≈ 5.1:1 */
    --brand: #b8445a;
    --brand-2: #d9697e;
    --ok: #3fbf87;
    --warn: #d9a24a;
  }

  /* 品牌色当**文字**用：深底上 #b8445a 只有 ≈3.1:1，不够。提到 #d9697e（≈5.1:1） */
  .tab-item.active,
  .phone-num,
  .rankcount,
  .stat b,
  .chip,
  .notice,
  .map-stat b,
  .creq-out-st.ok,
  .linkrow .ivalue,
  .btn-ghost { color: #d9697e; }
  .btn-ghost { border-color: #6d3a46; }

  /* 硬编码白底的面（不读 --card，必须逐个点名） */
  #tabbar,
  .fchip,
  .mlist,
  .vtab,
  .vcard,
  .statbar,
  .modal,
  .gtab,
  .gcard,
  .msgcard,
  .city-panel,
  .searchbar input,
  .btn-ghost { background: var(--card); }

  /* 浅灰底的小块 */
  .chip,
  .gdperson-tag { background: #2e2e37; }
  .chip-dim,
  .mood,
  .rankno,
  .gmeta,
  .gbadge { background: #2a2a32; }
  .gbadge.on { background: #17342a; color: var(--ok); }
  .notice,
  .level.on { background: #2e2226; }
  .gmeta { color: #b9b9c4; }
  .consent-row { color: #b9b9c4; }
  .spinner { border-color: #33333c; border-top-color: #d9697e; }
  .iinput::placeholder { color: #5b5b66; }

  /* 阴影在深底上没有存在感，改用描边把卡片边界交代清楚 */
  .gcard, .vcard, .msgcard, .mlist, .modal { box-shadow: none; }
  .gcard, .vcard, .msgcard { border: 1px solid var(--line); }
}

/* ---- 对比度体检补漏（2026-10-08，仅深色生效）----
   深色下 --brand 提到 #b8445a 是为了在深底上能读，但下面这三处
   「品牌色当文字」当时漏掉了：实测 .consent-row a 3.02:1、.gdperson-tag 2.48:1。
   深色下文字统一走 #d9697e（≈5.1:1）。 */
@media (prefers-color-scheme: dark) {
  .hero-hint.ok,
  .consent-row a,
  .gdperson-tag { color: #d9697e; }
}
