/* ============================================
   聚力狗 · 老蔡 用户端样式（UI5.0）
   基准：docs/ui-design/assets/theme.css（黑底 + 品牌绿）
   图标：内联 lucide 线性 SVG（模板 _icons.html），零外部依赖
   ============================================ */
:root {
  --c-bg: #060a09;
  --c-bg-elevated: #0d1412;
  --c-accent: #4ade80;               /* 品牌绿（文字/徽章/选中） */
  --c-accent-hover: #6ee7b7;
  --c-accent-btn: #22b85e;           /* 按钮底（白字） */
  --c-mid: #34d399;                  /* 辅助/重点数值 */
  --c-warn: #8fd4b4;
  --c-danger: #8fb8e8;
  --c-info: #6ba3d8;
  --c-accent-bg-light: rgba(74,222,128,0.08);
  --c-accent-bg-mid: rgba(74,222,128,0.15);
  --c-mid-bg: rgba(52,211,153,0.12);
  --c-warn-bg: rgba(143,212,180,0.12);
  --c-surface: rgba(255,255,255,0.05);
  --c-surface-raised: rgba(255,255,255,0.09);
  --c-border: rgba(255,255,255,0.09);
  --c-border-strong: rgba(255,255,255,0.15);
  --c-text: #f2f7f5;
  --c-text-2: rgba(242,247,245,0.62);
  --c-text-3: rgba(242,247,245,0.55);
  --c-on-accent: #04291a;             /* 绿底上的深色文字 */
  --c-red: #ef4444;                   /* 通知红点/强警示 */
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 9999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--c-bg); }
body {
  font-family: var(--font);
  background: linear-gradient(165deg, #071009 0%, var(--c-bg) 55%);
  background-attachment: fixed;
  color: var(--c-text);
  max-width: 428px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  animation: pageEnter 200ms ease-out;
}
body.no-nav { padding-bottom: 0; }
@keyframes pageEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
a, a:visited, a:hover, a:active { color: inherit; text-decoration: none; }
p { line-height: 1.7; }

/* ---------- 顶部导航 ---------- */
.page-header {
  background: rgba(6,10,9,0.9);
  backdrop-filter: blur(20px);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  position: sticky; top: 0; z-index: 10; min-height: 52px;
}
.page-header.has-back {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  align-items: center;
}
.page-header.has-back .h-title { text-align: center; }
.page-header.has-back .h-right { justify-self: end; }
.page-header .h-title { font-size: 17px; font-weight: 600; }
.page-header .h-back { color: var(--c-text-2); display: inline-flex; align-items: center; gap: 2px; min-width: 32px; }
.page-header .h-back .ic { width: 20px; height: 20px; }
.page-header .h-right { color: var(--c-text-3); display: flex; gap: 14px; align-items: center; font-size: 13px; min-width: 32px; justify-content: flex-end; }
.page-header .h-right .ic { width: 19px; height: 19px; }
.h-menu {
  color: var(--c-text-2); display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: none; background: none; cursor: pointer; font: inherit;
}
.h-menu .ic { width: 20px; height: 20px; }
.drawer-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 200;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0;
  left: max(0px, calc(50% - 214px));
  width: 300px; z-index: 201;
  background: var(--c-bg-elevated);
  border-right: 1px solid var(--c-border);
  transform: translateX(-105%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer .d-head { padding: 16px; border-bottom: 1px solid var(--c-border); }
.drawer .d-head-chat { padding-bottom: 12px; }
.drawer .d-head-chat .d-title { margin-bottom: 12px; }
.drawer .d-title { font-size: 15px; font-weight: 700; }
.drawer .d-new { width: 100%; }
.drawer .d-list { flex: 1; overflow-y: auto; padding: 8px; }
.drawer .d-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px; border-radius: var(--r-md);
  font-size: 14px; color: var(--c-text-2); text-decoration: none;
}
.drawer .d-item .ic { width: 17px; height: 17px; color: var(--c-text-3); flex-shrink: 0; }
.drawer .d-item:hover { background: var(--c-surface-raised); color: var(--c-text); }
.drawer .d-item.cur { color: var(--c-accent); background: var(--c-accent-bg-light); font-weight: 600; }
.drawer .d-item.cur .ic { color: var(--c-accent); }
.drawer .d-sep { height: 1px; background: var(--c-border); margin: 8px 10px; }
.drawer .d-group { font-size: 11px; color: var(--c-text-3); letter-spacing: 0.08em; padding: 14px 8px 6px; }
.drawer .d-empty { padding: 16px 10px; font-size: 13px; color: var(--c-text-3); line-height: 1.6; }
.drawer .d-nav { border-top: 1px solid var(--c-border); padding: 8px 8px 16px; }
.drawer .d-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px; border-radius: var(--r-md);
  font-size: 13px; color: var(--c-text-2); text-decoration: none;
}
.drawer .d-nav a:hover { background: var(--c-surface-raised); color: var(--c-text); }
.drawer .d-nav a .ic { width: 16px; height: 16px; color: var(--c-text-3); }
.brand { display: flex; align-items: center; gap: var(--s2); font-size: 17px; font-weight: 700; letter-spacing: 0.04em; }
.brand .logo-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--c-accent); color: var(--c-on-accent);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--c-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s4);
}
.card-m { margin: var(--s3) var(--s4); }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: var(--s2); }
.card-link { text-decoration: none; color: inherit; display: block; transition: all 150ms ease; }
.card-link:active { transform: scale(0.99); }

/* ---------- 按钮（32px 药丸，白字绿底） ---------- */
.btn {
  height: 32px; padding: 0 16px; border-radius: var(--r-full); border: none;
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; transition: all 100ms ease;
}
.btn:active { transform: scale(0.97); }
.btn .ic { width: 14px; height: 14px; }
.btn-primary { background: var(--c-accent-btn); color: #fff; }
.btn-secondary { background: var(--c-surface-raised); color: var(--c-text); border: 1px solid var(--c-border); }
.btn-ghost { background: transparent; color: var(--c-text-2); border: 1px solid var(--c-border-strong); }
.btn-danger { background: transparent; color: var(--c-danger); border: 1px solid var(--c-danger); }
.btn-block { width: 100%; }
.btn-lg { height: 40px; font-size: 14px; }
button.primary { background: var(--c-accent-btn); color: #fff; border: none; }
button.danger { background: transparent; color: var(--c-danger); border: 1px solid var(--c-danger); }

/* ---------- 输入 ---------- */
input, textarea, select {
  font: inherit; color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 10px 14px; width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--c-text-3); }
textarea { min-height: 96px; line-height: 1.6; resize: vertical; }
select { appearance: none; }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--c-accent); outline-offset: 1px;
}
.field { margin-bottom: var(--s4); }
.field .f-label, label.f-label { display: block; font-size: 13px; font-weight: 600; color: var(--c-text-2); margin-bottom: var(--s2); }
.field .f-hint, .f-hint { font-size: 12px; color: var(--c-text-3); margin-top: 6px; line-height: 1.6; }
label.check { display: flex; gap: var(--s2); align-items: flex-start; color: var(--c-text); font-size: 14px; }
label.check input { width: auto; margin-top: 3px; }
.stack { display: grid; gap: var(--s3); margin: var(--s3) 0; }
form.inline { display: inline-block; margin-right: var(--s2); }

/* ---------- 标签 / 徽章 ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 4px 12px; border-radius: var(--r-full);
  background: var(--c-surface-raised); border: 1px solid var(--c-border);
  color: var(--c-text-2); white-space: nowrap;
}
.pill .ic { width: 12px; height: 12px; }
.pill-accent { background: var(--c-accent-bg-mid); color: var(--c-accent); border-color: transparent; }
.pill-mid { background: var(--c-mid-bg); color: var(--c-mid); border-color: transparent; }
.pill-warn { background: var(--c-warn-bg); color: var(--c-warn); border-color: transparent; }
.tag {
  font-size: 13px; padding: 8px 16px; border-radius: var(--r-full);
  background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text-2);
}
.tag.sel { background: var(--c-accent-bg-mid); border-color: rgba(74,222,128,0.4); color: var(--c-accent); }

/* ---------- 头像 ---------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #16301c, #0d2112);
  border: 1px solid var(--c-border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: var(--c-accent);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
img.avatar { object-fit: cover; display: block; }
.avatar-lg { width: 56px; height: 56px; font-size: 19px; }
.avatar-xl { width: 72px; height: 72px; font-size: 24px; }

/* ---------- 区块 ---------- */
.section { padding: 0 var(--s4); margin-bottom: var(--s5); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s3); }
.section-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: var(--s2); }
.section-title .ic { width: 18px; height: 18px; color: var(--c-accent); background: var(--c-accent-bg-light); border-radius: var(--r-sm); padding: 2px; box-sizing: content-box; }
.section-more { font-size: 13px; color: var(--c-text-2); display: flex; align-items: center; gap: 2px; }
.section-more .ic { width: 14px; height: 14px; }

/* 列表行 */
.row { display: flex; align-items: center; gap: var(--s3); padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; }
.row .name { font-size: 14px; font-weight: 600; }
.row .sub { font-size: 12px; color: var(--c-text-3); margin-top: 2px; line-height: 1.5; }
.row .chev { color: var(--c-text-3); }
.row > .ic { width: 16px; height: 16px; color: var(--c-text-3); flex-shrink: 0; }
.row .chev .ic { width: 16px; height: 16px; }
.list-card { padding: 4px var(--s4); }

/* 图标块 */
.ico-box {
  width: 40px; height: 40px; border-radius: var(--r-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-accent-bg-mid); color: var(--c-accent);
}
.ico-box .ic { width: 20px; height: 20px; }

/* ---------- 顶部 Tab / 筛选 ---------- */
.ptabs { display: flex; gap: 18px; padding: var(--s3) var(--s4) 0; margin: 0 var(--s4); border-bottom: 1px solid var(--c-border); }
.ptab { font-size: 14px; color: var(--c-text-3); padding-bottom: 10px; }
.ptab.active { color: var(--c-accent); border-bottom: 2px solid var(--c-accent); font-weight: 600; }

/* ---------- 进度 / 步骤 ---------- */
.step-bar { display: flex; gap: 4px; padding: var(--s3) var(--s4) 0; }
.step-bar i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.10); }
.step-bar i.done { background: var(--c-accent); }

/* ---------- 开关 ---------- */
.switch { width: 44px; height: 26px; border-radius: var(--r-full); background: var(--c-accent-btn); position: relative; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.switch.off { background: rgba(255,255,255,0.15); }
.switch.off::after { right: auto; left: 3px; }

/* ---------- 空态（每页必备） ---------- */
.empty-state {
  text-align: center; padding: var(--s6) var(--s5);
  display: flex; flex-direction: column; align-items: center; gap: var(--s2);
}
.empty-state .ic { width: 40px; height: 40px; stroke-width: 1.2; color: var(--c-text-3); }
.empty-state .e-title { font-size: 15px; font-weight: 600; color: var(--c-text-2); margin-top: var(--s2); }
.empty-state .e-desc { font-size: 13px; color: var(--c-text-3); line-height: 1.6; max-width: 260px; }
.empty-state .btn { margin-top: 10px; }
.state-divider {
  margin: var(--s5) var(--s4);
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--c-text-3); letter-spacing: 0.1em;
}
.state-divider::before, .state-divider::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }

/* ---------- 底部导航 ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 428px;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(6,10,9,0.85); backdrop-filter: blur(20px);
  border-top: 1px solid var(--c-border);
  display: flex; justify-content: space-around; align-items: center; z-index: 100;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center;
  font-size: 12px; color: var(--c-text-3);
  gap: 2px; padding: 4px 12px; min-width: 44px; min-height: 44px;
  justify-content: center; text-decoration: none; transition: color 150ms ease;
}
.nav-item.active { color: var(--c-accent); font-weight: 600; }
.nav-item .ic { width: 22px; height: 22px; }

/* ---------- 首页问候（今日秘书台） ---------- */
.greeting {
  margin: var(--s4); padding: var(--s5);
  background: linear-gradient(135deg, #12201c, #060a09);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  position: relative; overflow: hidden;
}
.greeting::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 110px; height: 110px; border-radius: var(--r-full);
  background: var(--c-accent-bg-light); pointer-events: none;
}
.greeting > * { position: relative; }
.greeting .g-date { font-size: 12px; color: var(--c-text-3); margin-bottom: var(--s2); }
.greeting .g-title { font-size: 20px; font-weight: 700; }
.greeting .g-sub { font-size: 13px; color: var(--c-text-2); margin-top: var(--s2); }
.greeting .g-bell { position: absolute; top: var(--s4); right: var(--s4); color: var(--c-text-2); position: relative; }
.greeting .g-bell .ic { width: 19px; height: 19px; }
.dot { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-red); border: 1.5px solid var(--c-bg); }

/* 待办卡（轮到你的） */
.todo-card {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4); margin-bottom: 10px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg);
}
.todo-card .todo-icon {
  width: 36px; height: 36px; border-radius: var(--r-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-accent-bg-mid); color: var(--c-accent);
}
.todo-card .todo-icon .ic { width: 18px; height: 18px; }
.todo-card .todo-icon.urgent { background: rgba(239,68,68,0.12); color: var(--c-red); }
.todo-card .todo-icon.warn { background: var(--c-warn-bg); color: var(--c-warn); }
.todo-card .grow { flex: 1; min-width: 0; }
.todo-card .t { font-size: 14px; font-weight: 600; line-height: 1.5; }
.todo-card .m { font-size: 12px; color: var(--c-text-3); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.todo-card .m .ic { width: 12px; height: 12px; }
.todo-card .m.urgent { color: var(--c-red); }

/* ---------- 文本工具 ---------- */
.muted { color: var(--c-text-2); font-size: 14px; line-height: 1.7; }
.hint { color: var(--c-text-3); font-size: 12px; }
.error { color: var(--c-red); font-size: 14px; }
.ok { color: var(--c-accent); font-size: 14px; }
h1 { font-size: 20px; font-weight: 700; }
.quote {
  border-left: 3px solid var(--c-accent);
  background: var(--c-accent-bg-light);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--s3) var(--s4); color: var(--c-text); font-size: 14px; line-height: 1.7;
}

/* ---------- 老蔡对话 ---------- */
.chat-page { display: flex; flex-direction: column; min-height: calc(100dvh - 64px); }
.chat-head { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--c-border); }
.chat-head .avatar { width: 36px; height: 36px; font-size: 14px; }
.chat-head .t { font-size: 15px; font-weight: 600; }
.chat-head .s { font-size: 12px; color: var(--c-text-3); }
.chat-log {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: var(--s4) var(--s4) calc(120px + env(safe-area-inset-bottom, 0px));
}
/* 条目不参与 flex 压缩：气泡一旦成为 overflow 容器（宽表格横向滚动），
   min-height:auto 即失效，不锁 shrink 会被压成半行（文字上下裁切） */
.chat-log > * { flex-shrink: 0; }
.bubble { max-width: 84%; padding: 12px 14px; font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.bubble.lao { align-self: flex-start; background: var(--c-surface-raised); border: 1px solid var(--c-border); border-radius: 16px 16px 16px 4px; }
.bubble.me { align-self: flex-end; background: var(--c-accent-btn); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble .t-at { font-size: 11px; opacity: 0.65; margin-top: 4px; }
.think { align-self: flex-start; max-width: 84%; font-size: 13px; color: var(--c-text-3); }
.think summary { cursor: pointer; user-select: none; }
.think-body {
  white-space: pre-wrap; line-height: 1.5; margin-top: 6px; padding: 8px 10px;
  border: 1px dashed var(--c-border); border-radius: 10px; background: var(--c-surface);
}
/* 本轮方法论框：回复气泡上方的胶囊，点 × 隐藏（实时流与历史渲染共用） */
.method-box {
  align-self: flex-start; display: flex; align-items: center; gap: 6px;
  max-width: 84%; padding: 3px 10px; font-size: 12px;
  background: var(--c-surface); border: 1px dashed var(--c-border); border-radius: 999px;
}
.method-box .method-tag { color: var(--c-accent); font-weight: 600; white-space: nowrap; }
.method-box .method-name { color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.method-close {
  border: none; background: none; color: var(--c-text-3); font-size: 14px;
  line-height: 1; cursor: pointer; padding: 0 2px;
}
.method-close:hover { color: var(--c-text); }
/* 老蔡回复的 markdown 内容（.md 由 renderReply 标记） */
.bubble.lao.md { white-space: normal; overflow-x: auto; }
.bubble.lao p { margin: 0 0 8px; }
.bubble.lao p:last-child { margin-bottom: 0; }
.bubble.lao ul, .bubble.lao ol { margin: 4px 0 8px; padding-left: 20px; }
.bubble.lao li { margin: 2px 0; }
.bubble.lao h1, .bubble.lao h2, .bubble.lao h3, .bubble.lao h4 { font-size: 15px; margin: 10px 0 6px; font-weight: 600; }
.bubble.lao table { border-collapse: collapse; margin: 6px 0; font-size: 13px; min-width: 60%; }
.bubble.lao th, .bubble.lao td { border: 1px solid var(--c-border-strong); padding: 4px 8px; text-align: left; }
.bubble.lao th { background: var(--c-surface-raised); }
.bubble.lao code { background: var(--c-surface-raised); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.bubble.lao blockquote {
  margin: 6px 0; padding: 4px 10px; border-left: 3px solid var(--c-accent);
  color: var(--c-text-2); background: var(--c-surface); border-radius: 0 6px 6px 0;
}
.bubble.lao strong { font-weight: 650; }
.bubble.lao hr { border: none; border-top: 1px dashed var(--c-border-strong); margin: 10px 0; }
.chat-bar {
  position: fixed; bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 428px;
  padding: 10px 16px;
  background: rgba(6,10,9,0.92); backdrop-filter: blur(24px);
  border-top: 1px solid var(--c-border);
  display: flex; gap: 10px; align-items: flex-end; z-index: 90;
}
body.no-nav .chat-bar { bottom: 0; }
.chat-bar textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 10px 16px; border-radius: var(--r-full); }
.chat-bar .btn { height: 40px; width: 40px; border-radius: 50%; padding: 0; flex-shrink: 0; }
.chat-bar .btn .ic { width: 17px; height: 17px; }
.chat-actions { padding: 0 var(--s4) var(--s3); display: flex; gap: var(--s2); flex-wrap: wrap; }

/* ---------- 台账 / 记忆列表 ---------- */
.ledger-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ledger-item {
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
  border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s3);
  background: var(--c-surface); font-size: 14px; line-height: 1.6;
}
.ledger-item .pill { margin-bottom: 6px; }
.proposal { border: 1px dashed var(--c-accent); border-radius: var(--r-lg); padding: var(--s3); margin: 10px 0; font-size: 14px; line-height: 1.7; }

/* ---------- 表格（admin 之外少量使用） ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { border-bottom: 1px solid var(--c-border); padding: 6px 8px; text-align: left; }

/* ---------- 我的 · 分区标题（设计 menu-sec，只分组已有入口） ---------- */
.menu-sec {
  padding: 18px var(--s4) 6px;
  font-size: 12px; color: var(--c-text-3); font-weight: 600;
}
.me-head { display: flex; gap: 14px; align-items: center; }
.me-head .minfo { flex: 1; min-width: 0; }
.me-head .name { font-size: 16px; font-weight: 600; }
.me-head .sub { font-size: 12px; color: var(--c-text-3); margin-top: 2px; line-height: 1.5; }

/* ---------- 登录首屏 ---------- */
.login-hero { text-align: center; padding: 72px 40px 28px; }
.login-hero .logo-big {
  width: 72px; height: 72px; margin: 0 auto; border-radius: 50%;
  background: var(--c-accent); color: var(--c-on-accent);
  display: grid; place-items: center; font-size: 28px; font-weight: 700;
}
.login-hero h1 { font-size: 28px; font-weight: 700; letter-spacing: 0.06em; margin-top: 18px; }
.login-hero .slogan { font-size: 14px; color: var(--c-text-2); margin-top: 10px; line-height: 1.7; }
.login-body { padding: 8px 28px 40px; }
.agree { margin: 16px 0 20px; font-size: 12px; color: var(--c-text-3); line-height: 1.6; }
.agree a { color: var(--c-accent); }

/* ---------- 引导头像位 ---------- */
.onboard-head { padding: 8px 0 4px; }
.onboard-head h1 { font-size: 24px; font-weight: 700; }
.onboard-head p { font-size: 14px; color: var(--c-text-2); margin-top: 8px; line-height: 1.6; }
.avatar-up {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto;
  border: 1px dashed var(--c-border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-3); overflow: hidden; cursor: pointer;
  background: var(--c-surface);
}
.avatar-up .ic { width: 24px; height: 24px; }
.avatar-up img { width: 100%; height: 100%; object-fit: cover; }
.avatar-file {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---------- 日程周条 / 约见卡 / 人选 ---------- */
.week { display: flex; padding: 8px var(--s4) 4px; }
.day { flex: 1; text-align: center; padding: 6px 0; font-size: 11px; color: var(--c-text-3); }
.day .dn {
  font-size: 15px; font-weight: 600; color: var(--c-text-2);
  width: 30px; height: 30px; line-height: 30px; margin: 4px auto 0; border-radius: 50%;
}
.day.sel .dn { color: #fff; background: var(--c-accent-btn); }
.day.has .dn { box-shadow: inset 0 -6px 0 -4px var(--c-accent); }
.meet .mt { font-size: 15px; font-weight: 600; }
.meet .mm { font-size: 13px; color: var(--c-text-2); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.meet .mm .ic { width: 14px; height: 14px; color: var(--c-text-3); }
.person-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.person-pick .pp {
  display: flex; flex-direction: column; align-items: center; gap: 5px; width: 62px;
  cursor: pointer; position: relative;
}
.person-pick .pp input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.person-pick .pp .pn { font-size: 11px; color: var(--c-text-2); text-align: center; }
.person-pick .pp:has(input:checked) .avatar { border: 2px solid var(--c-accent); }
.person-pick .pp:has(input:checked) .pn { color: var(--c-accent); font-weight: 600; }
.entry-card { padding: 0; overflow: hidden; }
.entry-head {
  display: flex; gap: 12px; align-items: center; padding: 16px;
  list-style: none; cursor: pointer;
}
.entry-head::-webkit-details-marker { display: none; }
.entry-ico {
  width: 42px; height: 42px; border-radius: 50%; background: var(--c-surface-raised);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--c-text-2);
}
.entry-ico .ic { width: 20px; height: 20px; }
.entry-head .et { font-size: 15px; font-weight: 600; }
.entry-head .es { font-size: 12px; color: var(--c-text-3); margin-top: 2px; line-height: 1.4; }
.entry-panel { padding: 0 16px 16px; }
.cta-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 428px;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(6,10,9,0.92); backdrop-filter: blur(24px);
  border-top: 1px solid var(--c-border); z-index: 20;
}

/* ---------- 通知行 ---------- */
.msg-row {
  display: flex; gap: 10px; padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07); align-items: flex-start;
  color: inherit; text-decoration: none;
}
.msg-row:last-child { border-bottom: none; }
.unread-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent);
  flex-shrink: 0; margin-top: 6px;
}
.unread-dot.read { background: transparent; }

/* ---------- 老蔡空态入口 ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.chips .pill { cursor: pointer; font-family: inherit; }

/* 可点的开关：视觉仍是药丸，点按即提交 */
.switch-hit { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch-hit input {
  position: absolute; inset: 0; margin: 0; opacity: 0; width: 100%; height: 100%;
  cursor: pointer; z-index: 1;
}
.switch-hit .switch { display: block; }

/* ---------- 可访问性基线 ---------- */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.btn, .nav-item { position: relative; }
.btn::after, .nav-item::after { content: ''; position: absolute; inset: -6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
