/* ============================================================
   墨名堂「一缕蚕丝」中式古典美学样式
   配色：墨黑/黛青/月白/朱砂/鎏金
   ============================================================ */
:root {
  --ink: #1A1A1A;        /* 墨黑（加深，提升正文对比度） */
  --ink-soft: #383838;   /* 次要文字（加深） */
  --qing: #2E4250;       /* 黛青（加深，链接/标题更清晰） */
  --qing-deep: #1F323B;
  --moon: #F7F5F0;       /* 月白（略提亮背景，拉开与文字差距） */
  --moon-2: #ECE8DF;
  --zhu: #A8342A;        /* 朱砂（稍加深，红字更醒目） */
  --zhu-deep: #84241C;
  --gold: #B8904F;       /* 鎏金（加深，避免与浅背景糊在一起） */
  --gold-soft: #D8C49A;
  --line: #CFC8BA;       /* 细线（略加深，分隔更明确） */
  --paper: #FCFAF6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Songti SC", "Noto Serif SC", "SimSun", serif;
  background: var(--moon);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--qing); text-decoration: none; }
a:hover { color: var(--zhu); }

/* ---------- 顶部 ---------- */
.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 2rem;
  display: flex; align-items: baseline; gap: 2rem;
  flex-wrap: wrap;
}
.brand { font-size: 1.35rem; letter-spacing: 0.2em; color: var(--ink); font-weight: 700; }
.brand small { font-size: 0.75rem; color: var(--gold); letter-spacing: 0.4em; margin-left: 0.5rem; }
.brand img { display: block; height: 42px; width: auto; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; font-size: 0.95rem; }
.topbar nav a { white-space: nowrap; }  /* 中等宽度下整条换行，不把「积分总览」拆成两行 */
.topbar nav a { padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.topbar nav a.active, .topbar nav a:hover { border-color: var(--zhu); color: var(--zhu); }
.topbar .right { margin-left: auto; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- 主容器 ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.page-title {
  font-size: 1.3rem; letter-spacing: 0.25em; color: var(--ink);
  padding-bottom: 0.6rem; margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--zhu);
  position: relative;
}
.page-title::after {
  content: "◆"; color: var(--gold); font-size: 0.7rem;
  position: absolute; right: 0; bottom: -0.45rem;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 1px 3px rgba(43,43,43,0.04);
}
.card-title { font-size: 1rem; letter-spacing: 0.15em; color: var(--qing-deep); margin-bottom: 0.8rem; }

/* 回纹装饰角 */
.card { position: relative; }
.card::before, .card::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--gold); opacity: 0.55;
}
.card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* ---------- 丝线数字 ---------- */
.balance { display: flex; gap: 2rem; flex-wrap: wrap; }
.balance-item { text-align: center; }
.balance-item .num {
  font-size: 2rem; color: var(--zhu); font-weight: 700;
  letter-spacing: 0.05em;
}
.balance-item .num small { font-size: 1rem; color: var(--gold); }
.balance-item .label { font-size: 0.8rem; color: var(--ink-soft); letter-spacing: 0.2em; margin-top: 0.2rem; }

/* ---------- 印章式按钮 ---------- */
.btn {
  display: inline-block; padding: 0.45rem 1.3rem;
  border: 1px solid var(--zhu); color: var(--zhu);
  background: transparent; font-family: inherit; font-size: 0.9rem;
  letter-spacing: 0.15em; cursor: pointer; border-radius: 2px;
  transition: all 0.25s;
}
.btn:hover { background: var(--zhu); color: #fff; }
.btn-primary { background: var(--zhu); color: #fff; }
.btn-primary:hover { background: var(--zhu-deep); }
.btn-ghost { border-color: var(--qing); color: var(--qing); }
.btn-ghost:hover { background: var(--qing); color: #fff; }
.btn-danger { border-color: #8E2B22; color: #8E2B22; }
.btn-danger:hover { background: #8E2B22; color: #fff; }
.btn-sm { padding: 0.25rem 0.8rem; font-size: 0.8rem; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.35rem; letter-spacing: 0.1em; }
.input, select, textarea {
  width: 100%; padding: 0.55rem 0.8rem;
  border: 1px solid var(--line); border-radius: 2px;
  background: #fff; font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.2s;
}
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--zhu); }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
  text-align: left; padding: 0.6rem 0.8rem; color: var(--ink-soft);
  border-bottom: 2px solid var(--gold); letter-spacing: 0.1em; font-weight: 600;
  white-space: nowrap;
}
.table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); }
.table tr:hover td { background: var(--moon-2); }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-block; padding: 0.15rem 0.7rem; font-size: 0.78rem;
  border: 1px solid var(--gold); color: var(--qing-deep);
  border-radius: 999px; letter-spacing: 0.1em;
}
.badge-tier { background: var(--gold-soft); color: var(--ink); border-color: var(--gold); }
.badge-zhu { background: var(--zhu); color: #fff; border-color: var(--zhu); }
.badge-mute { border-color: var(--line); color: var(--ink-soft); }

/* ---------- 提示 ---------- */
.flash { max-width: 1080px; margin: 1rem auto 0; padding: 0 1.5rem; }
.flash div { padding: 0.6rem 1rem; margin-bottom: 0.4rem; font-size: 0.9rem; border-radius: 2px; }
.flash .ok { background: #F0F5EF; color: #4A6B4A; border: 1px solid #BCD3BC; }
.flash .error { background: #FBEFEE; color: #8E2B22; border: 1px solid #E5C6C2; }
.flash .warn { background: #FBF5E8; color: #8A6D2F; border: 1px solid #E8D5A8; }

/* ---------- 等级徽章 ---------- */
.tier-card { display: inline-block; padding: 0.5rem 1.2rem; text-align: center;
  border: 1px solid var(--line); background: var(--paper); margin: 0.3rem; }
.tier-card .name { font-size: 1.1rem; letter-spacing: 0.2em; }
.tier-card .org { font-size: 0.75rem; color: var(--gold); letter-spacing: 0.3em; }
.tier-card.current { border-color: var(--zhu); box-shadow: 0 0 0 1px var(--zhu); }
.tier-card.current .name { color: var(--zhu); }

/* 进度条 */
.progress { height: 6px; background: var(--moon-2); border-radius: 3px; overflow: hidden; margin: 0.6rem 0; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--zhu)); }

/* ---------- 布局辅助 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.muted { color: var(--ink-soft); font-size: 0.85rem; }
.center { text-align: center; }
.mt-1 { margin-top: 0.6rem; } .mt-2 { margin-top: 1.2rem; }
.flex { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* 竖排点缀 */
.vertical {
  writing-mode: vertical-rl; letter-spacing: 0.5em; color: var(--gold);
  font-size: 0.7rem; opacity: 0.7;
}

/* 登录/注册页 */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: linear-gradient(160deg, var(--moon) 0%, var(--moon-2) 100%); }
.auth-card { width: 400px; max-width: 92vw; background: var(--paper);
  border: 1px solid var(--line); padding: 2.5rem 2.2rem; position: relative; }
.auth-card::before, .auth-card::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border: 1px solid var(--gold); opacity: 0.7;
}
.auth-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.auth-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.auth-logo { text-align: center; margin-bottom: 1.2rem; }
.auth-logo .t { font-size: 1.6rem; letter-spacing: 0.3em; color: var(--ink); }
.auth-logo .s { font-size: 0.75rem; letter-spacing: 0.5em; color: var(--gold); margin-top: 0.3rem; }

/* 悦喜大陆 · 墨城 世界观叙事 */
.world-brand { position: fixed; top: 1.6rem; left: 0; right: 0; text-align: center;
  z-index: 5; pointer-events: none; }
.world-line { display: inline-block; font-size: 0.7rem; letter-spacing: 0.55em;
  color: var(--gold); opacity: 0.85; padding: 0.3rem 1.2rem;
  border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
  opacity: 0.7; }
.world-tagline { text-align: center; font-size: 0.68rem; letter-spacing: 0.18em;
  color: var(--qing-deep); opacity: 0.85; margin: -0.6rem 0 1.4rem;
  line-height: 1.9; }
.auth-logo { margin-bottom: 1.8rem; }

/* 印章 */
.stamp {
  display: inline-block; border: 2px solid var(--zhu); color: var(--zhu);
  padding: 0.3rem 0.9rem; font-size: 0.85rem; letter-spacing: 0.2em;
  transform: rotate(-2deg); border-radius: 2px; opacity: 0.9;
}

/* 后台侧栏 */
.admin-body { display: flex; min-height: 100vh; }
.admin-side { width: 190px; flex: 0 0 190px; background: var(--qing-deep); color: #EDE9E0; padding: 1.5rem 0; }
.admin-side .logo { padding: 0 1.2rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.15);
  letter-spacing: 0.2em; font-size: 1.05rem; margin-bottom: 0.8rem; }
.admin-side a { display: block; padding: 0.55rem 1.2rem; color: #C9C4B8; font-size: 0.9rem; }
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,0.08); color: #fff; border-left: 3px solid var(--gold); }
/* 导航待办红点（2026-10-19 兑换订单提示；2026-10-21 复用到客户导航「消息」） */
.nav-dot, .admin-side .nav-dot {
  display: inline-block; min-width: 1.25rem; padding: 0.05rem 0.32rem; margin-left: 0.3rem;
  border-radius: 999px; background: var(--zhu, #8E2B22); color: #fff;
  font-size: 0.68rem; line-height: 1.35; text-align: center; font-weight: 700;
  vertical-align: middle;
}
.admin-main { flex: 1; min-width: 0; padding: 1.8rem 2rem; }  /* min-width:0 防宽表格把侧栏挤扁 */
.admin-top { display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--line); padding-bottom: 0.8rem; margin-bottom: 1.5rem; }

/* ===== 墨城 · 2.8D 城邦地图（首页） ===== */
.city-hud .balance { margin-bottom: 0.4rem; }
.city-frame { padding: 0.6rem 0.4rem; background: linear-gradient(180deg, #eef2f4, #dfe6e2);
  border-radius: 12px; }
.city-svg { width: 100%; height: auto; display: block; }
.city-svg .bldg { transition: opacity .25s, filter .25s; }
.city-svg .bldg:hover { filter: brightness(1.08); }
.city-svg .bldg.locked { opacity: .62; }
.city-svg .bldg.locked:hover { opacity: .85; }
.city-svg .bldg.soon { opacity: .8; }
.city-links { margin-top: 0.8rem; }
.city-link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.5rem; }
.city-link-grid a { display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0.9rem; background: #faf7f1; border: 1px solid var(--line);
  border-radius: 8px; color: var(--ink); font-size: 0.86rem; text-decoration: none; }
.city-link-grid a:hover { border-color: var(--gold); background: #f7f2e6; }
.city-link-grid .badge { font-size: 0.68rem; }
@media (max-width: 640px) {
  .city-frame { overflow-x: auto; }
  .city-svg { min-width: 640px; }
}

/* ===== 登录页 · 拨云见日动效 ===== */
.cloud-stage { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.cloud { position: absolute; background: radial-gradient(ellipse at center,
  rgba(255,255,255,.92), rgba(255,255,255,0)); filter: blur(14px); border-radius: 50%; }
.cloud-1 { width: 900px; height: 260px; left: -200px; top: -60px; animation: cloud-drift 13s ease-in-out infinite; }
.cloud-2 { width: 760px; height: 220px; right: -160px; top: 40px; animation: cloud-drift 17s ease-in-out infinite reverse; }
.cloud-3 { width: 620px; height: 200px; left: 12%; bottom: -70px; animation: cloud-drift 21s ease-in-out infinite; }
.cloud-4 { width: 480px; height: 160px; right: 6%; bottom: -40px; animation: cloud-drift 15s ease-in-out infinite reverse; }
@keyframes cloud-drift {
  0%,100% { transform: translateX(0) scale(1); opacity: .55; }
  50% { transform: translateX(46px) scale(1.08); opacity: .75; }
}
.sunbeam { position: absolute; top: -12%; left: 50%; transform: translateX(-50%) rotate(0deg);
  width: 320px; height: 130%; background: linear-gradient(180deg,
    rgba(255,236,190,.55), rgba(255,236,190,0) 68%); clip-path: polygon(42% 0, 58% 0, 88% 100%, 12% 100%);
  animation: beam 6s ease-in-out infinite; }
@keyframes beam { 0%,100% { opacity: .5; } 50% { opacity: .85; } }
.city-silhouette { position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: linear-gradient(180deg, rgba(74,93,107,0) 0%, rgba(74,93,107,.18) 30%, rgba(43,43,43,.38) 100%);
  mask-image: linear-gradient(180deg, transparent, #000 45%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%); }
.auth-stage { position: relative; z-index: 1;
  animation: rise-in .9s cubic-bezier(.22,.9,.35,1) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
.auth-card-reveal { animation: fade-in 1.1s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ===== 墨名堂·巡查使司 · 工作台 ===== */
.sisi-banner { position: relative; border-radius: 10px; overflow: hidden;
  margin-bottom: 1rem; border: 1px solid var(--line); height: 220px;
  box-shadow: 0 6px 20px rgba(43,43,43,.16); animation: rise-in .8s ease both; }
.sisi-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%;
  display: block; }
.sisi-veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(43,43,43,.55) 0%, rgba(43,43,43,.18) 46%, rgba(43,43,43,0) 78%); }
.sisi-title { position: absolute; left: 1.6rem; top: 50%; transform: translateY(-50%);
  color: #f5f3ee; max-width: 60%; }
.sisi-title h1 { margin: 0 0 .25rem; font-size: 1.5rem; letter-spacing: .14em;
  color: #f5f3ee; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.sisi-sub { margin: 0; font-size: .82rem; color: #c9a86a; letter-spacing: .1em; }
.sisi-sub span { color: #f5f3ee; }

.si-card { margin-bottom: 1rem; }
.si-card.si-todo { padding: 0.6rem 0.8rem; }
.si-head { font-size: .85rem; color: var(--qing-deep); letter-spacing: .14em;
  border-bottom: 1px dashed var(--line); padding-bottom: .5rem; margin-bottom: .5rem; }
.si-todos { display: flex; flex-direction: column; gap: 2px; }
.si-todo-row { display: grid; grid-template-columns: 22px 1fr auto; gap: .4rem;
  align-items: center; padding: .52rem .6rem; border-radius: 6px; color: var(--ink);
  font-size: .85rem; text-decoration: none; transition: background .18s; }
.si-todo-row:hover { background: #faf3e2; }
.si-todo-ico { font-size: 1rem; text-align: center; }
.si-todo-name { color: var(--ink); letter-spacing: .04em; }
.si-todo-n { font-variant-numeric: tabular-nums; font-weight: 700;
  color: var(--zhu); min-width: 1.6rem; text-align: right; }

.si-num { font-size: 1.8rem; color: var(--zhu); font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1.1; }
.muted { color: #565A60; font-size: .78rem; margin-top: .15rem; }

/* ===== 飞入交错 ===== */
.sisi-stagger > .si-card.si-rise {
  opacity: 0; transform: translateY(14px);
  animation: rise-kf .55s cubic-bezier(.22,.9,.35,1) both;
}
.sisi-stagger > .si-rise:nth-child(1) { animation-delay: .15s; }
.sisi-stagger > .si-rise:nth-child(2) { animation-delay: .20s; }
.sisi-stagger > .si-rise:nth-child(3) { animation-delay: .25s; }
.sisi-stagger > .si-rise:nth-child(4) { animation-delay: .30s; }
.sisi-stagger > .si-rise:nth-child(5) { animation-delay: .35s; }
.sisi-stagger > .si-rise:nth-child(6) { animation-delay: .40s; }
.sisi-stagger > .si-rise:nth-child(7) { animation-delay: .45s; }
@keyframes rise-kf { to { opacity: 1; transform: translateY(0); } }

/* ===== 后台侧栏横向滚动防御 ===== */
.admin-body { min-height: 100vh; }
@media (max-width: 720px) {
  .sisi-banner { height: 160px; }
  .sisi-title h1 { font-size: 1.15rem; }
  .sisi-title { max-width: 70%; }
}

/* ===== 登录页 · 计划欢迎文案 ===== */
.auth-welcome { text-align: center; margin: -1rem 0 1.1rem; }
.auth-welcome .auth-plan { margin: 0 0 .45rem; font-size: 1.12rem; letter-spacing: .14em;
  color: var(--qing-deep); font-weight: 600; }
.auth-welcome .auth-welcome-text { margin: 0 auto; max-width: 330px;
  font-size: .78rem; line-height: 1.95; color: var(--ink); opacity: .85;
  letter-spacing: .03em; }
.auth-welcome .auth-welcome-text p { margin: 0 0 .5rem; }
.auth-welcome .auth-welcome-text p:last-child { margin-bottom: 0; }

/* ===== 长效积分专属页 ===== */
.long-balance-card { text-align: center; padding: 1.4rem 1rem; }
.long-balance-label { font-size: .82rem; color: var(--qing-deep); letter-spacing: .14em; }
.long-balance-num { font-size: 2.6rem; color: var(--gold); font-weight: 700;
  font-variant-numeric: tabular-nums; line-height: 1.2; margin: .2rem 0; }
.gray-num { color: #6A6E74; }   /* 待确认缕数灰色展示（加深保证可读） */

/* ===== 绑定特别申明 ===== */
.bind-notice { font-size: .82rem; line-height: 2; color: var(--qing-deep);
  background: #f6f1e4; border: 1px dashed var(--gold); border-radius: 8px;
  padding: .7rem 1rem; margin-top: .7rem; letter-spacing: .02em; }

/* ===== ICP 备案号页脚 ===== */
.icp-record { color: var(--ink-soft, #565a60); text-decoration: none; letter-spacing: .05em; }
.icp-record:hover { color: var(--gold); text-decoration: underline; }
.icp-sep { color: var(--ink-soft, #565a60); opacity: .5; margin: 0 .4rem; }
.icp-police img { height: 14px; width: auto; vertical-align: -2px; margin-right: .2rem; }

/* ===== 2026-08-18 全站字体放大一级 ===== */
html { font-size: 17.5px; }              /* rem 基准 16 → 17.5（约放大 9%） */
body { font-size: 1.02rem; }             /* 正文字号随之提升 */
.topbar nav { font-size: 1.02rem; }
.topbar .right { font-size: .95rem; }
.brand small { font-size: .8rem; }
.page-title { font-size: 1.45rem; }
.card-title { font-size: 1.08rem; }
.balance-item .num { font-size: 2.2rem; }
.balance-item .num small { font-size: 1.1rem; }
.balance-item .label { font-size: .9rem; }
.btn { font-size: .98rem; }
.btn-sm { font-size: .88rem; }
.badge { font-size: .85rem; }
.field label { font-size: .95rem; }
.input, select, textarea { font-size: 1rem; }
.table { font-size: .96rem; }
.flash div { font-size: .96rem; }
.tier-card .name { font-size: 1.2rem; }
.tier-card .org { font-size: .85rem; }
.muted { font-size: .88rem; }

/* ===== 注册条款滚动框（2026-08-18：阅读到底方可同意） ===== */
.terms-box {
  max-height: 210px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fffdf7; padding: .7rem .9rem;
  font-size: .92rem; line-height: 1.9; color: var(--ink);
  scrollbar-width: thin;
}
.terms-box h3 { font-size: .98rem; margin: .6rem 0 .2rem; color: var(--qing-deep); }
.terms-box p { margin: .25rem 0; }
.terms-box::-webkit-scrollbar { width: 6px; }
.terms-box::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* ===== 等级门槛切换提示（2026-08-24） ===== */
.tier-switch-note {
  margin: 0.7rem 0 0.2rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border-left: 4px solid var(--zhu);
  background: #fbeee9;
  color: var(--zhu-deep);
  font-size: 0.82rem;
  line-height: 1.7;
}
.tier-switch-note--active {
  border-left-color: var(--qing);
  background: #eef2f4;
  color: var(--qing-deep);
}

/* ============================================================
   移动端竖屏适配（≤640px）：单列布局、表格横向滚动、加大触控区
   —— 信息较多页面避免文字竖排/横向溢出，符合手机单手阅读习惯
   ============================================================ */
@media (max-width: 640px) {
  /* 导航栏：窄屏单行横向滚动，避免链接换行挤压 */
  .topbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: .4rem;
    padding: .5rem .8rem;
    align-items: center;
  }
  .topbar .brand { flex: none; }
  .topbar .brand img { height: 36px; }
  .topbar nav {
    flex: none;
    gap: 1rem;
    font-size: .9rem;
    margin-left: .6rem;
  }
  .topbar nav a { white-space: nowrap; }
  .topbar .right { flex: none; margin-left: auto; white-space: nowrap; }

  /* 通用栅格单列（已在 768 处理，这里兜底） */
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; }

  /* 卡片窄屏更紧凑 */
  .card { padding: 1rem .9rem; }
  .page-title { font-size: 1.15rem; }

  /* 表格：外层横向滚动，内部保最小宽度，避免文字被压成竖排 */
  .table { font-size: .82rem; white-space: nowrap; }
  .table th, .table td { padding: .5rem .6rem; }
  /* 含表格的容器允许横向滚动（会员/后台列表页） */
  .card:has(.table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* 兜底：直接的 table 父级若无滚动容器，则自身滚动 */
  table.table { display: block; width: max-content; min-width: 100%; }

  /* 表单与输入全宽、触控更大 */
  .field { margin-bottom: .8rem; }
  .input, input.input, select.input, textarea.input {
    width: 100%;
    font-size: 16px;            /* 防止 iOS 聚焦放大 */
    padding: .62rem .7rem;
  }
  .btn, button.btn, .btn-primary, .btn-ghost, .btn-danger {
    min-height: 42px;          /* 触控友好 */
    font-size: .92rem;
  }
  .flex { gap: .6rem; }

  /* 会员等级页等级卡片：单列堆叠，避免横向溢出 */
  .tier-card { display: block; width: 100% !important; margin: .5rem 0 !important; }

  /* 欢迎/落地页登录框窄屏内边距 */
  .scene-login { padding: 1.2rem 1rem; width: 92vw; max-width: 380px; }
  .sl-register-hint { font-size: .72rem; }

  /* 建议列表：移动端保持横向文字（不竖排） */
  .suggest-content { font-size: .88rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

  /* 后台看板：饼图与板块纵向排布已由 grid 单列覆盖 */
  .user-board-grid { grid-template-columns: 1fr !important; }
}

/* 超小屏（≤400px）进一步收紧 */
@media (max-width: 400px) {
  .topbar nav { gap: .8rem; font-size: .84rem; }
  .card-title { font-size: .98rem; }
  .si-num { font-size: 1.5rem; }
}

/* 会员等级页说明分段：移动端双栏改单栏 */
@media (max-width: 640px) {
  .tier-note-cols { grid-template-columns: 1fr; }
  .tier-note-sec p { font-size: .82rem; line-height: 1.75; }
  .tier-card .tier-hot { text-align: left; }
}

/* ============================================================
   品牌设置页（2026-09-22 重做）
   作用域：.bs-*（Brand Settings），仅本页使用，不影响其它页面。
   设计：字号整体小一号；按重要性分层字号/字重；卡片式分组 + 两列自适应网格。
   ============================================================ */
.bs-wrap { max-width: 920px; }
.bs-head { margin-bottom: 1.1rem; }
.bs-head h2 { font-size: 1.15rem; font-weight: 600; color: var(--qing-deep); margin: 0 0 .35rem; letter-spacing: .02em; }
.bs-head .bs-sub { font-size: .78rem; color: #6B6F76; line-height: 1.6; }
.bs-badge-ro { display: inline-block; font-size: .68rem; font-weight: 600; padding: .12rem .5rem;
  border-radius: 999px; background: #FBEFEE; color: #8E2B22; border: 1px solid #E5C6C2; margin-left: .4rem; }

.bs-card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 1rem 1.15rem 1.1rem; margin-bottom: .9rem; }
.bs-card > .bs-legend { font-size: .92rem; font-weight: 600; color: var(--qing-deep);
  display: flex; align-items: center; gap: .5rem; margin-bottom: .85rem;
  padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.bs-card > .bs-legend .bs-idx { display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; border-radius: 50%; font-size: .68rem; font-weight: 700;
  background: var(--qing-deep); color: #EDE9E0; flex: none; }
.bs-card > .bs-legend .bs-tip { margin-left: auto; font-size: .68rem; font-weight: 400; color: #8A8F96; }

.bs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .7rem .9rem; }
.bs-col-2 { grid-column: 1 / -1; }

.bs-field { display: flex; flex-direction: column; gap: .28rem; }
.bs-field > .bs-label { font-size: .8rem; font-weight: 500; color: var(--ink); line-height: 1.5; }
.bs-field > .bs-label .bs-req { color: var(--zhu); }
.bs-hint { font-size: .7rem; font-weight: 400; color: #8A8F96; line-height: 1.55; }
.bs-field input, .bs-field select, .bs-field textarea {
  width: 100%; box-sizing: border-box; font-size: .84rem; color: var(--ink);
  padding: .42rem .55rem; border: 1px solid var(--line); border-radius: 5px;
  background: #fff; transition: border-color .15s, box-shadow .15s; font-family: inherit; }
.bs-field textarea { line-height: 1.65; resize: vertical; }
.bs-field input:focus, .bs-field select:focus, .bs-field textarea:focus {
  outline: none; border-color: var(--qing); box-shadow: 0 0 0 3px rgba(46,66,80,.10); }
.bs-field input[disabled], .bs-field select[disabled], .bs-field textarea[disabled] {
  background: #F4F2EC; color: #8A8F96; cursor: not-allowed; }

/* 内联单位：输入框 + 后缀（如 元 / 天 / 分） */
.bs-inline { display: flex; align-items: stretch; gap: 0; }
.bs-inline input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.bs-inline .bs-suffix { display: inline-flex; align-items: center; padding: 0 .6rem;
  font-size: .78rem; color: var(--ink-soft); background: var(--moon-2);
  border: 1px solid var(--line); border-left: none; border-radius: 0 5px 5px 0; white-space: nowrap; }
.bs-inline.bs-pre input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bs-inline.bs-pre .bs-suffix { border-radius: 5px 0 0 5px; border-left: 1px solid var(--line); border-right: none; }

/* 一句话示例条 */
.bs-example { font-size: .7rem; color: #8A8F96; background: var(--moon);
  border: 1px dashed var(--line); border-radius: 5px; padding: .3rem .55rem; margin-top: .3rem; }
.bs-example b { color: var(--qing-deep); font-weight: 600; }

.bs-actions { display: flex; align-items: center; gap: .8rem; margin-top: 1.1rem; }
.bs-actions .bs-ro-note { font-size: .76rem; color: #8A8F96; }
.bs-actions .btn-primary { font-size: .86rem; padding: .5rem 1.5rem; border-radius: 6px; }

/* 只读整体降饱和 */
.bs-readonly .bs-card { background: #FAF8F3; }
.bs-readonly .bs-card > .bs-legend { color: #6B6F76; }

@media (max-width: 560px) {
  .bs-grid { grid-template-columns: 1fr; }
  .bs-card { padding: .85rem .9rem .95rem; }
}
