/* 三生 AI 工具箱 —— 手机优先，系统字体，不引外部资源 */
:root {
  --navy: #16264A;
  --navy-2: #22386A;
  --gold: #9A6B22;
  --gold-lite: #D9B26A;
  --gold-bg: #F6EEDD;
  --bg: #F3F5F8;
  --card: #FFFFFF;
  --text: #1B2333;
  --muted: #6B7385;
  --line: #E3E7EE;
  --soft: #EEF1F6;
  --ok: #2E7D5B;
  --ok-bg: #E5F3EC;
  --warn: #A2541B;
  --warn-bg: #FBF0E6;
  --danger: #B83A2E;
  --shadow: 0 1px 2px rgba(22, 38, 74, .06), 0 4px 16px rgba(22, 38, 74, .06);
  --radius: 16px;
  --tabbar-h: 62px;
  --topbar-h: 52px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #16264A;
    --navy-2: #1E3260;
    --gold: #D9B26A;
    --gold-lite: #E4C385;
    --gold-bg: #3A2F1C;
    --bg: #0C111C;
    --card: #161E30;
    --text: #E8ECF3;
    --muted: #9AA3B5;
    --line: #263049;
    --soft: #1D2740;
    --ok: #6CC49A;
    --ok-bg: #173327;
    --warn: #E6A46E;
    --warn-bg: #3A2617;
    --danger: #F08A7E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.55; min-height: 100vh; overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }

/* ---------- 顶栏、底栏 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  background: var(--navy); color: #fff; padding-top: env(safe-area-inset-top);
}
.topbar-in {
  height: var(--topbar-h); display: flex; align-items: center; gap: 8px;
  max-width: 600px; margin: 0 auto; padding: 0 8px;
}
.topbar h1 { flex: 1; margin: 0; font-size: 17px; font-weight: 600; text-align: center; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-page .topbar h1 { text-align: center; }
.tb-side { width: 76px; display: flex; align-items: center; }
.tb-side.right { justify-content: flex-end; }
.tb-btn {
  min-width: 44px; height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent;
  color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 15px; cursor: pointer;
}
.tb-btn:active { background: rgba(255, 255, 255, .12); }
.tb-btn svg { width: 22px; height: 22px; }
.tb-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold-lite); color: var(--navy);
  font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-in { max-width: 600px; margin: 0 auto; display: flex; height: var(--tabbar-h); }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 12px; position: relative;
}
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--navy); font-weight: 600; }
@media (prefers-color-scheme: dark) { .tab.on { color: var(--gold); } }
.tab .dot { position: absolute; top: 8px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }

.view {
  max-width: 600px; margin: 0 auto;
  padding: calc(var(--topbar-h) + env(safe-area-inset-top) + 14px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
}
body.no-tab .view { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
body.no-tab .tabbar { display: none; }
body.no-top .topbar { display: none; }
body.no-top .view { padding-top: calc(env(safe-area-inset-top) + 16px); }
body.has-sticky .view { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 96px); }

/* ---------- 通用块 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 16px; }
.sec { display: flex; align-items: baseline; gap: 8px; margin: 22px 4px 10px; font-size: 16px; font-weight: 700; }
.sec small { font-weight: 400; color: var(--muted); font-size: 13px; }
.sec .sec-act { margin-left: auto; font-weight: 400; font-size: 14px; color: var(--gold); background: none; border: 0; padding: 4px; cursor: pointer; }
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font-size: 16px; font-weight: 600; cursor: pointer;
  background: var(--soft); color: var(--text); text-align: center; width: 100%; user-select: none;
}
.btn:active { transform: scale(.985); opacity: .92; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { background: #2A4A8C; } }
.btn.gold { background: var(--gold); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.gold { color: #1B1408; } }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--text); }
.btn.big { min-height: 54px; font-size: 17px; }
.btn.sm { min-height: 38px; font-size: 14px; padding: 0 12px; width: auto; border-radius: 10px; }
.link { background: none; border: 0; color: var(--gold); padding: 10px 4px; font-size: 14px; cursor: pointer; }
.link.danger { color: var(--danger); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field > span b { color: var(--danger); font-weight: 400; }
.input, .field input, .field textarea, .field select, textarea.input {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 11px 13px; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.field textarea, textarea.input { resize: vertical; min-height: 96px; line-height: 1.6; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(154, 107, 34, .15); }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input[type="date"] { min-width: 0; }
.privacy { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--gold-bg);
  color: var(--gold); font-size: 14px; margin-bottom: 14px; }
.privacy svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px;
  font-weight: 600; white-space: nowrap; vertical-align: middle; flex: none; }
.tag-first { background: var(--gold); color: #fff; }
@media (prefers-color-scheme: dark) { .tag-first { color: #1B1408; } }
.tag-today { border: 1px solid var(--line); color: var(--muted); background: var(--card); }
.tag-sample { background: var(--soft); color: var(--muted); font-weight: 400; }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-late { background: var(--warn-bg); color: var(--warn); }
.tag-carry { background: var(--soft); color: var(--muted); font-weight: 400; }

.banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; margin-top: 12px;
  background: var(--card); box-shadow: var(--shadow); font-size: 14px; }
.banner .b-text { flex: 1; }
.banner.warn { background: var(--warn-bg); color: var(--warn); box-shadow: none; }
.banner.info { background: var(--gold-bg); color: var(--gold); box-shadow: none; }
.banner .btn { width: auto; }

.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty .e-title { color: var(--text); font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--soft); color: var(--navy);
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
@media (prefers-color-scheme: dark) { .avatar { color: var(--gold-lite); } }
.avatar.sm { width: 32px; height: 32px; font-size: 14px; }

/* ---------- 今天：顶部 ---------- */
.hero {
  border-radius: 20px; padding: 18px 18px 16px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, #2B4782 0%, var(--navy) 55%);
  box-shadow: 0 8px 24px rgba(22, 38, 74, .22);
}
.hero::after { content: ""; position: absolute; right: -36px; top: -36px; width: 132px; height: 132px; border-radius: 50%;
  border: 1.5px solid rgba(217, 178, 106, .35); }
.hero-date { font-size: 13px; opacity: .75; }
.hero-hello { font-size: 15px; margin-top: 2px; opacity: .92; }
.hero-big { font-size: 23px; font-weight: 700; margin: 6px 0 14px; letter-spacing: .3px; }
.hero-big b { color: var(--gold-lite); font-size: 30px; margin: 0 2px; }
.progress { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #C99A4A, var(--gold-lite)); transition: width .4s; }
.hero-foot { display: flex; justify-content: space-between; font-size: 13px; margin-top: 8px; opacity: .8; }
.hero-sm .hero-title { font-size: 20px; font-weight: 700; }
.hero-sm .hero-sub { font-size: 13px; opacity: .8; margin-top: 4px; }

/* ---------- 今天：一个人一张卡 ---------- */
.plist-people > * + * { margin-top: 10px; }
.person { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: opacity .2s; }
.person-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 0; background: none;
  text-align: left; cursor: pointer; min-height: 72px; }
.person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-name { font-weight: 700; font-size: 16.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.person-rel { font-weight: 400; font-size: 13px; color: var(--muted); }
.person-why { font-size: 14px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.person-chev { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.person.open .person-chev { transform: rotate(90deg); }
.person-body { display: none; padding: 0 14px 14px; }
.person.open .person-body { display: block; }
.person.done { background: var(--soft); box-shadow: none; }
.person.done .person-name, .person.done .person-why { color: var(--muted); }
.person.done .person-name .nm { text-decoration: line-through; text-decoration-color: rgba(107, 115, 133, .5); }
.check { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; }
.check svg { width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border-radius: 15px; font-size: 13px;
  background: var(--soft); color: var(--text); border: 0; cursor: pointer; }
.chip.reason { background: var(--gold-bg); color: var(--gold); cursor: default; }
.block { margin-top: 12px; border-radius: 12px; padding: 12px; background: var(--soft); }
.block p { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; }
.block-label { display: flex; align-items: center; font-size: 13px; color: var(--muted); font-weight: 600; }
.block-label .link { margin-left: auto; padding: 0 2px; font-weight: 400; }
.block.opener { background: var(--gold-bg); }
.block.opener p { font-size: 16.5px; line-height: 1.7; color: var(--text); }
.block.warn { background: var(--warn-bg); }
.block.warn p { color: var(--warn); }
.done-line { margin-top: 12px; font-size: 14px; color: var(--ok); }

.logbox { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 14px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button { min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 15px;
  font-weight: 600; cursor: pointer; padding: 0 4px; }
.seg button.on { border-color: var(--navy); background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .seg button.on { background: #2A4A8C; border-color: #2A4A8C; } }
.logbox textarea { margin-top: 10px; min-height: 76px; }
.logbox .next-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.logbox .next-row input { flex: 1; }
.logbox .btn { margin-top: 10px; }

.mini { padding: 4px 0; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 56px; }
.mini-row + .mini-row { border-top: 1px solid var(--line); }
.mini-row .mr-main { flex: 1; min-width: 0; }
.mini-row .mr-name { font-weight: 600; }
.mini-row .mr-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.mini-row:active, button.mini-row:active { background: var(--soft); }
.mini-row .arrow { color: var(--muted); width: 16px; height: 16px; flex: none; }
.mini-more { padding: 10px 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }

.todo-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; }
.todo-row + .todo-row { border-top: 1px solid var(--line); }
.todo-row .tr-main { flex: 1; min-width: 0; }
.todo-row .tr-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cbox { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin-top: 1px; padding: 0; }
.cbox svg { width: 14px; height: 14px; color: #fff; display: none; }
.cbox.on { background: var(--ok); border-color: var(--ok); }
.cbox.on svg { display: block; }
.bottom-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }

/* ---------- 顾客 ---------- */
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 15px; width: 18px; height: 18px; color: var(--muted); }
.search input { padding-left: 40px; }
.list-card { padding: 2px 0; }
.info-list { margin: 0; }
.info-list div { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.info-list div:first-child { border-top: 0; }
.info-list dt { flex: none; width: 72px; color: var(--muted); }
.info-list dd { margin: 0; flex: 1; white-space: pre-wrap; word-break: break-word; }
.c-head { display: flex; gap: 14px; align-items: center; }
.c-head .avatar { width: 54px; height: 54px; font-size: 22px; }
.c-head .c-name { font-size: 20px; font-weight: 700; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 14px; }
.tl-item::before { content: ""; position: absolute; left: -17px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.tl-item.missed::before { background: var(--muted); }
.tl-date { font-size: 13px; color: var(--muted); }
.tl-note { white-space: pre-wrap; word-break: break-word; }
.buy-row { display: grid; grid-template-columns: 1fr 140px 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.buy-row .pick { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: left;
  padding: 0 12px; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.buy-row .pick.empty { color: var(--muted); }
.buy-row input { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 8px; font-size: 15px; width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--soft); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; }
.bday { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.sticky-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 15;
  background: linear-gradient(to top, var(--bg) 70%, transparent); padding: 14px 16px 10px; }
.sticky-bar .in { max-width: 568px; margin: 0 auto; display: flex; gap: 10px; }

/* ---------- 卖点卡 ---------- */
.plist { max-height: 46vh; overflow-y: auto; margin-top: 10px; border-radius: 12px; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.prow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 14px; border: 0;
  background: var(--card); text-align: left; cursor: pointer; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow:active { background: var(--soft); }
.prow .p-name { font-weight: 600; flex: none; }
.prow .p-alias { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-product { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--gold-bg); margin-bottom: 14px; }
.sel-product .sp-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gold); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; flex: none; }
.sel-product .sp-name { font-weight: 700; font-size: 17px; }
.sel-product .sp-sub { font-size: 13px; color: var(--gold); }
.card-img { border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(22, 38, 74, .18); background: #fff; }
.card-img img { display: block; width: 100%; height: auto; -webkit-touch-callout: default; user-select: auto; }
.hint { text-align: center; font-size: 13px; color: var(--muted); margin: 10px 0 12px; }
.editor .field textarea { min-height: 64px; }
.counter { float: right; font-size: 12px; color: var(--muted); }
.counter.over { color: var(--danger); }

/* ---------- 会议 ---------- */
.trows > * + * { margin-top: 10px; }
.trow { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 10px 10px 12px; }
.trow.done { background: var(--soft); box-shadow: none; }
.trow.done .t-task { color: var(--muted); text-decoration: line-through; }
.trow-top { display: flex; gap: 10px; align-items: flex-start; }
.trow-top .num { flex: none; width: 22px; font-size: 13px; color: var(--muted); padding-top: 12px; text-align: right; }
.t-task { flex: 1; min-height: 46px; border: 1px solid transparent; border-radius: 10px; background: transparent; padding: 10px 8px;
  font-size: 16px; line-height: 1.5; resize: none; outline: none; overflow: hidden; }
.t-task:focus, .t-meta input:focus { border-color: var(--gold); background: var(--card); }
.t-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 0 32px; }
.t-meta label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.t-meta input { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 6px 10px;
  font-size: 15px; outline: none; width: 100%; color: var(--text); }
.t-meta input.late { border-color: var(--warn); color: var(--warn); }
.tbl-head { display: none; }
.share-box .share-url { font-size: 13px; color: var(--muted); word-break: break-all; padding: 10px 12px; background: var(--soft);
  border-radius: 10px; margin: 8px 0 12px; user-select: all; }
.title-input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 19px; font-weight: 700;
  padding: 6px 0 8px; outline: none; }
.title-input:focus { border-bottom-color: var(--gold); }
.dirty-tip { font-size: 13px; color: var(--warn); text-align: center; margin-top: 6px; }

.tbl-wrap { margin-top: 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.share-tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.share-tbl th, .share-tbl td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.share-tbl th { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--soft); }
.share-tbl td:first-child, .share-tbl th:first-child { width: 28px; color: var(--muted); }
.share-tbl td:nth-child(3), .share-tbl td:nth-child(4) { white-space: nowrap; }
.share-tbl tr.done td { color: var(--muted); }
.share-tbl tr:last-child td { border-bottom: 0; }
@media (max-width: 420px) {
  .share-tbl thead { display: none; }
  .share-tbl tr { display: grid; grid-template-columns: 28px 1fr 1fr; padding: 10px 6px; border-bottom: 1px solid var(--line); }
  .share-tbl td { border: 0; padding: 2px 4px; }
  .share-tbl td:first-child { grid-row: span 2; }
  .share-tbl td:nth-child(2) { grid-column: 2 / 4; font-weight: 600; }
  .share-tbl td:nth-child(3)::before { content: "负责："; color: var(--muted); }
  .share-tbl td:nth-child(4)::before { content: "时间："; color: var(--muted); }
}

/* ---------- 登录 ---------- */
.login { max-width: 420px; margin: 0 auto; }
.brand { text-align: center; padding: 28px 0 22px; }
.logo { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 22px; background: var(--navy);
  color: var(--gold-lite); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800;
  letter-spacing: 1px; box-shadow: 0 10px 26px rgba(22, 38, 74, .28); position: relative; }
.logo::after { content: ""; position: absolute; inset: 7px; border-radius: 16px; border: 1.5px solid rgba(217, 178, 106, .45); }
.brand h1 { margin: 0; font-size: 24px; letter-spacing: 1px; }
.brand p { margin: 6px 0 0; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.feature { background: var(--card); border-radius: 14px; padding: 12px 6px; text-align: center; font-size: 13px; color: var(--muted); box-shadow: var(--shadow); }
.feature svg { width: 26px; height: 26px; color: var(--gold); display: block; margin: 0 auto 6px; }
.feature b { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin: -4px 0 10px; }

/* ---------- 弹层、提示、加载 ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); transform: translateX(-50%) translateY(20px);
  background: rgba(20, 26, 40, .92); color: #fff; padding: 11px 18px; border-radius: 22px; font-size: 15px; z-index: 60;
  opacity: 0; transition: all .25s; pointer-events: none; max-width: calc(100% - 48px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.mask { position: fixed; inset: 0; background: rgba(8, 12, 22, .45); z-index: 40; opacity: 0; transition: opacity .2s; }
.mask.show { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--card); border-radius: 20px 20px 0 0;
  max-height: 86vh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .25s;
  padding-bottom: env(safe-area-inset-bottom); max-width: 600px; margin: 0 auto; }
.sheet.show { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; padding: 14px 16px 8px; font-weight: 700; font-size: 17px; }
.sheet-head .spacer { flex: 1; }
.sheet-body { overflow-y: auto; padding: 4px 16px 16px; -webkit-overflow-scrolling: touch; }
.sheet .plist { max-height: none; border: 0; margin: 0; }
.loading { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(243, 245, 248, .72);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
@media (prefers-color-scheme: dark) { .loading { background: rgba(12, 17, 28, .72); } }
.loading-box { background: var(--card); border-radius: 18px; padding: 22px 26px; box-shadow: var(--shadow); text-align: center; min-width: 220px; max-width: 80vw; }
.spinner { width: 34px; height: 34px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--gold);
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg { font-size: 15px; }
.loading-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--soft) 25%, var(--line) 50%, var(--soft) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; height: 78px; }
.skeleton + .skeleton { margin-top: 10px; }
.skeleton.tall { height: 150px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.inline-build { display: flex; align-items: center; gap: 12px; padding: 16px; margin-top: 12px; }
.inline-build .spinner { margin: 0; width: 24px; height: 24px; border-width: 2.5px; flex: none; }

/* ---------- 管理员 ---------- */
.admin-user { padding: 14px; }
.admin-user + .admin-user { border-top: 1px solid var(--line); }
.admin-user .au-top { display: flex; align-items: center; gap: 10px; }
.admin-user .au-name { font-weight: 700; font-size: 16px; }
.admin-user .au-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.admin-user .au-stats div { background: var(--soft); border-radius: 10px; padding: 6px 4px; text-align: center; font-size: 12px; color: var(--muted); }
.admin-user .au-stats b { display: block; color: var(--text); font-size: 16px; }
.admin-user.off { opacity: .6; }
.code-box { font-size: 34px; letter-spacing: 8px; font-weight: 800; text-align: center; color: var(--navy); background: var(--gold-bg);
  border-radius: 14px; padding: 14px 0; margin: 10px 0; font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .code-box { color: var(--gold-lite); } }

@media (min-width: 640px) {
  .view { padding-left: 20px; padding-right: 20px; }
}
