/* Ethan OS — 布局与组件 · 配色见 themes.css */

:root {
  --chat-max: 820px;
  --sheet-w: min(560px, 44vw);
  --dock-h: 72px;
  --composer-h: 76px;
  --radius-pill: 999px;
}

body { font-family: var(--font-body); }

.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background:
    radial-gradient(ellipse 85% 75% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.45) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0px, rgba(0, 0, 0, 0.12) 1px, transparent 1px, transparent 3px);
  opacity: 0.35;
  mix-blend-mode: multiply;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* —— Topbar：大问候 + 状态胶囊 —— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 40px) 12px;
  flex-shrink: 0;
  background: transparent;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.topbar-right { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.chat-history-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06); color: var(--muted); font-size: 16px; cursor: pointer;
}
.chat-history-btn:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.chat-history-sheet {
  position: fixed; inset: 0; z-index: 180; display: flex; align-items: flex-end; justify-content: center;
}
.chat-history-sheet.hidden { display: none; }
.chat-history-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.chat-history-panel {
  position: relative; width: min(520px, 100%); max-height: 78dvh;
  background: var(--bg-mid); border-radius: 20px 20px 0 0;
  border: 1px solid var(--glass-border); padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
}
.chat-history-head { display: flex; align-items: center; justify-content: space-between; }
.chat-history-head h3 { font-size: 17px; color: var(--text); margin: 0; }
.chat-history-close {
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: var(--muted); font-size: 22px; cursor: pointer;
}
.chat-history-actions { display: flex; gap: 8px; }
.chat-history-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.chat-history-item {
  display: flex; align-items: stretch; gap: 6px;
  border: 1px solid var(--glass-border); border-radius: 12px;
  background: rgba(255,255,255,0.04); overflow: hidden;
}
.chat-history-item.is-current { border-color: var(--accent); background: rgba(255,80,40,0.08); }
.chat-history-item-main {
  flex: 1; text-align: left; border: none; background: transparent; color: var(--text);
  padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
}
.chat-history-rename {
  flex-shrink: 0; border: none; border-left: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04); color: var(--muted); font: inherit; font-size: 12px;
  padding: 0 12px; cursor: pointer;
}
.chat-history-rename:hover { color: var(--accent); background: rgba(255,255,255,0.08); }
.chat-history-item-title { font-size: 14px; }
.chat-history-item-id { font-size: 11px; color: var(--muted-2); font-family: var(--font-mono, monospace); }
.theme-studio-panel { max-height: 88dvh; }
.theme-studio-body { overflow-y: auto; padding-bottom: 8px; }
.chat-history-empty { color: var(--muted); font-size: 13px; line-height: 1.5; padding: 12px 4px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 6px; flex-shrink: 0;
  background: rgba(255, 0, 21, 0.12);
  border: 1px solid rgba(255, 0, 21, 0.45);
  box-shadow: var(--crt-glow);
  display: flex; align-items: center; justify-content: center;
}
.brand-initial {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 400; color: var(--accent);
  text-shadow: var(--crt-glow);
  letter-spacing: 0.05em;
}
.brand-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.briefing-greet {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 400; letter-spacing: 0.04em;
  color: var(--text); line-height: 1.15;
  text-shadow: 0 0 20px rgba(255, 136, 0, 0.25);
}
.briefing-line {
  font-size: 13px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.status-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}
.status { font-size: 11px; color: var(--muted); font-weight: 500; }
.status-cloud-tag {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
  padding-left: 6px;
  margin-left: 2px;
  border-left: 1px solid var(--glass-border);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex-shrink: 0; }
.dot.ok { background: var(--success); }
.dot.err { background: #e07a7a; }
.dot.busy { background: var(--accent); animation: pulse 1s infinite; }
.dot.warn { background: #e0b65a; animation: pulse 1.4s infinite; }

/* —— 底部浮动 Dock —— */
.app-dock {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 60;
  width: min(280px, calc(100% - 32px));
  pointer-events: none;
}
.dock-pill {
  pointer-events: auto;
  display: flex; gap: 4px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: var(--shadow-dock);
}
.hub-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 10px 16px; border: none; border-radius: var(--radius-pill);
  background: transparent; color: var(--muted-2);
  font: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.hub-tab svg { opacity: 0.55; transition: opacity 0.2s; }
.hub-tab.active {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 4px 16px rgba(255, 136, 0, 0.28);
}
.hub-tab.active svg { opacity: 1; stroke: var(--accent-text); }

/* —— 内容区底部留白（给 Dock + Composer）—— */
body.view-say #panel-say .feed {
  padding-bottom: calc(var(--dock-h) + var(--composer-h) + 24px + env(safe-area-inset-bottom));
}
body.view-see .see-body {
  padding-bottom: calc(var(--dock-h) + 32px + env(safe-area-inset-bottom));
}

/* —— Welcome / Chat —— */
.feed-inner { display: flex; flex-direction: column; gap: 14px; }
.welcome {
  padding: 12px 0 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  padding: 24px;
  margin-bottom: 8px;
}
.welcome-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--accent-dim); border: 1px solid rgba(255, 136, 0, 0.28);
}
.welcome h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 36px); font-weight: 500;
  margin-bottom: 10px; color: var(--text);
}
.welcome-lead { color: var(--muted); font-size: 15px; line-height: 1.6; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.quick-chip {
  padding: 10px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border); background: rgba(0,0,0,0.2);
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.15s;
}
.quick-chip:active, .quick-chip:hover {
  background: var(--accent); color: var(--accent-text); border-color: var(--accent);
}

.msg-user {
  align-self: flex-end; max-width: 88%;
  padding: 14px 18px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 20px 20px 6px 20px;
  font-size: 15px; line-height: 1.45;
  backdrop-filter: blur(12px);
}
.msg-agent { align-self: flex-start; max-width: 100%; font-size: 15px; color: var(--muted); }
.reply-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.reply-chip {
  border: 1px solid rgba(255, 136, 0, 0.35); border-radius: 999px;
  background: rgba(255, 136, 0, 0.08); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 500;
  padding: 8px 14px; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.reply-chip:hover, .reply-chip:active {
  background: rgba(255, 136, 0, 0.18); border-color: rgba(255, 136, 0, 0.55);
}
.stream-error {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px; color: var(--muted-2); line-height: 1.5;
}
.msg-agent--restored .thinking-slot { display: none; }
.chat-log-hint {
  font-size: 11px; color: var(--muted-2); text-align: center; padding: 4px 0 8px;
}
.content-slot:not(:empty) {
  padding: 16px 18px; margin-top: 6px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid rgba(255, 0, 21, 0.22);
  backdrop-filter: blur(16px);
}
.content-slot .prose { color: var(--text); }

.glass-card {
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: var(--shadow-glass);
}

/* —— Thinking（一行进度，不搞五步假流水线） —— */
.thinking-panel {
  margin-bottom: 6px; padding: 8px 12px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
  font-size: 12px; color: var(--muted-2);
  display: flex; align-items: center; gap: 8px;
  max-width: max-content;
}
.thinking-panel--done {
  opacity: 0.55; padding: 4px 10px;
}
.thinking-panel--live .thinking-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent, #e8a23a);
  animation: thinkPulse 1.1s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes thinkPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}
.thinking-live-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.thinking-live-time { opacity: 0.7; font-variant-numeric: tabular-nums; }
.thinking-done-label { display: inline-flex; align-items: center; gap: 6px; }
.thinking-panel--collapsed .thinking-steps { display: none; }
.thinking-toggle {
  width: 100%; background: none; border: none; color: inherit; font: inherit;
  cursor: pointer; display: flex; justify-content: space-between; padding: 0;
}
.thinking-steps { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.reasoning-trail {
  margin-top: 8px; padding: 8px 10px; border-left: 2px solid var(--accent-red);
  font-size: 11px; line-height: 1.45; color: var(--muted-2); font-style: italic;
  max-height: 72px; overflow: hidden;
}
.think-step { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
.think-step-icon { flex-shrink: 0; margin-top: 1px; }
.think-step-body { flex: 1; min-width: 0; }

.proposal-card {
  margin-top: 12px; padding: 20px; border-radius: var(--radius-lg);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass);
}
.proposal-card h3 {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 500; margin-bottom: 8px; color: var(--text);
}
.proposal-type { font-size: 12px; color: var(--muted-2); margin-bottom: 10px; }
.proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn {
  flex: 1; min-width: 100px; padding: 13px 16px; border-radius: var(--radius-pill);
  border: none; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--white-btn); color: var(--accent-text);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.btn-ghost {
  background: rgba(0,0,0,0.25); border: 1px solid var(--glass-border);
  color: var(--muted); flex: 0 0 auto; padding-inline: 18px;
}

.prose { line-height: 1.65; color: var(--muted); }
.prose p { margin: 0 0 0.75em; }
.prose code { background: rgba(0,0,0,0.3); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; }

@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg { animation: msgIn 0.22s ease; }

/* —— Composer：玻璃输入条，浮在 Dock 上方 —— */
.composer {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--dock-h) + 4px + env(safe-area-inset-bottom));
  z-index: 55;
  padding: 0 clamp(16px, 4vw, 40px) 8px;
  background: transparent;
  border: none;
  pointer-events: none;
}
.composer-inner { max-width: var(--chat-max); margin: 0 auto; pointer-events: auto; }
.composer.hidden { display: none; }
.chat-warn-banner {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--dock-h) + 76px + env(safe-area-inset-bottom));
  z-index: 56;
  max-width: var(--chat-max);
  width: calc(100% - 32px);
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(120, 53, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251, 146, 60, 0.4);
  color: #fed7aa;
  font-size: 13px;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.chat-warn-banner.warn-warming {
  background: rgba(120, 95, 15, 0.85);
  border-color: rgba(251, 191, 60, 0.45);
  color: #fde68a;
}
.chat-warn-banner.warn-auth {
  background: rgba(127, 29, 29, 0.88);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}
.topics-portal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(129, 140, 248, 0.08);
  border: 1px solid rgba(129, 140, 248, 0.2);
}
.topics-portal-link { font-size: 13px; }
.topics-portal-hint { font-size: 12px; color: var(--muted-2); }
.cal-empty {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted-2);
  font-size: 13px;
  text-align: center;
}
.cal-rows { display: flex; flex-direction: column; gap: 6px; }
.cal-row {
  display: grid;
  grid-template-columns: 48px 52px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}
.cal-row--today {
  background: rgba(255, 136, 0, 0.08);
  border-color: rgba(255, 136, 0, 0.3);
}
.cal-date { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.cal-row--today .cal-date { color: var(--accent); font-weight: 600; }
.cal-time { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.cal-summary { color: rgba(255,255,255,0.88); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Month calendar — 日程页主视图 */
.cal-month-wrap {
  margin-bottom: 20px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 14px 12px 16px;
}
.cal-month-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.cal-month-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cal-nav, .cal-today-btn {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}
.cal-nav { width: 36px; padding: 6px 0; font-size: 20px; line-height: 1; }
.cal-today-btn { font-size: 12px; margin-left: auto; }
.cal-nav:hover, .cal-today-btn:hover { background: rgba(255,255,255,0.08); }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 500;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-cell {
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  padding: 6px 4px 4px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-cell--pad { background: transparent; border: none; min-height: 0; pointer-events: none; }
.cal-cell-num {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
  color: rgba(255,255,255,0.75);
}
.cal-cell--today .cal-cell-num {
  color: var(--accent-text);
  background: var(--accent);
  border-radius: 6px;
  width: fit-content;
  min-width: 22px;
  text-align: center;
  padding: 2px 5px;
}
.cal-cell--selected {
  border-color: rgba(255, 136, 0, 0.45);
  background: rgba(255, 136, 0, 0.06);
}
.cal-cell--has-event { background: rgba(129, 140, 248, 0.08); }
.cal-cell-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
}
.cal-ev-chip {
  font-size: 9px;
  line-height: 1.2;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(129, 140, 248, 0.35);
  color: rgba(255,255,255,0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-ev-more { font-size: 9px; color: var(--muted-2); padding-left: 4px; }
.cal-agenda {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.cal-agenda-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
  color: rgba(255,255,255,0.9);
}
.cal-agenda--empty .cal-agenda-empty {
  font-size: 13px;
  color: var(--muted-2);
  margin: 0;
}
.cal-agenda-rows { display: flex; flex-direction: column; gap: 6px; }
.cal-agenda-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}
.cal-agenda-time { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.cal-agenda-summary { color: rgba(255,255,255,0.9); }
.cal-feishu {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

@media (max-width: 480px) {
  .cal-cell { min-height: 58px; }
  .cal-ev-chip { display: none; }
  .cal-cell--has-event .cal-cell-num::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #818cf8;
    margin-left: 3px;
    vertical-align: middle;
  }
}
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.shake { animation: shake 0.3s; }
.me-pane { max-width: 640px; margin: 0 auto; padding: 8px 4px 40px; }
.me-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.me-head h2 { font-size: 26px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.me-date { color: var(--muted-2); font-size: 13px; }
.me-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.me-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
}
.me-card--streak { background: rgba(255, 136, 0, 0.08); border-color: rgba(255, 136, 0, 0.28); }
.me-card-num { font-size: 28px; font-weight: 700; color: rgba(255,255,255,0.95); font-variant-numeric: tabular-nums; }
.me-card--streak .me-card-num { color: var(--accent); }
.me-card-label { font-size: 12px; color: var(--muted-2); }
.me-card-hint { font-size: 10px; color: var(--muted-2); opacity: 0.6; }
.me-section { margin-bottom: 20px; }
.me-section h3 { font-size: 14px; color: var(--muted-2); margin: 0 0 8px; font-weight: 500; }
.me-placeholder { font-size: 13px; color: var(--muted-2); padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,0.02); border: 1px dashed rgba(255,255,255,0.08); margin: 0; }
.me-note { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0 0 8px; }
.me-note b { color: var(--accent, #d4e09b); font-weight: 700; }
.me-note--dim { color: var(--muted-2); font-size: 12px; margin-top: 4px; margin-bottom: 0; }
.me-topic {
  display: block; font-family: var(--font-mono, monospace); font-size: 14px;
  color: var(--accent, #d4e09b); background: rgba(255,255,255,0.03);
  border: 1px solid color-mix(in srgb, var(--accent, #d4e09b) 30%, transparent);
  border-radius: 8px; padding: 10px 12px; margin: 0 0 8px; user-select: all;
  word-break: break-all;
}
.composer.drag-over .composer-row {
  outline: 2px dashed rgba(255, 136, 0, 0.5); outline-offset: 2px;
}
.composer-attachments { display: none; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.composer-attachments.has-items { display: flex; }
.composer-row {
  display: flex; gap: 8px; align-items: flex-end;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 14px;
  box-shadow: var(--shadow-glass);
}
.composer-icon-btn {
  width: 40px; height: 40px; border: none; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.attach-wrap { position: relative; flex-shrink: 0; }
.attach-sheet {
  position: absolute; left: 0; bottom: calc(100% + 8px);
  min-width: 168px; padding: 6px;
  background: var(--surface); border: 1px solid var(--glass-border);
  border-radius: 14px; box-shadow: var(--shadow-glass); z-index: 40;
  display: flex; flex-direction: column; gap: 2px;
}
.attach-sheet[hidden] { display: none !important; }
.attach-sheet-item {
  border: none; background: transparent; color: var(--text);
  text-align: left; padding: 10px 12px; border-radius: 10px;
  font: inherit; font-size: 14px; cursor: pointer;
}
.attach-sheet-item:hover,
.attach-sheet-item:focus-visible { background: rgba(255,255,255,0.06); outline: none; }
.composer-send {
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: var(--white-btn); color: var(--accent-text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.composer-send:disabled { background: rgba(255,255,255,0.08); color: var(--muted-2); box-shadow: none; }
.composer-send.is-uploading { opacity: 0.55; }
#input {
  flex: 1; border: none; background: transparent; color: var(--text);
  font: inherit; font-size: 16px; resize: none; max-height: 120px;
  padding: 10px 4px; outline: none;
}
#input::placeholder { color: var(--muted-2); }

.attach-chip {
  position: relative; width: 56px; height: 56px; border-radius: 12px;
  overflow: hidden; background: var(--surface-2); border: 1px solid var(--glass-border);
}
.attach-chip img { width: 100%; height: 100%; object-fit: cover; }
.attach-chip .attach-file {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-size: 10px; color: var(--muted); padding: 4px; text-align: center;
}
.attach-chip .attach-remove {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border: none; border-radius: 50%; background: rgba(0,0,0,0.65); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.attach-chip.uploading { opacity: 0.5; }

.msg-user .user-media { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg-user .user-media img { max-width: 120px; max-height: 120px; border-radius: 10px; object-fit: cover; cursor: zoom-in; }
.msg-user .user-media-file {
  display: inline-flex; align-items: center; max-width: 160px; padding: 8px 10px;
  border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
  color: var(--muted); font-size: 12px; text-decoration: none;
}

.img-lightbox {
  position: fixed; inset: 0; z-index: 400; display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.92); padding: 16px;
}
.img-lightbox.open { display: flex; }
.img-lightbox-img {
  max-width: min(96vw, 1200px); max-height: 90dvh;
  object-fit: contain; border-radius: 8px;
}
.img-lightbox-close {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px;
  width: 40px; height: 40px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff; font-size: 24px; cursor: pointer;
}
.md-img-missing, .md-img--broken {
  display: block; margin: 1em 0; padding: 12px 14px;
  border-radius: 10px; background: rgba(255,255,255,0.04);
  border: 1px dashed var(--glass-border); color: var(--muted-2); font-size: 13px;
}
.detail-body img.md-img, .prose img.md-img, .entity-sheet-body img {
  max-width: 100%; height: auto; display: block; border-radius: 12px;
  margin: 1em 0; border: 1px solid var(--glass-border); cursor: zoom-in;
  background: rgba(0,0,0,0.2);
}

.msg-system {
  align-self: center; max-width: 95%; padding: 12px 18px; border-radius: var(--radius-pill);
  background: rgba(139, 196, 138, 0.12); border: 1px solid rgba(139, 196, 138, 0.28);
}
.system-note { color: #b8e0b8; font-size: 13px; text-align: center; line-height: 1.5; }

.proposal-card.proposal-confirmed { animation: confirmPop 0.35s ease; border-color: var(--success); }
@keyframes confirmPop { 0% { transform: scale(1); } 40% { transform: scale(1.02); } 100% { transform: scale(1); } }

/* —— Hub 看 —— */
.hub-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.hub-panel.hidden { display: none; }
#panel-say { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#panel-say .feed { flex: 1; min-height: 0; max-width: var(--chat-max); width: 100%; margin: 0 auto; }
#panel-see { flex: 1; min-height: 0; }

.see-sticky {
  flex-shrink: 0; padding: 0 clamp(16px, 4vw, 40px) 0;
  background: transparent;
}
.see-search-wrap { position: relative; margin-bottom: 14px; }
.see-search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; opacity: 0.45;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ff8800'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-4.35-4.35M11 18a7 7 0 100-14 7 7 0 000 14z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.hub-search-input {
  width: 100%; padding: 14px 16px 14px 44px; border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border); background: var(--glass);
  backdrop-filter: blur(16px);
  color: var(--text); font: inherit; font-size: 15px;
}
.hub-search-results { margin: 10px 0; max-height: 200px; overflow-y: auto; }
.hub-search-results.hidden { display: none; }
.hub-search-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hub-search-item {
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border); cursor: pointer;
  backdrop-filter: blur(12px);
}
.hub-search-kind { font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.06em; }
.hub-search-title { color: var(--text); font-size: 14px; display: block; margin: 4px 0; }
.hub-search-snippet { color: var(--muted-2); font-size: 12px; display: block; }

.see-pills {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.see-pills::-webkit-scrollbar { display: none; }
.see-pill {
  flex-shrink: 0; min-width: 52px;
  padding: 10px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border); background: rgba(0,0,0,0.2);
  color: var(--muted-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.18s; text-align: center;
}
.see-pill.active {
  background: var(--accent); border-color: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 4px 16px rgba(255, 136, 0, 0.22);
}

.see-body { flex: 1; overflow-y: auto; padding: 8px clamp(16px, 4vw, 40px) 24px; -webkit-overflow-scrolling: touch; }
.see-pane.hidden { display: none; }

.see-hero { padding: 22px; margin-bottom: 16px; }
.see-hero-greet {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; color: var(--text); margin-bottom: 8px;
}
.see-hero-hint { font-size: 14px; color: var(--muted); line-height: 1.55; }

.stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px;
}
.stat-tile {
  padding: 18px; border-radius: var(--radius-lg); text-align: left;
  border: 1px solid var(--glass-border); background: var(--glass);
  backdrop-filter: blur(16px); cursor: pointer;
  transition: transform 0.12s, border-color 0.15s;
}
.stat-tile:active { transform: scale(0.98); }
.stat-value {
  display: block; font-size: 32px; font-weight: 700;
  letter-spacing: -0.03em; color: var(--text);
  font-family: var(--font-display);
}
.stat-label { font-size: 12px; color: var(--muted-2); font-weight: 500; margin-top: 4px; }
.stat-tile--emerald .stat-value { color: #a8d4a8; }
.stat-tile--indigo .stat-value { color: var(--text); }
.stat-tile--violet .stat-value { color: #c4b8e8; }
.stat-tile--amber .stat-value { color: var(--accent); }
.stat-tile--sky .stat-value { color: #a8c8d4; }

.featured-wiki { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.featured-wiki-card {
  text-align: left; padding: 18px 20px; border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border); background: var(--glass);
  backdrop-filter: blur(16px); cursor: pointer;
}
.featured-wiki-card h4 {
  font-family: var(--font-display); font-size: 17px; font-weight: 500;
  color: var(--text); margin-bottom: 6px;
}
.featured-wiki-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

.see-block { margin-bottom: 24px; }
.see-block-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 500; color: var(--text);
  margin-bottom: 12px; letter-spacing: -0.01em;
}
.see-block-title--inline { margin-top: 12px; font-size: 17px; }
.see-empty-card {
  padding: 36px 24px; text-align: center; border-radius: var(--radius-lg);
  border: 1px dashed var(--glass-border); color: var(--muted);
  background: var(--glass); backdrop-filter: blur(12px);
}
.see-empty-hint { font-size: 13px; color: var(--muted-2); margin-top: 8px; }
.btn-go-say {
  margin-top: 18px; padding: 13px 24px; border-radius: var(--radius-pill);
  border: none; background: var(--white-btn); color: var(--accent-text);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.btn-toggle-test {
  display: block; width: 100%; margin-top: 16px; padding: 10px;
  border: none; background: transparent; color: var(--muted-2);
  font: inherit; font-size: 12px; cursor: pointer;
}
.pending-banner .proposal-card { border-color: rgba(255, 0, 21, 0.45); }
.pending-banner::before {
  content: "待确认"; display: block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}

.mini-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mini-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: var(--radius-lg); background: var(--glass);
  border: 1px solid var(--glass-border); backdrop-filter: blur(12px); cursor: pointer;
}
.mini-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.mini-dot--amber { background: var(--warning); }
.mini-row-main { min-width: 0; flex: 1; }
.mini-row-title { display: block; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row-meta { font-size: 11px; color: var(--muted-2); }

.journal-day-group {
  margin-bottom: 12px; border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border); background: var(--glass);
  backdrop-filter: blur(16px); overflow: hidden;
}
.journal-day-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; cursor: pointer; list-style: none;
  font-family: var(--font-display);
  font-weight: 500; font-size: 16px; color: var(--text);
}
.journal-day-head::-webkit-details-marker { display: none; }
.journal-day-count { font-size: 12px; color: var(--muted-2); }
.journal-day-list { list-style: none; padding: 0 10px 10px; }
.journal-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-radius: var(--radius); cursor: pointer;
  transition: background 0.12s;
}
.journal-row:hover, .journal-row:active { background: rgba(255,255,255,0.05); }
.journal-row-title { flex: 1; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journal-row-chevron { color: var(--muted-2); font-size: 18px; }
.journal-more-btn {
  width: 100%; padding: 10px; border: none; background: transparent;
  color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.journal-day-list--more.hidden { display: none; }
.journal-more-hint { font-size: 12px; color: var(--muted-2); padding: 8px 12px; text-align: center; }
.journal-tree-item { list-style: none; margin-bottom: 4px; }
.journal-child-list { list-style: none; margin: 0 0 6px 0; padding: 0 0 0 14px; border-left: 2px solid rgba(255,255,255,0.08); }
.journal-row--child { padding-left: 8px; opacity: 0.92; }
.journal-row--child .journal-row-title { font-size: 13px; font-weight: 500; }
.journal-row-sub { font-size: 11px; color: var(--muted-2); margin-right: 6px; white-space: nowrap; }
.journal-tree-meta { font-size: 12px; color: var(--muted-2); text-align: center; padding: 12px 16px 0; }
.journal-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 12px; }
.journal-crumb { border: none; background: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; }
.journal-crumb--text, .journal-crumb--current { color: var(--muted-2); cursor: default; }
.journal-crumb-sep { color: var(--muted-2); opacity: 0.6; }
.journal-card-children { padding: 0 22px 16px; border-top: 1px solid var(--glass-border); }
.journal-children-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); margin: 14px 0 8px; }
.journal-children-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.journal-child-link {
  width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04);
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer;
}
.journal-child-link:hover { background: rgba(255,255,255,0.08); }

.rich-editor-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 0 12px 8px; }
.journal-card-editor.rich-editor-wrap,
.journal-card-editor:not(.hidden) { display: flex; }
.rich-editor-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 8px 10px; border: 1px solid var(--glass-border); border-radius: var(--radius) var(--radius) 0 0;
  background: rgba(0,0,0,0.28); position: sticky; top: 0; z-index: 2;
}
.rich-editor-btn {
  border: none; background: rgba(255,255,255,0.06); color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; cursor: pointer;
}
.rich-editor-btn:hover { color: var(--text); background: rgba(255,255,255,0.12); }
.rich-editor-sep { width: 1px; height: 18px; background: var(--glass-border); margin: 0 4px; }
.rich-editor-body {
  flex: 1; min-height: 220px; max-height: 50vh; overflow-y: auto;
  padding: 16px 18px; border: 1px solid var(--glass-border); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); background: rgba(0,0,0,0.18);
  outline: none; font-size: 16px; line-height: 1.75;
}
.rich-editor-body:empty:before,
.rich-editor-body[data-placeholder]:not(:focus):empty:before {
  content: attr(data-placeholder);
  color: var(--muted-2);
  pointer-events: none;
}
.rich-editor-body img { max-width: 100%; border-radius: 8px; margin: 0.6em 0; }

.link-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.link-row {
  display: flex; gap: 14px; padding: 16px; border-radius: var(--radius-lg);
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); cursor: pointer;
}
.link-row-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--accent-dim); border: 1px solid rgba(255, 136, 0, 0.22);
}
.link-row-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.link-row-meta { font-size: 11px; color: var(--muted-2); word-break: break-all; }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 8px; }
.kanban-col { flex: 0 0 172px; }
.kanban-col-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border);
  border-left: 3px solid var(--col, var(--accent));
  font-size: 13px; font-weight: 600; margin-bottom: 8px;
}
.kanban-count { color: var(--muted-2); font-size: 12px; }
.kanban-cards { display: flex; flex-direction: column; gap: 8px; min-height: 72px; padding: 4px; border-radius: var(--radius); }
.kanban-cards.drag-over { background: var(--accent-dim); }
.kanban-card {
  padding: 14px; background: rgba(0,0,0,0.25); border-radius: var(--radius);
  border: 1px solid var(--glass-border); cursor: grab; font-size: 13px;
}
.kanban-card.dragging { opacity: 0.55; }
.kanban-card-title { color: var(--text); margin-bottom: 4px; line-height: 1.35; font-weight: 500; }
.kanban-card-meta { color: var(--muted-2); font-size: 11px; }

.hub-tappable { cursor: pointer; }
.hub-empty, .hub-empty-col, .hub-loading, .hub-error { color: var(--muted-2); font-size: 14px; padding: 12px 0; }
.hub-error { color: #e07a7a; }

.gateway-prompt-card { margin-top: 12px; padding: 16px; border-radius: var(--radius-lg); background: var(--glass); border: 1px solid rgba(232, 201, 106, 0.35); }
.gateway-prompt-card--human { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.gateway-prompt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gateway-prompt-head h3 { font-family: var(--font-display); font-size: 16px; color: var(--text); margin: 0; }
.gateway-prompt-title { font-size: 15px; font-weight: 600; color: var(--accent); margin: 0 0 8px; line-height: 1.45; }
.gateway-prompt-preview { font-size: 13px; color: var(--muted); margin: 0 0 12px; line-height: 1.55; max-height: 4.5em; overflow: hidden; }
.gateway-prompt-desc { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.gateway-prompt-cmd { font-size: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); border-radius: 10px; padding: 10px; color: var(--muted); margin-bottom: 12px; white-space: pre-wrap; word-break: break-all; }
.gateway-prompt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gateway-prompt-choices { flex-direction: column; }
.gateway-prompt-choices .btn { flex: none; width: 100%; }
.gateway-prompt-done { margin-top: 8px; color: var(--success); }
.gateway-prompt-err { font-size: 13px; color: var(--danger, #e07a7a); margin: 0 0 8px; }

/* —— 捕获快路径反馈 —— */
.capture-ack { margin-top: 8px; }
.capture-ack-title { font-weight: 600; color: var(--accent); margin: 6px 0 10px; }
.capture-ack-link {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: rgba(255,255,255,0.04); color: var(--accent);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer;
}
.moment-recent-capture { margin-bottom: 12px; }
.moment-recent-btn {
  width: 100%; text-align: left; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.03); border-radius: 12px; padding: 12px 14px;
  cursor: pointer; color: inherit;
}
.moment-recent-title { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.moment-recent-chevron { font-size: 12px; color: var(--accent); }
.see-block-meta { font-size: 12px; color: var(--muted-2); }
.see-hero-streak { font-size: 12px; color: var(--muted); margin-top: 6px; }
.ico-warn { color: var(--warning); }
.aether-link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--glass); font-size: 13px; color: var(--muted-2); }
.aether-link-btn { color: var(--accent); text-decoration: none; font-weight: 600; }

.thinking-toggle-title { display: inline-flex; align-items: center; gap: 6px; }
.think-step-label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.ico-ok { color: var(--success); }
.ico-err { color: #e07a7a; }
.ico-active { color: var(--accent); }
.ico-idle { color: var(--muted-2); }
.ico-spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.entity-sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.entity-sheet.hidden { display: none; }
.entity-sheet-backdrop { position: absolute; inset: 0; background: rgba(11, 7, 3, 0.82); backdrop-filter: blur(10px); }
.entity-sheet-panel {
  position: relative; width: min(720px, 100%); max-height: min(88dvh, 900px);
  background: var(--bg-mid); border-radius: 20px;
  display: flex; flex-direction: column; border: 1px solid var(--glass-border);
  box-shadow: 0 24px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: journalCardIn 0.28s ease;
}
@keyframes journalCardIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
body.journal-card-open { overflow: hidden; }
.entity-sheet-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--glass-border);
}
.journal-card-head-main { flex: 1; min-width: 0; }
.journal-card-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.entity-sheet-title {
  font-family: var(--font-display); font-size: clamp(18px, 4vw, 24px); font-weight: 500;
  color: var(--text); line-height: 1.25; word-break: break-word;
}
.journal-card-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.journal-card-edit {
  padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer;
}
.journal-card-edit:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.entity-sheet-close {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--muted); font-size: 22px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.entity-sheet-body, .journal-card-read { flex: 1; overflow-y: auto; padding: 8px 22px 24px; font-size: 16px; line-height: 1.75; }
.journal-card-editor {
  flex: 1; min-height: 240px; margin: 0 16px 8px; padding: 16px 18px;
  border-radius: var(--radius); border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.25); color: var(--text); font: inherit; font-size: 15px; line-height: 1.65;
  resize: vertical;
}
.journal-card-editor.hidden { display: none; }
.entity-sheet-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--glass-border);
}
.entity-sheet-meta { font-size: 12px; color: var(--muted-2); }
.journal-card-save {
  padding: 8px 18px; border-radius: var(--radius-pill); border: none;
  background: var(--accent); color: var(--bg-deep); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.journal-card-save.hidden { display: none; }
.journal-card-save:disabled { opacity: 0.6; cursor: wait; }
.sheet-handle { display: none; }

@media (max-width: 767px) {
  .entity-sheet { align-items: flex-end; padding: 0; }
  .entity-sheet-panel { max-height: 92dvh; border-radius: 20px 20px 0 0; width: 100%; }
}

.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 200; }

.toast-host {
  position: fixed; left: 50%;
  bottom: calc(var(--dock-h) + var(--composer-h) + 16px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 150;
  width: min(92vw, 420px); pointer-events: none;
}
body.view-see .toast-host {
  bottom: calc(var(--dock-h) + 16px + env(safe-area-inset-bottom));
}
.toast {
  pointer-events: auto; width: 100%; padding: 12px 16px;
  border-radius: var(--radius-pill); font-size: 14px; font-weight: 600;
  text-align: center; cursor: pointer;
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px); box-shadow: var(--shadow-glass);
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast--in { opacity: 1; transform: none; }
.toast--out { opacity: 0; transform: translateY(-6px); }
.toast--success { border-color: rgba(139, 196, 138, 0.4); color: #b8e0b8; }
.toast--info { border-color: rgba(255, 136, 0, 0.35); color: var(--accent); }

.see-pane-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 16px;
}
.see-pane-head h2 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; color: var(--text);
}
.see-pane-meta { font-size: 12px; color: var(--muted-2); }

/* —— 此刻（IA 修正） —— */
.moment-hero { margin-bottom: 8px; }
.watch-status { padding: 14px 16px; margin-bottom: 14px; }
.watch-status-row { display: flex; align-items: center; gap: 8px; }
.watch-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent, #d4e09b);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #d4e09b) 25%, transparent);
  animation: watch-pulse 2.4s ease-in-out infinite;
}
@keyframes watch-pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.watch-status-main { font-size: 14px; font-weight: 600; color: var(--text); }
.watch-status-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.watch-status-sub b { color: var(--accent, #d4e09b); font-weight: 700; }
.moment-block { margin-bottom: 4px; }
.see-block-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.see-block-link {
  border: none; background: transparent; color: var(--accent);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 0;
}
.moment-latest {
  display: block; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border);
  cursor: pointer; transition: border-color 0.15s;
}
.moment-latest:hover { border-color: rgba(255, 136, 0, 0.4); }
.moment-latest-label { display: block; font-size: 11px; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.moment-latest-title { display: block; font-size: 15px; color: var(--text); font-weight: 500; }
.moment-latest-meta { display: block; font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.todo-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-border);
}
.todo-row--done { opacity: 0.55; }
.todo-check {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid var(--muted-2); background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: transparent; padding: 0;
}
.todo-check.checked { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.todo-body { flex: 1; border: none; background: transparent; text-align: left; cursor: pointer; padding: 0; font: inherit; }
.todo-title { display: block; font-size: 14px; color: var(--text); line-height: 1.4; }
.todo-meta { display: block; font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.todo-list--compact .todo-row { padding: 8px 12px; background: transparent; border: none; }
.todo-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 7px; flex-shrink: 0; }
.todo-done-group { margin-top: 16px; }
.todo-done-head { font-size: 12px; color: var(--muted-2); cursor: pointer; margin-bottom: 8px; }
.todo-list--done .todo-title { text-decoration: line-through; }

@media (prefers-reduced-motion: reduce) {
  .msg, .proposal-card.proposal-confirmed, .ico-spin { animation: none; }
  .stat-tile, .btn, .kanban-card, .hub-tab { transition: none; }
}

@media (min-width: 900px) {
  .app-dock { width: min(320px, 30vw); }
  body.view-say .composer { padding-inline: max(16px, calc((100% - var(--chat-max)) / 2)); }
}
