:root {
  --bg-1: #0b0f1a;
  --bg-2: #131a2e;
  --bg-3: #1b2540;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.09);
  --ink: #eaf0f6;
  --ink-soft: #9aa7b4;
  --line: rgba(255, 255, 255, 0.10);
  --brand: #e6c27a;       /* 星光金 */
  --brand-soft: rgba(230, 194, 122, 0.16);
  --accent: #b9a7e6;      /* 思绪紫 */
  --danger: #e58c84;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --maxw: 640px;
}

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

html, body {
  margin: 0; padding: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.6;
  min-height: 100%;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(120, 110, 200, 0.18), transparent 60%),
    radial-gradient(900px 600px at 12% 8%, rgba(230, 194, 122, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 38%, var(--bg-1) 100%);
  background-attachment: fixed;
}

/* 星空画布 */
#sky {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.app-bar, .view, .tabbar, .overlay { position: relative; z-index: 1; }

.app-bar {
  background: linear-gradient(135deg, rgba(27, 37, 64, 0.65), rgba(11, 15, 26, 0.45));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  color: #fff; padding: 22px 18px 18px; position: sticky; top: 0; z-index: 10;
}
.app-bar-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { flex: 0 0 auto; min-width: 0; }
.ver {
  display: inline-block; margin-top: 6px;
  font-size: 11px; letter-spacing: 1px; color: var(--brand);
  opacity: .72; cursor: default; user-select: none;
}
.ver:active { opacity: 1; }
.share-btn {
  flex: 0 0 auto;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid rgba(230, 194, 122, 0.35);
  padding: 8px 13px; font-size: 13.5px; font-weight: 600; letter-spacing: 1px;
  border-radius: 999px; white-space: nowrap;
}
.share-btn:active { transform: scale(.95); }
.app-bar-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  flex: 0 0 auto; width: 38px; height: 38px; font-size: 17px; line-height: 1;
  background: var(--surface-2); color: var(--brand);
  border: 1px solid var(--line); border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:active { transform: scale(.94); }
.mode-badge {
  flex: 0 0 auto;
  font-size: 11px; font-weight: 600; letter-spacing: .5px;
  padding: 4px 8px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line);
}
.mode-badge.local { background: rgba(229, 140, 132, 0.14); color: #f0b0a0; }
.mode-badge.online { background: rgba(129, 199, 132, 0.12); color: #a8d5a2; }
.user-entry {
  flex: 0 0 auto;
  display: inline-flex; align-items: center;
  padding: 7px 11px; font-size: 12.5px; font-weight: 600; letter-spacing: .5px;
  border: 1px solid rgba(230, 194, 122, 0.35); border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  text-decoration: none; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.user-entry:hover { background: rgba(230, 194, 122, 0.22); border-color: rgba(230, 194, 122, 0.55); }
.user-entry:active { transform: scale(.95); }
.user-entry .name { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 顶栏「设置 ▾」下拉（1.0.64） ---------- */
/* 为什么要给 .app-bar 临时抬 z-index：.app-bar 与 .view 都是 z-index:1（见第 40 行），
   而 .view 在 DOM 里排在后面 —— 同层里后画的赢。下拉是 .app-bar 内部的绝对定位元素，
   它自己的 z-index 只在 .app-bar 这个层叠上下文里有效，所以不抬 .app-bar 就会被 .view 盖住。
   只在菜单打开时抬（.menu-open），关掉即恢复，免得顶栏压住 .overlay 弹层的遮罩。 */
.app-bar.menu-open { z-index: 60; }
.set-wrap { position: relative; flex: 0 0 auto; }
.set-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-2); color: var(--brand);
  border: 1px solid rgba(230, 194, 122, 0.35);
  padding: 8px 12px; font-size: 13.5px; font-weight: 600; letter-spacing: 1px;
  border-radius: 999px; white-space: nowrap;
}
.set-btn:active { transform: scale(.95); }
.set-btn-ico { font-size: 13px; line-height: 1; }
.set-btn-arr { font-size: 9px; opacity: .8; transform: translateY(1px); }
.set-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 5;
  min-width: 176px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
/* ★ 本样式表**没有通用 .hidden 规则**（只有 .overlay.hidden / .toast.hidden / .settings-pane.hidden）。
   新元素用 classList 切 hidden 时必须自己补一条，否则「本该藏起来」的菜单会一直露在外面，
   而静态断言全绿也发现不了（1.0.59 踩过一次）。 */
#setMenu.hidden { display: none; }
.set-menu-head {
  padding: 7px 10px 8px; margin-bottom: 2px; max-width: 196px;
  font-size: 12px; letter-spacing: .5px; color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.set-menu-item {
  display: block; width: 100%; text-align: left;
  padding: 10px; font-size: 14px; font-weight: 600; letter-spacing: .5px;
  color: var(--ink); background: transparent; border: none; border-radius: 10px;
}
.set-menu-item:hover { background: var(--brand-soft); color: var(--brand); }
.set-menu-item:active { transform: scale(.98); }
.set-menu-item.danger { color: var(--danger); }
.set-menu-item.danger:hover { background: rgba(229, 140, 132, 0.14); color: #f0b0a0; }
.logo {
  margin: 0; font-size: 23px; letter-spacing: 3px; font-weight: 600;
  background: linear-gradient(90deg, #fff, var(--brand));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  display: inline-block;
}
.logo::after { content: "✦"; -webkit-text-fill-color: var(--brand); margin-left: 6px; animation: twinkle 3.2s ease-in-out infinite; }
.tagline { margin: 5px 0 0; font-size: 12.5px; opacity: 0.72; letter-spacing: 2px; color: var(--ink-soft); }

.view { max-width: var(--maxw); margin: 0 auto; padding: 16px 14px 100px; min-height: 60vh; }

/* ---------- 通用元件 ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span.lbl { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; letter-spacing: .5px; }
input[type="datetime-local"], input[type="date"], input[type="text"], textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; font-size: 15px; font-family: inherit; color: var(--ink);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
input::placeholder, textarea::placeholder { color: rgba(154, 167, 180, 0.7); }
input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
/* 让 datetime-local / date 的日历图标在暗色下可见 */
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); opacity: .7; }
textarea { resize: vertical; min-height: 64px; }

button { font-family: inherit; cursor: pointer; border: none; border-radius: 12px; font-size: 14.5px; padding: 10px 14px; transition: transform .05s, background .15s, box-shadow .15s; }
button:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, #f0cf8e, var(--brand)); color: #2a2113; font-weight: 700; box-shadow: 0 6px 18px rgba(230, 194, 122, 0.28); }
.btn-ghost { background: var(--brand-soft); color: var(--brand); }
.btn-line { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }

.share-hint {
  display: block; width: 100%; text-align: left;
  background: linear-gradient(135deg, rgba(185, 167, 230, 0.16), rgba(230, 194, 122, 0.12));
  color: var(--ink); border: 1px solid var(--line);
  padding: 11px 14px; font-size: 13px; letter-spacing: .4px; border-radius: 12px;
  margin-bottom: 14px; line-height: 1.5;
}
.share-hint:active { transform: scale(.99); }
.btn-danger { background: rgba(229, 140, 132, 0.16); color: var(--danger); }
.btn-block { width: 100%; padding: 13px; font-size: 16px; }

.section-title { font-size: 15px; font-weight: 700; margin: 20px 0 10px; letter-spacing: 1px; color: #f3ead6; }
.section-title::before { content: "· "; color: var(--brand); }

/* ---------- 念头卡片 ---------- */
.thought-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 15px 14px; margin-bottom: 14px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: riseIn .4s ease both;
}
.thought-card::before {
  content: ""; position: absolute; left: 14px; top: 18px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 10px 2px rgba(230, 194, 122, 0.6);
}
.thought-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px 16px; }
.thought-no { font-weight: 700; color: var(--brand); font-size: 14px; letter-spacing: 1px; }
.thought-actions { display: flex; gap: 6px; }
.mini-btn { background: var(--brand-soft); color: var(--brand); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; border: none; }
.mini-btn.del { background: rgba(229, 140, 132, 0.16); color: var(--danger); }

.dims { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.dim-row { margin-bottom: 8px; }
.dim-row .dl { font-size: 12px; color: var(--ink-soft); display: flex; gap: 6px; align-items: center; margin-bottom: 3px; }
.dim-row .dl b { color: var(--accent); font-weight: 700; letter-spacing: .5px; }
.dim-row textarea { min-height: 46px; font-size: 14px; }
.ai-hint { font-size: 11.5px; color: var(--brand); margin-top: 4px; min-height: 14px; }

/* ---------- 历史列表 ---------- */
.entry-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .12s, border-color .15s; animation: riseIn .4s ease both;
}
.entry-item:active { transform: scale(.99); border-color: var(--brand-soft); }
.entry-item .et-time { font-size: 12.5px; color: var(--ink-soft); }
.entry-item .et-event { margin: 6px 0 8px; font-size: 15px; color: var(--ink); }
.entry-item .et-meta { font-size: 12px; color: var(--ink-soft); display: flex; gap: 12px; align-items: center; }
.chip { background: var(--brand-soft); color: var(--brand); border-radius: 20px; padding: 2px 10px; font-size: 12px; }
.empty { text-align: center; color: var(--ink-soft); padding: 54px 20px; font-size: 15px; line-height: 1.9; }

/* ---------- 报告 ---------- */
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.seg button { flex: 1; background: transparent; color: var(--ink-soft); border-radius: 9px; font-weight: 600; }
.seg button.on { background: linear-gradient(135deg, #f0cf8e, var(--brand)); color: #2a2113; box-shadow: 0 4px 12px rgba(230, 194, 122, 0.25); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stat-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; text-align: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.stat-box .num { font-size: 24px; font-weight: 700; color: var(--brand); text-shadow: 0 0 14px rgba(230, 194, 122, 0.4); }
.stat-box .cap { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.daybars { display: flex; align-items: flex-end; gap: 4px; height: 92px; margin: 12px 0; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.daybar { flex: 1; min-width: 16px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.daybar .bar { width: 100%; background: linear-gradient(180deg, #f4dca6, var(--brand)); border-radius: 4px 4px 0 0; min-height: 3px; box-shadow: 0 0 8px rgba(230, 194, 122, 0.35); }
.daybar .d { font-size: 9px; color: var(--ink-soft); margin-top: 3px; }

.summary-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; white-space: pre-wrap; font-size: 14.5px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); line-height: 1.85; }

/* ---------- 洞察 ---------- */
.cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.tag { background: var(--surface); color: var(--brand); border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; font-size: 14px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform .12s, border-color .15s; }
.tag:active { transform: scale(.95); border-color: var(--brand); }
.tag.lg { font-size: 17px; padding: 9px 15px; color: #fff; border-color: var(--brand-soft); }
.tag.sm { font-size: 12px; opacity: .8; }

/* ---------- 弹层 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(7, 10, 18, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: flex-end; z-index: 30; }
.overlay.hidden { display: none; }
.sheet {
  background: linear-gradient(180deg, rgba(27, 37, 64, 0.96), rgba(15, 20, 34, 0.98));
  border: 1px solid var(--line); border-radius: 22px 22px 0 0; width: 100%; max-width: var(--maxw); margin: 0 auto;
  max-height: 88vh; overflow-y: auto; padding: 20px 16px 28px; position: relative; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
}
.sheet-close { position: absolute; right: 14px; top: 12px; font-size: 26px; line-height: 1; background: transparent; color: var(--ink-soft); }
.sheet-body h3 { margin: 0 0 4px; color: #fff; }
.sheet-body .muted { color: var(--ink-soft); font-size: 13px; }
.detail-dim { font-size: 13.5px; margin: 4px 0; color: var(--ink-soft); }
.detail-dim b { color: var(--accent); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(20, 27, 45, 0.95); color: #fff; padding: 10px 18px; border-radius: 22px; font-size: 14px; z-index: 50; max-width: 86%; text-align: center; border: 1px solid var(--line); box-shadow: var(--shadow); }
.toast.hidden { display: none; }

/* ---------- tabbar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(15, 20, 34, 0.82), rgba(11, 15, 26, 0.95));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); display: flex; z-index: 20;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.tabbar .tab { flex: 1; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-soft); font-size: 11.5px; padding: 6px 0; }
.tabbar .tab .ico { font-size: 19px; line-height: 1; filter: drop-shadow(0 0 6px rgba(230, 194, 122, 0.0)); transition: filter .2s; }
.tabbar .tab.active { color: var(--brand); font-weight: 700; }
.tabbar .tab.active .ico { filter: drop-shadow(0 0 8px rgba(230, 194, 122, 0.7)); }

/* ---------- 底部版本号（始终可见，移动端也显示） ---------- */
.site-footer {
  position: fixed;
  left: 0; right: 0;
  bottom: 64px;                 /* 浮于 tabbar 之上 */
  height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; letter-spacing: 1px;
  color: var(--ink-soft);
  opacity: .6;
  z-index: 19;                  /* 低于 tabbar(20)，高于内容(1) */
  pointer-events: none;         /* 不挡底部点击；由内部 span 接管 */
  user-select: none;
}
.foot-ver {
  color: var(--brand);
  opacity: .9;
  pointer-events: auto;
  cursor: default;
}
.foot-ver:active { opacity: 1; }

.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.mt { margin-top: 12px; }
.mt-sm { margin-top: 8px; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- 分享引导层（微信内） ---------- */
.share-guide-sheet { text-align: center; padding: 28px 24px 22px; }
.share-guide-arrow { font-size: 42px; color: var(--brand); transform: rotate(-45deg); margin: -8px 0 6px; line-height: 1; }
.share-guide-sheet h3 { margin: 0 0 10px; font-size: 18px; color: var(--ink); }
.share-guide-sheet .muted { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.share-guide-sheet b { color: var(--brand); }

/* ---------- 动画 ---------- */
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .logo::after, .thought-card, .entry-item { animation: none; }
}

/* ---------- AI 追问面板 ---------- */
.probe-sheet { max-height: 92vh; }
.probe-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.probe-title { font-size: 16px; font-weight: 700; color: var(--brand); letter-spacing: .5px; }
.probe-step { font-size: 12.5px; color: var(--ink-soft); }
.probe-q { font-size: 15.5px; line-height: 1.6; margin-bottom: 12px; color: var(--ink); font-weight: 600; }
.probe-input { width: 100%; min-height: 116px; resize: vertical; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--ink);
  font-size: 15px; line-height: 1.6; font-family: inherit; }
.probe-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(230,194,122,.18); }
.probe-tip { font-size: 12px; margin-top: 8px; }
.probe-loading { text-align: center; font-size: 15px; color: var(--brand); padding: 28px 8px; line-height: 1.9; }

/* ---------- 生成洞察报告：进度条 + 提示 ---------- */
.insight-progress { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: rgba(230,194,122,.06); }
.insight-progress .ip-tip { text-align: center; color: var(--brand); font-size: 14px;
  line-height: 1.8; letter-spacing: .5px; }
.insight-progress .ip-bar { height: 7px; border-radius: 6px; background: rgba(230,194,122,.18);
  margin: 10px 0 8px; overflow: hidden; position: relative; }
.insight-progress .ip-fill { height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, #d9a94f, #e6c27a); transition: width .4s ease; }
.insight-progress .ip-note { text-align: center; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.insight-progress .ip-pct { text-align: right; color: var(--ink-soft); font-size: 11px; }

/* ---------- 1.0.86：洞察后台任务（进度块 / 失败块） ----------
   本样式表**没有通用 .hidden 规则**，这两个 id 的隐藏必须显式写死，
   否则「本该藏起来」的失败块会一直露在外面（1.0.64 踩过一次同样的坑）。 */
#ovInsightProgress.hidden, #ovInsightFail.hidden { display: none; }
.insight-fail { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(214,120,110,.35);
  border-radius: 12px; background: rgba(214,120,110,.08); }
.insight-fail .if-msg { color: var(--ink-soft); font-size: 13px; line-height: 1.75;
  margin-bottom: 10px; word-break: break-word; }

/* ---------- 记录详情 / 进度条 · 返回按钮 ---------- */
.ov-head { display: flex; align-items: center; margin-bottom: 4px; }
.ov-head .btn-back { padding: 6px 14px; font-size: 13px; border-radius: 10px; width: auto;
  margin-left: -6px; }
.btn-back { cursor: pointer; letter-spacing: 1px; }

/* ---------- 洞察报告（Markdown 渲染） ---------- */
.insight-report { font-size: 14px; line-height: 1.8; color: var(--ink); overflow-wrap: anywhere; }
.insight-report h1 { font-size: 19px; color: var(--brand); margin: 18px 0 10px; letter-spacing: .5px; }
.insight-report h2 { font-size: 16.5px; color: var(--brand); margin: 18px 0 8px; }
.insight-report h3 { font-size: 15px; margin: 12px 0 6px; color: var(--ink); }
.insight-report p { margin: 8px 0; }
.insight-report hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.insight-report blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--brand);
  background: rgba(230,194,122,.08); border-radius: 0 10px 10px 0; color: var(--ink-soft); }
.insight-report ul { margin: 8px 0; padding-left: 18px; }
.insight-report li { margin: 5px 0; }
.insight-report .md-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12.8px; }
.insight-report .md-table th, .insight-report .md-table td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.insight-report .md-table th { background: rgba(230,194,122,.12); color: var(--brand); font-weight: 600; }
.insight-report b { color: var(--ink); font-weight: 700; }

/* ---------- 洞察报告：复制按钮 ----------
   记录详情页的复制按钮已改为复用 .btn-primary/.btn-block（与「分享到群里」同款），
   故此处只保留 AI 追问弹层标题右侧的小胶囊按钮样式。
   两条 .insight-head 规则已随改动移除（不再有元素使用）。 */
.insight-copy {
  flex: 0 0 auto; white-space: nowrap; cursor: pointer; font-family: inherit;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid rgba(230, 194, 122, .35); border-radius: 999px;
  padding: 5px 13px; font-size: 12.5px; font-weight: 600; letter-spacing: .5px; line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, opacity .15s ease;
}
.insight-copy:active { transform: scale(.96); }
.insight-copy:disabled { opacity: .65; cursor: default; }

/* ---------- AI 追问（基于报告 · 让画面说话）----------
   全部为新增规则，不改动上方任何既有样式。 */
.fu-track { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.fu-node { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 1.5;
  padding: 3px 9px 3px 5px; border-radius: 999px; color: var(--ink-soft);
  background: rgba(255,255,255,.03); border: 1px solid var(--line); white-space: nowrap; }
.fu-node i { font-style: normal; font-size: 10.5px; width: 15px; height: 15px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.07); color: var(--ink-soft); }
.fu-node.now { color: var(--brand); border-color: rgba(230,194,122,.5);
  background: rgba(230,194,122,.12); box-shadow: 0 0 0 3px rgba(230,194,122,.08); }
.fu-node.now i { background: var(--brand); color: #241d10; font-weight: 700; }
.fu-node.done { color: var(--brand); border-color: rgba(230,194,122,.28); opacity: .75; }
.fu-node.done i { background: rgba(230,194,122,.35); color: #241d10; }
.fu-arrow { color: var(--line); font-size: 12px; }

.fu-why { font-size: 12.5px; line-height: 1.6; color: var(--brand); opacity: .9;
  margin: -4px 0 12px; padding-left: 2px; letter-spacing: .3px; }

.fu-qa { margin: 14px 0 4px; border: 1px dashed var(--line); border-radius: 12px;
  padding: 10px 12px; background: rgba(255,255,255,.02); }
.fu-qa > summary { cursor: pointer; font-size: 12.5px; color: var(--brand); letter-spacing: .3px;
  -webkit-tap-highlight-color: transparent; }
.fu-qa-item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.fu-qa-item:first-of-type { border-top: none; }
.fu-qa-q { font-size: 12px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 4px; }
.fu-qa-a { font-size: 13px; line-height: 1.75; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- 响应式：移动端顶部自适应 ---------- */
@media (max-width: 640px) {
  .app-bar { padding: 14px 14px 12px; }
  .app-bar-inner { gap: 10px; }
  .logo { font-size: 20px; letter-spacing: 2px; }
  .tagline { font-size: 11px; letter-spacing: 1px; margin-top: 2px; }
  .ver { display: none; }
  .icon-btn { width: 34px; height: 34px; font-size: 15px; }
  .share-btn { padding: 6px 10px; font-size: 12px; }
  .set-btn { padding: 6px 10px; font-size: 12px; gap: 3px; }
  .set-menu { min-width: 158px; }
  .user-entry { padding: 6px 9px; font-size: 12px; }
  .user-entry .name { max-width: 60px; }
  .mode-badge { font-size: 10px; padding: 3px 6px; }
}

@media (max-width: 480px) {
  .app-bar { padding: 12px 12px 10px; }
  .app-bar-inner { flex-wrap: wrap; gap: 8px; }
  .brand { flex: 0 0 auto; min-width: auto; max-width: 100%; }
  .logo { font-size: 18px; letter-spacing: 1px; white-space: nowrap; }
  .tagline { display: none; }
  .ver { display: none; }
  .app-bar-actions { flex: 1 1 auto; justify-content: flex-end; gap: 6px; }
  .share-btn { padding: 5px 9px; font-size: 11.5px; }
  .set-btn { padding: 5px 9px; font-size: 11.5px; gap: 3px; }
  .set-btn-txt { display: none; }   /* 小屏只留「⚙ ▾」，给顶栏三个元素腾地方 */
  .icon-btn { width: 32px; height: 32px; font-size: 14px; }
  .user-entry { padding: 5px 8px; font-size: 11px; }
  .user-entry .name { max-width: 48px; }
  .mode-badge { font-size: 9px; padding: 2px 5px; }
}

@media (max-width: 360px) {
  .app-bar { padding: 10px 10px 8px; }
  .logo { font-size: 16px; }
  .app-bar-actions { width: 100%; justify-content: flex-end; }
  .share-btn { padding: 5px 8px; }
}

/* ---------- 雷妈提灯（事业提灯 / 家庭提灯） ---------- */
/* 只新增 .lm-* 规则，不动任何已有规则；颜色一律复用站点变量，
   免得自造一套颜色在夜空主题下读不清。 */
.lm-scenes { display: flex; gap: 8px; margin: 4px 0 12px; }
.lm-scene {
  flex: 1 1 0; padding: 9px 10px; border-radius: 999px; font-size: 13.5px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.lm-scene.on {
  color: #2a2113; font-weight: 700; border-color: transparent;
  background: linear-gradient(135deg, #f0cf8e, var(--brand));
  box-shadow: 0 0 14px rgba(230, 194, 122, 0.28);
}
.lm-scene:active { transform: scale(.98); }
/* 这条线还留着一段进行中的对话（切走再切回来还在）—— 右上角一个小点，
   安静提示「那边还有半截」，不显示数字、不做任何催促。 */
.lm-scene { position: relative; }
.lm-scene.has::after {
  content: ''; position: absolute; top: 6px; right: 9px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand); opacity: .9;
}
.lm-scene.on.has::after { background: #2a2113; opacity: .7; }

/* 视角选择（1.0.98）：默认「文化自信」，另有阳明心学 / 第一性原理 / 易经 */
.lm-persp-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px; flex-wrap: wrap;
}
.lm-persp-hint {
  font-size: 11.5px; color: var(--ink-soft); flex: 0 0 auto; letter-spacing: .3px;
}
.lm-persp-list { display: flex; gap: 6px; flex: 1 1 auto; flex-wrap: wrap; }
.lm-persp {
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 11px; font-size: 12px; line-height: 1.5;
}
.lm-persp.on {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--surface) 100%);
  color: var(--ink); border-color: var(--brand); font-weight: 600;
}
.lm-persp-list.locked .lm-persp { opacity: .55; }
.lm-persp-list.locked .lm-persp.on { opacity: 1; }
.lm-persp:active { transform: scale(.96); }

.lm-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lm-who { font-size: 12.5px; color: var(--ink-soft); letter-spacing: .3px; }
.lm-tools { display: flex; gap: 8px; flex: 0 0 auto; }
.lm-tool {
  background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px;
}
.lm-tool:active { transform: scale(.95); }

/* 历史对话列表 */
.lm-hist {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; margin-bottom: 12px; box-shadow: var(--shadow);
  max-height: 260px; overflow-y: auto;
}
.lm-hist-row { display: flex; align-items: center; gap: 6px; border-radius: 12px; }
.lm-hist-row.on { background: var(--brand-soft); }
.lm-hist-open {
  flex: 1 1 auto; min-width: 0; text-align: left; background: transparent; border: 0;
  padding: 9px 10px; border-radius: 12px; color: var(--ink); display: block;
}
.lm-hist-title { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-hist-meta { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.lm-hist-del {
  flex: 0 0 auto; background: rgba(229, 140, 132, 0.12); color: var(--danger);
  border-radius: 10px; padding: 6px 10px; font-size: 12px; margin-right: 4px;
}

/* 消息流 */
.lm-list { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 12px; }
.lm-msg { display: flex; animation: riseIn .35s ease both; }
.lm-msg.lm-her { justify-content: flex-start; }
.lm-msg.lm-me { justify-content: flex-end; }
.lm-text { max-width: 86%; font-size: 15px; line-height: 1.85; word-break: break-word; }
.lm-her .lm-text {
  color: var(--ink); padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px 16px 16px 16px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lm-me .lm-text {
  color: #2a2113; padding: 10px 14px;
  background: linear-gradient(135deg, #f0cf8e, var(--brand));
  border-radius: 16px 4px 16px 16px;
}

/* 空态：雷妈的开场 */
.lm-lead {
  padding: 18px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.lm-hi { font-size: 16px; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.lm-lead-text { font-size: 14.5px; color: var(--ink); line-height: 1.8; }

.lm-typing { font-size: 12.5px; color: var(--ink-soft); margin: -4px 0 10px; padding-left: 2px; }

/* 输入区 */
.lm-input { display: flex; gap: 8px; align-items: flex-end; }
.lm-input textarea {
  flex: 1 1 auto; min-width: 0; resize: vertical; min-height: 52px; max-height: 180px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); font-size: 15px; line-height: 1.7; padding: 10px 12px;
  font-family: inherit; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.lm-input textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.lm-input textarea::placeholder { color: var(--ink-soft); }
.lm-input .btn-primary { flex: 0 0 auto; padding: 12px 18px; border-radius: 14px; }
.lm-input .btn-primary:disabled { opacity: .5; }
.lm-hint { font-size: 11.5px; color: var(--ink-soft); margin: 8px 2px 0; }

/* ============================================================
   记录详情 · 「这次记录的全貌」（1.0.51 新增）
   只**新增**规则，不改动任何已有规则 → 现有页面样式零变化。
   一律复用站点已有的 CSS 变量（--surface / --line / --brand / --ink-soft），
   免得自造一套颜色在深色主题下读不清。
   ============================================================ */
.eyebrow {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--brand);
}
.full-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 8px 0;
}
.full-line { display: flex; gap: 10px; line-height: 1.7; font-size: 14px; }
.full-line + .full-line { margin-top: 4px; }
.full-k {
  flex: 0 0 auto;
  min-width: 2.4em;
  color: var(--ink-soft);
  font-size: 13px;
}
.full-v { flex: 1 1 auto; word-break: break-word; }
.full-qa-title {
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: .5px;
}
.full-qa-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.full-qa-q { line-height: 1.7; font-size: 14px; color: var(--brand); }
.full-qa-a { margin-top: 4px; line-height: 1.7; font-size: 14.5px; word-break: break-word; }

/* ============================================================
   记录详情 · 「一个框」（1.0.54 新增）
   时间 / 事件 / 念头详情 / 两类 AI 追问的问答，全部收进 .full-card 这一个框，
   框的正下方紧跟「复制以上全部内容」。读完一屏、一次复制走人。
   仍然**只新增规则**：.full-block / .full-qa-item 等原有规则一字未改，
   框内收边靠后代选择器覆盖（.full-card .full-qa-item 权重高于 .full-qa-item）。
   ============================================================ */
.full-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 8px 0;
}
/* 1.0.55：框里放的是「排版好的纯文字」（pre），所见即所得 —— 屏幕上这段字就是复制到微信的那段。 */
.full-text {
  margin: 0;
  padding: 0;
  white-space: pre-wrap;      /* 保留换行与缩进，但长行能折行，不被撑破 */
  word-break: break-word;
  font-family: inherit;       /* 不用等宽字体，跟正文一致，粘到微信里更像手打的 */
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink);
}
.full-sec {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: .5px;
}
.full-thoughts { margin: 2px 0 0; }
.full-thoughts .thought-row { padding: 9px 0; }
.full-card .full-qa-title {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.full-card .full-qa-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 0 0;
  margin: 0;
}
.full-card .full-qa-item + .full-qa-item {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

/* 详情念头列表（所有念头共用一个卡片容器，节省垂直空间） */
.thoughts-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 14px;
  margin: 10px 0;
}
.thought-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.thought-row:last-child { border-bottom: none; }
.thought-row .dt-no {
  font-weight: 700;
  color: var(--brand);
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.thought-row .dt-content {
  font-weight: 600;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
}
.detail-dim { font-size: 13px; margin: 3px 0; color: var(--ink-soft); }
.detail-dim b { color: var(--accent); }

/* 群动态入口按钮（详情内主操作）样式复用 .btn-primary 即可，无需额外定义 */

/* ============================================================
   念头漂流瓶（匿名社交玩法 · 温暖避风港风格）
   ============================================================ */
.drift-sub { color: var(--ink-soft); font-size: 12.5px; line-height: 1.7; margin: -4px 0 14px; }
.drift-cat-tag {
  font-size: 12px; font-weight: 600; color: var(--brand);
  background: var(--brand-soft); padding: 2px 9px; border-radius: 999px; margin-left: 6px;
}
.drift-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.drift-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; letter-spacing: .5px;
  transition: all .18s ease;
}
.drift-chip:active { transform: scale(.96); }
.drift-chip.on {
  background: linear-gradient(135deg, rgba(230, 194, 122, 0.22), rgba(230, 194, 122, 0.10));
  border-color: var(--brand); color: var(--brand); font-weight: 700;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.drift-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.drift-pick, .drift-throw {
  flex: 1 1 0; border-radius: 14px; padding: 12px 10px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .15s ease, box-shadow .2s ease;
}
.drift-pick { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.drift-pick:active { transform: scale(.97); }
.drift-throw {
  background: linear-gradient(135deg, var(--brand), #e7b85e); color: #2a2113; border: 0;
  box-shadow: 0 6px 18px rgba(230, 194, 122, 0.28);
}
.drift-throw:active { transform: scale(.97); }

/* 发瓶区 */
.drift-compose {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px; margin-bottom: 16px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: riseIn .35s ease both;
}
.drift-input {
  width: 100%; min-height: 84px; resize: vertical; border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 12px; background: var(--surface-2); color: var(--ink);
  font-size: 14.5px; line-height: 1.7; outline: none; font-family: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.drift-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.drift-compose-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.drift-pseudo { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.drift-pseudo-label { font-size: 12px; color: var(--ink-soft); flex: 0 0 auto; }
.drift-pseudo-input {
  flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 12px; background: var(--surface-2); color: var(--ink); font-size: 13.5px; outline: none;
}
.drift-pseudo-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.drift-roll {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--brand); font-size: 17px; line-height: 1;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.drift-roll:active { transform: rotate(180deg) scale(.9); }

/* 瓶子卡片 */
.drift-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: riseIn .4s ease both; position: relative; overflow: hidden;
}
.drift-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--brand), rgba(230, 194, 122, 0.1));
}
.drift-card.picked {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow);
}
.drift-card.picked::after {
  content: '🫧 刚捞到'; position: absolute; right: 12px; top: 12px;
  font-size: 11px; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px;
}
.dc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dc-name { font-weight: 700; font-size: 14px; color: var(--brand); letter-spacing: .5px; }
.dc-time { font-size: 11.5px; color: var(--ink-soft); flex: 0 0 auto; }
.dc-body { font-size: 14.5px; line-height: 1.8; color: var(--ink); word-break: break-word; white-space: normal; }
.dc-foot { display: flex; align-items: center; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.dc-resonate {
  border-radius: 999px; padding: 6px 13px; font-size: 13px; display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, rgba(244, 143, 177, 0.18), rgba(230, 194, 122, 0.14));
  color: #f0a6c2; border: 1px solid rgba(244, 143, 177, 0.3);
  transition: transform .15s ease, box-shadow .2s ease;
}
.dc-resonate:active { transform: scale(.95); }
.dc-resonate:hover { box-shadow: 0 0 12px rgba(244, 143, 177, 0.35); }
.dc-res-n { font-weight: 800; }
.dc-echo-toggle {
  border-radius: 999px; padding: 6px 13px; font-size: 13px;
  background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line);
}
.dc-echo-toggle:active { transform: scale(.95); }
.dc-del { margin-left: auto; background: rgba(229, 140, 132, 0.14); color: var(--danger); border-radius: 9px; padding: 5px 10px; font-size: 12px; }
.dc-del:active { transform: scale(.95); }

/* 回音区 */
.drift-echoes { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 8px; }
.drift-echo {
  background: var(--surface-2); border-radius: 12px; padding: 9px 12px;
  border-left: 3px solid rgba(244, 143, 177, 0.5);
}
.de-body { font-size: 13.5px; line-height: 1.65; color: var(--ink); word-break: break-word; white-space: normal; }
.de-time { font-size: 10.5px; color: var(--ink-soft); margin-top: 4px; }
.drift-echo-empty { font-size: 12.5px; color: var(--ink-soft); padding: 4px 2px; }
.drift-echo-input-row { display: flex; gap: 8px; margin-top: 4px; }
.drift-echo-input {
  flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; background: var(--surface-2); color: var(--ink); font-size: 13.5px; outline: none;
}
.drift-echo-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.drift-echo-btn {
  flex: 0 0 auto; border: 0; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), #e7b85e); color: #2a2113;
}

/* ============================================================
   写念头 · 未登录登录闸门
   ============================================================ */
.login-gate {
  max-width: 360px; margin: 8vh auto 0; padding: 28px 24px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lg-emoji { font-size: 44px; line-height: 1; margin-bottom: 10px; filter: drop-shadow(0 0 10px rgba(230, 194, 122, 0.4)); }
.lg-title { font-size: 18px; font-weight: 800; color: var(--brand); margin-bottom: 8px; }
.login-gate .muted { margin-bottom: 18px; }
.login-gate .btn-primary { display: inline-block; text-decoration: none; padding: 11px 0; }


/* ============================================================
   易经起卦解卦（v1.0.96 · 替换原「呼吸」tab）
   ============================================================ */
.yj-stage {
  padding: 22px 16px 24px;
  max-width: 520px;
  margin: 0 auto;
}
.yj-head { text-align: center; margin-bottom: 18px; }
.yj-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: 2px;
}
.yj-sub {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.yj-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 15px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.yj-q-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.yj-q-input {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  font-family: inherit;
}
.yj-q-input:focus { outline: none; border-color: var(--brand); }
.yj-persp-label-row { font-size: 13px; font-weight: 600; color: var(--ink); margin: 18px 0 8px; }
.yj-persp-list { display: flex; gap: 8px; flex-wrap: wrap; }
.yj-persp {
  flex: 1 1 30%;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}
.yj-persp.active {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--surface) 100%);
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.yj-persp-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.yj-persp-sub { font-size: 11px; color: var(--ink-soft); line-height: 1.4; }
.yj-cast-btn { margin-top: 18px; font-size: 15px; letter-spacing: 1px; }
.yj-persp[disabled] { opacity: 0.6; cursor: not-allowed; }

.yj-result { margin-top: 20px; }
.yj-loading {
  text-align: center;
  font-size: 14px;
  color: var(--ink);
  padding: 26px 12px;
  line-height: 1.8;
}
.yj-error {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 20px 12px;
}
.yj-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 16px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.yj-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.yj-gua-symbol { font-size: 40px; line-height: 1; color: var(--brand); }
.yj-gua-name { font-size: 17px; font-weight: 700; color: var(--ink); }
.yj-gua-sub { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.yj-lines { display: flex; flex-direction: column; gap: 5px; margin: 12px 0 16px; }
.yj-line-row { display: flex; align-items: center; gap: 10px; }
.yj-bar { font-family: monospace; font-size: 17px; letter-spacing: 1px; color: var(--ink); }
.yj-line.changing .yj-bar { color: var(--accent); }
.yj-move { font-size: 11px; color: var(--accent); margin-left: 6px; }
.yj-pos { font-size: 12px; color: var(--ink-soft); }
.yj-judgment { font-size: 15px; color: var(--ink); line-height: 1.7; margin-bottom: 6px; }
.yj-j-label {
  display: inline-block;
  font-size: 11px;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 8px;
  vertical-align: middle;
}
.yj-bai { font-size: 13px; color: var(--ink-soft); line-height: 1.7; }
.yj-meta {
  font-size: 11.5px;
  color: var(--ink-soft);
  opacity: 0.8;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  line-height: 1.6;
}
.yj-reading {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.yj-reading-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.yj-reading-title { font-size: 15px; font-weight: 700; color: var(--brand); }
.yj-copy {
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}
.yj-copy:active { opacity: 0.7; }
.yj-reading-body { font-size: 14.5px; line-height: 1.85; color: var(--ink); }
.yj-reading-body h1, .yj-reading-body h2, .yj-reading-body h3 { font-size: 15px; color: var(--ink); margin: 16px 0 8px; }
.yj-reading-body p { margin: 0 0 10px; }
.yj-reading-body table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
.yj-reading-body th, .yj-reading-body td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.yj-reading-body blockquote { border-left: 3px solid var(--brand); padding-left: 10px; color: var(--ink-soft); margin: 10px 0; }


/* ---------- 个人空间 · 设置 ---------- */
.settings-sheet { max-width: 420px; padding: 22px 20px 18px; }
.settings-title { font-size: 16px; margin: 0 0 14px; color: var(--ink); }
.settings-tabs { display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.settings-tab { flex: 1; background: transparent; color: var(--ink-soft); border-radius: 9px; font-weight: 600; padding: 8px 0; font-size: 13.5px; }
.settings-tab.active { background: linear-gradient(135deg, #f0cf8e, var(--brand)); color: #2a2113; box-shadow: 0 4px 12px rgba(230,194,122,.25); }
.settings-pane.hidden { display: none; }
.settings-pane label.field > span.lbl { font-size: 12.5px; }
.settings-pane input[type=password] { letter-spacing: 1px; }
.settings-foot { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.weekly-status { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.85; color: var(--ink-soft); margin: 12px 0; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.weekly-status div + div { margin-top: 4px; }
.msg { padding: 0; min-height: 0; font-size: 13px; }
.msg.ok { color: var(--brand); margin-bottom: 8px; }
.msg.err { color: #ff8a8a; margin-bottom: 8px; }

/* ---------- 账号 · 登录密码区（1.0.59 新增；只加新规则，上面每一条都没动） ---------- */
/* 提醒：样式表里没有通用 .hidden 规则，只有 .overlay.hidden / .toast.hidden / .settings-pane.hidden，
   所以本区两处用 hidden 类切换显隐的元素必须各自给规则，否则「去修改密码」按钮会一直露在外面。 */
.acct-pass { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.acct-pass .msg { margin-bottom: 8px; }
.acct-pass .btn-block + .btn-block { margin-top: 10px; }
#setpassBox.hidden, #sp-goto-pwd.hidden { display: none; }

/* ---------- 洞察：信念 / 感受 卡片 ---------- */
.insight-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.insight-card-meta { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 8px; letter-spacing: .3px; }
.insight-card .insight-report { font-size: 14px; line-height: 1.85; color: var(--ink); }
.insight-card .insight-report h1, .insight-card .insight-report h2, .insight-card .insight-report h3 { font-size: 14px; margin: 10px 0 6px; color: var(--brand); }
.insight-card .insight-report p { margin: 6px 0; }
.insight-card .insight-report ul, .insight-card .insight-report ol { margin: 6px 0 6px 18px; }
.insight-card .insight-report hr { border: none; border-top: 1px dashed var(--line); margin: 10px 0; }

/* ---------- 写念头草稿提示条（1.0.82）---------- */
.draft-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--brand-soft); border: 1px solid rgba(230, 194, 122, 0.35); font-size: 12px; line-height: 1.5; color: var(--brand); }
.draft-bar-txt { flex: 1; min-width: 0; }
.draft-discard { flex: none; padding: 3px 12px; border-radius: 999px; cursor: pointer; border: 1px solid rgba(230, 194, 122, 0.45); background: transparent; color: var(--brand); font-size: 12px; }
.draft-discard:active { background: rgba(230, 194, 122, 0.18); }
