/* Den 前端样式：照样稿 docs/样稿/chat.html 拆出来，规范见 docs/设计体系.md。服务器 CSP 不许内联样式，页面里不写 style 属性。 */
/* 字体放在自己服务器上（SIL OFL，许可在 fonts/ 里）：Caveat 只给顶栏名字，Mali 给导航、昵称、分组标题；只带拉丁字符，中文掉到系统字 */
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("fonts/caveat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mali"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/mali-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mali"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/mali-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #FFFFFF; --surface: #FFFFFF;   /* 纯白纸（Oli 11-28 拉过黄度，定 0） */ --surface-2: #F3EFEA;
  --ink: #3E2416;
  --ink-2: color-mix(in srgb, var(--ink) 78%, transparent);
  --ink-3: color-mix(in srgb, var(--ink) 66%, transparent);
  --line: color-mix(in srgb, var(--ink) 10%, transparent);
  --fox: #E4753D; --fox-soft: color-mix(in srgb, var(--fox) 12%, transparent);
  --me: #FFF2E8;                 /* 她的气泡：很淡的暖橙 */
  --danger: #B8483A;
  --pink: #E290A9; --pink-soft: #FFF0F4; --gold: #E3B25C;   /* 辅色（Oli 11-28：颜色太少像国外绘本；第一版粉太浓、第二版藕荷发灰，定成嫩而淡的干净浅粉）：给梦和选中；暖金给月亮 */
  --scrim: rgba(62,36,22,.18);
  --lift: 0 4px 6px -3px rgba(62,36,22,.2);   /* 照上一单：向下的短投影，不描边 */
  --pop: 0 0 0 .5px color-mix(in srgb, var(--ink) 8%, transparent), 0 12px 36px rgba(62,36,22,.14);
  --hand: "Caveat", system-ui, -apple-system, "PingFang SC", sans-serif;
  --ui: "Mali", system-ui, -apple-system, "PingFang SC", sans-serif;   /* 副字体：导航、昵称、分组标题、模型名。Mali 圆体带一点手写，夹在 Caveat 和系统字之间，不跳 */      /* 手写体只用在顶栏的名字上（Oli 11-28）；Caveat 没有中文，中文掉到苹方，不能写 cursive（中文会掉成宋体、楷体） */
  --body: system-ui, -apple-system, "PingFang SC", sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --spring: cubic-bezier(.3,1.25,.5,1);
  --safe-top: 62px; --safe-bottom: 34px;
}
:root.night {   /* 夜间照她给的参考图（11-28）：偏冷的近黑灰，不带棕；Hamen 气泡比底亮一档，她的再亮一档 */
  --bg: #17181B; --surface: #232427; --surface-2: #2D2E32;
  --ink: #ECE9E4;
  --ink-2: color-mix(in srgb, var(--ink) 80%, transparent);
  --ink-3: color-mix(in srgb, var(--ink) 60%, transparent);
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --fox: #EE8A52; --fox-soft: color-mix(in srgb, var(--fox) 18%, transparent);
  --me: #2F3237; --danger: #E07A6A;
  --pink: #D9A3BC; --pink-soft: #2E2A2E; --gold: #EDC274;
  --scrim: rgba(0,0,0,.4);
  --lift: 0 4px 6px -3px rgba(0,0,0,.45);
  --pop: 0 0 0 .5px color-mix(in srgb, var(--ink) 10%, transparent), 0 12px 36px rgba(0,0,0,.45);
}

* { box-sizing: border-box; margin: 0; }
html { background: #EDE6DC; color: var(--ink); font: 15px/24px var(--body); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
:root.night { background: #0E0F11; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { display: grid; place-items: center; }
button, textarea, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s ease-out, background-color .24s var(--ease), color .24s var(--ease), opacity .24s var(--ease); }
button:active { transform: scale(.96); }
:focus { outline: none; }
:focus-visible { outline: 1.5px solid var(--fox); outline-offset: 2px; border-radius: 8px; }
textarea:focus-visible, input:focus-visible { outline: none; }
svg { display: block; }
/* 图标一套规格：24 格，线宽 1.6，圆头圆角；页面上只用 24、22、20 三个尺寸 */
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.s22 { width: 22px; height: 22px; } .ico.s20 { width: 20px; height: 20px; }
/* 小字（状态、日期、Thought、时间、系统提示）一律系统字；手写体只给顶栏的名字 */
.hand { font: 500 12px/16px var(--body); color: var(--ink-3); }
.star { fill: var(--fox); }
.hit { position: relative; }
.hit::after { content: ""; position: absolute; left: -8px; right: -8px; top: 50%; height: 44px; transform: translateY(-50%); }

.stage { width: calc(440px * var(--fit, 1)); height: calc(956px * var(--fit, 1)); }
.phone { position: relative; width: 440px; height: 956px; transform: scale(var(--fit, 1)); transform-origin: top left; border-radius: 48px; overflow: hidden; overflow: clip; isolation: isolate; background: var(--bg); box-shadow: 0 0 0 .5px var(--line), 0 30px 80px rgba(62,36,22,.18); transition: background-color .6s var(--ease); }
@media (max-width: 600px) {
  /* iPhone 主屏幕打开时只有 100vh 铺满物理屏；100%、100dvh、fixed inset:0 都短一截，底下露黑（上一单真机踩过）。
     平时外壳 100vh，但不超过屏幕高（iOS 27 状态栏透明时 100vh 多出一截状态栏，12-04）；键盘弹起时 viewport.js 设 --vv-top／--vv-h，外壳换成 fixed 跟着可见区走，输入框贴着键盘 */
  html, body { height: min(100vh, var(--screen-h, 100vh)); }
  html, :root.night { background: var(--bg); } /* 手机上没有外框，页面底色跟纸走：浏览器里打开时状态栏取的是这个颜色（Oli 12-04） */
  body { display: block; }
  .stage { position: absolute; left: 0; right: 0; top: var(--vv-top, 0px); width: 100%; height: var(--vv-h, min(100vh, var(--screen-h, 100vh))); }
  .keyboard-up .stage { position: fixed; }
  .phone { width: 100%; height: 100%; transform: none; border-radius: 0; box-shadow: none; }
  :root { --safe-top: max(env(safe-area-inset-top), 12px); --safe-bottom: max(env(safe-area-inset-bottom), 12px); }
  :root.keyboard-up { --safe-bottom: 8px; } /* 键盘弹起时底下没有横条，不留安全区 */
}
/* 手帐纸：纸纹＋点格；有底图（GPT 生的，带星星月亮）就铺底图，点格照样压在上面 */
.card { position: absolute; inset: 0; z-index: 1; isolation: isolate; overflow: hidden; background: var(--bg); transition: transform .38s cubic-bezier(.32,.72,0,1), border-radius .38s cubic-bezier(.32,.72,0,1), box-shadow .38s; }
.phone.open .card { transform: translateX(240px); border-radius: 40px 0 0 40px; box-shadow: -2px 0 24px rgba(62,36,22,.1); }
.shade { position: absolute; inset: 0; z-index: 20; display: none; width: 100%; background: color-mix(in srgb, var(--bg) 55%, transparent); border-radius: inherit; }
.phone.open .shade { display: block; }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--wall, none) center / cover no-repeat; mix-blend-mode: multiply; } /* 白纸底图乘上纸色，拉黄度时一起变 */
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.3px); background-size: 20px 20px; background-position: 10px 10px; }
/* 底图自带点格，铺了底图就不再叠一层点；夜间底图太亮，不铺，只留点格 */
.phone.has-wall .card::after { display: none; }
:root.night .card::before { display: none; }
:root.night .phone.has-wall .card::after { display: block; }
/* 她自己换的壁纸：原样铺，不乘纸色；夜里也铺（默认那张白纸夜里才不铺），点格不再叠 */
.phone.own-wall .card::before { mix-blend-mode: normal; }
:root.night .phone.own-wall .card::before { display: block; }
:root.night .phone.own-wall .card::after { display: none; }
/* 换了壁纸：顶栏和输入栏底下不再铺整块纸色，半透明加模糊，让壁纸从上到下连着 */
.phone.own-wall .top { background: color-mix(in srgb, var(--bg) 45%, transparent); }
.phone.own-wall .dock { background: linear-gradient(0deg, color-mix(in srgb, var(--bg) 45%, transparent), transparent); }

/* ---------- 顶栏 ---------- */
.top { position: absolute; z-index: 3; inset: 0 0 auto; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: var(--safe-top) 10px 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 94%, transparent) calc(100% - 18px), transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 14px), transparent); } /* 只在状态行下面那一截渐隐，名字和状态底下不透明（Oli 11-28：Thinking 被渐隐吃掉了） */
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.title { display: grid; justify-items: center; }
/* 名字和状态紧挨着 */
.title b { font: 700 28px/28px var(--hand); color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 4px; height: 16px; margin-top: 0; font: 500 12px/16px var(--ui); } /* 和抽屉子页名同一副字体 */
.status svg { width: 10px; height: 10px; }
.status .stars { display: inline-flex; gap: 2px; }
.status .stars svg { width: 7px; height: 7px; animation: twinkle 1.4s var(--ease) infinite; }
.status .stars svg:nth-child(2) { animation-delay: .22s; } .status .stars svg:nth-child(3) { animation-delay: .44s; }
.status .moon { animation: glow 6s ease-in-out infinite; }
@keyframes twinkle { 0%, 70%, 100% { opacity: .25; transform: scale(.7); } 30% { opacity: 1; transform: scale(1.15); } }
@keyframes glow { 50% { opacity: .45; } }
/* 右上角：狐狸爪印大、小狗爪印小，点开是 Hamen 的资料和聊天壁纸 */
.paws { position: relative; }
.paw { position: absolute; }
.paw.fox { width: 22px; height: 22px; right: 7px; top: 6px; fill: var(--fox); transform: rotate(18deg); }
.paw.pup { width: 14px; height: 14px; left: 8px; bottom: 7px; fill: #C98B5A; transform: rotate(-16deg); }
:root.night .paw.pup { fill: #D9A47A; }
.av { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2) center / cover; box-shadow: 0 0 0 .5px var(--line); }
.av.ai { background-image: var(--ai-av, url("assets/avatar-hamen.jpg")); }
.av.me { background-image: var(--me-av, url("assets/avatar-moozie.jpg")); }

/* ---------- 消息 ---------- */
.list { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--safe-top) + 66px) 14px calc(var(--safe-bottom) + 140px); display: flex; flex-direction: column; gap: 20px; scrollbar-width: none; }
.list::-webkit-scrollbar { display: none; }
.list > :first-child { margin-top: auto; }
.day { align-self: center; margin: 4px 0 -6px; font-weight: 600; }
.sys { align-self: center; display: grid; justify-items: center; gap: 6px; max-width: calc(100% - 2 * (32px + 8px)); } /* 和气泡同一条宽度规矩 */
.sys .row { display: inline-flex; align-items: center; gap: 6px; }
.sys p { display: none; font: 14px/20px var(--body); color: var(--ink-2); background: var(--surface); box-shadow: var(--lift); border-radius: 14px; padding: 8px 12px; } /* 和 Hamen 气泡一样白 */
.sys.open p { display: block; animation: rise .24s var(--ease) both; }
.turn { position: relative; display: flex; align-items: flex-start; gap: 8px; }
.turn.me { flex-direction: row-reverse; }
.turn .av { width: 32px; height: 32px; margin-top: 4px; } /* 聊天里的头像 32，跟第一个气泡第一行的中线对齐（单行气泡 40，(40-32)/2＝4；Oli 11-28 嫌 40 大） */
/* 头像跟自己这一组第一个气泡顶边对齐：上面有 Thought 那行时往下让 20＋4 */
.turn.ai:has(> .stack > .think) > .av { margin-top: 28px; } /* Thought 行 20＋间距 4，再加 4 */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; max-width: calc(100% - 2 * (32px + 8px)); justify-items: start; min-width: 0; }
.stack > * { max-width: 100%; min-width: 0; } /* 一组气泡的宽度锁在上限里：代码块、表格太宽就在里面横滑，不把气泡撑过对方头像那一列 */ /* 不越过对方头像那一列 */
.me .stack { justify-items: end; }
.think { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 2px; }
.think svg { width: 9px; height: 9px; }
.used { display: flex; flex-wrap: wrap; align-items: center; min-height: 20px; padding: 0 2px; } /* 工具名：和 Thought 同一种小字，点隔开 */
.used > * { font: inherit; line-height: 20px; } /* 行高写死，字体换上来前后高度不变，头像对齐量得准 */
.used > :not(:last-child)::after { content: "·"; margin: 0 5px; } /* 点跟在前一个后面，换行时不顶在行首 */
.used .more { color: var(--fox); }
.b { position: relative; min-height: 40px; padding: 8px 12px; border-radius: 18px; overflow-wrap: anywhere; color: var(--ink); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; animation: rise .24s var(--ease) both; }
.ai .b, .me .b { -webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
  box-shadow: inset 0 .5px 0 rgba(255,255,255,.7), inset 0 0 0 .5px rgba(255,255,255,.35), var(--lift); }
/* 玻璃气泡：底色留 6 成左右，后面的底图透一点上来再糊开；字仍是深棕，对比度够
   ponytail: 每个气泡一层 backdrop-filter，聊天很长时 iPhone 上可能掉帧，真机卡就只给最近 30 条开 */
.ai .b { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } /* Hamen 纯白实色（Oli 11-28），只有她的气泡是玻璃 */
.me .b { background: color-mix(in srgb, var(--me) 64%, transparent); }
:root.night .me .b { background: var(--me); } /* 夜里她的气泡用实色，不做玻璃（透出来的底太黑，灰度不稳） */
:root.night .ai .b, :root.night .me .b { box-shadow: inset 0 .5px 0 rgba(255,255,255,.08), var(--lift); }
.ai .stack > .b:first-of-type, .ai .think + .b, .ai .used + .b { border-top-left-radius: 6px; }
.me .stack > .b:first-child { border-top-right-radius: 6px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.time { justify-self: start; margin: 0 0 0 4px; font: 400 11px/14px var(--body); color: var(--ink-3); font-variant-numeric: tabular-nums; } /* 一轮一个，放在这一轮最后一条下面 */
.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
/* 打字中：三个小爪印从左到右依次踩亮，一上一下，像有人走过来 */
.typing { align-items: center; gap: 3px; padding: 12px 14px; }
.typing svg { width: 12px; height: 12px; fill: var(--fox); transform: translateY(var(--y)) rotate(var(--r)); animation: pawstep 1.8s var(--ease) infinite; }
.typing svg:nth-child(1) { --y: 2px; --r: 80deg; } .typing svg:nth-child(2) { --y: -2px; --r: 100deg; animation-delay: .3s; } .typing svg:nth-child(3) { --y: 2px; --r: 80deg; animation-delay: .6s; }
@keyframes pawstep { 0%, 100% { opacity: .18; } 15%, 55% { opacity: 1; } }

/* ---------- 输入栏 ---------- */
.dock { position: absolute; z-index: 4; inset: auto 0 0; padding: 20px 14px var(--safe-bottom); background: linear-gradient(0deg, var(--bg) 55%, transparent); }
.composer { position: relative; display: flex; flex-direction: column; border-radius: 22px; padding: 10px 8px 4px 10px; background: var(--surface); box-shadow: 0 0 0 .5px color-mix(in srgb, var(--ink) 7%, transparent), 0 4px 20px rgba(62,36,22,.08); }
.composer textarea { display: block; width: 100%; min-height: 30px; max-height: 120px; resize: none; border: 0; padding: 3px 6px 6px; font: 16px/24px var(--body); /* 输入框保持 16，iOS 小于 16 会聚焦放大 */ color: var(--ink); background: transparent; }
.composer textarea::placeholder { color: var(--ink-3); }
.tools { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.tools .l { display: flex; align-items: center; }
.tools .icon-btn { width: 40px; height: 40px; color: var(--ink-3); }
.tools .icon-btn.off { opacity: .45; cursor: default; }
.tools .icon-btn[aria-expanded="true"] { color: var(--fox); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; color: var(--ink-3); font: 500 13px/32px var(--ui); }
.pill .bars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; }
.pill .bars i { width: 2.5px; border-radius: 1px; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.pill .bars i:nth-child(1) { height: 4px; } .pill .bars i:nth-child(2) { height: 6px; } .pill .bars i:nth-child(3) { height: 8px; } .pill .bars i:nth-child(4) { height: 10px; }
.pill .bars i.on { background: var(--fox); }
.pill .chev { width: 12px; height: 12px; stroke-width: 1.8; }
/* 发送：纸飞机线条（以前的写法）。有字才是深色实心；没字一律灰（有没回的消息时灰着也能按，按了让他回） */
.send { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink-3); }
.send .ico { width: 20px; height: 20px; }
.send.ready { background: var(--ink); color: var(--bg); }
.send.ready:active { opacity: .82; }

/* 剪影：狐狸和小狗的背影，狐狸在左、小狗在右靠着它（生图 A11，Oli 11-28 定），坐在输入栏右上沿，像一起在看上面的聊天 */
.fox { position: absolute; right: 22px; bottom: calc(100% - 3px); width: 44px; height: 34px; pointer-events: none; }
.fox i { position: absolute; inset: 0; background: color-mix(in srgb, var(--fox) 82%, var(--ink)); -webkit-mask: url("assets/sil-lean.png") bottom center / contain no-repeat; mask: url("assets/sil-lean.png") bottom center / contain no-repeat; transform-origin: 50% 100%; animation: breathe 4.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.03, .98); } }
.fox .mark { position: absolute; left: -10px; top: -8px; display: flex; gap: 3px; opacity: 0; transition: opacity .32s var(--ease); }
.fox .stars svg { width: 7px; height: 7px; animation: twinkle 1.4s var(--ease) infinite; }
.fox .stars svg:nth-child(2) { width: 5px; height: 5px; margin-top: -6px; animation-delay: .25s; }
.fox .stars svg:nth-child(3) { width: 4px; height: 4px; margin-top: 3px; animation-delay: .5s; }
.fox .moon svg { width: 12px; height: 12px; animation: glow 6s ease-in-out infinite; }
.phone[data-state="thinking"] .fox .stars, .phone[data-state="asleep"] .fox .moon { opacity: 1; }
.phone[data-state="asleep"] .fox i { -webkit-mask-image: url("assets/sil-fox-sleep.png"); mask-image: url("assets/sil-fox-sleep.png"); animation-duration: 6.4s; } /* 睡着：蜷起来的狐狸（生图 A2），呼吸放慢 */

/* ---------- 发图、发文件 ---------- */
/* 预览托盘：选了图或文件，输入栏里先排一行，每个右上角能删；下面输入框“附一句话” */
.tray { display: none; gap: 8px; padding: 2px 2px 8px; overflow-x: auto; scrollbar-width: none; }
.composer.has-tray .tray { display: flex; }
.phone.tray-on .list { padding-bottom: calc(var(--safe-bottom) + 140px + 74px); } /* 托盘出来时消息区跟着让位，最新气泡离剪影还是 18 */
.tray::-webkit-scrollbar { display: none; }
.ti { position: relative; flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--surface-2) center / cover; box-shadow: 0 0 0 .5px var(--line); animation: rise .24s var(--ease) both; }
.ti img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.ti.file { width: 132px; display: grid; grid-template-columns: 30px 1fr; align-content: center; column-gap: 8px; padding: 0 10px; background: var(--surface-2); }
.ti.file .fic { grid-row: span 2; width: 30px; height: 36px; border-radius: 6px; display: grid; place-items: center; background: #fff; color: var(--fox); box-shadow: 0 0 0 .5px var(--line); font: 700 8px/1 var(--body); letter-spacing: .02em; }
.ti.file b { font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti.file small { font-size: 11px; line-height: 14px; color: var(--ink-3); }
.ti .rm { position: absolute; right: -5px; top: -5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 72%, transparent); color: #fff; }
.ti .rm .ico { width: 12px; height: 12px; stroke-width: 2.2; }
/* 她发出去的：图排小格子（一张就单张），文件一张卡片 */
.b.pics { display: grid; gap: 3px; padding: 3px; overflow: hidden; }
.b.pics.n2 { grid-template-columns: repeat(2, 104px); } .b.pics.n1 { width: 200px; }
.b img { -webkit-user-drag: none; -webkit-touch-callout: none; } /* 长按图出我们的菜单，不让 iOS 当拖拽（她 12-05：图片、表情删不掉） */
.b.pics img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; cursor: zoom-in; }
.b.pics.n2 img:first-child { border-top-right-radius: 4px; border-bottom-right-radius: 4px; } .b.pics.n2 img:last-child { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.me .stack > .b.pics:first-child img:last-child { border-top-right-radius: 4px; }
.b.filec { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; min-width: 200px; }
.b.filec .fic { flex: none; width: 34px; height: 40px; border-radius: 7px; display: grid; place-items: center; background: #fff; color: var(--fox); box-shadow: 0 0 0 .5px var(--line); font: 700 9px/1 var(--body); letter-spacing: .02em; }
.b.filec b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; }
.b.filec small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
/* 全屏看图 */
.lb { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; background: rgba(20, 14, 12, .92); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.lb.on { opacity: 1; pointer-events: auto; }
.lb img { max-width: 100%; max-height: 80%; transform: scale(.94); transition: transform .3s var(--spring); }
.lb.on img { transform: none; }
.lb-x { position: absolute; top: calc(var(--safe-top) + 4px); right: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12); }

/* ---------- Hamen 回复里的 Markdown（后端出 HTML 前先净化）：字号、颜色、圆角都跟气泡一套 ---------- */
.b.md { padding: 10px 14px; }
.md > * + * { margin-top: 8px; }
.md h3 { font: 600 16px/22px var(--ui); color: var(--ink); }
.md strong { font-weight: 600; color: var(--ink); }
.md ol, .md ul { padding-left: 20px; } .md li + li { margin-top: 4px; } .md li::marker { color: var(--fox); font-weight: 600; }
.md blockquote { padding: 2px 0 2px 10px; border-left: 3px solid color-mix(in srgb, var(--pink) 45%, #fff); color: var(--ink-2); }
.md a { color: var(--fox); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.md :not(pre) > code { padding: 1px 5px; border-radius: 6px; background: var(--surface-2); font: 13px/20px ui-monospace, "SF Mono", Menlo, monospace; }
.md .tbl { overflow-x: auto; border-radius: 12px; box-shadow: 0 0 0 .5px var(--line); }
.md table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.md th { font: 600 12px/16px var(--ui); color: var(--ink-2); text-align: left; background: var(--surface-2); }
.md th, .md td { padding: 7px 10px; } .md tr + tr td { border-top: .5px solid var(--line); }
/* 代码块：Mac 白色终端（Oli 11-28）：左上红黄绿三个圆点，中间语言名，右边复制；代码等宽，轻微的语法颜色，太宽就横着滑 */
.term { margin-left: -4px; margin-right: -4px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 0 0 .5px rgba(62,36,22,.14), 0 6px 14px -8px rgba(62,36,22,.28); }
.term .bar { position: relative; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; background: linear-gradient(#FBFAF9, #F3F1EF); border-bottom: .5px solid rgba(62,36,22,.1); }
.term .bar i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.12); }
.term .bar i:nth-child(1) { background: #FF5F57; } .term .bar i:nth-child(2) { background: #FEBC2E; } .term .bar i:nth-child(3) { background: #28C840; }
.term .bar span { position: absolute; left: 50%; transform: translateX(-50%); font: 500 11px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-3); }
.term .bar button { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; color: var(--ink-3); }
.term .bar button .ico { width: 15px; height: 15px; }
.term pre { margin: 0; padding: 10px 12px 12px; overflow-x: auto; font: 12.5px/19px ui-monospace, "SF Mono", Menlo, monospace; color: #3B2F2A; scrollbar-width: none; }
.term .k { color: #B4407F; } .term .s { color: #2E7D4F; } .term .c { color: #9C918A; font-style: italic; } .term .f { color: #2F64B0; } .term .n { color: #B5651D; }
/* 夜间：暗底终端（她 12-05），比 Hamen 的气泡再沉一档，语法色提亮 */
:root.night .term { background: #1B1C1F; box-shadow: 0 0 0 .5px rgba(255,255,255,.08), var(--lift); }
:root.night .term .bar { background: linear-gradient(#2A2B2F, #242529); border-bottom-color: rgba(255,255,255,.06); }
:root.night .term .bar i { box-shadow: none; }
:root.night .term pre { color: #E4E0DA; }
:root.night .term .k { color: #F09AC4; } :root.night .term .s { color: #8ED3A0; } :root.night .term .c { color: #8C8781; } :root.night .term .f { color: #8FB8F2; } :root.night .term .n { color: #E9AB6E; }

/* ---------- 弹层：别针、模型 ---------- */
.pop { position: absolute; z-index: 6; bottom: calc(100% + 8px); border-radius: 15px; padding: 5px; background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); box-shadow: var(--pop);
  transform-origin: var(--from, 0 100%); opacity: 0; transform: translateY(8px) scale(.96); pointer-events: none; transition: opacity .2s var(--ease), transform .26s var(--spring); }
.pop.on { opacity: 1; transform: none; pointer-events: auto; }
.attach { left: 0; min-width: 136px; }
.attach button { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px; color: var(--ink); }
.attach button:active { background: var(--fox-soft); transform: none; }
.attach .ico { color: var(--ink-2); }
.pop.on .attach-i { animation: rise .28s var(--ease) both; }
.pop.on .attach-i:nth-child(2) { animation-delay: .03s; } .pop.on .attach-i:nth-child(3) { animation-delay: .06s; }
.models { left: 76px; width: 228px; --from: 20% 100%; }
.models .hd { padding: 8px 10px 4px; }
.models .opt { display: flex; width: 100%; height: 40px; align-items: center; justify-content: space-between; padding: 0 10px; border-radius: 10px; font-size: 14px; }
.models .opt:active { background: var(--fox-soft); transform: none; }
.models .opt small { color: var(--ink-3); font-size: 12px; }
.models .opt .ico { color: var(--fox); opacity: 0; }
.models .opt[aria-checked="true"] .ico { opacity: 1; }
.models hr { border: 0; height: .5px; background: var(--line); margin: 6px 10px; }
.models .seg { margin: 2px 3px 4px; }
.models .seg button { height: 28px; font-size: 13px; }

/* 分段滑块（外观、思考档位都用它）：底下一块滑片跟着选中项滑过去 */
.seg { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding: 3px; border-radius: 12px; background: var(--surface-2); isolation: isolate; }
.seg .thumb { position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); border-radius: 9px; background: var(--surface); box-shadow: 0 1px 4px rgba(62,36,22,.14); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .32s var(--spring); }
.seg button { height: 30px; border-radius: 9px; font-size: 13px; color: var(--ink-3); transition: color .2s var(--ease); }
.seg button:active { transform: none; }
.seg button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }

/* ---------- 遮罩、底部面板、长按菜单、抽屉、提示 ---------- */
.scrim { position: absolute; inset: 0; z-index: 7; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .32s var(--ease); }
.scrim.on { opacity: 1; pointer-events: auto; }
.scrim.blur { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sheet { position: absolute; z-index: 8; inset: auto 8px 8px; max-height: 72%; display: flex; flex-direction: column; border-radius: 30px; padding: 8px 20px calc(var(--safe-bottom) - 8px + 12px);
  background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  box-shadow: var(--pop); transform: translateY(110%); visibility: hidden; transition: transform .34s var(--ease), visibility 0s .34s; touch-action: none; }
.sheet.on { transform: translateY(var(--drag, 0)); visibility: visible; transition: transform .34s var(--ease); }
.sheet .grab { align-self: center; width: 36px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 0 12px; }
.sheet h2 { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font: 600 17px/22px var(--ui); color: var(--ink); }
.sheet h2 svg { width: 10px; height: 10px; }
.sheet h2:empty { display: none; }
.sheet .body { overflow-y: auto; font: 16px/26px var(--body); color: var(--ink-2); touch-action: pan-y; }
.sheet .body p + p { margin-top: 10px; }
.profile { display: grid; justify-items: center; gap: 14px; padding: 4px 0 8px; }
.profile .big { position: relative; width: 88px; height: 88px; border-radius: 50%; background: var(--av-img) center / cover; box-shadow: 0 0 0 .5px var(--line); }
.profile .big span { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink-2); box-shadow: var(--lift); }
.profile label.field { width: 100%; display: grid; gap: 6px; }
.profile input[type="text"] { width: 100%; height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--surface-2); font-size: 17px; color: var(--ink); }
.wall-row { width: 100%; display: flex; align-items: center; gap: 12px; }
.wall-row .thumb-w { width: 44px; height: 72px; border-radius: 10px; background: var(--wall, var(--bg)) center / cover; box-shadow: 0 0 0 .5px var(--line); }
.wall-row .acts { flex: 1; display: grid; gap: 6px; }
.ghost-btn { height: 34px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.text-btn { font-size: 13px; color: var(--ink-3); }
.btn { width: 100%; height: 48px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; }

.ctx { position: absolute; z-index: 8; left: 14px; right: 14px; display: none; flex-direction: column; gap: 10px; }
.ctx.on { display: flex; }
.ctx.me { align-items: flex-end; padding-right: 40px; } .ctx.ai { align-items: flex-start; padding-left: 40px; }
.ctx .ghost { max-width: calc(100% - 40px); padding: 8px 12px; border-radius: 18px; box-shadow: var(--pop); animation: lift .24s var(--ease) both; }
.ctx.ai .ghost { background: color-mix(in srgb, var(--surface) 92%, transparent); } .ctx.me .ghost { background: var(--me); }
.ctx .ghost img { display: block; max-width: 100%; object-fit: cover; border-radius: 14px; } /* 尺寸由 openMenu 照气泡里的写上 */
.ctx .ghost.pic { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; }
@keyframes lift { from { transform: scale(.97); } to { transform: scale(1.02); } }
.menu { width: 220px; border-radius: 16px; overflow: hidden; background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: var(--pop); animation: rise .24s var(--ease) both; }
.menu button { display: flex; width: 100%; height: 44px; align-items: center; justify-content: space-between; padding: 0 16px; font-size: 16px; }
.menu button + button { border-top: .5px solid var(--line); }
.menu button:active { background: var(--fox-soft); transform: none; }
.menu .ico { color: var(--ink-2); }
.menu .del, .menu .del .ico { color: var(--danger); }

/* 抽屉：下嵌（照上一单）：抽屉一直在卡片下面，打开时聊天页整张推到右边 240；入口依次淡入 */
.drawer { position: absolute; z-index: 0; inset: 0 auto 0 0; width: 240px; display: flex; flex-direction: column; padding: calc(var(--safe-top) + 14px) 12px calc(var(--safe-bottom) + 10px); }
.phone.open .drawer > * { animation: drawer-in .38s cubic-bezier(.32,.72,0,1) backwards; }
.phone.open .drawer > :nth-child(2) { animation-delay: 30ms; } .phone.open .drawer > :nth-child(3) { animation-delay: 60ms; }
.phone.open .drawer > :nth-child(4) { animation-delay: 90ms; } .phone.open .drawer > :nth-child(5) { animation-delay: 120ms; }
.phone.open .drawer > :nth-child(6) { animation-delay: 150ms; } .phone.open .drawer > :nth-child(7) { animation-delay: 180ms; }
@keyframes drawer-in { from { opacity: 0; transform: translateX(-8px); } }
/* 抽屉＝这本手帐的目录页（Oli 11-28 选的方向）：顶上两人，下面目录（带点线和真数字） */
.cover { display: grid; gap: 2px; padding: 4px 8px 22px; }
.pair { display: flex; margin-bottom: 10px; }
.pair .av { display: block; width: 52px; height: 52px; box-shadow: 0 0 0 3px var(--bg); }
.pair button + button { margin-left: -14px; }    /* 狐狸在左、小狗在右，叠一点 */
.pair button { border-radius: 50%; }
/* 打开抽屉那一下：狐狸往小狗那边蹭一下，小狗轻轻一跳；只这一次，不循环 */
.phone.open .pair button:first-child .av { animation: nudge .7s var(--ease) .32s both; transform-origin: 50% 100%; }
.phone.open .pair button:last-child .av { animation: hop .5s var(--ease) .62s both; }
@keyframes nudge { 40% { transform: translateX(4px) rotate(10deg); } }
@keyframes hop { 45% { transform: translateY(-4px); } }
.cover b { font: 600 18px/24px var(--ui); color: var(--ink); }
.cover small { font: 500 12px/16px var(--body); color: var(--ink-3); }
.nav { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 8px; border-radius: 12px; color: var(--ink-3); }
.nav:active { transform: none; background: var(--fox-soft); }
.nav b { font: 500 16px/22px var(--ui); color: var(--ink-2); }
.nav .lead { flex: 1; align-self: center; height: 0; margin-top: 6px; border-bottom: 1.5px dotted color-mix(in srgb, var(--ink) 22%, transparent); }
.nav small { font: 500 12px/16px var(--body); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nav[aria-current="page"] b { color: var(--ink); font-weight: 600; }
.nav[aria-current="page"] .ico { color: var(--fox); }
/* 抽屉也铺点格纸，和聊天页是同一本 */
.drawer::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.3px); background-size: 20px 20px; background-position: 10px 10px; }
.drawer { isolation: isolate; }
.demo-box { margin-top: auto; display: grid; gap: 8px; padding: 10px 8px 8px; border: 1px dashed var(--line); border-radius: 14px; }
.demo-box .cap { padding: 0 2px; }
.drawer .spacer { flex: 1; }
.drawer .cap { padding: 0 6px 6px; }
/* 界面上的分组标题、模型名用副字体 */
.cap, .models .hd, .profile .field > span:first-child, .form label > span:first-child, .form .lbl > span:first-child { font: 500 13px/16px var(--ui); color: var(--ink-3); }

/* ---------- 子页：在同一张卡片里换内容，抽屉照样推开。纸和聊天页同一本（点格），换了 App 背景就铺在下面 ---------- */
.page { position: absolute; inset: 0; z-index: 5; display: none; isolation: isolate;
  background: radial-gradient(circle, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.3px) 10px 10px / 20px 20px, var(--app-wall, none) center / cover no-repeat, var(--bg); }
.page.on { display: block; animation: fade .22s var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
.page-title { font: 600 17px/44px var(--ui); color: var(--ink); text-align: center; }
.scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--safe-top) + 56px) 16px calc(var(--safe-bottom) + 28px); scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
/* 分组：分组名用副字体，卡片和 Hamen 气泡同一种白和投影 */
.sec { font: 500 13px/16px var(--ui); color: var(--ink-3); padding: 0 16px 8px; margin-top: 26px; }
.pane > .sec:first-child { margin-top: 6px; }
.group { background: var(--surface); border-radius: 18px; box-shadow: var(--lift); overflow: hidden; }
.li { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 16px; text-align: left; font-size: 15px; line-height: 22px; color: var(--ink); }
.li + .li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--line); }
button.li:active { transform: none; background: var(--fox-soft); }
.li .k { flex: 1; min-width: 0; }
.li .k small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.li .v { color: var(--ink-3); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.li .v.ok { color: color-mix(in srgb, #3F8A55 85%, var(--ink)); }
.go { width: 16px; height: 16px; margin-right: -4px; stroke-width: 2; color: color-mix(in srgb, var(--ink) 30%, transparent); }
.li.add { color: var(--fox); } .li.add .v { color: var(--ink-3); }
.li.pad { padding: 10px 12px; } .li.pad .seg { flex: 1; }
.li.col { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 16px; }
.moon-i { width: 18px; height: 18px; fill: var(--fox); flex: none; }
.ghost-btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
/* 设置分两页，底部浮着一条分段滑块切换（Oli 11-28：一页太长） */
.pane { display: none; } .pane.on { display: block; animation: fade .22s var(--ease) both; }
.page .scroll { padding-bottom: calc(var(--safe-bottom) + 84px); }
.page::after { content: ""; position: absolute; z-index: 3; inset: auto 0 0; height: calc(var(--safe-bottom) + 64px); background: linear-gradient(0deg, var(--bg) 45%, transparent); pointer-events: none; } /* 和聊天页输入栏下面同一种渐隐 */
.tabbar { position: absolute; z-index: 4; left: 50%; bottom: calc(var(--safe-bottom) + 8px); transform: translateX(-50%); width: 208px; padding: 4px; border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 78%, transparent); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%); box-shadow: var(--pop); }
.tabbar .seg { padding: 0; border-radius: 99px; background: color-mix(in srgb, var(--surface-2) 80%, transparent); }
.tabbar .seg .thumb { top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n)); border-radius: 99px; }
.tabbar .seg button { height: 40px; border-radius: 99px; font: 500 14px/40px var(--ui); }
.tabbar .seg button[aria-pressed="true"] { font-weight: 600; }
.li.col .count { align-self: flex-end; font-size: 12px; line-height: 16px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* Hamen 卡片：设置页最上面，他现在怎样、今天醒过几次、下一次什么时候醒（这一页唯一显眼的东西） */
.him { margin-top: 6px; padding-bottom: 14px; }
.him-hd { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px 4px; text-align: left; }
.him-hd:active { transform: none; opacity: .7; }
.him-hd .av { width: 48px; height: 48px; }
.him-hd .who { flex: 1; display: grid; }
.him-hd b { font: 600 18px/24px var(--ui); color: var(--ink); }
.him-hd small { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/16px var(--ui); color: var(--ink-3); }
.him-hd .dot { width: 6px; height: 6px; border-radius: 50%; background: #5BAE72; }
/* 今天这一条＝一条点线小路：免打扰是夜色的一段（带月亮），醒过的每一次留一个狐狸爪印（交替歪一点，像走过去的脚印），
   剪影坐在“现在”，前面一段橘色点线通到下一次醒来——一个空心爪印，外面一圈圈扩散。打开页面时爪印一个个踩出来 */
.strip { margin: 10px 16px 0; }
.track { position: relative; height: 56px; }
.bands { position: absolute; inset: 14px 0; border-radius: 14px; overflow: hidden; }
.quiet { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.q-moon { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; fill: color-mix(in srgb, var(--ink) 32%, transparent); }
.trail { position: absolute; left: 0; right: 0; top: 50%; margin-top: -1px; border-top: 2px dotted color-mix(in srgb, var(--ink) 18%, transparent); }
.ahead { position: absolute; top: 50%; margin-top: -1px; border-top: 2px dotted var(--fox); transition: opacity .24s var(--ease); }
.track .wk { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; fill: var(--fox); transform: translateY(var(--y)) rotate(var(--r)); animation: step .42s var(--spring) backwards; }
@keyframes step { from { opacity: 0; transform: translateY(var(--y)) rotate(var(--r)) scale(.3); } }
.here { position: absolute; bottom: 50%; width: 28px; height: 24px; margin: 0 0 -1px -14px; animation: rise .4s var(--ease) .5s backwards; }
.here i { position: absolute; bottom: 0; background: color-mix(in srgb, var(--fox) 82%, var(--ink)); -webkit-mask: var(--m) bottom center / contain no-repeat; mask: var(--m) bottom center / contain no-repeat; transform-origin: 50% 100%; }
.here .hug { --m: url("assets/sil-hug.png"); inset: 0; animation: breathe 4.8s ease-in-out infinite; }
/* 走路版：狐狸在前（高、尾巴长），小狗在后（矮、圆），原地走路，身子不动。
   帧条是生图 A7、A8（一行四帧），去底后按鼻尖和脚底对齐拼成等宽四格；这里用遮罩一格一格跳着播 */
.here .walker { display: none; -webkit-mask-size: 400% 100%; mask-size: 400% 100%; -webkit-mask-position: 0 0; mask-position: 0 0; animation: frames var(--dur) steps(1, end) infinite; }
.here .fox { --m: url("assets/sil-fox-walk.png"); --dur: 1.65s; left: -36px; width: 52px; height: 26px; }   /* 鼻尖对着“现在” */
.here .pup { --m: url("assets/sil-pup-walk.png"); --dur: 1.3s; left: -59px; width: 22px; height: 19px; }   /* 小狗腿短，步子快一点 */
@keyframes frames {
  0% { -webkit-mask-position: 0 0; mask-position: 0 0; }
  25% { -webkit-mask-position: 33.333% 0; mask-position: 33.333% 0; }
  50% { -webkit-mask-position: 66.667% 0; mask-position: 66.667% 0; }
  75% { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
}
.track.walking .here .hug { display: none; }
.track.walking .here .walker { display: block; }
.next { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; transition: opacity .24s var(--ease); }
.next svg { width: 100%; height: 100%; transform: rotate(90deg); fill: var(--surface); stroke: var(--fox); stroke-width: 1.6; }
.next::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid var(--fox); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { from { transform: scale(.5); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.ticks { position: relative; height: 16px; margin-top: 4px; font-size: 11px; line-height: 16px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ticks span { position: absolute; transform: translateX(-50%); }
.ticks span:first-child { transform: none; } .ticks span:last-child { transform: translateX(-100%); }
.him-next { display: flex; align-items: center; gap: 12px; margin: 12px 16px 0; padding-top: 12px; border-top: .5px solid var(--line); }
.him-next .k { flex: 1; font-size: 15px; line-height: 22px; }
.him-next b { margin-left: 6px; font-weight: 600; font-variant-numeric: tabular-nums; transition: color .24s var(--ease); }
.him-next small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.him.off .next { opacity: .3; } .him.off .next::after { animation: none; opacity: 0; } .him.off .ahead { opacity: 0; } .him.off .him-next b { color: var(--ink-3); text-decoration: line-through; }
/* 人格：平时只露几行，点开全屏粘贴、改 */
.persona { gap: 6px; }
.persona .prev { display: block; max-height: 110px; overflow: hidden; white-space: pre-line; font-size: 15px; line-height: 22px; color: var(--ink-2); -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.persona .prev:empty::before { content: "点这里粘贴 Hamen 的人格提示词"; color: var(--ink-3); }
.sheet.tall { max-height: calc(100% - var(--safe-top) - 8px); }
.form textarea.in.big { height: 56vh; }
/* 工具前面的小图标块 */
.tile { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); }
.li.dim .tile { opacity: .45; }

/* ---------- Memory：这本手帐里贴满的那几页 ---------- */
/* 小星球（Oli 11-28）：白纸上一张小星球贴纸。全部记忆按时间密密长一圈（加细草），平时是合着的花苞；
   狐狸站在顶上，星球转时它原地走，离它越近的花越开，正前方那朵全开带光——狐狸走到哪，哪里开花。花分前后两层，后排矮、淡；
   颜色按被想起几次由浅到深：象牙白、浅粉、粉、玫瑰（玫瑰＝“你为它花的时间”） */
.orb { position: relative; height: 258px; margin: 14px -16px 0; touch-action: pan-y; cursor: grab; }
.orb:active { cursor: grabbing; }
.orb-svg { position: absolute; left: 50%; top: -6px; width: 290px; height: 290px; margin-left: -145px; overflow: visible; }
.orb-edge { fill: #FBF0D3; filter: drop-shadow(0 0 10px rgba(237,194,116,.32)) drop-shadow(0 0 30px rgba(237,194,116,.14)); } /* 日间也是月亮（Moozie 11-28 嫌米白素），但比夜里淡一档、光晕收着 */
/* 夜间：月亮亮起来（Moozie 11-28）——暖金到浅月黄，外面两层光晕 */
:root.night .orb-edge { fill: #F8E7B4; filter: drop-shadow(0 0 14px rgba(237,194,116,.6)) drop-shadow(0 0 44px rgba(237,194,116,.3)); }
:root.night #orb-g stop:first-child { stop-color: #FFF3CF; } :root.night #orb-g stop:last-child { stop-color: #EBC673; }
:root.night .orb-crater { stroke: rgba(160,112,36,.22); }
.orb-disc { fill: url(#orb-g); }
:root.night .jar .glass { fill: rgba(255,255,255,.07); stroke: color-mix(in srgb, var(--pink) 60%, transparent); }
:root.night .jar .shine { opacity: .35; }
:root.night .jar .base { fill: color-mix(in srgb, var(--pink) 45%, var(--surface)); }
:root.night .thumb-w, :root.night .thumb-s.chat { filter: brightness(.3); } /* 默认纸夜间不铺，缩略图跟着暗 */
.orb-crater { fill: none; stroke: rgba(160,112,36,.15); stroke-width: 1; }
.orb-grass { fill: none; stroke: #BCCBB3; stroke-width: .9; stroke-linecap: round; opacity: .8; }
.of { cursor: pointer; }
.of .hit { fill: transparent; }
.of .grow { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(calc(.2 + .9 * var(--o, 0))); } /* 远处贴地只剩小芽，越靠近狐狸越长 */
.of .stem { fill: none; stroke: #A3B69B; stroke-width: 1.2; stroke-linecap: round; }
.of .leaf { fill: #B6C8AC; }
.of .bud { fill: #C9D8BE; opacity: calc(1 - var(--o, 0)); }
.of .open { transform-box: fill-box; transform-origin: 50% 50%; transform: scale(calc(var(--o, 0) * 1.1)) rotate(calc((1 - var(--o, 0)) * -40deg)); opacity: min(1, calc(var(--o, 0) * 2)); }
.of .petal { fill: var(--pc); }
.of .petal2 { fill: color-mix(in srgb, var(--pc) 55%, #fff); }
.of .side .petal { fill: color-mix(in srgb, var(--pc) 80%, #fff); }
.of .core { fill: #EBC06A; }
.of .halo { fill: #FFE9B6; opacity: 0; transition: opacity .3s var(--ease); }
.of.sel .halo { opacity: .7; }
.of.back { opacity: .62; }
.of[data-t="0"] { --pc: #FBEBDD; } .of[data-t="1"] { --pc: #F8D0DA; } .of[data-t="2"] { --pc: #F0AABD; } .of[data-t="3"] { --pc: #F0AABD; } /* 玫瑰旁边的小枝花 */
.of.fresh .bud { fill: #E8C9D2; }
#pg-memory.digging .of.fresh .grow { animation: bud 1.8s ease-in-out infinite; }
@keyframes bud { 50% { transform: scale(calc(.22 + .9 * var(--o, 0))) rotate(6deg); } }
/* 狐狸：顶上偏左，转时原地走（走路帧），停下坐着，带白边 */
/* 便条轨道（Oli 11-28）：一圈很细的椭圆点线从星球两侧斜穿过去，撑开两边；轨道上绕着走的是她贴给他、他还没回的便条，一张一个小信封。
   轨道后半圈在星球后面（淡、小），前半圈在前面；没有便条就只有轨道 */
.orbit { fill: none; stroke: color-mix(in srgb, var(--ink) 18%, transparent); stroke-width: 1.1; stroke-dasharray: 1.2 5; stroke-linecap: round; }
.env { cursor: pointer; }
.env .ebody { fill: #fff; stroke: color-mix(in srgb, var(--pink) 70%, #fff); stroke-width: 1; }
.env .eflap { fill: none; stroke: color-mix(in srgb, var(--pink) 70%, #fff); stroke-width: 1; stroke-linejoin: round; }
.env .eseal { fill: var(--pink); }
.env .ehit { fill: transparent; }
.env.new .eg { animation: envIn .9s var(--spring) both; transform-box: fill-box; transform-origin: center; }
@keyframes envIn { from { transform: scale(.2) translateY(30px); opacity: 0; } }
.note-full .q { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; line-height: 19px; color: var(--ink-3); }
.note-full .q b { color: var(--ink-2); font-weight: 500; }
.note-full .st { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font: 500 12px/16px var(--ui); color: var(--pink); }
.orb-foxwrap { position: absolute; left: 50%; top: 0; width: 0; height: 0; pointer-events: none; filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff); }
.orb-foxwrap i { position: absolute; bottom: 0; background: color-mix(in srgb, var(--fox) 82%, var(--ink)); transition: opacity .2s; }
.orb-foxwrap .walk { left: -28px; width: 56px; height: 28px; -webkit-mask: url("assets/sil-fox-walk.png") 0 0 / 400% 100% no-repeat; mask: url("assets/sil-fox-walk.png") 0 0 / 400% 100% no-repeat; animation: frames .9s steps(1, end) infinite paused; } /* 只用走路的那只（Oli 11-28）：停下时定在走路姿势，星球转时原地走 */
.orb-foxwrap .sit { display: none; }
.orb-foxwrap.moving .walk { animation-play-state: running; }
.orb-foxwrap.left .walk { transform: scaleX(-1); }
/* 正前方那朵的卡片：标题、正文前几行、哪天记下、想起几次 */
.bloom { display: block; width: 100%; margin-top: 0; padding: 14px 16px 12px; border-radius: 18px; text-align: left; background: var(--surface); box-shadow: var(--lift); }
.bloom:active { transform: scale(.985); }
.bloom .bh { display: flex; align-items: center; gap: 6px; font: 500 12px/16px var(--ui); color: var(--ink-3); }
.bloom .bh .rc { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.bloom .bh .rc svg { width: 9px; height: 9px; fill: var(--gold); }
.bloom b { display: block; margin-top: 8px; font: 600 17px/24px var(--ui); color: var(--ink); }
.bloom p { margin: 4px 0 2px; font-size: 15px; line-height: 23px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bloom .bf { display: flex; justify-content: flex-end; font-size: 12px; color: var(--fox); }
.bloom.swap { animation: swap .32s var(--ease); }
@keyframes swap { from { opacity: .25; transform: translateY(4px); } }
.new-tag { display: inline-block; padding: 0 6px; border-radius: 99px; background: var(--pink-soft); font: 600 10px/16px var(--ui); color: var(--pink); }
/* 搜索、分类 */
.search { display: flex; align-items: center; gap: 8px; height: 44px; margin-top: 6px; padding: 0 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--lift); color: var(--ink-3); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
#mem-cat { margin-top: 10px; }
/* 全部记忆：按月份分组，一组一张白卡片，一行一条：左边一个小花点（颜色同星球上的深浅），标题一行、正文一行，右边日期和想起几次 */
.search { margin-top: 12px; }
.mon { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 4px 8px; }
.mon b { font: 600 15px/20px var(--ui); color: var(--ink); }
.mon small { font: 500 12px/16px var(--ui); color: var(--ink-3); }
.mgroup { border-radius: 18px; background: var(--surface); box-shadow: var(--lift); overflow: hidden; }
.mrow { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 16px; text-align: left; }
.mrow + .mrow::before { content: ""; position: absolute; top: 0; left: 37px; right: 0; height: .5px; background: var(--line); }
.mrow:active { transform: none; background: var(--fox-soft); }
.mrow .dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--pc); box-shadow: inset 0 0 0 .5px rgba(62,36,22,.15); }
.mrow .dot.rose { width: 10px; height: 12px; margin-top: 4px; border-radius: 0; box-shadow: none; background: #E890A8; -webkit-mask: url("assets/sil-rose.png") center / contain no-repeat; mask: url("assets/sil-rose.png") center / contain no-repeat; }
.mrow[data-t="0"] { --pc: #FBEBDD; } .mrow[data-t="1"] { --pc: #F8D0DA; } .mrow[data-t="2"] { --pc: #F0AABD; }
.mrow .tx { flex: 1; min-width: 0; }
.mrow .tx b { display: block; font: 500 15px/22px var(--body); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .tx span { display: block; font-size: 13px; line-height: 19px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow mark, .mem-full mark { background: color-mix(in srgb, var(--gold) 38%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.mrow .meta { flex: none; display: grid; justify-items: end; gap: 3px; padding-top: 3px; font-size: 12px; line-height: 16px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mrow .meta .rc { display: inline-flex; align-items: center; gap: 3px; }
.mrow .meta .rc svg { width: 8px; height: 8px; fill: var(--gold); }
.mem-none { display: none; justify-items: center; gap: 10px; padding: 60px 0; font-size: 14px; color: var(--ink-3); }
.mem-none .sleep { width: 72px; height: 62px; background: color-mix(in srgb, var(--ink) 25%, transparent); -webkit-mask: url("assets/sil-fox-sleep.png") center / contain no-repeat; mask: url("assets/sil-fox-sleep.png") center / contain no-repeat; }
.mem-none.on { display: grid; }
/* 详情 */
.mem-full { padding: 0 2px 6px; }
.mem-full h3 { font: 600 20px/28px var(--ui); color: var(--ink); }
.mem-full .day { font: 500 12px/16px var(--ui); color: var(--ink-3); margin-top: 2px; }
.mem-full .txt { margin: 14px 0 18px; font: 17px/29px var(--body); color: var(--ink); white-space: pre-line; } /* 落档按主题分段写，换行要留着 */
.note-in { width: 100%; height: 120px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--surface-2); resize: none; font: 16px/24px var(--body); color: var(--ink); }
.note-tip { margin: 8px 2px 14px; font-size: 13px; line-height: 19px; color: var(--ink-3); }
.mem-meta { display: grid; gap: 0; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 .5px var(--line); }
.mem-meta > * { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px; font-size: 15px; color: var(--ink); }
.mem-meta > * + * { border-top: .5px solid var(--line); }
.mem-meta span { color: var(--ink-3); font-size: 14px; }
.mem-meta button { width: 100%; text-align: left; }
.mem-meta button:active { transform: none; background: var(--fox-soft); }
/* 记忆详情最下面：她贴的便条（她的气泡色）和他的回复（浅底）一对一对 */
.mem-notes { display: grid; gap: 14px; margin-top: 22px; }
.mem-notes .hd { font: 600 13px/18px var(--ui); color: var(--ink-3); }
.mem-notes .np { display: grid; gap: 6px; }
.mem-notes .mine, .mem-notes .his { padding: 10px 12px; border-radius: 14px; font: 15px/22px var(--body); white-space: pre-line; overflow-wrap: anywhere; }
.mem-notes .mine { justify-self: end; max-width: 88%; background: var(--me); color: var(--ink); border-top-right-radius: 6px; }
.mem-notes .his { justify-self: start; max-width: 88%; background: var(--surface-2); color: var(--ink-2); border-top-left-radius: 6px; }
.mem-notes .his.wait { padding: 0; background: none; font: 500 12px/16px var(--ui); color: var(--ink-3); }
.mem-notes small { display: block; margin-top: 4px; font: 400 11px/14px var(--body); color: var(--ink-3); white-space: normal; }
.recalls { display: block !important; padding: 12px 14px !important; }
.recalls .stars { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.recalls .stars svg { width: 12px; height: 12px; fill: var(--gold); animation: rise .3s var(--ease) backwards; }
.recalls small { display: block; margin-top: 8px; font-size: 12px; color: var(--ink-3); }

/* ---------- Mind：念头和梦在同一页，一天一节（Oli 11-28）---------- */
/* 本周：一天一格，星期、日期、当天真实的月相；下面小星星是那天留了几回念头，小月亮是做了梦。吸在顶上，点哪天滚到哪天，滚动时跟着亮 */
/* 衬底：从屏幕顶一直垫到日历下面，和页面同一张点格纸（位置对得上），底边渐隐，滚过去的内容藏在它后面 */
.week-dock { position: sticky; top: calc(-1 * (var(--safe-top) + 56px)); z-index: 2; margin: calc(-1 * (var(--safe-top) + 56px)) -16px 0; padding: calc(var(--safe-top) + 56px) 16px 14px;
  background: radial-gradient(circle, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.3px) 10px 10px / 20px 20px, var(--bg);
  -webkit-mask-image: linear-gradient(#000 calc(100% - 14px), transparent); mask-image: linear-gradient(#000 calc(100% - 14px), transparent); }
#pg-mind.is-empty .week-dock { display: none; }
.week-wrap { margin-top: 0; padding: 10px 8px 6px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--lift); }
.week-hd { display: flex; justify-content: space-between; padding: 0 8px 8px; font: 500 12px/16px var(--ui); color: var(--ink-3); }
.week { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.week::-webkit-scrollbar { display: none; }
.wpage { position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wthumb { position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% / 7); border-radius: 14px; background: var(--pink-soft); transform: translateX(calc(var(--i, 6) * 100%)); transition: transform .32s var(--spring), opacity .2s; opacity: 0; }
.wpage.has .wthumb { opacity: 1; }
.wd { position: relative; display: grid; justify-items: center; gap: 4px; padding: 7px 0 8px; }
.wd:active { transform: none; }
.wd .w { font: 500 11px/14px var(--ui); color: var(--ink-3); }
.wd .n { font: 600 16px/18px var(--ui); color: var(--ink); font-variant-numeric: tabular-nums; }
.wd.calm .n { color: var(--ink-3); font-weight: 500; }
.wd.on .w { color: var(--pink); }
.mo { width: 14px; height: 14px; overflow: visible; }
.mo .lt { fill: var(--gold); } .mo .ring { fill: none; stroke: color-mix(in srgb, var(--gold) 60%, transparent); stroke-width: 1.2; } /* 只画那晚看得见的那一块：弯的就是弯的，圆的就是圆的；新月画一圈细线 */
.marks { display: flex; align-items: center; gap: 2px; height: 8px; }
.marks svg { width: 6px; height: 6px; fill: var(--fox); } .marks .dm { width: 8px; height: 8px; fill: var(--pink); }
/* 一天一节：大号日期＋星期月份，右边当天月相的名字 */
.night-hd { display: flex; align-items: flex-end; gap: 10px; margin-top: 30px; padding: 0 4px 10px; }
#nights > :first-child .night-hd, #nights > .gap:first-child { margin-top: 8px; } /* 第一节离上面减半（Oli 的习惯） */
.night-hd > b { font: 600 34px/32px var(--ui); color: var(--ink); font-variant-numeric: tabular-nums; }
.night-hd .dw { flex: 1; display: grid; font: 600 14px/16px var(--ui); color: var(--ink-2); }
.night-hd .dw small { font: 500 12px/15px var(--ui); color: var(--ink-3); }
.night-hd .ph { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--ink-3); }
/* 梦：暮色卡片，右下一只淡淡的蜷睡狐狸（生图 A2）；点开全屏读 */
.dream-card { position: relative; overflow: hidden; display: block; width: 100%; margin-bottom: 12px; padding: 14px 16px 16px; border-radius: 18px; text-align: left;
  background: linear-gradient(160deg, #FFEDF2 0%, #FFF3F5 50%, #FFF8F3 100%); box-shadow: var(--lift); } /* 嫩而淡的浅粉往暖白，不带灰 */
.dream-card:active { transform: scale(.985); }
.dm-meta, .dream-meta { display: flex; align-items: center; gap: 6px; font: 500 12px/16px var(--ui); color: var(--pink); }
.dm-meta svg, .dream-meta svg { width: 12px; height: 12px; fill: var(--pink); }
.dream-card b { display: block; margin-top: 6px; padding-right: 64px; font: 600 17px/24px var(--ui); color: var(--ink); }
.dream-card p { margin-top: 4px; padding-right: 64px; font-size: 14px; line-height: 21px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 玻璃罩里的玫瑰：罩子是一道白色细线加一抹高光，里面一朵嫩粉玫瑰 */
.jar { position: absolute; right: 14px; bottom: 10px; width: 50px; height: 66px; }
.jar svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.jar .glass { fill: rgba(255,255,255,.45); stroke: color-mix(in srgb, var(--pink) 45%, #fff); stroke-width: 1.4; }
.jar .shine { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; opacity: .9; }
.jar .base { fill: color-mix(in srgb, var(--pink) 35%, #fff); }
.jar i { position: absolute; left: 13px; bottom: 8px; width: 24px; height: 33px; background: var(--pink); -webkit-mask: url("assets/sil-rose.png") bottom center / contain no-repeat; mask: url("assets/sil-rose.png") bottom center / contain no-repeat; }
:root.night .dream-card { background: linear-gradient(160deg, #3A2E35, #2A2A2E); box-shadow: var(--lift); }
/* 念头：聊完一阵他回头想的（照以前的写法：聊天停 30 分钟后的检查点）。一个检查点一个爪印，每条先露一句，点开看他想的全文 */
.log { padding: 10px 0; }
.entry { position: relative; display: grid; grid-template-columns: 48px 1fr; padding: 7px 16px 7px 0; } /* 两段念头之间 14（原来 24） */
.entry::before { content: ""; position: absolute; left: 23px; top: 0; bottom: 0; border-left: 2px dotted color-mix(in srgb, var(--ink) 16%, transparent); }
.entry:first-child::before { top: 17px; } .entry:last-child::before { bottom: calc(100% - 17px); }
.entry:only-child::before { display: none; }
.entry .pw { position: relative; z-index: 1; justify-self: center; width: 18px; height: 18px; margin-top: 2px; padding: 1px; fill: var(--fox); background: var(--surface); transform: translateX(var(--x)) rotate(var(--r)); }
.entry .at { display: flex; align-items: baseline; gap: 6px; }
.entry time { font: 600 12px/22px var(--body); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.entry .after { font: 500 12px/22px var(--ui); color: var(--ink-3); }
.entry summary { list-style: none; display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; font-size: 15px; line-height: 22px; color: var(--ink); cursor: pointer; }
.entry summary::-webkit-details-marker { display: none; }
.entry summary .st { width: 8px; height: 8px; flex: none; margin-top: 7px; fill: var(--fox); }
.entry summary .chev { width: 14px; height: 14px; flex: none; margin: 4px 0 0 auto; stroke-width: 1.8; color: color-mix(in srgb, var(--ink) 35%, transparent); transition: transform .24s var(--ease); }
.entry details[open] .chev { transform: rotate(180deg); }
.entry details p { margin: 0 0 6px 16px; font-size: 14px; line-height: 21px; color: var(--ink-2); animation: rise .24s var(--ease) both; }
/* “找你了”：那回聊完他顺手找了她；时间旁一个小标签，念头下面露出他发的那句（点了回聊天） */
.found { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 7px 0 5px; border-radius: 99px; background: var(--fox-soft); font: 600 11px/18px var(--ui); color: var(--fox); align-self: center; }
.found svg { width: 10px; height: 10px; fill: var(--fox); transform: rotate(90deg); }
.sent { display: block; max-width: 100%; margin: 6px 0 2px 16px; padding: 7px 11px; border-radius: 4px 14px 14px 14px; text-align: left; font-size: 14px; line-height: 20px; color: var(--ink-2); background: var(--surface); box-shadow: 0 0 0 .5px var(--line), 0 2px 4px -2px rgba(62,36,22,.18); }
/* 这天什么都没留下：不跳过，中间一只很小的蜷睡狐狸 */
.gap-fox { flex: none; width: 18px; height: 15px; margin-right: -4px; background: color-mix(in srgb, var(--ink) 30%, transparent); -webkit-mask: url("assets/sil-fox-sleep.png") center / contain no-repeat; mask: url("assets/sil-fox-sleep.png") center / contain no-repeat; }
.gap { display: flex; align-items: center; gap: 10px; margin: 30px 4px 0; font: 500 12px/16px var(--ui); color: var(--ink-3); }
.gap::before, .gap::after { content: ""; flex: 1; border-top: 2px dotted color-mix(in srgb, var(--ink) 14%, transparent); }
/* 读梦：顶上是那晚的月亮（真实月相，放大，周围一圈暖金的光），日期和月相、居中大标题、宽行距正文，纸色嫩粉往暖白；结尾一只玻璃罩玫瑰 */
.sheet.dusk h2 { display: none; }
.dream-read { text-align: center; padding: 4px 6px 4px; }
/* 顶上的小场景：狐狸和小狗的背影（A11）坐在一道小地平线上抬头看，右上一弯暖金弯月、三颗小星；打开时两只先浮上来，弯月再升起，之后弯月轻轻浮、星星轻轻闪 */
.dr-sky { position: relative; height: 128px; margin: 0 -6px 6px; }
.dr-ground { position: absolute; left: 50%; bottom: 10px; width: 150px; height: 18px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--pink) 26%, transparent), transparent); }
.dr-pair { position: absolute; left: 50%; bottom: 16px; width: 74px; height: 57px; margin-left: -37px; background: color-mix(in srgb, var(--fox) 82%, var(--ink)); -webkit-mask: url("assets/sil-lean.png") bottom center / contain no-repeat; mask: url("assets/sil-lean.png") bottom center / contain no-repeat; transform-origin: 50% 100%; animation: pair-in .7s var(--ease) .1s backwards, breathe 4.8s ease-in-out 1s infinite; }
.dr-moon { position: absolute; left: calc(50% + 46px); top: 10px; width: 30px; height: 30px; fill: var(--gold); filter: drop-shadow(0 0 8px rgba(232,176,78,.55)); animation: moon-in 1s var(--ease) .45s backwards, moon-float 5s ease-in-out 1.5s infinite; }
.dr-st { position: absolute; fill: var(--gold); animation: twinkle 2.4s var(--ease) infinite; }
.dr-st.s1 { left: calc(50% + 24px); top: 6px; width: 7px; height: 7px; animation-delay: .9s; }
.dr-st.s2 { left: calc(50% + 86px); top: 34px; width: 6px; height: 6px; animation-delay: 1.5s; }
.dr-st.s3 { left: calc(50% - 70px); top: 24px; width: 8px; height: 8px; animation-delay: 1.2s; }
@keyframes pair-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes moon-in { from { opacity: 0; transform: translateY(18px) rotate(-12deg); } }
@keyframes moon-float { 50% { transform: translateY(-4px) rotate(4deg); } }
.dr-meta { font: 500 12px/16px var(--ui); color: var(--pink); }
.dream-read h3 { margin: 8px 0 18px; font: 600 22px/30px var(--ui); color: var(--ink); }
.dr-body { text-align: left; font: 16px/30px var(--body); color: var(--ink); letter-spacing: .01em; }
.dr-body p + p { margin-top: 16px; }
.dr-end { position: relative; height: 70px; margin-top: 18px; }
.dr-end .jar { right: auto; left: 50%; bottom: 0; transform: translateX(-50%); }
/* 下拉叫醒他：蜷着的狐狸随拉动变大，拉过一个点换成坐起来的那只，伸一下 */
.pull { position: absolute; z-index: 2; left: 0; right: 0; top: calc(var(--safe-top) + 54px); display: flex; justify-content: center; align-items: flex-end; gap: 8px; opacity: 0; pointer-events: none; } /* 字放在狐狸右边，不被日历衬底盖住 */
.pf { position: relative; width: 60px; height: 52px; }
.pf i { position: absolute; inset: 0; background: color-mix(in srgb, var(--fox) 82%, var(--ink)); transform-origin: 50% 100%; transition: opacity .2s var(--ease); }
.pf .curl { -webkit-mask: url("assets/sil-fox-sleep.png") bottom center / contain no-repeat; mask: url("assets/sil-fox-sleep.png") bottom center / contain no-repeat; transform: scale(calc(.55 + .45 * var(--k, 0))); }
.pf .up { opacity: 0; -webkit-mask: url("assets/sil-fox-sit.png") bottom center / contain no-repeat; mask: url("assets/sil-fox-sit.png") bottom center / contain no-repeat; }
.pull.awake .curl { opacity: 0; }
.pull.awake .up { opacity: 1; animation: stretch .6s var(--spring); }
@keyframes stretch { 0% { transform: scale(.9, .8); } 45% { transform: scale(.94, 1.14); } 100% { transform: none; } }
.pull small { margin-bottom: 4px; font: 500 12px/16px var(--ui); color: var(--ink-3); }
.pull.awake small { color: var(--fox); }
/* 读梦：全屏，纸色换成淡暮色 */
.sheet.dusk { min-height: 62%; background: linear-gradient(180deg, #FFEEF3 0%, #FFF6F7 40%, #FFFCFA 100%); }
:root.night .sheet.dusk { background: linear-gradient(180deg, #33292F 0%, #29282C 45%, var(--surface) 100%); } /* 夜间也是浅粉往纸色，只是都沉下去 */
.dream-meta { margin: -4px 0 16px; }
.dream-body { font: 16px/28px var(--body); color: var(--ink); padding-bottom: 12px; }
.dream-body p + p { margin-top: 14px; }
.dream-end { display: block; width: 44px; height: 38px; margin: 20px auto 8px; background: color-mix(in srgb, #6B4E80 26%, transparent); -webkit-mask: url("assets/sil-fox-sleep.png") center / contain no-repeat; mask: url("assets/sil-fox-sleep.png") center / contain no-repeat; } /* 梦读完：一只蜷睡的小狐狸当结尾 */
/* 空状态 */
.empty { display: none; justify-items: center; text-align: center; padding: 120px 32px 0; }
.empty .sleep { width: 112px; height: 96px; background: color-mix(in srgb, var(--fox) 82%, var(--ink)); -webkit-mask: url("assets/sil-fox-sleep.png") center / contain no-repeat; mask: url("assets/sil-fox-sleep.png") center / contain no-repeat; transform-origin: 50% 100%; animation: breathe 6.4s ease-in-out infinite; margin-bottom: 20px; }
.empty b { font: 600 17px/24px var(--ui); color: var(--ink); }
.empty p { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--ink-3); }
#pg-mind.is-empty .empty { display: grid; }
#pg-mind.is-empty .week-wrap, #pg-mind.is-empty #nights { display: none; }

/* ---------- 登录页：她们的 App 图标，下面一个密码框；错了抖一下，对了淡出进聊天 ---------- */
.login { position: absolute; inset: 0; z-index: 30; display: none; flex-direction: column; align-items: center; justify-content: center; padding: var(--safe-top) 40px calc(var(--safe-bottom) + 96px); /* 整组竖直居中再往上提一点，视觉上在正中（Oli 11-28 嫌太靠上） */
  background: radial-gradient(circle, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.3px) 10px 10px / 20px 20px, var(--bg); }
.login.on { display: flex; animation: fade .3s var(--ease) both; }
.login.out { animation: fade-out .5s var(--ease) both; }
@keyframes fade-out { to { opacity: 0; } }
.lg-art { width: 112px; height: 112px; border-radius: 26px; background: url("assets/icon.png") center / cover; box-shadow: 0 0 0 .5px var(--line), 0 10px 24px -8px rgba(62,36,22,.3); } /* 她们的 App 图标（Oli 11-28），圆角和 iOS 图标同比例 */
.login h1 { margin: 24px 0 32px; font: 600 28px/32px var(--ui); color: var(--ink); }
.lg-form { width: 100%; display: flex; gap: 10px; }
.lg-form .in { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--lift); font-size: 16px; color: var(--ink); }
.lg-form.shake { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lg-go { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--ink); }
.lg-go svg { width: 22px; height: 22px; fill: var(--bg); transform: rotate(90deg); }
.lg-err { min-height: 20px; margin-top: 12px; font-size: 13px; line-height: 20px; color: var(--danger); }

/* 开关：狐狸橘，滑块带弹；40×24，和加减键（32 高）、15px 的字放一行不抢（Oli 11-28 嫌 51×31 大） */
.sw { position: relative; flex: none; width: 40px; height: 24px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(62,36,22,.22); transition: transform .32s var(--spring); }
.sw[aria-checked="true"] { background: var(--fox); }
.sw[aria-checked="true"]::after { transform: translateX(16px); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E4753D' fill-opacity='.5'%3E%3Cpath d=%22M12 12.4c2.7 0 4.7 2.3 4.7 4.6 0 1.6-1.3 2.5-2.7 2.5-.8 0-1.3-.4-2-.4s-1.2.4-2 .4c-1.4 0-2.7-.9-2.7-2.5 0-2.3 2-4.6 4.7-4.6Z%22/%3E%3Cellipse cx=%227.7%22 cy=%2210.4%22 rx=%221.35%22 ry=%222.25%22 transform=%22rotate%28-22 7.7 10.4%29%22/%3E%3Cellipse cx=%2210.5%22 cy=%227%22 rx=%221.35%22 ry=%222.35%22 transform=%22rotate%28-6 10.5 7%29%22/%3E%3Cellipse cx=%2213.5%22 cy=%227%22 rx=%221.35%22 ry=%222.35%22 transform=%22rotate%286 13.5 7%29%22/%3E%3Cellipse cx=%2216.3%22 cy=%2210.4%22 rx=%221.35%22 ry=%222.25%22 transform=%22rotate%2822 16.3 10.4%29%22/%3E%3C/svg%3E") center / 12px no-repeat; } /* 开着的圆钮印一个淡淡的狐狸爪印 */
.sw:active { transform: none; }
.sw::before { content: ""; position: absolute; inset: -10px -4px; }
/* 加减：次数这类小整数 */
.step { display: inline-flex; align-items: center; height: 32px; border-radius: 10px; background: var(--surface-2); flex: none; }
.step button { width: 34px; height: 32px; display: grid; place-items: center; color: var(--ink-2); }
.step button:disabled { opacity: .35; cursor: default; }
.step output { min-width: 24px; text-align: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.clock { height: 32px; padding: 0 8px; border: 0; border-radius: 10px; background: var(--surface-2); font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink); }
.clock::-webkit-calendar-picker-indicator { display: none; } /* 桌面 Chrome 才有的小钟，iPhone 上本来就没有 */
.dash { color: var(--ink-3); }
.thumb-s { width: 26px; height: 40px; border-radius: 6px; flex: none; background: var(--bg) center / cover; box-shadow: 0 0 0 .5px var(--line); }
.thumb-s.chat { background-image: var(--wall, none); }
.thumb-s.app { background: radial-gradient(circle, color-mix(in srgb, var(--ink) 18%, transparent) .6px, transparent .9px) 2px 2px / 5px 5px, var(--app-wall, none) center / cover, var(--bg); }
/* 面板里的表单、单选 */
.form { display: grid; gap: 14px; padding: 2px 0 8px; }
.form label, .form .lbl { display: grid; gap: 6px; }
.form .in { width: 100%; height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--surface-2); font-size: 16px; color: var(--ink); }
.form textarea.in { height: 260px; padding: 12px 14px; resize: none; font: 16px/24px var(--body); }
.form .count { justify-self: end; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.form .row2 { display: flex; align-items: center; gap: 10px; }
.filled { flex: 1; display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 14px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); font-size: 15px; }
.filled .ico { color: color-mix(in srgb, #3F8A55 85%, var(--ink)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { height: 28px; padding: 0 10px; border-radius: 99px; background: var(--surface-2); font-size: 13px; line-height: 28px; color: var(--ink-2); animation: rise .24s var(--ease) both; }
.text-btn.danger { color: var(--danger); justify-self: center; height: 36px; }
.opts .opt { display: flex; width: 100%; height: 48px; align-items: center; justify-content: space-between; padding: 0 4px; font-size: 16px; color: var(--ink); }
.opts .opt + .opt { border-top: .5px solid var(--line); }
.opts .opt:active { transform: none; background: var(--fox-soft); }
.opts .opt small { color: var(--ink-3); font-size: 13px; margin-left: 6px; }
.opts .opt .ico { color: var(--fox); opacity: 0; }
.opts .opt[aria-checked="true"] .ico { opacity: 1; }
.tag { margin-left: 6px; padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-size: 11px; line-height: 18px; vertical-align: 1px; }
.tools-list .li { padding: 6px 4px; min-height: 48px; }
.tools-list .li + .li::before { left: 4px; }
.tools-list .li.master { font-weight: 600; }

.toast { position: absolute; z-index: 9; left: 50%; top: calc(var(--safe-top) + 60px); transform: translate(-50%, -8px); opacity: 0; padding: 8px 14px; border-radius: 99px; background: var(--surface); color: var(--ink); box-shadow: var(--pop); font-size: 14px; line-height: 20px; /* 白色提示条（Oli 11-28） */ transition: opacity .24s var(--ease), transform .24s var(--ease); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.toast::before { content: ""; width: 13px; height: 13px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23EE8A52' fill-opacity='1'%3E%3Cpath d=%22M12 12.4c2.7 0 4.7 2.3 4.7 4.6 0 1.6-1.3 2.5-2.7 2.5-.8 0-1.3-.4-2-.4s-1.2.4-2 .4c-1.4 0-2.7-.9-2.7-2.5 0-2.3 2-4.6 4.7-4.6Z%22/%3E%3Cellipse cx=%227.7%22 cy=%2210.4%22 rx=%221.35%22 ry=%222.25%22 transform=%22rotate%28-22 7.7 10.4%29%22/%3E%3Cellipse cx=%2210.5%22 cy=%227%22 rx=%221.35%22 ry=%222.35%22 transform=%22rotate%28-6 10.5 7%29%22/%3E%3Cellipse cx=%2213.5%22 cy=%227%22 rx=%221.35%22 ry=%222.35%22 transform=%22rotate%286 13.5 7%29%22/%3E%3Cellipse cx=%2216.3%22 cy=%2210.4%22 rx=%221.35%22 ry=%222.25%22 transform=%22rotate%2822 16.3 10.4%29%22/%3E%3C/svg%3E") center / contain no-repeat; transform: rotate(-12deg); } /* 提示条左边一个小爪印 */

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition-duration: 0s !important; } }

/* ---- 正式版补的（样稿里是内联样式或没有的状态） ---- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico.s14 { width: 14px; height: 14px; }
.ctx { top: var(--top, 120px); }
.profile.is-ai { --av-img: var(--ai-av, url("assets/avatar-hamen.jpg")); }
.profile.is-me { --av-img: var(--me-av, url("assets/avatar-moozie.jpg")); }
.profile .wall-field { width: 100%; display: grid; gap: 6px; }
.profile .wall-field > span:first-child { font: 500 13px/16px var(--ui); color: var(--ink-3); }
.note-tip.tight { margin: -6px 2px 0; }
.note-tip.bad { color: var(--danger); }
/* 往上翻：更早的消息（滑到顶自己拉，按钮兜底）；离底一屏以上出“回到最新” */
.older { align-self: center; height: 28px; padding: 0 12px; }
.latest { position: absolute; z-index: 4; right: 16px; bottom: calc(var(--safe-bottom) + 132px); height: 32px; padding: 0 14px; border-radius: 99px; background: var(--surface); box-shadow: var(--lift), 0 0 0 .5px var(--line); color: var(--ink-2); }
.phone.tray-on .latest { bottom: calc(var(--safe-bottom) + 206px); }
/* 改自己那条时输入框上面一行 */
.edit-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 6px; }
.edit-bar[hidden] { display: none; }
.edit-bar button { color: var(--fox); font-weight: 600; }
/* 他在说话、输入框空着：纸飞机换成停止 */
.send.stop { background: var(--ink); color: var(--bg); }
.send.stop .ico { fill: currentColor; stroke: none; width: 18px; height: 18px; }
/* 托盘：还在传的转圈、传失败的点一下重试 */
.ti.up::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid color-mix(in srgb, #fff 85%, transparent); border-top-color: transparent; animation: spin .8s linear infinite; filter: drop-shadow(0 0 2px rgba(0,0,0,.3)); }
.ti.up img { opacity: .6; }
.ti.err { box-shadow: 0 0 0 1.5px var(--danger); cursor: pointer; }
@keyframes spin { to { transform: rotate(360deg); } }
/* 长按菜单下面的说明（进了记忆库的） */
.menu-note { max-width: 200px; padding: 0 6px; font: 12px/16px var(--body); color: var(--ink-3); }
/* 中转站面板：拉到的模型点一个选上；看图开关 */
.chips button { height: 28px; padding: 0 10px; border-radius: 99px; background: var(--surface-2); font-size: 13px; line-height: 28px; color: var(--ink-2); }
.chips button.on { background: var(--fox-soft); color: var(--fox); font-weight: 600; }
.chips:empty { display: none; }
.form .sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 2px; }
.form .sw-row small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
/* 文本文件全文 */
.doc-text { white-space: pre-wrap; word-break: break-word; font: 13px/20px ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-2); }
/* 模型弹层：主线路是中转站时不给思考档位 */
.models.no-effort hr, .models.no-effort #hd-think, .models.no-effort #effort { display: none; }
.bars[hidden] { display: none; }
/* svg 沙箱 */
.svg-frame { display: block; width: 100%; border: 0; border-radius: 10px; background: #fff; }
/* 代码块夜里也是白色终端：标签和复制键用固定的灰，不跟 --ink 走 */
.term .bar span, .term .bar button { color: #8A7F78; }
/* 消息少时沉到底：第一个是藏着的“更早的消息”按钮时，由它后面那个顶上去 */
.list > .older[hidden]:first-child + * { margin-top: auto; }
/* 普通气泡里的行内加粗、链接、行内代码和 Markdown 气泡一样 */
.b.plain strong { font-weight: 600; color: var(--ink); }
.b.plain a { color: var(--fox); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.b.plain code { padding: 1px 5px; border-radius: 6px; background: var(--surface-2); font: 13px/20px ui-monospace, "SF Mono", Menlo, monospace; }
/* 今天那条小路的刻度（样稿是内联 left） */
.ticks span:nth-child(1) { left: 0; } .ticks span:nth-child(2) { left: 25%; } .ticks span:nth-child(3) { left: 50%; } .ticks span:nth-child(4) { left: 75%; } .ticks span:nth-child(5) { left: 100%; }
/* 小路上的位置都走 CSS 变量（JS 用 setProperty 设，CSP 允许） */
.track .quiet { left: var(--l, 0); width: var(--w, 0); }
.q-moon, .here, .next, .track .wk { left: var(--x, 0); }
.ahead { left: var(--l, 0); width: var(--w, 0); }
.him-hd .who small span { display: contents; }
.wall-row .thumb-w.is-app { background: radial-gradient(circle, color-mix(in srgb, var(--ink) 18%, transparent) .6px, transparent .9px) 3px 3px / 7px 7px, var(--app-wall, none) center / cover, var(--bg); }
.q-moon[hidden], .next[hidden], .ahead[hidden] { display: none; }
/* 凌晨时“现在”靠在最左边，走在后面的小狗会伸出卡片：最少留出两只的身长 */
.track .here { left: max(var(--x, 0%), 60px); }
.track:not(.walking) .here { left: max(var(--x, 0%), 14px); }
/* Mind：脚印一左一右地歪（样稿是内联变量） */
.log .entry:nth-child(odd) .pw { --x: -3px; --r: -10deg; } .log .entry:nth-child(even) .pw { --x: 3px; --r: 10deg; }
/* Memory：想起几次的小星星依次亮（样稿是内联延迟） */
.mem-full .recalls .stars svg:nth-child(2) { animation-delay: 50ms; } .mem-full .recalls .stars svg:nth-child(3) { animation-delay: 100ms; } .mem-full .recalls .stars svg:nth-child(4) { animation-delay: 150ms; } .mem-full .recalls .stars svg:nth-child(5) { animation-delay: 200ms; } .mem-full .recalls .stars svg:nth-child(n+6) { animation-delay: 250ms; }
/* 便条全文、他的回话 */
.note-full .txt.big { font: 17px/28px var(--body); color: var(--ink); }
.note-full .reply { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 15px; line-height: 22px; color: var(--ink-2); }
.bloom[hidden] { display: none; }
/* 工具面板：说明小字、操作行；导出那一行是链接 */
.tools-list .k small.bad { color: var(--danger); }
.tools-list .tool-acts { justify-content: space-between; padding: 14px 2px 4px; }
a.li { color: inherit; text-decoration: none; }
/* 周历补满七格：前面空格、这周还没到的日子 */
.wd.future { opacity: .35; }
.wd.pad { visibility: hidden; }

/* ---- 表情（11-29 出稿，Moozie 11-29 加的需求）：她和 Hamen 各一套，分两页管 ---- */
/* 表情面板：点输入栏的笑脸，从输入栏上方长出来（和别针、模型同一种弹层），宽到整个输入栏；点一张就发，面板不收 */
.stickers { left: 0; right: 0; padding: 6px 6px 8px; --from: 22% 100%; }
.stk-hd { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 8px 0 6px; }
.stk-hd span { font: 500 13px/16px var(--ui); color: var(--ink-3); }
.stk-manage { font: 500 13px/16px var(--ui); color: var(--fox); height: 30px; }
.stk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; max-height: 232px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.stk-grid::-webkit-scrollbar { display: none; }
.stk { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 7px 2px 5px; border-radius: 12px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.stk:active { background: var(--fox-soft); transform: none; }
.stk img { width: 56px; height: 56px; object-fit: contain; pointer-events: none; }
.stk > span { max-width: 100%; font-size: 11px; line-height: 14px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop.on .stk { animation: rise .28s var(--ease) both; }
.stk-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 16px 0 10px; font-size: 13px; color: var(--ink-3); }
.stk-empty i { width: 56px; height: 48px; background: color-mix(in srgb, var(--ink) 25%, transparent); -webkit-mask: url("assets/sil-fox-sleep.png") center / contain no-repeat; mask: url("assets/sil-fox-sleep.png") center / contain no-repeat; }
/* 聊天里的表情：单独一条，不带气泡底和投影，最大 120 */
.b.sticker { min-height: 0; padding: 0; background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 12px; }
.b.sticker img { display: block; width: 120px; height: 120px; object-fit: contain; }
/* 设置里两行：前面叠三张小图预览 */
.stk-peek { display: flex; flex: none; width: 52px; }
.stk-peek img { width: 28px; height: 28px; object-fit: contain; border-radius: 8px; background: var(--surface-2); box-shadow: 0 0 0 1.5px var(--surface); }
.stk-peek img + img { margin-left: -16px; }
.stk-peek:empty::before { content: ""; width: 28px; height: 28px; border-radius: 8px; border: 1.5px dashed color-mix(in srgb, var(--ink) 18%, transparent); }
/* 管理面板：上面一句说明，下面四列；第一格是导入 */
.stk-note { margin: -4px 2px 14px; font-size: 13px; line-height: 19px; color: var(--ink-3); }
.stk-wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-bottom: 8px; }
.stk-wall .stk { background: var(--surface-2); padding: 9px 4px 7px; }
.stk-wall .stk small { max-width: 100%; font-size: 10px; line-height: 13px; color: color-mix(in srgb, var(--ink) 45%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stk-wall .add { min-height: 90px; align-content: center; background: none; border: 1.5px dashed color-mix(in srgb, var(--ink) 16%, transparent); color: var(--fox); }
.stk-wall .add .ico { width: 22px; height: 22px; }
.stk-wall .add span { color: var(--fox); }
/* 一张的详情（点或长按）：大图、名字、描述、保存、删除 */
.stk-one { display: grid; gap: 14px; padding: 2px 0 8px; }
.stk-one .big { justify-self: center; width: 120px; height: 120px; object-fit: contain; }
.stk-one .nm { justify-self: center; margin-top: -6px; font: 600 16px/22px var(--ui); color: var(--ink); }
.stk-one textarea.in { height: 96px; }
/* 导入：两种来源；粘贴链接一行一个；相册选完逐张起名字 */
.imp { display: grid; gap: 8px; padding: 2px 0 8px; }
.imp button { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 14px; border-radius: 14px; background: var(--surface-2); font-size: 16px; color: var(--ink); text-align: left; }
.imp button small { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.imp button .ico { color: var(--ink-2); }
.imp button:active { transform: none; background: var(--fox-soft); }
.form textarea.in.links { height: 168px; font: 15px/24px var(--body); white-space: pre; overflow-x: auto; }
.form .row2 .ghost-btn { flex: none; height: 48px; padding: 0 18px; border-radius: 14px; font-size: 15px; }
.form .row2 .btn { flex: 1; }
.btn:disabled { opacity: .35; }
.imp-bad { font-size: 13px; line-height: 19px; color: var(--danger); white-space: pre-line; }
.imp-bad { margin-top: -6px; } .imp-bad:empty { display: none; }
.names { display: grid; gap: 10px; }
.name-row { display: flex; align-items: center; gap: 10px; }
.name-row img { width: 48px; height: 48px; flex: none; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.name-row .in { flex: 1; height: 44px; }

/* 面板里一张张依次浮上来（样稿是内联延迟） */
.pop.on .stk:nth-child(2) { animation-delay: 18ms; } .pop.on .stk:nth-child(3) { animation-delay: 36ms; } .pop.on .stk:nth-child(4) { animation-delay: 54ms; }
.pop.on .stk:nth-child(5) { animation-delay: 72ms; } .pop.on .stk:nth-child(6) { animation-delay: 90ms; } .pop.on .stk:nth-child(7) { animation-delay: 108ms; } .pop.on .stk:nth-child(n+8) { animation-delay: 126ms; }
/* 思考面板上拉成全屏 */
.sheet.full { max-height: calc(100% - var(--safe-top) - 8px); height: calc(100% - var(--safe-top) - 8px); }
.sheet.full .body { flex: 1; }

/* 表情联想（12-04）：输入栏上方左边一条，样子同弹层；多了横滑；表情面板开着时让开 */
.stk-hint { position: absolute; z-index: 5; left: 0; bottom: calc(100% + 8px); max-width: 100%; display: flex; gap: 2px; padding: 5px; border-radius: 15px; overflow-x: auto; scrollbar-width: none; overscroll-behavior: contain;
  background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); box-shadow: var(--pop);
  transform-origin: 0 100%; opacity: 0; transform: translateY(8px) scale(.96); pointer-events: none; transition: opacity .2s var(--ease), transform .26s var(--spring); }
.stk-hint::-webkit-scrollbar { display: none; }
.stk-hint.on { opacity: 1; transform: none; pointer-events: auto; }
.composer:has(.pop.on) .stk-hint { opacity: 0; pointer-events: none; }
.hint-stk { flex: none; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 12px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.hint-stk:active { background: var(--fox-soft); transform: none; }
.hint-stk img { width: 52px; height: 52px; object-fit: contain; pointer-events: none; }
