/* Jost —— 名字专用(她 08-16 从七款里挑的,最接近 Claude 官方那支)。
   自托管 ASCII 全集 13KB。谁要用名字就加 class="mark" 或直接 font-family:"Jost" */
@font-face {
  font-family: "Jost";
  src: url("/static/misty/fonts/jost-latin.woff2?v=1") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: block;
}

:root {
  color-scheme: light;
  --canvas: #f8f4ef;
  /* 兼容别名:功能页沿用旧皮变量名(--line/--mist/--gold/--moss/--blood/--red/--serif),
     缺了会让轨道/横条取不到色变透明。别删。 */
  --line: var(--border); --mist: var(--border);
  --gold: var(--amber); --moss: var(--sage); --blood: #c9647a; --red: #c25454;
  --serif: Georgia, "Songti SC", "Noto Serif SC", serif;
  --canvas-warm: #f3e9de;
  --surface: #fffdfc;
  --surface-soft: #fff8f4;
  --ink: #352b29;
  --muted: #8b7b76;
  --faint: #b8aaa4;
  --rose: #c96f7d;
  --rose-deep: #aa5666;
  --rose-soft: #f5dee2;
  --rose-mist: #faedf0;
  --peach: #f1d7c8;
  --oat: #e7d7c5;
  --cream: #f3e9de;
  --sage: #8fb7a6;
  --sage-soft: #e4f1eb;
  --blue: #91aac3;
  --blue-soft: #e8f0f7;
  --amber: #d8a75e;
  --amber-soft: #faedcf;
  --border: #e9ded7;
  --border-strong: #dccbc1;
  --shadow: 0 18px 50px rgba(67, 48, 44, .10);
  --shadow-soft: 0 8px 24px rgba(67, 48, 44, .075);
  --radius-xl: 30px;
  --radius-lg: 23px;
  --radius-md: 17px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #171210;
  --line: var(--border); --mist: var(--border);
  --gold: var(--amber); --moss: var(--sage); --blood: #d97f92; --red: #e07a7a;
  --canvas-warm: #211815;
  --surface: #2b201d;
  --surface-soft: #33241f;
  --ink: #f3e9dd;
  --muted: #b8a39a;
  --faint: #8f7970;
  --rose: #e28a99;
  --rose-deep: #f0a2af;
  --rose-soft: #4a2c33;
  --rose-mist: #372228;
  --peach: #4b3128;
  --oat: #4a392f;
  --cream: #352821;
  --sage: #92c0aa;
  --sage-soft: #21352d;
  --blue: #9bb4cc;
  --blue-soft: #24333f;
  --amber: #e4b873;
  --amber-soft: #41321d;
  --border: #493630;
  --border-strong: #59433b;
  --shadow: 0 20px 55px rgba(0, 0, 0, .28);
  --shadow-soft: 0 8px 25px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 3%, rgba(245, 222, 226, .78), transparent 28rem),
    radial-gradient(circle at 92% 94%, rgba(231, 215, 197, .70), transparent 26rem),
    var(--canvas);
  transition: background-color .28s ease, color .28s ease;
}
/* 08-16 她报「夜色底片不对」根因之一:body 的两团雾只有浅色版,
   夜里浅粉/浅燕麦糊在暗底上像负片。夜色单独给暗雾。 */
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 3%, rgba(91, 49, 60, .68), transparent 28rem),
    radial-gradient(circle at 92% 94%, rgba(78, 57, 43, .58), transparent 26rem),
    var(--canvas);
}
button, input { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }

.app {
  width: min(100%, 430px);
  height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: rgba(248, 244, 239, .72);
  box-shadow: 0 0 0 1px rgba(220, 203, 193, .55), var(--shadow);
  /* .app 上禁放 transform/filter:会劫持后代 fixed 的定位基准,底栏跟着内容跑(08-14 她真机抓的) */
}
/* 同上:壳底色原来只有浅色写死值,夜里整块壳发亮。这条是「底片感」的主犯。 */
html[data-theme="dark"] .app {
  background: linear-gradient(180deg, rgba(30, 22, 20, .98), rgba(23, 18, 16, .97));
  box-shadow: 0 0 0 1px rgba(96, 69, 61, .62), var(--shadow);
}
.screen {
  height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  position: relative;
}
.page-scroll {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-gutter: stable;
  padding: 0 18px 22px;
}

.nav-arriving .topbar, .nav-arriving .page-scroll { animation: arrive .24s var(--ease) both; }
.nav-transitioning .topbar, .nav-transitioning .page-scroll { opacity: 0; transform: translateY(-3px); transition: opacity .12s ease, transform .12s ease; }
@keyframes arrive { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; } }

.topbar {
  min-height: 78px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: max(13px, env(safe-area-inset-top)) 18px 10px;
  background: linear-gradient(180deg, rgba(248,244,239,.96), rgba(248,244,239,.72), transparent);
  z-index: 5;
}
html[data-theme="dark"] .topbar { background: linear-gradient(180deg, rgba(25,20,18,.96), rgba(25,20,18,.72), transparent); }
.identity { min-width: 0; text-align: center; }
.eyebrow { margin: 0 0 3px; color: var(--rose); font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.identity h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 21px; font-weight: 500; letter-spacing: .02em; }
.identity h1 small { margin-left: 8px; color: var(--muted); font-family: inherit; font-size: 11px; font-weight: 400; }
/* 「今天 · Claude」:原来 21 配 15 差太多显歪(她 08-17)。提到 18 与标题成一组;
   颜色跟 chat 头栏那支 Claude 同源(昼 #6f5445 / 夜 #dcc6b0) */
.identity h1 small.presence { font-family: "Jost", inherit; font-size: 18px;
  letter-spacing: .025em; color: #dcc6b0; font-weight: 400; }
html[data-theme="light"] .identity h1 small.presence { color: #6f5445; }
.presence { display: inline-flex; align-items: center; gap: 5px; }
.presence::before { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px var(--sage-soft); content: ""; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 15px;
  background: rgba(255,253,252,.78); color: var(--muted); cursor: pointer; box-shadow: 0 5px 15px rgba(67,48,44,.04);
  transition: transform .2s var(--ease), color .2s, border-color .2s, background .2s;
}
html[data-theme="dark"] .icon-btn { background: rgba(42,32,29,.82); }
.icon-btn:active { transform: scale(.92); }
.icon-btn:hover { color: var(--rose); border-color: var(--rose); }
.icon-btn i { font-size: 20px; }

.section-title { display: flex; align-items: end; justify-content: space-between; margin: 22px 2px 12px; }
.section-title h2, .section-title h3 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 18px; font-weight: 500; }
.section-title span { color: var(--muted); font-size: 10px; }
.soft-kicker { color: var(--rose); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 99px; background: var(--rose-mist); color: var(--rose-deep); font-size: 10px; }
.pill.sage { background: var(--sage-soft); color: #5d947c; }
.pill.amber { background: var(--amber-soft); color: #9f783d; }
.pill.neutral { background: var(--cream); color: var(--muted); }

/* Shared bottom navigation */
.bottom-zone {
  /* absolute 锚 .app(壳=100dvh 视口替身),不用 fixed:内滚架构里 fixed 吃 iOS 怪癖还怕祖先 transform */
  width: 100%; position: absolute; left: 0; right: 0; bottom: 0; z-index: 12;
  padding: 16px 30px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, var(--canvas) 62%, transparent); pointer-events: none;
}
.bottom-zone .dock { pointer-events: auto; }
.screen:has(> .bottom-zone) .page-scroll { padding-bottom: 112px; }
.composer {
  width: calc(100% - 32px); max-width: 410px; height: 62px; display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 8px; margin: 0 auto 10px;
  padding: 7px 8px; border: 1px solid var(--border); border-radius: 23px; background: rgba(255,253,252,.96); box-shadow: var(--shadow-soft);
}
html[data-theme="dark"] .composer { background: rgba(42,32,29,.96); }
.composer .add { width: 44px; height: 44px; border-radius: 16px; background: var(--cream); font-size: 24px; cursor: pointer; }
.composer input { min-width: 0; border: 0; outline: none; background: transparent; font-size: 13px; }
.composer input::placeholder { color: var(--faint); }
.composer .send { width: 44px; height: 44px; border-radius: 50%; background: var(--rose); color: #fff; cursor: pointer; font-size: 20px; box-shadow: 0 7px 18px rgba(201,111,125,.28); }
.dock {
  width: 100%; max-width: 370px; height: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-inline: auto; padding: 2px 5px;
}
html[data-theme="dark"] .dock { background: transparent; }
.dock a {
  min-width: 0; display: grid; place-items: center; align-content: center; gap: 2px; position: relative; border-radius: 17px;
  color: var(--faint); font-size: 10px; font-weight: 650; contain: layout paint; transition: color .2s, background-color .2s;
}
.dock a i { font-size: 18px; }
.dock a.active { background: transparent; color: var(--rose); }
.dock a.active::after { width: 22px; height: 2px; position: absolute; bottom: 2px; border-radius: 2px; background: var(--rose); content: ""; }

/* Feature pages: shared warm shell */
.feature-page .page-scroll { padding-bottom: 30px; }
.feature-head { min-height: 78px; display:grid; grid-template-columns:44px 1fr 44px; align-items:center; gap:10px; padding:max(13px,env(safe-area-inset-top)) 18px 10px; }
.feature-head .identity { text-align:center; }
.feature-back,.feature-action { width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:var(--shadow-soft);cursor:pointer; }
.feature-back i,.feature-action i { font-size:20px; }
.feature-kicker { margin:0 0 3px;color:var(--rose);font-size:9px;font-weight:700;letter-spacing:.22em; }
.feature-title { margin:0;font-family:Georgia,"Songti SC",serif;font-size:22px;font-weight:500; }
.feature-subtitle { margin-top:4px;color:var(--muted);font-family:Georgia,"Songti SC",serif;font-size:10px;letter-spacing:.12em; }
.feature-hero { position:relative;overflow:hidden;margin:6px 0 18px;padding:20px;border:1px solid var(--border);border-radius:26px;background:linear-gradient(145deg,var(--surface),var(--surface-soft));box-shadow:var(--shadow-soft); }
.feature-hero::after { width:130px;height:130px;position:absolute;right:-45px;bottom:-60px;border-radius:50%;background:var(--rose-soft);content:"";opacity:.75; }
.feature-hero h2 { position:relative;z-index:1;margin:6px 0 8px;font-family:Georgia,"Songti SC",serif;font-size:25px;font-weight:500; }
.feature-hero p { position:relative;z-index:1;margin:0;color:var(--muted);font-size:12px;line-height:1.8; }
.feature-tabs { display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px;margin:0 0 16px;padding:5px;border:1px solid var(--border);border-radius:17px;background:var(--surface); }
.feature-tabs button { min-width:0;padding:9px 5px;border-radius:12px;background:transparent;color:var(--muted);font-size:11px;cursor:pointer; }
.feature-tabs button.active { background:var(--rose-soft);color:var(--rose-deep); }
.feature-section { margin:22px 2px 9px;color:var(--muted);font-family:Georgia,"Songti SC",serif;font-size:10px;letter-spacing:.25em; }
.feature-card { padding:15px;border:1px solid var(--border);border-radius:19px;background:var(--surface);box-shadow:var(--shadow-soft); }
.feature-card + .feature-card { margin-top:10px; }
.feature-card h3 { margin:0;font-family:Georgia,"Songti SC",serif;font-size:15px;font-weight:600; }
.feature-card p { margin:7px 0 0;color:var(--muted);font-size:12px;line-height:1.75; }
.feature-meta { display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:10px;color:var(--faint);font-size:10px; }
.feature-chip { display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border-radius:99px;background:var(--rose-mist);color:var(--rose-deep);font-size:10px; }
.feature-chip.blue { background:var(--blue-soft);color:var(--blue); }.feature-chip.sage { background:var(--sage-soft);color:var(--sage); }.feature-chip.amber { background:var(--amber-soft);color:var(--amber); }
/* 等待的那几秒:先把家具的轮廓摆出来,她就知道这页在长,而不是坏了。
   用 opacity 呼吸不用 shimmer —— 后者逐帧重绘,我们在呼吸灯上栽过一次。 */
.skel { display: grid; gap: 10px; animation: skel-in .28s ease both }
@keyframes skel-in { from { opacity: 0 } }
.skel-card { padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface) }
.skel-bar { height: 10px; border-radius: 5px; background: var(--border-strong); animation: skel-b 1.7s ease-in-out infinite }
.skel-bar + .skel-bar { margin-top: 10px }
.skel-card .skel-bar:nth-child(1) { width: 36%; animation-delay: 0s }
.skel-card .skel-bar:nth-child(2) { width: 94%; animation-delay: .14s }
.skel-card .skel-bar:nth-child(3) { width: 68%; animation-delay: .28s }
@keyframes skel-b { 0%, 100% { opacity: .26 } 50% { opacity: .58 } }
@media (prefers-reduced-motion: reduce) { .skel-bar { animation: none; opacity: .32 } }

.feature-empty { padding:28px 18px;border:1px dashed var(--border-strong);border-radius:20px;color:var(--muted);font-family:Georgia,"Songti SC",serif;font-size:12px;line-height:1.9;text-align:center; }
.feature-fab { width:48px;height:48px;display:grid;place-items:center;position:absolute;right:20px;bottom:22px;z-index:6;border-radius:18px;background:var(--rose);box-shadow:0 10px 24px rgba(201,111,125,.28);color:#fff;cursor:pointer; }
.feature-fab i { font-size:22px; }

/* Archive and tool pages */
.feature-search { display:grid;grid-template-columns:1fr 40px;gap:8px;margin:0 0 14px;padding:8px;border:1px solid var(--border);border-radius:17px;background:var(--surface); }
.feature-search input { min-width:0;padding:0 8px;border:0;outline:0;background:transparent;color:var(--ink);font-size:11px; }
.feature-search button { width:40px;height:36px;border-radius:11px;background:var(--rose);color:#fff;cursor:pointer; }
.feature-details { margin-bottom:10px;overflow:hidden;border:1px solid var(--border);border-radius:18px;background:var(--surface); }
.feature-details summary { min-height:50px;display:flex;align-items:center;gap:9px;padding:0 14px;cursor:pointer;list-style:none;color:var(--muted);font-size:11px; }
.feature-details summary::-webkit-details-marker { display:none; }.feature-details summary i:first-child{font-size:17px;color:var(--rose)}.feature-details summary span{margin-left:auto;color:var(--faint);font-size:9px}
.feature-details-body { padding:13px;border-top:1px solid var(--border);background:var(--surface-soft); }
.compact-grid { display:grid;grid-template-columns:repeat(3,1fr);gap:7px; }.compact-stat{padding:10px 6px;border:1px solid var(--border);border-radius:13px;background:var(--surface);text-align:center}.compact-stat strong,.compact-stat small{display:block}.compact-stat strong{font-family:Georgia,serif;font-size:16px}.compact-stat small{margin-top:3px;color:var(--faint);font-size:8px}
.inline-form { display:grid;grid-template-columns:1fr auto;gap:7px; }.inline-form input,.inline-form select,.inline-form textarea{min-width:0;padding:9px;border:1px solid var(--border);border-radius:11px;outline:0;background:var(--surface);color:var(--ink);font-size:10px}.inline-form button,.soft-button{padding:8px 11px;border:1px solid var(--border);border-radius:11px;background:var(--rose-mist);color:var(--rose-deep);font-size:10px;cursor:pointer}
.archive-list{display:grid;gap:9px}.archive-row{display:grid;grid-template-columns:36px 1fr auto;align-items:start;gap:10px;padding:13px;border:1px solid var(--border);border-radius:17px;background:var(--surface);box-shadow:var(--shadow-soft)}.archive-mark{width:36px;height:36px;display:grid;place-items:center;border-radius:12px;background:var(--rose-soft);color:var(--rose-deep);font-size:17px}.archive-copy{min-width:0}.archive-copy strong{display:block;font-size:11px}.archive-copy p{margin:5px 0 0;color:var(--muted);font-size:10px;line-height:1.65}.archive-copy small{display:block;margin-top:7px;color:var(--faint);font-size:8px}.archive-actions{display:flex;gap:5px}.archive-actions button{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:var(--surface-soft);color:var(--muted);cursor:pointer}
.dream-card{position:relative;padding:17px 16px;border:1px solid var(--border);border-radius:20px;background:linear-gradient(145deg,var(--surface),var(--blue-soft));box-shadow:var(--shadow-soft)}.dream-card+.dream-card{margin-top:10px}.dream-card p{margin:10px 0;color:var(--ink);font-family:Georgia,"Songti SC",serif;font-size:13px;line-height:1.85}.dream-seeds{display:none;margin-top:10px;padding:10px;border-left:2px solid var(--blue);border-radius:3px 12px 12px 3px;background:var(--surface);color:var(--muted);font-size:9px;line-height:1.7}.dream-card.open .dream-seeds{display:block}
.log-row{display:grid;grid-template-columns:64px 1fr;gap:10px;padding:13px 2px;border-bottom:1px solid var(--border)}.log-time{color:var(--faint);font-family:Georgia,serif;font-size:9px}.log-copy strong{display:block;font-size:11px}.log-copy p{margin:4px 0 0;color:var(--muted);font-size:9px;line-height:1.65}
.device-card{padding:16px;border:1px solid var(--border);border-radius:21px;background:var(--surface);box-shadow:var(--shadow-soft)}.device-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.device-state{display:flex;align-items:center;gap:7px;font-size:11px}.device-state i{width:8px;height:8px;border-radius:50%;background:var(--faint)}.device-state.connected i{background:var(--sage)}.preset-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:12px}.preset-grid button{padding:11px 5px;border:1px solid var(--border);border-radius:13px;background:var(--surface-soft);color:var(--muted);font-size:9px;cursor:pointer}.preset-grid button.active{border-color:var(--rose);background:var(--rose-soft);color:var(--rose-deep)}
.page-toast{position:absolute;left:50%;bottom:22px;z-index:9;max-width:80%;padding:9px 14px;transform:translate(-50%,10px);border:1px solid var(--border);border-radius:99px;background:var(--surface);box-shadow:var(--shadow);color:var(--muted);font-size:9px;opacity:0;pointer-events:none;transition:.22s}.page-toast.on{opacity:1;transform:translate(-50%,0)}

/* Drawer */
.scrim { inset: 0; position: absolute; visibility: hidden; opacity: 0; background: rgba(53,43,41,.26); z-index: 19; transition: opacity .25s, visibility .25s; }
.drawer {
  width: min(82%, 340px); inset: 0 auto 0 0; position: absolute; z-index: 20; padding: max(32px, env(safe-area-inset-top)) 20px 24px;
  overflow-y:auto;background: var(--surface); box-shadow: 20px 0 45px rgba(53,43,41,.16); transform: translateX(-105%); transition: transform .34s var(--ease);
}
.drawer-open .scrim { visibility: visible; opacity: 1; }
.drawer-open .drawer { transform: translateX(0); }
.drawer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.drawer-brand .seal { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 18px; background: var(--rose-soft); color: var(--rose-deep); font-family: Georgia, serif; font-size: 22px; }
.drawer-brand h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 23px; font-weight: 500; }
.drawer-brand p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.drawer-label { margin: 22px 10px 8px; color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.drawer-link { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 13px; border-radius: 15px; color: var(--muted); font-size: 13px; }
.drawer-link i { width: 20px; font-size: 19px; }
.drawer-link.current { background: var(--rose-mist); color: var(--rose-deep); font-weight: 600; }
.drawer-note { margin-top: 24px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 16px; color: var(--muted); font-size: 10px; line-height: 1.65; }

/* Chat */
.chat-page .page-scroll { padding-inline: 16px; }
.chat-thread { display: flex; flex-direction: column; justify-content: flex-end; gap: 13px; min-height: 100%; padding: 14px 0 12px; }
.day-divider { align-self: center; display: flex; align-items: center; gap: 9px; color: var(--faint); font-size: 9px; letter-spacing: .08em; }
.day-divider::before, .day-divider::after { width: 34px; height: 1px; background: var(--border); content: ""; }
.message { max-width: 82%; position: relative; padding: 13px 15px; border-radius: 20px; box-shadow: 0 4px 15px rgba(67,48,44,.04); font-size: 13px; line-height: 1.7; }
.message p { margin: 0; }
.message small { display: block; margin-top: 6px; color: var(--faint); font-size: 9px; }
.message.stellan { align-self: flex-start; border: 1px solid var(--border); background: var(--surface); border-top-left-radius: 8px; }
.message.stellan::before {
  width: 20px; height: 18px; position: absolute; left: 13px; top: -11px; background: var(--surface); border-left: 1px solid var(--border);
  clip-path: polygon(0 100%, 48% 0, 100% 100%); content: "";
}
.message.you { align-self: flex-end; background: linear-gradient(135deg, #edd9bc, #f1dfc8); color: #3d302b; border-top-right-radius: 8px; }
.message.you::after { width: 20px; height: 18px; position: absolute; right: 13px; top: -10px; background: #efddc4; clip-path: polygon(0 100%, 52% 0, 100% 100%); content: ""; }
html[data-theme="dark"] .message.you { background: linear-gradient(135deg, #60473a, #523a31); color: var(--ink); }
html[data-theme="dark"] .message.you::after { background: #594035; }
.thought-card { align-self: flex-start; max-width: 86%; padding: 10px 13px; border-left: 2px solid var(--rose); border-radius: 3px 15px 15px 3px; background: var(--rose-mist); color: var(--muted); font-family: Georgia, "Songti SC", serif; font-size: 11px; line-height: 1.65; }
.typing { display: flex; align-items: center; gap: 4px; width: max-content; padding: 11px 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); animation: dot 1.25s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%,60%,100% { opacity: .28; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-contract { margin: 5px 0 0; padding-top: 10px; border-top: 1px dashed var(--border); }
.contract-label { align-self: center; margin: 5px 0; padding: 5px 9px; border-radius: 99px; background: var(--cream); color: var(--muted); font-size: 8px; letter-spacing: .08em; }
.proactive-stack { width: 86%; align-self: flex-start; display: grid; gap: 5px; padding-left: 8px; border-left: 2px solid var(--rose); }
.proactive-stack .message { max-width: 100%; width: 100%; }
.proactive-stack .message + .message::before { display: none; }
.media-card { margin-top: 9px; padding: 11px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); }
.music-card { display: grid; grid-template-columns: 38px 1fr 30px; align-items: center; gap: 9px; }
.album { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, var(--rose-soft), var(--peach)); color: var(--rose-deep); font-size: 18px; }
.media-copy strong, .media-copy small { display: block; }.media-copy strong { font-size: 10px; }.media-copy small { margin-top: 3px; color: var(--muted); font-size: 8px; }.media-play { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--rose); color: white; }
.web-embed { overflow: hidden; padding: 0; }.web-preview { height: 64px; position: relative; background: linear-gradient(135deg, var(--blue-soft), var(--rose-mist)); }.web-preview::before { inset: 12px 14px; position: absolute; border-radius: 8px; background: rgba(255,255,255,.65); box-shadow: 0 8px 18px rgba(67,48,44,.08); content: ""; }.web-meta { padding: 10px; }.web-meta strong, .web-meta small { display: block; }.web-meta strong { font-size: 10px; }.web-meta small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.standalone-image { width: 76%; height: 150px; align-self: flex-start; position: relative; overflow: hidden; border-radius: 19px; background: linear-gradient(160deg, #efd2d8, #e9dfcc 47%, #a8bec2); box-shadow: var(--shadow-soft); }
.standalone-image::before { width: 90px; height: 90px; position: absolute; right: 24px; top: 23px; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; content: ""; }.standalone-image::after { left: 18px; bottom: 14px; position: absolute; color: rgba(53,43,41,.68); font-family: Georgia, serif; font-size: 10px; content: "图片独立显示 · 不住进气泡"; }
.tool-shelf { align-self: stretch; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 9px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.tool-shelf button { min-width: 0; display: grid; place-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; background: transparent; color: var(--muted); font-size: 8px; cursor: pointer; }.tool-shelf button:hover { background: var(--rose-mist); color: var(--rose-deep); }.tool-shelf i { font-size: 17px; }

/* Home */
.home-hero { padding: 12px 3px 22px; }   /* 下缘 22:门楣卡片顶上那个便签角向上戳 16px,原来 padding-0 正好压住日期 */
.home-clock { font-family: Georgia, serif; font-size: 50px; line-height: 1; letter-spacing: -.035em; }
.home-date { margin-top: 9px; color: var(--muted); font-size: 11.5px; letter-spacing: .11em; }
.home-whisper { display: flex; align-items: center; gap: 7px; margin: 19px 0 10px; color: var(--rose); font-size: 9px; letter-spacing: .13em; }
.signature-card { position: relative; padding: 22px 21px 24px; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(145deg, var(--surface), var(--surface-soft)); box-shadow: var(--shadow-soft); }
.signature-card::before { width: 31px; height: 24px; position: absolute; left: 28px; top: -16px; background: var(--surface); clip-path: polygon(0 100%, 50% 0, 100% 100%); content: ""; }
/* 门楣署名:9px 太小(她 08-17)。「Claude · 写给今天的你」是落款,
   该看得清 —— 提到 11.5,右边那个「门 楣」保持小字当角标 */
.signature-meta { display: flex; justify-content: space-between; align-items: baseline;
  color: var(--muted); font-size: 11.5px; }
.signature-meta span:last-child { font-size: 9.5px; letter-spacing: .18em; color: var(--faint); }
.signature-card blockquote {
  margin: 19px 0 0; font-family: Georgia, "Songti SC", "Noto Serif SC", serif;
  font-size: 20px; line-height: 1.92; letter-spacing: .012em; color: var(--ink);
  animation: sig-in .85s var(--ease) both;
}
@keyframes sig-in { from { opacity: 0; transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .signature-card blockquote { animation: none } }
.schedule-line { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-soft); color: var(--muted); font-size: 11px; }
.schedule-line i { color: var(--amber); font-size: 15px }
.chat-door { display: grid; grid-template-columns: 44px 1fr 32px; align-items: center; gap: 11px; margin-top: 13px; padding: 13px; border: 1px solid var(--border); border-radius: 21px; background: var(--surface); box-shadow: var(--shadow-soft); }
.chat-avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 16px; background: var(--rose-soft); color: var(--rose-deep); font-size: 21px; }
.chat-copy { min-width: 0; }.chat-copy strong, .chat-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.chat-copy strong { font-family: Georgia, "Songti SC", serif; font-size: 14px; }.chat-copy small { margin-top: 5px; color: var(--muted); font-size: 9px; }.chat-arrow { color: var(--rose); font-size: 20px; }
.today-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.today-card { min-width: 0; min-height: 118px; padding: 14px; position: relative; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); text-align: left; cursor: pointer; }
.today-card .today-icon { width: 31px; height: 31px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 11px; }
.today-icon.rose { background: var(--rose-soft); color: var(--rose-deep); }.today-icon.beige { background: var(--cream); color: #96785a; }.today-icon.blue { background: var(--blue-soft); color: var(--blue); }.today-icon.sage { background: var(--sage-soft); color: #62937d; }
.today-card strong, .today-card small { display: block; }.today-card strong { font-family: Georgia, "Songti SC", serif; font-size: 14px; }.today-card small { margin-top: 6px; color: var(--muted); font-size: 9px; }.today-label { position: absolute; right: 12px; top: 13px; color: var(--faint); font-size: 9px; }

/* Settings */
.settings-intro { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 13px; margin: 10px 0 19px; padding: 16px; border-radius: 23px; background: linear-gradient(135deg, var(--rose-soft), var(--cream)); }
.settings-avatar { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.6); border-radius: 21px; background: var(--surface); color: var(--rose-deep); font-family: Georgia, serif; font-size: 24px; box-shadow: var(--shadow-soft); }
.settings-intro h2 { margin: 0; font-family: Georgia, serif; font-size: 18px; font-weight: 500; }.settings-intro p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.settings-group { margin-bottom: 14px; overflow: hidden; border: 1px solid var(--border); border-radius: 21px; background: var(--surface); box-shadow: 0 6px 18px rgba(67,48,44,.035); }
.settings-row { min-height: 59px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 9px 13px; }
.settings-row + .settings-row { border-top: 1px solid var(--border); }
.settings-row .row-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; background: var(--cream); color: #927960; font-size: 17px; }
.settings-row:nth-child(2n) .row-icon { background: var(--rose-mist); color: var(--rose); }
.row-copy strong, .row-copy small { display: block; }.row-copy strong { font-size: 12px; font-weight: 600; }.row-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }.row-value { color: var(--muted); font-size: 10px; }.row-value i { font-size: 17px; }
.toggle { width: 42px; height: 25px; position: relative; border-radius: 99px; background: var(--border-strong); cursor: pointer; transition: background .2s; }.toggle::after { width: 19px; height: 19px; position: absolute; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(53,43,41,.2); content: ""; transition: transform .23s var(--ease); }.toggle.on { background: var(--rose); }.toggle.on::after { transform: translateX(17px); }
.settings-details { margin-bottom: 14px; overflow: hidden; border: 1px solid var(--border); border-radius: 21px; background: var(--surface); }
.settings-details summary { min-height: 56px; display: flex; align-items: center; gap: 11px; padding: 0 14px; cursor: pointer; list-style: none; font-family: Georgia, "Songti SC", serif; font-size: 14px; }
.settings-details summary::-webkit-details-marker { display: none; }
.settings-details summary > i:first-child { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 11px; background: var(--cream); color: #927960; font-size: 17px; }
.settings-details summary .chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
.settings-details[open] summary .chev { transform: rotate(90deg); }
.settings-details .settings-group { margin: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.settings-row.tall { min-height: 68px; }
.settings-row .row-control { min-width: 86px; max-width: 145px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 10px; outline: none; background: var(--surface-soft); color: var(--muted); text-align: right; font-size: 9px; }
.settings-row select.row-control { appearance: none; }
.settings-save { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin: 18px 0 3px; }
.settings-save button { min-height: 45px; border-radius: 15px; cursor: pointer; }
.settings-save .save { background: var(--rose); color: #fff; box-shadow: 0 8px 20px rgba(201,111,125,.22); }
.settings-save .back { padding-inline: 18px; background: var(--cream); color: var(--muted); }

/* Relationship pages */
.relation-hero { margin: 8px 0 14px; padding: 18px; position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(145deg, var(--surface), var(--surface-soft)); box-shadow: var(--shadow-soft); }
.relation-hero::after { width: 110px; height: 110px; position: absolute; right: -35px; top: -42px; border-radius: 50%; background: var(--rose-soft); opacity: .7; content: ""; }.relation-hero h2 { margin: 8px 0 6px; position: relative; z-index: 1; font-family: Georgia, "Songti SC", serif; font-size: 22px; font-weight: 500; }.relation-hero p { max-width: 82%; margin: 0; position: relative; z-index: 1; color: var(--muted); font-size: 10px; line-height: 1.65; }
.relation-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 1px 0 11px; scrollbar-width: none; }.relation-tabs::-webkit-scrollbar { display: none; }.relation-tabs button { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--muted); font-size: 9px; }.relation-tabs button.active { border-color: var(--rose-soft); background: var(--rose-soft); color: var(--rose-deep); }
.entry-list { display: grid; gap: 10px; }.entry-card { padding: 15px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: 0 5px 16px rgba(67,48,44,.035); }.entry-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; }.entry-card h3 { margin: 10px 0 7px; font-family: Georgia, "Songti SC", serif; font-size: 16px; font-weight: 500; }.entry-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }.entry-actions { display: flex; gap: 13px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); color: var(--muted); font-size: 9px; }.entry-actions button { padding: 0; background: none; color: inherit; }
.relation-compose { display: grid; grid-template-columns: 1fr 38px; gap: 8px; margin-bottom: 12px; padding: 9px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }.relation-compose input { min-width: 0; border: 0; outline: 0; background: transparent; font-size: 10px; }.relation-compose button { border-radius: 12px; background: var(--rose); color: #fff; }
.mood-scale { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; margin-top: 13px; }.mood-scale button { padding: 10px 2px; border-radius: 13px; background: var(--cream); color: var(--muted); font-size: 9px; }.mood-scale button.active { background: var(--rose-soft); color: var(--rose-deep); }
.cycle-orb { width: 150px; height: 150px; display: grid; place-items: center; margin: 14px auto 18px; position: relative; border: 12px solid var(--cream); border-top-color: var(--rose); border-right-color: var(--peach); border-radius: 50%; }.cycle-orb::after { inset: 9px; position: absolute; border: 1px dashed var(--border-strong); border-radius: 50%; content: ""; }.cycle-orb strong, .cycle-orb small { display: block; position: relative; z-index: 1; text-align: center; }.cycle-orb strong { font-family: Georgia, serif; font-size: 27px; }.cycle-orb small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }.stat { padding: 12px 8px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); text-align: center; }.stat strong, .stat small { display: block; }.stat strong { font-family: Georgia, serif; font-size: 17px; }.stat small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.timeline { margin-left: 10px; padding-left: 18px; border-left: 1px solid var(--border-strong); }.timeline-item { position: relative; padding: 0 0 18px; }.timeline-item::before { width: 9px; height: 9px; position: absolute; left: -23px; top: 4px; border: 3px solid var(--canvas); border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 1px var(--rose); content: ""; }.timeline-item strong { display: block; font-size: 11px; }.timeline-item p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.fab { width: 46px; height: 46px; display: grid; place-items: center; position: absolute; right: 22px; bottom: 98px; z-index: 7; border-radius: 50%; background: var(--rose); color: #fff; box-shadow: 0 10px 24px rgba(201,111,125,.28); font-size: 20px; }

/* Dashboard placeholder */
.dash-banner { margin: 10px 0 14px; padding: 18px; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(145deg, var(--surface), var(--cream)); box-shadow: var(--shadow-soft); }
.dash-banner-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }.dash-banner h2 { margin: 9px 0 6px; font-family: Georgia, "Songti SC", serif; font-size: 21px; font-weight: 500; }.dash-banner p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }.status-dot::before { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); content: ""; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric-card { min-height: 117px; padding: 14px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.metric-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 9px; }.metric-head i { font-size: 17px; color: var(--rose); }.metric-card strong { display: block; margin-top: 17px; font-family: Georgia, "Songti SC", serif; font-size: 18px; font-weight: 500; }.metric-card small { display: block; margin-top: 5px; color: var(--faint); font-size: 9px; }
.placeholder-line { height: 5px; margin-top: 14px; overflow: hidden; border-radius: 99px; background: var(--cream); }.placeholder-line i { display: block; width: 32%; height: 100%; border-radius: inherit; background: var(--border-strong); }
.agent-list, .check-list { overflow: hidden; border: 1px solid var(--border); border-radius: 21px; background: var(--surface); }
.agent-row, .check-row { min-height: 58px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 9px 13px; }.agent-row + .agent-row, .check-row + .check-row { border-top: 1px solid var(--border); }
.agent-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 13px; background: var(--rose-soft); color: var(--rose-deep); font-weight: 700; }.agent-avatar.cc { background: var(--cream); color: #94775e; }
.agent-copy strong, .agent-copy small { display: block; }.agent-copy strong { font-size: 12px; }.agent-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.check-row { grid-template-columns: 30px 1fr auto; }.check-row > i { color: var(--faint); font-size: 18px; }.check-row strong { font-size: 11px; font-weight: 600; }.check-row span { color: var(--faint); font-size: 9px; }
.demo-ribbon { display: flex; align-items: center; gap: 7px; margin: 14px 0 2px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--muted); font-size: 9px; line-height: 1.55; }

@media (min-width: 720px) {
  body.preview-page { padding: 28px; }
  .app { height: min(920px, calc(100dvh - 56px)); min-height: 0; border-radius: 34px; }
  .screen { height: 100%; min-height: 0; }
}
