/* ==========================================================================
   灵犀智记 · 视觉系统
   设计取向：纸墨质感 / 克制的玉青色 / 细线框 / 无渐变、无表情符号
   三端自适应：≤768 手机 · 769–1024 平板 · >1024 桌面
   ========================================================================== */

:root {
  /* 纸与墨 */
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #1b1f1d;
  --ink-2: #444b48;
  --muted: #7b8580;
  --line: #e6e4dd;
  --line-2: #d7d4cb;

  /* 玉青主色（替代原来的紫蓝渐变） */
  --brand: #14675a;
  --brand-hover: #0f5449;
  --brand-ink: #0b3d35;
  --brand-soft: #eaf2ee;

  /* 语义色 */
  --ok: #2f7a4f;
  --ok-soft: #eaf4ee;
  --warn: #96660f;
  --warn-soft: #fbf1dd;
  --err: #a63a2f;
  --err-soft: #fbecea;

  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(24, 28, 26, .05);
  --shadow-pop: 0 10px 30px rgba(24, 28, 26, .10);
  --ring: 0 0 0 3px rgba(20, 103, 90, .14);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.35; letter-spacing: -.005em; }
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 15.5px; }
h4 { font-size: 14px; }
small { font-size: 12px; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* 图标（线性 SVG） */
.ic { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -3px; }
.ic-sm { width: 15px; height: 15px; flex: 0 0 auto; vertical-align: -2px; }
.ic-lg { width: 22px; height: 22px; flex: 0 0 auto; }
.ic-xl { width: 28px; height: 28px; flex: 0 0 auto; }

/* ---------- 骨架 ---------- */
.app-shell { display: flex; min-height: 100vh; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.page { flex: 1; padding: 22px 24px 32px; max-width: 1080px; width: 100%; margin: 0 auto; }

/* 侧边栏 */
.sidebar {
  display: none; width: 236px; background: var(--surface);
  border-right: 1px solid var(--line); padding: 18px 14px 14px;
  flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 9px; font-size: 16px; color: var(--ink);
  font-weight: 600; padding: 4px 8px 16px; letter-spacing: .01em;
}
.sidebar .brand .ic-lg { color: var(--brand); }
.sidebar .brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14px;
  transition: background .15s, color .15s;
}
.side-nav a .ic { color: var(--muted); }
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.side-nav a.on .ic { color: var(--brand); }

.lang-select {
  margin-top: 14px; width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-size: 13px;
}
.side-user {
  display: flex; align-items: center; gap: 10px; margin-top: auto;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.side-user b { display: block; font-size: 13.5px; font-weight: 600; }
.side-user small { display: block; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.side-user .logout { margin-left: auto; color: var(--muted); display: flex; }
.side-user .logout:hover { color: var(--err); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand-ink); border: 1px solid #d9e6e1;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px;
}

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 24px; background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(140%) blur(8px);
}
.brand-m { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.brand-m .ic { color: var(--brand); }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.lang-select.sm { margin: 0; width: auto; padding: 5px 8px; font-size: 12px; }

/* 底部 Tab（H5） */
.mobile-tab {
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
  position: sticky; bottom: 0; z-index: 20; padding-bottom: env(safe-area-inset-bottom);
}
.mobile-tab a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 6px; font-size: 10.5px; color: var(--muted); letter-spacing: .01em;
}
.mobile-tab a .ic { width: 21px; height: 21px; }
.mobile-tab a.on { color: var(--brand); font-weight: 600; }
.tab-compose .ic {
  background: var(--brand); color: #fff; border-radius: 50%;
  width: 40px; height: 40px; padding: 9px; margin-top: -18px;
  box-shadow: 0 4px 12px rgba(20, 103, 90, .28);
}

/* ---------- 卡片与版式 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card > h3 { margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.card > h3 .ic { color: var(--brand); }
.card.pad-sm { padding: 14px 16px; }
.card.flat { box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { display: flex; align-items: center; gap: 7px; }
.card-head h3 .ic { color: var(--brand); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { font-size: 21px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.center-page { max-width: 420px; margin: 9vh auto; text-align: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; font-weight: 500; line-height: 1.4;
  cursor: pointer; background: var(--sand, #f2f0ea); color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: #ece9e1; color: var(--ink); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); color: #fff; }
.btn.ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); }
.btn.danger { background: var(--surface); border-color: #e6c9c4; color: var(--err); }
.btn.danger:hover { background: var(--err-soft); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 7px; }
.btn.lg { padding: 12px 22px; font-size: 15px; border-radius: var(--radius); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ic { width: 16px; height: 16px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; letter-spacing: .01em; }
input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a9b0ac; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input:disabled { background: var(--surface-2); color: var(--muted); }
textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
input[type="checkbox"], input[type="radio"] { width: auto; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 180px; }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.7; }
/* 输入框字数提示（由 JS 自动追加到带 maxlength 的输入框后面） */
.count-tip { margin-top: 4px; font-size: 11.5px; color: var(--muted); text-align: right; line-height: 1.4; font-variant-numeric: tabular-nums; }
.count-tip.warn { color: #b45309; }
.hint code, p code, td code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }
.check-row { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); margin: 4px 0; }
.check-row input { width: auto; flex: none; }

/* ---------- 网格 / 统计 ---------- */
.grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.stat b { display: block; font-size: 23px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.stat .ic { color: var(--muted); margin-bottom: 6px; }

/* ---------- 提示 ---------- */
.msg { padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13.5px; margin: 10px 0; border: 1px solid transparent; display: flex; align-items: center; gap: 7px; }
.msg.ok { background: var(--ok-soft); color: #1f5c3a; border-color: #cfe6d8; }
.msg.err { background: var(--err-soft); color: #7f2a22; border-color: #eed3cf; }
.msg.warn { background: var(--warn-soft); color: #6f4c0c; border-color: #eddfc0; }
.msg .ic { width: 16px; height: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 5px;
  font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-2); font-weight: 500;
}
.badge.ok { background: var(--ok-soft); color: #1f5c3a; border-color: #cfe6d8; }
.badge.warn { background: var(--warn-soft); color: #6f4c0c; border-color: #eddfc0; }
.badge.err { background: var(--err-soft); color: #7f2a22; border-color: #eed3cf; }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); border-color: #d5e5df; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { background: var(--surface-2); color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .02em; }
td.num, th.num { font-variant-numeric: tabular-nums; }

/* 分页 */
.pager { display: flex; gap: 6px; justify-content: center; padding: 14px 0; flex-wrap: wrap; }
.pager a, .pager span {
  padding: 5px 11px; border-radius: 7px; background: var(--surface);
  border: 1px solid var(--line); font-size: 13px; color: var(--ink-2);
}
.pager .cur { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- 落地页 ---------- */
.hero { padding: 60px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-size: 30px; letter-spacing: -.02em; margin-bottom: 10px; max-width: 620px; }
.hero-sub { color: var(--muted); font-size: 15px; margin-bottom: 24px; max-width: 560px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: 12.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--surface); padding: 20px; }
.feature .ic-lg { color: var(--brand); margin-bottom: 10px; }
.feature h3 { margin-bottom: 4px; font-size: 14.5px; }
.feature p { color: var(--muted); font-size: 12.8px; line-height: 1.7; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 30px 0 12px; font-size: 13px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- 登录注册 ---------- */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 76vh; padding: 20px 0; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 20px; margin-bottom: 4px; }
.auth-card .auth-sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.auth-card .btn.primary { width: 100%; padding: 11px; }
.code-row > div { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.alt { text-align: center; color: var(--muted); font-size: 13px; margin-top: 16px; }
.divider { position: relative; text-align: center; margin: 20px 0 14px; color: var(--muted); font-size: 12px; }
.divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.divider span { position: relative; background: var(--surface); padding: 0 10px; }
.social-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.social-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 13px;
  color: var(--ink-2); font-family: inherit; transition: border-color .15s, color .15s;
}
.social-btn:hover { border-color: var(--brand); color: var(--brand); }
.social-btn .dot-ic { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.auth-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; }

/* 极验容器（行为验证弹层由官方 gt4.js 渲染，这里只保证层级） */
.geetest_holder, .geetest_panel, .geetest_captcha { z-index: 10050 !important; }

/* ---------- 笔记列表 ---------- */
.note-item {
  display: flex; gap: 12px; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; margin-bottom: 8px;
  transition: border-color .15s, box-shadow .15s;
}
a.note-item:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.note-item .ni-main { flex: 1; min-width: 0; }
.note-item h4 { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.note-item p { color: var(--muted); font-size: 12.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-item .ni-meta { color: #9aa19d; font-size: 11.5px; margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.type-chip {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; color: var(--brand);
  background: var(--brand-soft); border: 1px solid #dcebe5;
}
.type-chip .ic { width: 17px; height: 17px; }
.type-chip input[type="checkbox"] { width: 15px; height: 15px; }
.kw-row { margin: 6px 0; }
.kw { display: inline-block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; font-size: 11.5px; margin: 2px 4px 2px 0; color: var(--ink-2); }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filter-bar select, .filter-bar input { width: auto; min-width: 130px; padding: 7px 10px; font-size: 13px; }
mark { background: #f7ecc6; padding: 0 2px; border-radius: 3px; color: inherit; }
.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 10px; }
.empty .ic-xl { color: var(--line-2); margin-bottom: 6px; }

/* ---------- 问答 ---------- */
.chat-box { display: flex; flex-direction: column; gap: 10px; min-height: 220px; margin-bottom: 14px; max-height: 62vh; overflow-y: auto; padding-right: 2px; }
.msg-ai, .msg-user { max-width: 88%; padding: 11px 14px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; word-break: break-word; line-height: 1.75; }
.msg-user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg-ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ref-row { font-size: 12px; color: var(--muted); margin-top: 8px; border-top: 1px solid var(--line); padding-top: 7px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ask-input { display: flex; gap: 8px; align-items: flex-end; }
.ask-input textarea { min-height: 50px; flex: 1; }
.ask-input textarea:focus { min-height: 50px; }

/* ---------- 分享卡片 ---------- */
.share-card {
  width: 320px; border-radius: var(--radius-lg); background: var(--brand-ink); color: #fff;
  padding: 24px; margin: 0 auto; position: relative; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}
.share-card h3 { font-size: 17px; margin-bottom: 10px; color: #fff; }
.share-card .sc-sum { font-size: 13px; color: rgba(255, 255, 255, .78); min-height: 42px; line-height: 1.7; }
.share-card .sc-brand { margin-top: 18px; font-size: 11px; color: rgba(255, 255, 255, .62); display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.share-card .sc-kw { margin-top: 10px; }
.share-card .kw { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .92); }
#shareQr { background: #fff; border-radius: 6px; padding: 5px; display: inline-block; }

/* ---------- 统计条 ---------- */
.bar-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; font-size: 12.5px; }
.bar-row .bl { width: 80px; color: var(--ink-2); flex-shrink: 0; display: flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bl .ic { width: 14px; height: 14px; color: var(--muted); }
.bar-row .bt { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-row .bb { height: 100%; background: var(--brand); border-radius: 4px; min-width: 2px; }
.bar-row .bv { color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }

/* 用量条（云空间） */
.usage { margin: 4px 0 2px; }
.usage-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.usage-track { height: 7px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.usage-fill { height: 100%; background: var(--brand); }
.usage-fill.warn { background: #c08a1e; }
.usage-fill.err { background: var(--err); }

/* ---------- 云空间 ---------- */
.upload-zone {
  border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface-2);
  padding: 22px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.upload-zone .ic-lg { color: var(--brand); margin-bottom: 6px; }
.file-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 2px;
  border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.file-row:last-child { border-bottom: 0; }
.file-row .fi { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-2); flex: none; }
.file-row .fmeta { flex: 1; min-width: 0; }
.file-row .fmeta b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row .fmeta small { color: var(--muted); font-size: 11.5px; }
.file-row .fops { display: flex; gap: 6px; align-items: center; flex: none; }

/* ---------- 后台 ---------- */
.admin-table-tools { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
code.cmd { display: block; background: #1c211f; color: #d9e6e1; padding: 11px 13px; border-radius: var(--radius-sm); font-family: var(--mono); font-size: 12px; word-break: break-all; white-space: pre-wrap; line-height: 1.7; }
.kv { display: grid; grid-template-columns: 132px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--ink); word-break: break-all; }
.sec-check { display: grid; gap: 6px; margin-top: 8px; }
.sec-check .row { display: flex; gap: 8px; align-items: flex-start; font-size: 12.8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.sec-check .row.ok .ic { color: var(--ok); }
.sec-check .row.err .ic { color: var(--err); }
.sec-check .row b { font-weight: 500; }

/* 页脚 */
.footer { text-align: center; color: #9aa19d; font-size: 11.5px; padding: 18px; letter-spacing: .01em; }
.footer a { color: inherit; }
.footer a:hover { color: var(--brand); }

/* 主题色（浏览器 UI / PWA） */
::selection { background: #cfe6dd; color: var(--brand-ink); }

/* ---------- 通知 / 日程 / 会员 ---------- */
/* 顶栏余额胶囊：H5 端唯一的「充值」入口（侧边栏在手机端隐藏，底部 tab 又不放钱包） */
.topbar-bal {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 11px; border-radius: var(--radius-sm);
  border: 1px solid #d9e6e1; background: var(--brand-soft); color: var(--brand-ink);
  font-size: 13px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.topbar-bal .ic { color: var(--brand); }
.topbar-bal:hover { border-color: var(--brand); background: #e3eee9; color: var(--brand-ink); }
.topbar-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.topbar-bell:hover { border-color: var(--brand); color: var(--brand); }
.topbar-bell i {
  position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--err); color: #fff; font-size: 10.5px; font-style: normal;
  line-height: 16px; text-align: center; font-variant-numeric: tabular-nums;
}
.note-item p.wrap { white-space: pre-wrap; overflow: visible; text-overflow: clip; line-height: 1.7; }
.note-item.unread { border-left: 3px solid var(--brand); }
.period-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 8px; background: var(--surface-2);
}
.period-row b { font-size: 13.5px; }
.period-row small { display: block; color: var(--muted); font-size: 11.5px; }
.line-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 8px; }
.line-kv span { color: var(--muted); }
.line-kv b { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .page { padding: 14px 12px 84px; }
  .topbar { padding: 9px 12px; gap: 8px; }
  .topbar-right { gap: 6px; }
  /* 底部 tab 中间已有「记录」按钮，顶栏省下位置给余额/充值 */
  .topbar-quick { display: none; }
  .topbar-bal { height: 32px; padding: 0 9px; font-size: 12.5px; }
  .lang-select.sm { max-width: 74px; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  th, td { padding: 8px 9px; }
  .hero { padding: 34px 0 22px; }
  .hero h1 { font-size: 24px; }
  .card { padding: 15px; border-radius: var(--radius); }
  .page-head { flex-direction: column; align-items: flex-start; }
  .note-item { padding: 11px 12px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 6px; }
}
@media (min-width: 769px) {
  .mobile-tab { display: none; }
  .sidebar { display: flex; }
  .brand-m { display: none; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .grid4 { grid-template-columns: repeat(4, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1025px) {
  .page { max-width: 1120px; }
}
@media (hover: none) {
  .side-nav a:hover, .btn:hover, a.note-item:hover { background: inherit; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
