/* ═══════════════════════════════════════════════════════
   SonderX Design System — v6
   Inner Space · Time Sediment · Unknown Architecture
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #0A0A0E;
  --bg-mid: #101016;
  --bg-surface: #18181E;
  --bg-raised: #202028;
  --bg-hover: #282830;

  --text: #F0EBE2;
  --text-secondary: #C0B8AA;
  --text-tertiary: #90887A;
  --text-muted: #605850;

  --amber: #A9BECD;
  --amber-dim: #8499AB;
  --amber-glow: rgba(150, 178, 200, 0.08);
  --amber-line: rgba(150, 178, 200, 0.16);

  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  --border-amber: rgba(150, 178, 200, 0.22);

  --shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;

  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
    'Helvetica Neue', sans-serif;
  --sans-zh: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;

  --ease-apple: cubic-bezier(0.34, 0.01, 0.17, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --slow: 0.6s;
  --norm: 0.35s;
  --fast: 0.2s;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
/* html/body 必须显式铺满 viewport（不做颜色掩盖，只补占位约束） */
html { -webkit-text-size-adjust: 100%; width: 100%; min-height: 100%; }

body {
  font-family: var(--sans), var(--sans-zh);
  font-size: 15px;
  line-height: 1.8;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: rgba(150, 178, 200, 0.22); color: var(--text); }
::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }

/* ── Background: Inner space — time sediment, undefined depth ── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 110% 90% at 70% 25%, transparent 30%, rgba(6, 8, 12, 0.45) 70%, rgba(6, 8, 12, 0.85) 100%),
    linear-gradient(180deg, rgba(6, 8, 12, 0.35) 0%, rgba(6, 8, 12, 0.15) 40%, rgba(6, 8, 12, 0.35) 75%, rgba(6, 8, 12, 0.6) 100%),
    url('/images/lookback-bg.jpg') center center / cover no-repeat;
  background-color: #06080C;
  transform-origin: 65% 30%;
  animation: bgBreath 90s ease-in-out infinite alternate;
}

@keyframes bgBreath {
  0% { transform: scale(1); opacity: 0.92; }
  100% { transform: scale(1.03); opacity: 1; }
}

/* ── Navigation ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: rgba(10, 14, 22, 0.85);
  backdrop-filter: blur(24px) saturate(0.9);
  -webkit-backdrop-filter: blur(24px) saturate(0.9);
  border-bottom: 1px solid var(--border);
}
.nav-brand { font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif; font-size: 13px; font-weight: 400; letter-spacing: .14em; text-decoration: none; color: var(--text-secondary); transition: color var(--fast); }
.nav-brand:hover { color: var(--text); }
.nav-brand span { color: inherit; letter-spacing: 0; margin-left: -.03em; }
.nav-links { display: flex; gap: 2px; }
.nav-link { padding: 6px 16px; border-radius: var(--r-full); font-size: 13px; font-weight: 400; color: var(--text-muted); text-decoration: none; transition: all var(--fast) var(--ease-out); }
.nav-link:hover { color: var(--text-tertiary); background: var(--bg-surface); }
.nav-link.active { color: var(--text); background: var(--bg-raised); }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); text-decoration: none; padding: 6px 0; transition: color var(--fast); margin-bottom: 32px; white-space: nowrap; }
.back-link:hover { color: var(--text-tertiary); }
/* svg 无显式尺寸时会被 flex 压缩，导致文字竖排 —— 固定尺寸 */
.back-link svg { width: 14px; height: 14px; flex: none; }

/* ── Animations ── */
.page { position: relative; z-index: 2; animation: pageEnter var(--slow) var(--ease-apple) both; min-height: 100vh; padding-top: 72px; }
@keyframes pageEnter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardEnter { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════
   Home
   ═══════════════════════════════════════════ */

.home-page { display: flex; flex-direction: column; min-height: 100vh; padding: 92px 28px 60px; position: relative; z-index: 2; }
.home-brand { font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif; font-size: 11px; font-weight: 400; letter-spacing: .22em; color: var(--text-muted); margin-bottom: 16px; }
.home-brand span { color: inherit; letter-spacing: 0; margin-left: -.03em; }
.home-title { font-size: 40px; font-weight: 300; line-height: 1.15; letter-spacing: -0.8px; color: var(--text); margin-bottom: 8px; }
.home-subtitle { font-size: 15px; color: var(--text-tertiary); font-weight: 300; margin-bottom: 48px; max-width: 280px; }
.home-entrance { display: inline-flex; align-items: center; gap: 12px; padding: 14px 36px; border-radius: var(--r-full); background: var(--bg-surface); border: 1px solid var(--border-amber); color: var(--text-secondary); font-size: 14px; font-family: inherit; letter-spacing: 0.6px; cursor: pointer; text-decoration: none; transition: all var(--norm) var(--ease-apple); margin-bottom: 36px; }
.home-entrance:hover { border-color: rgba(150, 178, 200, 0.22); color: var(--text); transform: translateY(-1px); background: var(--bg-raised); box-shadow: var(--shadow); }
.home-entrance-icon { font-size: 14px; opacity: 0.5; transition: opacity var(--fast); }
.home-entrance:hover .home-entrance-icon { opacity: 0.8; }
.home-stats { font-size: 13px; color: var(--text-muted); letter-spacing: 0.3px; margin-bottom: 12px; }
/* 最近片刻：原先整体 opacity .4 叠 text-muted，实测对比度只有 1.36–1.87:1（不可读）。
   去掉整体淡出，改用 token 表达层级：文字统一 --text-tertiary ≈ 5.8:1。 */
.home-preview { margin-top: 18px; }
/* 层级由强到弱：正文 > 标签 > 时间。正文固定 3 行截断，超出只做视觉裁切，内容不删。 */
.home-preview-label { font-size: 10.5px; color: var(--text-muted); letter-spacing: 1.4px; margin-bottom: 9px; }
.home-preview-text { font-size: 14px; line-height: 1.8; color: var(--text-secondary); max-width: 520px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.home-preview-time { font-size: 10.5px; color: var(--text-muted); letter-spacing: .3px; margin-top: 10px; font-variant-numeric: tabular-nums; }
/* 最近此刻里的图片：克制、单张、无大圆角卡片、无边框 */
.home-preview-image-link { display: block; margin-top: 14px; max-width: 420px; }
.home-preview-image { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: 6px; opacity: .92; }
/* 可见范围（上传到世界）：轻量文字开关，不用按钮卡片 */
.home-preview-public { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.home-preview-public-label { font-size: 10.5px; color: var(--text-muted); letter-spacing: 1.2px; }
.home-preview-public-opt { font-size: 12.5px; color: var(--text-tertiary); cursor: pointer; letter-spacing: .3px; transition: color var(--fast); user-select: none; }
.home-preview-public-opt:hover { color: var(--text-secondary); }
.home-preview-public-opt.is-active { color: var(--text); }
.home-preview-public-radio { color: var(--text-muted); margin-right: 2px; }
.home-preview-public-opt.is-active .home-preview-public-radio { color: var(--amber); }

/* ── 此刻：宽屏尺度校正（仅桌面；窄屏样式不受影响） ──
   1440–1920px 下把尺度拉到与视口相称，主体仍从左侧起排，不居中成卡片。 */
@media (min-width: 1024px) {
  .home-page { padding: 112px clamp(32px, 5vw, 96px) 72px; }
  .home-brand { font-size: 12px; margin-bottom: 18px; }
  .home-title { font-size: 60px; letter-spacing: -1.4px; }
  .home-subtitle { font-size: 17px; color: var(--text-secondary); max-width: 360px; margin-bottom: 56px; }
  /* 入口恢复为内容宽度（原为 flex 列拉伸，1920px 下会变成整屏长条） */
  .home-entrance { align-self: flex-start; padding: 17px 42px; font-size: 15px; gap: 13px; margin-bottom: 44px; }
  .home-entrance-icon { font-size: 15px; }
  .home-stats { font-size: 14px; color: var(--text-tertiary); margin-bottom: 16px; }
  .home-preview { margin-top: 24px; }
  .home-preview-label { font-size: 11px; letter-spacing: 1.6px; margin-bottom: 12px; }
  .home-preview-text { font-size: 15.5px; line-height: 1.95; max-width: 620px; }
  .home-preview-time { font-size: 11.5px; margin-top: 14px; }
  .home-preview-image-link { max-width: 520px; }
  .home-preview-public { gap: 22px; margin-top: 20px; }
  .home-preview-public-label { font-size: 11px; letter-spacing: 1.5px; }
  .home-preview-public-opt { font-size: 13.5px; }
}

/* ═══════════════════════════════════════════
   Create
   ═══════════════════════════════════════════ */

.create-page { display: flex; flex-direction: column; min-height: 100vh; position: relative; z-index: 2; }
.create-header { padding: 72px 28px 0; max-width: 520px; margin: 0 auto; width: 100%; }
.create-prompt { font-size: 14px; color: var(--text-secondary); font-weight: 300; letter-spacing: 0.5px; margin-bottom: 32px; line-height: 1.6; }
.create-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 28px 40px; max-width: 520px; margin: 0 auto; width: 100%; }
.create-textarea-wrap { position: relative; min-height: 180px; background: rgba(25, 32, 43, 0.4); border-radius: var(--r-lg); padding: 16px 20px; border: 1px solid var(--border); }
.create-textarea { width: 100%; border: none; outline: none; font-size: 18px; font-family: inherit; line-height: 2; color: var(--text); background: transparent; resize: none; min-height: 140px; padding: 0; }
.create-textarea::placeholder { color: var(--text-tertiary); font-weight: 300; opacity: 0.6; }
.create-textarea:focus::placeholder { opacity: 0.2; }
.create-textarea-wrap::after { content: ''; position: absolute; bottom: 0; left: -16px; right: -16px; height: 80px; background: radial-gradient(ellipse at 50% 100%, var(--amber-glow) 0%, transparent 70%); pointer-events: none; opacity: 0; transition: opacity var(--norm); }
.create-textarea-wrap:focus-within::after { opacity: 1; }
.create-footer { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px 24px; max-width: 520px; margin: 0 auto; width: 100%; }
.create-stats { font-size: 12px; color: var(--text-tertiary); }
.create-submit { background: var(--bg-raised); border: 1px solid var(--border-light); font-size: 13px; font-family: inherit; color: var(--text); padding: 10px 28px; border-radius: var(--r-full); cursor: pointer; letter-spacing: 0.6px; transition: all var(--norm) var(--ease-apple); }
.create-submit:hover { border-color: var(--border-amber); color: var(--amber-dim); background: var(--amber-glow); }
.create-submit:disabled { opacity: 0.08; cursor: default; pointer-events: none; }
.create-submit.loading { pointer-events: none; }
.create-submit.loading .submit-text { display: none; }
.create-submit.loading .submit-spinner { display: inline-block; }
.submit-spinner { display: none; width: 14px; height: 14px; border: 2px solid var(--border-light); border-top-color: var(--text); border-radius: 50%; animation: spin 0.6s linear infinite; }

/* ── 照片（记录此刻）：极克制入口 + 仅选中后出现的预览 ── */
.create-photo-bar { display: flex; margin-top: 14px; }
.create-photo-add { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--border); color: var(--text-tertiary); font-family: inherit; font-size: 12px; letter-spacing: 0.6px; padding: 7px 15px; border-radius: var(--r-full); cursor: pointer; transition: all var(--norm) var(--ease-apple); }
.create-photo-add:hover { color: var(--text-secondary); border-color: var(--border-light); }
.create-photo-add svg { width: 14px; height: 14px; opacity: 0.75; }
.create-photo-preview { position: relative; margin-top: 14px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); background: rgba(25, 32, 43, 0.35); }
.create-photo-preview img { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.create-photo-actions { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.create-photo-actions button { background: rgba(10, 14, 20, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--border-light); color: var(--text-secondary); font-family: inherit; font-size: 11px; letter-spacing: 0.4px; padding: 5px 12px; border-radius: var(--r-full); cursor: pointer; transition: color var(--fast), border-color var(--fast); }
.create-photo-actions button:hover { color: var(--text); border-color: var(--border-amber); }
.create-echo { padding: 0 28px 80px; max-width: 520px; margin: 0 auto; width: 100%; }
.create-echo-divider { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; opacity: 0.12; }
.create-echo-divider-line { flex: 1; height: 1px; background: var(--text-muted); }
.create-echo-divider-text { font-size: 9px; color: var(--text-muted); letter-spacing: 2px; }
.echo-section { margin-bottom: 16px; }
.echo-label { font-size: 9px; color: var(--text-muted); letter-spacing: 1.5px; margin-bottom: 4px; opacity: 0.4; }
.echo-content { font-size: 14px; line-height: 1.7; color: var(--text-tertiary); white-space: pre-wrap; }
.echo-actions { display: flex; gap: 10px; margin-top: 20px; }
.echo-btn { flex: 1; padding: 10px 20px; border-radius: var(--r-full); font-size: 13px; font-family: inherit; cursor: pointer; letter-spacing: 0.3px; border: none; transition: all var(--fast); }
.echo-btn-save { background: var(--bg-raised); color: var(--text); }
.echo-btn-save:hover { background: var(--bg-hover); }
.echo-btn-dismiss { background: none; color: var(--text-muted); border: 1px solid var(--border); }
.echo-btn-dismiss:hover { border-color: var(--border-light); }
.success-bar { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(15, 18, 24, 0.92); backdrop-filter: blur(16px); color: var(--text); padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; z-index: 300; border-top: 1px solid var(--border); transform: translateY(100%); transition: transform var(--norm) var(--ease-apple); }
.success-bar.show { transform: translateY(0); }
.success-link { color: var(--amber-dim); text-decoration: none; font-size: 13px; }
.success-link:hover { color: var(--amber); }

/* ═══════════════════════════════════════════
   Record
   ═══════════════════════════════════════════ */

.record-page { padding: 72px 28px 80px; max-width: 560px; margin: 0 auto; width: 100%; min-height: 100vh; position: relative; z-index: 2; }
.record-header { margin-bottom: 36px; }
.record-time { font-size: 12px; color: var(--text-muted); letter-spacing: 0.3px; margin-top: 6px; }
.record-content { font-size: 18px; line-height: 2; color: var(--text); white-space: pre-wrap; margin-bottom: 36px; }
.record-divider { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; opacity: 0.1; }
.record-divider-line { flex: 1; height: 1px; background: var(--text-muted); }
.record-divider-text { font-size: 9px; color: var(--text-muted); letter-spacing: 2px; }
.record-echo { opacity: 0.65; margin-bottom: 36px; }
.record-explore-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--border-amber); font-size: 13px; font-family: inherit; color: var(--amber-dim); padding: 10px 24px; border-radius: var(--r-full); cursor: pointer; letter-spacing: 0.3px; text-decoration: none; transition: all var(--norm) var(--ease-apple); }
.record-explore-btn:hover { background: var(--amber-glow); color: var(--amber); border-color: rgba(150, 178, 200, 0.22); }

/* ═══════════════════════════════════════════
   Explore
   ═══════════════════════════════════════════ */

.explore-page { display: flex; flex-direction: column; min-height: 100vh; position: relative; z-index: 2; }
.explore-header { padding: 72px 28px 0; max-width: 560px; margin: 0 auto; width: 100%; }

/* Record context — the past moment being explored */
.explore-context {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 20px;
  padding: 20px 22px;
  background: rgba(25, 32, 43, 0.8);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--amber-line);
  backdrop-filter: blur(8px);
}

.explore-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px 28px 40px; max-width: 560px; margin: 0 auto; width: 100%; }

/* AI question — the main dialog */
.explore-question-wrap {
  background: rgba(30, 38, 50, 0.85);
  border-radius: var(--r-xl);
  padding: 28px 28px 24px;
  border: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
}
.explore-question { font-size: 20px; font-weight: 400; line-height: 1.8; color: var(--text); }
.explore-question-source { font-size: 11px; color: var(--text-tertiary); margin-top: 8px; }

/* Input area */
.explore-input-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  background: rgba(25, 32, 43, 0.7);
  padding: 14px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
}
.explore-input {
  flex: 1;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  outline: none;
}
.explore-input::placeholder { color: var(--text-tertiary); }
.explore-input:focus { border-color: var(--amber-line); }

.explore-send {
  background: var(--bg-raised);
  border: 1px solid var(--border-amber);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  padding: 8px 24px;
  border-radius: var(--r-full);
  cursor: pointer;
  white-space: nowrap;
}
.explore-send:hover { background: var(--bg-hover); color: var(--amber); }
.explore-send:disabled { opacity: 0.2; cursor: default; }

/* Conversation history — each turn as a dialog bubble */
.explore-history { margin-top: 32px; max-width: 560px; margin-left: auto; margin-right: auto; width: 100%; padding: 0 28px 40px; }

.explore-turn {
  padding: 20px 22px;
  margin-bottom: 12px;
  background: rgba(25, 32, 43, 0.6);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.explore-turn-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.explore-turn-label.is-user { color: var(--amber); }
.explore-turn-text { font-size: 14px; line-height: 1.8; color: var(--text-secondary); }
.explore-turn-text.is-user { color: var(--text); }

/* ═══════════════════════════════════════════
   加载指示 / 空状态图标 —— 被 report.js、world.js、record-view.js 共用，勿删
   ═══════════════════════════════════════════ */

.lookback-loading { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 60px 20px; }
.lookback-loading-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); animation: dotPulse 1.4s ease-in-out infinite; }
.lookback-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.lookback-loading-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%, 60%, 100% { opacity: 0.08; } 30% { opacity: 0.35; } }

.lookback-empty-icon { font-size: 20px; margin-bottom: 12px; opacity: 0.08; }

/* ── Toast & Common ── */

.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%); background: var(--bg-raised); backdrop-filter: blur(16px); color: var(--text); padding: 10px 22px; border-radius: var(--r-full); font-size: 13px; opacity: 0; transition: opacity var(--norm); pointer-events: none; z-index: 200; border: 1px solid var(--border-light); white-space: nowrap; }
.toast.show { opacity: 1; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border-light); border-top-color: var(--text-tertiary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn { display: inline-block; padding: 8px 22px; border-radius: var(--r-full); font-size: 13px; font-family: inherit; color: var(--text-tertiary); background: var(--bg-surface); border: 1px solid var(--border); text-decoration: none; cursor: pointer; letter-spacing: 0.3px; transition: all var(--fast); }
.btn:hover { background: var(--bg-raised); color: var(--text-secondary); }

@media (max-width: 640px) {
  .nav { padding: 14px 20px; }
  .nav-link { padding: 4px 12px; font-size: 12px; }
  .home-page { padding: 60px 20px 40px; }
  .home-title { font-size: 32px; }
  .home-entrance { padding: 12px 28px; }
  .create-header, .create-body, .create-footer, .create-echo, .record-page { padding-left: 20px; padding-right: 20px; }
  .create-textarea { font-size: 17px; }
  .fragment-card { padding: 20px 16px; }
  .explore-question { font-size: 18px; }
  .explore-header, .explore-body, .explore-history { padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ═══════════════════════════════════════════
   Report (档案) — 状态快照 + 模式观察
   ═══════════════════════════════════════════ */

.report-page { padding: 72px 28px 100px; max-width: 620px; margin: 0 auto; width: 100%; min-height: 100vh; position: relative; z-index: 2; }
.report-head { margin-bottom: 28px; }

/* ── 档案 = 「时间阶段」列表（阶段默认收起，点开才看到那段时间的 AI 提炼与记录） ──
   点开一个阶段后，先摆「阶段总结」（已有的 AI 提炼收敛成标题 + 一句短事实），
   再摆「记录」（每条只给预览，完整内容在「查看」窗口里）。
   阶段报告不再单独成节 —— 它就在所属阶段内，点「查看阶段报告」才完全展开。
   记录行沿用档案原有的 .report-archive-* 样式，不另立一套。 */

.report-title { font-size: 28px; font-weight: 300; letter-spacing: -0.3px; color: var(--text); margin-bottom: 4px; }
.report-subtitle { font-size: 14px; color: var(--text-tertiary); font-weight: 300; margin-bottom: 18px; }

.report-range { display: flex; gap: 6px; }
.report-range-btn {
  padding: 5px 14px; border-radius: var(--r-full); font-size: 12px; font-family: inherit;
  color: var(--text-tertiary); background: none; border: 1px solid var(--border); cursor: pointer;
  transition: all var(--fast);
}
.report-range-btn:hover { color: var(--text); border-color: var(--border-light); }
.report-range-btn.active { color: var(--text); background: var(--bg-raised); border-color: var(--border-amber); }

.report-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.report-empty h2 { font-size: 16px; font-weight: 400; color: var(--text-tertiary); margin-bottom: 4px; }
.report-empty p { font-size: 13px; }

.report-section { margin-bottom: 36px; }
.report-section-label {
  font-size: 10px; color: var(--text-tertiary); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 14px; opacity: 0.6;
}

/* Stat grid */
.report-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.report-stat {
  padding: 14px 8px; background: rgba(16, 20, 30, 0.5); border: 1px solid var(--border);
  border-radius: var(--r); text-align: center; min-height: 92px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.report-stat-num {
  font-size: 26px; font-weight: 350; color: var(--text); letter-spacing: -0.3px;
  line-height: 1.2; white-space: nowrap;
}
.report-stat-num em { font-style: normal; font-size: 13px; color: var(--text-tertiary); font-weight: 300; }
.report-stat-label { font-size: 10px; color: var(--text-muted); letter-spacing: 0.5px; margin-top: 5px; white-space: nowrap; }
.report-stat-sub { font-size: 10px; color: var(--text-tertiary); opacity: 0.6; margin-top: 3px; white-space: nowrap; }

/* Valence trend */
.report-trend { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding-top: 4px; }
.report-trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.report-trend-bar {
  width: 100%; max-width: 22px; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(160, 186, 204, 0.55), rgba(160, 186, 204, 0.25));
  min-height: 2px;
}
.report-trend-label { font-size: 9px; color: var(--text-muted); opacity: 0.5; transform: scale(0.9); white-space: nowrap; }
.report-trend-axis { font-size: 9px; color: var(--text-muted); opacity: 0.6; margin-bottom: 2px; }

/* Topic rows */
.report-topic { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.report-topic:last-child { border-bottom: none; }
.report-topic-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.report-topic-name { font-size: 14px; color: var(--text-secondary); }
.report-topic-meta { font-size: 12px; color: var(--text-muted); }
.report-topic-meta .val { color: var(--amber); }
.report-topic-track { height: 2px; background: rgba(255, 255, 255, 0.06); border-radius: 2px; overflow: hidden; }
.report-topic-fill { height: 100%; background: rgba(160, 186, 204, 0.32); border-radius: 2px; }

/* Patterns */
.report-pattern {
  padding: 14px 16px; margin-bottom: 8px; background: rgba(16, 20, 30, 0.4);
  border-radius: var(--r); border-left: 2px solid rgba(160, 186, 204, 0.25); font-size: 13px; line-height: 1.7; color: var(--text-secondary);
}
.report-note { font-size: 11px; color: var(--text-muted); line-height: 1.7; margin-top: 12px; opacity: 0.7; }

/* AI reflect */
.report-ai-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.report-ai-btn {
  padding: 10px 22px; border-radius: var(--r-full); font-size: 13px; font-family: inherit; cursor: pointer;
  border: 1px solid var(--border-amber); background: none; color: var(--text-secondary);
  transition: all var(--norm);
}
.report-ai-btn:hover { background: var(--amber-glow); color: var(--text); }
.report-ai-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.report-ai-card {
  margin-top: 14px; padding: 20px 22px; background: rgba(16, 20, 30, 0.5);
  border: 1px solid var(--border); border-radius: var(--r-lg); font-size: 14px; line-height: 1.9; color: var(--text);
  animation: cardEnter 0.5s var(--ease-apple) both;
}
.report-ai-narrative { white-space: pre-wrap; }
.report-ai-card .dir-title { font-size: 10px; color: var(--text-tertiary); letter-spacing: 2px; margin: 16px 0 8px; opacity: 0.7; }
.report-ai-card ul { margin: 0; padding-left: 18px; }
.report-ai-card li { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }

/* ═══════════════════════════════════════════
   Report — 入口式信息架构（默认全部收起）
   ═══════════════════════════════════════════ */

.report-lede {
  font-size: 13.5px; color: var(--text-tertiary); line-height: 1.9;
  margin: 0 0 16px; max-width: 520px; font-weight: 300;
}

.report-summary {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px 12px; padding: 14px 18px; margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--r);
  background: rgba(16, 20, 30, 0.3);
  font-size: 12.5px; color: var(--text-muted); letter-spacing: .2px;
}
.report-summary b { font-weight: 400; color: var(--text-secondary); margin: 0 3px; }
.report-summary .sep { opacity: .35; padding: 0 2px; }
.report-summary-sub { opacity: .55; margin-left: 4px; }

.report-shelf {
  display: flex; flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.report-entry { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }

.report-entry-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 18px 2px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; text-align: left; color: inherit;
  transition: color var(--fast);
}
.report-entry-head:hover .report-entry-name { color: var(--text); }
.report-entry-head:focus { outline: none; }
.report-entry-head:focus-visible .report-entry-name { color: var(--text); }

.report-entry-titles {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.report-entry-name {
  font-size: 17px; font-weight: 300; color: var(--text-secondary);
  letter-spacing: -.1px; transition: color var(--fast);
}
.report-entry-sub {
  font-size: 12px; color: var(--text-muted); letter-spacing: .15px; line-height: 1.5;
}

.report-entry-arrow {
  flex-shrink: 0; color: var(--text-muted); opacity: .55;
  width: 14px; height: 14px;
  transform: rotate(90deg); transform-origin: center;
  transition: transform .45s var(--ease-apple), opacity var(--norm);
}
.report-entry.open .report-entry-arrow { opacity: .95; transform: rotate(-90deg); }
.report-entry.open .report-entry-name { color: var(--text); }

/* Grid-row 动画：0fr ⇄ 1fr，纯 CSS 高度过渡 */
.report-entry-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease-apple);
}
.report-entry.open .report-entry-panel { grid-template-rows: 1fr; }
.report-entry-inner {
  min-height: 0; overflow: hidden;
  padding: 0 0 0 0;
}
.report-entry.open .report-entry-inner { padding: 4px 0 24px; }

/* 复用旧样式时，entry 内部 section 不再吃大块 margin */
.report-entry-inner .report-section { margin-bottom: 0; }
.report-entry-inner .report-section + .report-section { margin-top: 22px; }
.report-entry-inner .report-divider {
  height: 1px; background: rgba(255, 255, 255, 0.05); margin: 22px 0 18px;
}
.report-entry-inner .report-note { margin-top: 14px; }

/* entry 3 / 4 内不再需要重复的副提示：入口 sub 已经说清楚了 */
.report-entry-inner .report-obs-hint { display: none; }
.report-entry-inner .report-ai-actions { margin-top: 4px; }
.report-entry-inner .report-ai-card { margin-top: 14px; }
.report-entry-inner .report-obs-card { margin-top: 14px; }

/* legacy 提示行 — 独立于抽屉 */
.report-legacy {
  margin-top: 24px; padding: 14px 18px;
  border: 1px dashed var(--border); border-radius: var(--r);
  font-size: 12.5px; color: var(--text-muted); line-height: 1.85;
}
.report-legacy .report-ai-btn { margin-top: 10px; padding: 8px 18px; font-size: 12px; }

/* 窄屏微调 */
@media (max-width: 560px) {
  .report-page { padding-left: 18px; padding-right: 18px; }
  .report-summary { gap: 8px 10px; font-size: 12px; padding: 12px 14px; }
  .report-entry-head { padding: 16px 0; }
  .report-entry-name { font-size: 16px; }
  .report-entry-sub { font-size: 11.5px; }
  .report-open .report-entry-inner,
  .report-entry.open .report-entry-inner { padding-bottom: 18px; }
}

/* ═══════════════════════════════════════════
   Report — 阶段报告档案（固定阶段 → 静默观察 → 落盘）
   ═══════════════════════════════════════════ */

.report-new-hint {
  font-size: 12.5px; color: var(--amber-dim); letter-spacing: .3px;
  margin: 0 0 18px; opacity: .9;
}
.phase-dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--amber); margin-right: 9px; vertical-align: 2px;
  box-shadow: 0 0 8px rgba(160, 186, 204, 0.5);
}

/* 未到期的阶段：静置展示，不提供任何点击/管理 */
.report-entry-static .report-entry-head { cursor: default; }
.report-entry-static:hover .report-entry-name { color: var(--text-secondary); }
.report-entry-static .report-entry-sub { color: var(--text-muted); }

.report-phase-detail { padding-top: 6px; }
.report-phase-range {
  font-size: 12px; color: var(--text-muted); letter-spacing: .4px;
  margin-bottom: 16px; font-variant-numeric: tabular-nums;
}
.report-phase-lede {
  font-size: 14px; color: var(--text-secondary); line-height: 1.9;
  font-weight: 300; margin: 0 0 4px; letter-spacing: .2px;
}
.report-phase-block { margin-top: 20px; }
.report-phase-block-title {
  font-size: 10px; color: var(--amber-dim); letter-spacing: 3px;
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px; opacity: .85;
}
.report-phase-block-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.report-phase-item { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.report-phase-item:last-of-type { border-bottom: none; }
.report-phase-text { font-size: 13.5px; color: var(--text); line-height: 1.85; }
.report-phase-evs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.report-phase-ev {
  display: flex; align-items: baseline; gap: 10px; text-decoration: none;
  padding: 7px 12px; background: rgba(150, 178, 200, 0.05);
  border: 1px solid rgba(150, 178, 200, 0.1); border-radius: var(--r-sm);
  transition: all var(--norm);
}
.report-phase-ev:hover { background: rgba(150, 178, 200, 0.1); border-color: rgba(150, 178, 200, 0.3); }
.report-phase-ev-date { font-size: 10px; color: var(--amber-dim); letter-spacing: .5px; white-space: nowrap; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.report-phase-ev-snip {
  font-size: 12px; color: var(--text-tertiary); line-height: 1.7;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.report-phase-note { font-size: 13px; color: var(--text-tertiary); line-height: 1.95; opacity: .9; }
.report-phase-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 10.5px; color: var(--text-muted); opacity: .55; letter-spacing: .2px; line-height: 1.8;
}

/* ── 「值得回看的内容」：默认只给看懂所需的最小信息，点击后才展开记录 ──
   信息层级：标题 → 一句短事实 → 记录数量 / 日期 → 查看记录 →（展开）记录 →（有变化时）前 / 后 */
.report-moment { margin-top: 52px; }
.report-moment:first-of-type { margin-top: 36px; }
.report-moment-title {
  font-size: 17px; color: var(--text); font-weight: 400;
  letter-spacing: .1px; line-height: 1.6; margin: 0 0 10px;
}
.report-moment-text {
  font-size: 13px; color: var(--text-secondary); line-height: 1.9;
  margin: 0; max-width: 44ch;
}
/* 记录数量与日期范围：弱信息 */
.report-moment-meta {
  margin-top: 14px; font-size: 10.5px; color: var(--text-muted);
  letter-spacing: .3px; opacity: .55; font-variant-numeric: tabular-nums;
}
/* 「查看记录」：轻量文字交互，不做成按钮 */
.report-moment-more {
  margin-top: 15px; padding: 0; background: none; border: none;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 11.5px; letter-spacing: .4px;
  color: var(--text-tertiary); cursor: pointer;
  transition: color var(--norm);
}
.report-moment-more:hover, .report-moment-more:focus-visible { color: var(--text); }
.report-moment-more:focus { outline: none; }
.report-moment-more-arrow {
  width: 12px; height: 12px; opacity: .55;
  transition: transform .4s var(--ease-apple), opacity var(--norm);
}
.report-moment.open .report-moment-more { color: var(--text-secondary); }
.report-moment.open .report-moment-more-arrow { transform: translateX(2px); opacity: .9; }

/* 展开：grid-row 动画，与阶段条目同一套语言 */
.report-moment-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease-apple);
}
.report-moment.open .report-moment-panel { grid-template-rows: 1fr; }
.report-moment-panel-inner { min-height: 0; overflow: hidden; }

.report-recs { padding-top: 15px; }
.report-rec {
  display: flex; align-items: baseline; gap: 12px;
  padding: 7px 0; text-decoration: none;
}
.report-rec-date {
  width: 62px; flex-shrink: 0;
  font-size: 10px; color: var(--text-muted); opacity: .75;
  letter-spacing: .3px; white-space: nowrap; font-variant-numeric: tabular-nums;
  transition: color var(--norm), opacity var(--norm);
}
.report-rec:hover .report-rec-date { color: var(--amber-dim); opacity: 1; }
.report-rec-snip {
  font-size: 12.5px; color: var(--text-tertiary); line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; transition: color var(--norm);
}
.report-rec:hover .report-rec-snip { color: var(--text-secondary); }

/* 记录超过 3 条时，多出来的先折叠 */
.report-recs-rest { display: none; }
.report-recs-rest.is-open { display: block; }
.report-recs-all {
  margin-top: 11px; padding: 0; background: none; border: none;
  font-family: inherit; font-size: 11px; letter-spacing: .3px;
  color: var(--text-muted); cursor: pointer; transition: color var(--norm);
}
.report-recs-all:hover { color: var(--text-secondary); }

/* 变化：由前 / 后两条记录本身体现；最多再补一句很短的小字 */
.report-moment-change {
  margin-top: 24px; padding-left: 14px;
  border-left: 1px solid var(--border-amber);
}
.report-moment-change-label {
  font-size: 9.5px; color: var(--amber-dim); letter-spacing: 3px;
  margin-bottom: 13px; opacity: .85;
}
.report-moment-change-hint {
  font-size: 12px; color: var(--text-tertiary); line-height: 1.85;
  margin: 0 0 15px; max-width: 42ch;
}
.report-change-item { padding: 1px 0; }
.report-change-side {
  font-size: 9px; color: var(--amber-dim); letter-spacing: 1px;
  border: 1px solid var(--border-amber); border-radius: 3px;
  padding: 0 4px; margin-right: 8px;
}
.report-change-date {
  font-size: 10px; color: var(--text-muted); letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}
.report-change-snip {
  display: block; margin-top: 7px; max-width: 42ch;
  font-size: 12.5px; color: var(--text-secondary); line-height: 1.85;
}
.report-change-arrow {
  padding: 5px 0; font-size: 12px; color: var(--text-muted); opacity: .45;
}
.report-change-link {
  display: inline-block; margin-top: 12px;
  font-size: 11.5px; letter-spacing: .3px;
  color: var(--text-tertiary); text-decoration: none;
  transition: color var(--norm);
}
.report-change-link:hover { color: var(--text); }

/* ── 阶段展开后的记录条目：只给「简短预览」，完整内容在「查看」窗口里 ── */
.report-archive-list { display: flex; flex-direction: column; margin-top: 2px; }
.report-archive-item {
  display: block; text-decoration: none;
  padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.report-archive-item:last-child { border-bottom: none; }
.report-archive-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.report-archive-date {
  font-size: 10.5px; color: var(--amber-dim); letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.report-archive-flag {
  font-size: 9.5px; color: var(--text-muted); letter-spacing: .6px;
  border: 1px solid var(--border); border-radius: 4px;
  padding: 0 5px; line-height: 1.65;
}
.report-archive-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px; color: var(--text-secondary); line-height: 1.85;
  white-space: pre-wrap; word-break: break-word;
  transition: color var(--norm);
}
.report-archive-item:hover .report-archive-text { color: var(--text); }
/* 「查看」：记录行上唯一的新增入口；完整内容在查看窗口里，行本身不展开 */
.report-archive-view {
  margin-left: auto;
  background: none; border: 1px solid var(--border);
  color: var(--text-tertiary); font-family: inherit; font-size: 11px;
  letter-spacing: .5px; padding: 3px 12px; border-radius: var(--r-full);
  cursor: pointer; transition: all var(--fast);
}
.report-archive-view:hover { color: var(--text); border-color: var(--border-light); }

/* ── 阶段展开后的「阶段总结」：这一阶段 AI 看到了什么 ──
   只收敛已经生成好的 moments（标题 + 一句短事实），完整报告点开才给。
   还没有报告的阶段（active / 未生成）不摆这一段，不编造 AI 内容。 */
.report-phase-ai { margin-top: 18px; }
.report-phase-ai-item { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.report-phase-ai-item:last-of-type { border-bottom: none; }
.report-phase-ai-title {
  font-size: 15px; color: var(--text); font-weight: 400;
  letter-spacing: .1px; line-height: 1.65; margin: 0 0 7px;
}
.report-phase-ai-text {
  font-size: 13px; color: var(--text-secondary); line-height: 1.9;
  margin: 0; max-width: 44ch;
}
/* 「查看阶段报告」：轻量文字交互，与「查看记录」同一套语言 */
.report-phase-ai-more {
  margin-top: 15px; padding: 0; background: none; border: none;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 11.5px; letter-spacing: .4px;
  color: var(--text-tertiary); cursor: pointer;
  transition: color var(--norm);
}
.report-phase-ai-more:hover, .report-phase-ai-more:focus-visible { color: var(--text); }
.report-phase-ai-more:focus { outline: none; }
.report-phase-ai-more svg {
  width: 12px; height: 12px; opacity: .55;
  transition: transform .4s var(--ease-apple), opacity var(--norm);
}
.report-phase-ai.open .report-phase-ai-more { color: var(--text-secondary); }
.report-phase-ai.open .report-phase-ai-more svg { transform: translateX(2px); opacity: .9; }
/* 完整报告：grid-row 动画，与阶段条目 / moment 同一套语言 */
.report-phase-ai-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease-apple);
}
.report-phase-ai.open .report-phase-ai-panel { grid-template-rows: 1fr; }
.report-phase-ai-panel-inner { min-height: 0; overflow: hidden; }
.report-phase-ai-panel-inner .report-phase-range { margin-top: 24px; }
/* 「记录」小节跟在总结之后，拉开一点距离 */
.report-phase-ai + .report-phase-block { margin-top: 34px; }

@media (max-width: 640px) {
  .report-phase-ai-title { font-size: 14.5px; }
  .report-phase-ai-text { font-size: 12.5px; }
  .report-phase-ai + .report-phase-block { margin-top: 28px; }
}

/* ── Background layers must be FIXED & non-flowing ── */
.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-rising {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-ember {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  animation: bgRise var(--rise-duration, 22s) linear var(--rise-delay, 0s) infinite;
  will-change: transform, opacity;
}

@keyframes bgRise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  8%   { opacity: 1; }
  100% { transform: translateY(-110vh) translateX(var(--rise-drift-x, 0px)); opacity: 0; }
}

/* ═══════════════════════════════════════════
   Report — AI 观察（读原文 · 带证据）
   ═══════════════════════════════════════════ */

.report-obs-hint { font-size: 14px; color: var(--text-tertiary); line-height: 1.8; margin-top: 2px; }

.report-obs-loading { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 34px 0 12px; }

.report-obs-card {
  margin-top: 16px; padding: 22px 22px 16px; background: rgba(16, 20, 30, 0.5);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  animation: cardEnter 0.5s var(--ease-apple) both;
}

.report-obs-group { margin-bottom: 20px; }
.report-obs-group:last-of-type { margin-bottom: 6px; }

.report-obs-group-title {
  font-size: 10px; color: var(--amber-dim); letter-spacing: 2.5px; opacity: 0.9;
  margin-bottom: 10px; display: flex; align-items: center; gap: 10px;
}
.report-obs-group-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.report-obs-item { padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.report-obs-group .report-obs-item:first-of-type { border-top: none; padding-top: 2px; }

.report-obs-text { font-size: 13.5px; line-height: 1.85; color: var(--text); }

.report-obs-evs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }

.report-obs-ev {
  display: flex; align-items: baseline; gap: 10px; text-decoration: none;
  padding: 7px 12px; background: rgba(150, 178, 200, 0.05);
  border: 1px solid rgba(150, 178, 200, 0.1); border-radius: var(--r-sm);
  transition: all var(--norm);
}
.report-obs-ev:hover { background: rgba(150, 178, 200, 0.1); border-color: rgba(150, 178, 200, 0.3); }
.report-obs-ev-date { font-size: 10px; color: var(--amber-dim); letter-spacing: 0.5px; white-space: nowrap; flex-shrink: 0; }
.report-obs-ev-snip {
  font-size: 12px; color: var(--text-tertiary); line-height: 1.7;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

.report-obs-empty { font-size: 12.5px; color: var(--text-muted); line-height: 1.8; opacity: 0.85; }
.report-obs-weak {
  margin: 4px 0 2px; padding: 10px 14px; font-size: 12px; color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03); border-radius: var(--r-sm); line-height: 1.7;
}
.report-obs-foot { margin-top: 14px; font-size: 10.5px; color: var(--text-muted); opacity: 0.55; letter-spacing: 0.2px; }

.report-obs-state { margin-top: 14px; padding: 18px 20px; border: 1px dashed var(--border); border-radius: var(--r); }
.report-obs-state p { font-size: 13px; color: var(--text-muted); line-height: 1.8; }

/* ═══════════════════════════════════════════
   Multi-user — nav user & login page
   ═══════════════════════════════════════════ */

.nav-user { display: flex; align-items: center; gap: 12px; margin-left: 4px; }
.nav-user-name {
  font-size: 12px; color: var(--text-tertiary); letter-spacing: 0.3px;
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-user-logout {
  background: none; border: none; font-family: inherit; cursor: pointer;
  font-size: 12px; color: var(--text-muted); padding: 5px 10px; border-radius: var(--r-full);
  transition: all var(--fast);
}
.nav-user-logout:hover { color: var(--text); background: var(--bg-surface); }
.nav-user-logout:disabled { opacity: 0.3; pointer-events: none; }

.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 96px 24px 60px; position: relative; z-index: 2;
}
.login-card {
  width: 100%; max-width: 380px; padding: 34px 30px 26px;
  background: rgba(16, 20, 30, 0.55); border: 1px solid var(--border);
  border-radius: var(--r-xl); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow);
  animation: cardEnter 0.6s var(--ease-apple) both;
}
.login-brand { font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif; font-size: 18px; font-weight: 400; letter-spacing: .16em; text-align: center; color: var(--text); }
.login-brand span { color: inherit; letter-spacing: 0; margin-left: -.03em; }
.login-tagline { text-align: center; font-size: 12px; color: var(--text-muted); margin: 8px 0 26px; font-weight: 300; }
.login-panel { display: flex; flex-direction: column; gap: 10px; }
.login-panel-title { font-size: 10px; color: var(--text-tertiary); letter-spacing: 2.5px; margin-bottom: 2px; opacity: 0.7; }
.login-input {
  background: rgba(25, 32, 43, 0.45); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font-family: inherit; font-size: 14px; padding: 11px 14px; outline: none;
  transition: border-color var(--fast);
}
.login-input::placeholder { color: var(--text-muted); opacity: 0.45; font-weight: 300; }
.login-input:focus { border-color: var(--border-amber); }
.login-error { min-height: 16px; font-size: 12px; color: #C08080; line-height: 1.5; }
.login-btn {
  padding: 11px 0; border-radius: var(--r-full); font-size: 13px; font-family: inherit; cursor: pointer;
  border: 1px solid var(--border-amber); background: var(--bg-raised); color: var(--text);
  letter-spacing: 0.8px; transition: all var(--norm);
}
.login-btn:hover { border-color: var(--amber); box-shadow: 0 0 20px rgba(150, 178, 200, 0.12); }
.login-btn:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.login-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; opacity: 0.35; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }
.login-divider span { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; }
.login-foot { text-align: center; font-size: 10.5px; color: var(--text-muted); opacity: 0.5; margin-top: 24px; line-height: 1.8; }

/* ── 登录页：登录 / 创建账号 单一表单区切换 ── */
.login-tabs { display: flex; border-bottom: 1px solid var(--border); margin: 0 0 26px; }
.login-tab {
  flex: 1; padding: 9px 0 13px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; letter-spacing: 2px; color: var(--text-muted);
  border-bottom: 1px solid transparent; margin-bottom: -1px;
  transition: color 0.2s var(--ease-apple), border-color 0.2s var(--ease-apple);
}
.login-tab:hover { color: var(--text-secondary); }
.login-tab.is-active { color: var(--text); border-bottom-color: var(--amber-dim); }
.login-tab:disabled { opacity: 0.35; pointer-events: none; }

.login-panel { position: relative; transition: opacity 0.16s var(--ease-apple), transform 0.16s var(--ease-apple); }
.login-panel.is-switching { opacity: 0.45; transform: translateY(4px); }
.login-fields { display: flex; flex-direction: column; gap: 10px; }
.login-confirm { display: flex; flex-direction: column; }
.login-confirm.is-hidden { display: none; }

/* ═══════════════════════════════════════════════════════
   世界 — 很多人的生活，散落在这里
   继承整体视觉：深色、留白、安静、克制。
   首页是一批「不同的人」的片段，错落地摆开；不做卡片墙、不做网格、不做社交身份。
   ═══════════════════════════════════════════════════════ */

.world-page { padding: 72px 28px 100px; max-width: 620px; margin: 0 auto; width: 100%; min-height: 100vh; position: relative; z-index: 2; }

.world-title { font-size: 28px; font-weight: 300; letter-spacing: -0.3px; color: var(--text); margin-bottom: 4px; }
.world-subtitle { font-size: 14px; color: var(--text-tertiary); font-weight: 300; margin-bottom: 40px; }

.world-back { margin-bottom: 20px; }

.world-divider { display: flex; align-items: center; gap: 16px; margin: 8px 0 26px; opacity: 0.1; }
.world-divider span { flex: 1; height: 1px; background: var(--text-muted); }

.world-more {
  display: inline-block; font-size: 13px; color: var(--amber-dim);
  text-decoration: none; letter-spacing: 0.3px; transition: color var(--fast);
}
.world-more:hover { color: var(--amber); }

/* ── 世界首页：一片错落的空间，不是一列卡片 ── */
.world-space { display: flex; flex-direction: column; gap: 64px; margin-top: 8px; }

.world-fragment { display: block; max-width: 38em; margin-left: 0; }
a.world-fragment { text-decoration: none; color: inherit; cursor: pointer; }
.world-fragment-text {
  font-size: 19px; line-height: 2.05; color: var(--text); font-weight: 300;
  white-space: pre-wrap; margin: 0;
}
/* 版式节奏：大小、缩进、留白轻微错开，让「很多人在各自生活」被感觉到 */
.world-fragment[data-v="1"] { margin-left: 10%; max-width: 30em; }
.world-fragment[data-v="1"] .world-fragment-text { font-size: 16px; color: var(--text-secondary); }
.world-fragment[data-v="2"] { margin-left: 22%; max-width: 25em; }
.world-fragment[data-v="2"] .world-fragment-text { font-size: 15px; color: var(--text-tertiary); line-height: 2; }
.world-fragment[data-v="3"] { margin-left: 4%; max-width: 33em; }
.world-fragment[data-v="3"] .world-fragment-text { font-size: 17px; color: var(--text-secondary); }

.world-fragment-foot { display: flex; align-items: baseline; gap: 16px; margin-top: 14px; min-height: 16px; }
.world-fragment-date { font-size: 12px; color: var(--text-muted); letter-spacing: 0.3px; }
.world-fragment-enter { font-size: 13px; color: var(--amber-dim); letter-spacing: 0.3px; text-decoration: none; transition: color var(--fast); }
a.world-fragment:hover .world-fragment-enter { color: var(--amber); }
a.world-fragment:hover .world-fragment-text { color: var(--text); }

/* 公开照片：作者主动公开的那一张，安静地摆在那里，不做封面不做瀑布流 */
.world-photo {
  display: block; width: 100%; max-width: 340px; height: auto;
  border-radius: var(--r-sm); opacity: 0.94;
}
.world-fragment-photo { margin: 0 0 0 0; }
.world-fragment .world-fragment-photo { margin-top: 16px; }
.world-fragment[data-v="2"] .world-photo { max-width: 240px; }
.world-fragment[data-v="1"] .world-photo { max-width: 300px; }

/* 一批的收尾：换一批 / 到尽头，都很克制，不做无限加载 */
.world-foot { margin-top: 76px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.world-foot-line { font-size: 14px; color: var(--text-muted); font-weight: 300; margin: 0; }
.world-batch {
  font-family: inherit; font-size: 13px; letter-spacing: 0.3px;
  color: var(--text-tertiary); background: none;
  border: 1px solid var(--border); border-radius: var(--r-full);
  padding: 8px 20px; cursor: pointer; transition: all var(--fast) var(--ease-out);
}
.world-batch:hover:not(:disabled) { color: var(--text); border-color: var(--border-light); }
.world-batch:disabled { opacity: 0.45; cursor: default; }

/* 一个人的生活：只展开最近的一段 */
.world-person-title { font-size: 22px; font-weight: 300; color: var(--text); letter-spacing: -0.2px; margin-bottom: 4px; }
.world-records { display: flex; flex-direction: column; gap: 40px; margin-top: 8px; }
.world-record-date { font-size: 12px; color: var(--text-muted); letter-spacing: 0.3px; margin-bottom: 8px; }
.world-record-content { font-size: 16px; line-height: 2; color: var(--text-secondary); white-space: pre-wrap; max-width: 40em; }
.world-record .world-fragment-photo { margin-top: 14px; }

/* 动作区：一组很轻的进入 / 离开方式 */
.world-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 28px; }

/* 内容被替换：很轻地浮现一下，让「确实换了」被看见（不是重新设计版面） */
#worldBody.is-swap > * { animation: fadeIn .4s var(--ease-apple) both; }

/* 自然结束点 */
.world-end { margin-top: 40px; }
.world-end-line { font-size: 15px; color: var(--text-tertiary); font-weight: 300; line-height: 2; margin: 0; }
.world-end-hint { font-size: 13px; color: var(--text-muted); font-weight: 300; margin: 10px 0 0; }
.world-end .world-actions { margin-top: 28px; }

@media (max-width: 640px) {
  .world-page { padding: 64px 20px 80px; }
  .world-space { gap: 52px; }
  /* 手机上不缩进：留白靠间距，不靠偏移，避免窄屏别扭 */
  .world-fragment,
  .world-fragment[data-v="1"], .world-fragment[data-v="2"], .world-fragment[data-v="3"] { margin-left: 0; max-width: 100%; }
  .world-fragment-text { font-size: 17px; line-height: 1.95; }
  .world-fragment[data-v="1"] .world-fragment-text,
  .world-fragment[data-v="3"] .world-fragment-text { font-size: 16px; }
  .world-fragment[data-v="2"] .world-fragment-text { font-size: 15px; }
  .world-photo { max-width: 100%; }
  .world-record-content { font-size: 15px; line-height: 1.9; }
}

/* ── 记录公开控制：极克制的可见范围开关 ── */
.record-public { margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--border); }
.record-public-label { font-size: 11px; color: var(--text-muted); letter-spacing: 1.5px; margin-bottom: 16px; }
.record-public-control { display: flex; flex-direction: column; gap: 10px; }
.record-public-opt {
  display: flex; align-items: center; gap: 12px; background: none; border: none;
  padding: 10px 0; cursor: pointer; font-family: inherit; font-size: 14px;
  color: var(--text-tertiary); letter-spacing: 0.3px; text-align: left;
  transition: color var(--fast);
}
.record-public-opt:hover { color: var(--text-secondary); }
.record-public-opt.is-active { color: var(--text); }
.record-public-radio { font-size: 12px; color: var(--amber-dim); width: 16px; text-align: center; }
.record-public-opt.is-active .record-public-radio { color: var(--amber); }
.record-public-note { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* ── 上传到世界 · 轻量确认层 ──
   极简暗色玻璃拟态，只交代一件事，不做夸张弹窗。 */
.public-confirm-overlay {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(6, 8, 12, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: public-confirm-fade var(--norm) var(--ease-out);
}
.public-confirm {
  width: 100%; max-width: 360px;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 28px 26px 22px;
  box-shadow: var(--shadow);
  animation: public-confirm-rise var(--norm) var(--ease-apple);
}
.public-confirm-title { font-size: 16px; color: var(--text); letter-spacing: .3px; margin-bottom: 14px; }
.public-confirm-text { font-size: 13.5px; line-height: 1.9; color: var(--text-secondary); margin-bottom: 26px; }
.public-confirm-actions { display: flex; gap: 10px; }
.public-confirm-btn {
  flex: 1; font-family: inherit; font-size: 13px; letter-spacing: .3px;
  padding: 10px 0; border-radius: var(--r-full); cursor: pointer;
  transition: all var(--fast);
}
.public-confirm-cancel { background: transparent; border: 1px solid var(--border); color: var(--text-tertiary); }
.public-confirm-cancel:hover { color: var(--text); border-color: var(--border-light); }
.public-confirm-ok { background: var(--bg-hover); border: 1px solid var(--border-amber); color: var(--text); }
.public-confirm-ok:hover { border-color: var(--amber-dim); }
.public-confirm-ok:disabled { opacity: .55; cursor: default; }

@keyframes public-confirm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes public-confirm-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 640px) {
  .public-confirm-overlay { padding: 20px; align-items: center; }
  .public-confirm { max-width: none; }
}

/* ── 记录查看窗口 ──
   档案列表点「查看」后打开：完整正文 + 图片 + 时间 + 可见范围。
   与列表分离的独立一层，关闭即回到原来的档案列表。 */
.record-viewer-overlay {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
  background: rgba(6, 8, 12, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: public-confirm-fade var(--norm) var(--ease-out);
}
.record-viewer {
  position: relative;
  width: 100%; max-width: 620px; max-height: 86vh;
  overflow-y: auto;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 44px 36px 36px;
  animation: public-confirm-rise var(--norm) var(--ease-apple);
}
.record-viewer-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  border-radius: var(--r-full); transition: color var(--fast);
}
.record-viewer-close:hover { color: var(--text); }
.record-viewer-close svg { width: 18px; height: 18px; }
.record-viewer-loading { display: flex; gap: 6px; justify-content: center; padding: 36px 0; }
.record-viewer-time { font-size: 12px; color: var(--text-muted); letter-spacing: .3px; margin-bottom: 22px; }
.record-viewer-content { font-size: 16px; line-height: 1.95; color: var(--text); white-space: pre-wrap; margin-bottom: 28px; }
.record-viewer-content:last-child { margin-bottom: 0; }
.record-viewer-image { margin-bottom: 28px; border-radius: var(--r); overflow: hidden; }
.record-viewer-image img { display: block; width: 100%; height: auto; }
.record-viewer-public { padding-top: 26px; border-top: 1px solid var(--border); }
body.record-viewer-lock { overflow: hidden; }

@media (max-width: 640px) {
  .record-viewer-overlay { padding: 16px; }
  .record-viewer { max-height: 88vh; padding: 36px 22px 28px; }
  .record-viewer-content { font-size: 15px; line-height: 1.9; }
}
