/* 知己网页版 · 第二版视觉：奶油蜜桃。
 * 三套主题色（蜜桃 / 薄荷 / 薰衣草）× 浅色 / 深色，全部用 CSS 变量；确认后同步到 iOS App 的 Theme.swift。 */
:root {
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-title: "Noto Serif SC", "Songti SC", "STSong", serif;
  --safe-top: 22px; --safe-bottom: 18px;
  --chat-font-size: 16.5px;
  /* 中性色（浅色） */
  --surface: #FFFFFF; --surface-muted: #FBF1EE; --line: #F1E2DD;
  --ink: #4A3B39; --ink-soft: #8F7C78; --ink-faint: #C4B3AE;
  --shadow: rgba(205, 148, 136, .16); --shadow-strong: rgba(170, 110, 100, .22);
  --scrim: rgba(74, 52, 50, .32); --glass: rgba(255, 255, 255, .62);
  --ios-red: #FF3B30; --ios-blue: #007AFF; --ios-group: rgba(250, 248, 248, .97); --ios-sep: rgba(60, 60, 67, .2); --ios-caption: #8A8A8E;
  --desk: #EEE4E1;
  /* 主题色：蜜桃（默认） */
  --bg: #FFF8F4; --bg-deep: #FDEBE6; --bg-top: #FFE7E1; --bg-bottom: #F7EEFF;
  --p1: #F7A59B; --p2: #F28BA3; --p-deep: #E07884; --p-ink: #C25A6B; --p-soft: #FFE5E3; --p-glow: rgba(242, 139, 163, .38);
  --accent: #B9A6EE; --accent-soft: #EFE9FE; --butter: #FFE2A6;
  --bubble-me: linear-gradient(135deg, #FFE2DA, #FFD3DE); --bubble-me-solid: #FFDCDC; --bubble-ta: #FFFFFF;
  --blob-a: #FFC0B2; --blob-b: #DCCBFF; --blob-c: #FFE3A6;
  color-scheme: light;
}
:root[data-palette="mint"] {
  --bg: #FBF7F1; --bg-deep: #F4EDE3; --bg-top: #EEF7F1; --bg-bottom: #FFF1E8;
  --p1: #95CBB6; --p2: #6FB39D; --p-deep: #5E9A86; --p-ink: #487F6C; --p-soft: #DDEFE6; --p-glow: rgba(111, 179, 157, .36);
  --accent: #F2B49B; --accent-soft: #FCE8DD; --butter: #F6E3A8;
  --bubble-me: linear-gradient(135deg, #E3F3EB, #D3ECE1); --bubble-me-solid: #DCEEE5;
  --blob-a: #F7C7B0; --blob-b: #BFE3D3; --blob-c: #F8E7B5;
  --shadow: rgba(160, 150, 130, .16); --surface-muted: #F4EFE8; --line: #EAE2D7; --ink: #3D3934; --ink-soft: #8A837A; --ink-faint: #B8B0A6;
}
:root[data-palette="lavender"] {
  --bg: #FBF8FF; --bg-deep: #F2ECFC; --bg-top: #EFE8FF; --bg-bottom: #FFEFF3;
  --p1: #C3ADF5; --p2: #A48BEB; --p-deep: #8D74DB; --p-ink: #6F57C4; --p-soft: #EEE8FE; --p-glow: rgba(164, 139, 235, .38);
  --accent: #F6A9BD; --accent-soft: #FFE8EE; --butter: #FFE6B0;
  --bubble-me: linear-gradient(135deg, #EEE7FF, #F6E3F7); --bubble-me-solid: #EEE7FF;
  --blob-a: #D9C8FF; --blob-b: #FFC9D8; --blob-c: #C9ECFF;
  --shadow: rgba(150, 130, 200, .16); --surface-muted: #F5F1FC; --line: #E8E0F5; --ink: #3F3850; --ink-soft: #857C96; --ink-faint: #BDB4CC;
}
:root[data-theme="dark"] {
  --surface: #2A2426; --surface-muted: #352E30; --line: #43393B;
  --ink: #F4EAE7; --ink-soft: #B3A29F; --ink-faint: #77686A;
  --shadow: rgba(0, 0, 0, .3); --shadow-strong: rgba(0, 0, 0, .45); --scrim: rgba(0, 0, 0, .55); --glass: rgba(42, 36, 38, .6);
  --ios-red: #FF453A; --ios-blue: #0A84FF; --ios-group: rgba(44, 44, 46, .97); --ios-sep: rgba(84, 84, 88, .6); --ios-caption: #98989F;
  --desk: #121011;
  --bg: #1F1A1C; --bg-deep: #191516; --bg-top: #2A1F23; --bg-bottom: #221D2B;
  --p1: #EFA197; --p2: #EA8DA3; --p-deep: #F2A3AE; --p-ink: #F6B6BF; --p-soft: #4A2F35; --p-glow: rgba(234, 141, 163, .26);
  --accent: #A996E0; --accent-soft: #33294A; --butter: #6B5A35;
  --bubble-me: linear-gradient(135deg, #5A3B42, #573347); --bubble-me-solid: #5A3B42; --bubble-ta: #2E2729;
  --blob-a: #6E3F45; --blob-b: #43376A; --blob-c: #5A4A2A;
  color-scheme: dark;
}
:root[data-theme="dark"][data-palette="mint"] {
  --p1: #8CC2AE; --p2: #6FAE98; --p-deep: #9FD1BE; --p-ink: #B2DCCB; --p-soft: #2E453D; --p-glow: rgba(140, 194, 174, .24);
  --bubble-me: linear-gradient(135deg, #2F4A40, #2C4639); --bubble-me-solid: #2F4A40; --blob-a: #4A372E; --blob-b: #2E453D;
}
:root[data-theme="dark"][data-palette="lavender"] {
  --p1: #B9A3F0; --p2: #9C84E3; --p-deep: #C2B1F5; --p-ink: #D1C4F8; --p-soft: #352C52; --p-glow: rgba(164, 139, 235, .26);
  --bubble-me: linear-gradient(135deg, #3D3360, #47305A); --bubble-me-solid: #3D3360; --blob-a: #3D3360; --blob-b: #5A3346;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--ink); background: var(--desk);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; justify-content: center;
}
button, input, textarea { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, textarea:focus { outline: none; }
:focus-visible { outline: 2px solid var(--p2); outline-offset: 2px; }
::-webkit-scrollbar { width: 0; height: 0; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
.title-font { font-family: var(--font-title); font-weight: 600; letter-spacing: .02em; }
p, small, .bubble-text { text-wrap: pretty; }

/* 桌面上是一部手机，手机上全屏 */
.phone {
  position: relative; width: 390px; height: min(844px, calc(100vh - 32px)); overflow: hidden; border-radius: 46px;
  background: var(--bg); box-shadow: 0 30px 80px rgba(0, 0, 0, .18), 0 0 0 10px #1d1a1b, 0 0 0 11px #3b3537;
}
@media (max-width: 500px) {
  body { display: block; }
  .phone { width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
  :root { --safe-top: max(12px, env(safe-area-inset-top)); --safe-bottom: max(10px, env(safe-area-inset-bottom)); }
}
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen.enter-fade { animation: fade .4s ease both; }
.setup-content { position: absolute; inset: 0; }

/* 暖色背景：上浅粉、下淡紫，三团慢慢漂的柔光 */
.warm { background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 45%, var(--bg-bottom) 100%); overflow: hidden; }
.blob { position: absolute; left: 50%; top: 50%; border-radius: 50%; opacity: .55; filter: blur(64px); pointer-events: none; }
.blob.a { width: 300px; height: 300px; margin: -150px 0 0 -150px; background: var(--blob-a); animation: drift-a 9s ease-in-out infinite alternate; }
.blob.b { width: 320px; height: 320px; margin: -160px 0 0 -160px; background: var(--blob-b); animation: drift-b 11s ease-in-out infinite alternate; }
.blob.c { width: 220px; height: 220px; margin: -110px 0 0 -110px; background: var(--blob-c); opacity: .45; animation: drift-c 13s ease-in-out infinite alternate; }
/* 缓缓升起的小爱心和星光 */
.particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.particle { position: absolute; bottom: -24px; opacity: 0; animation: float-up var(--dur) linear var(--delay) infinite; }
.particle svg { display: block; }

/* 按钮 */
.press { cursor: pointer; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), background-color .25s, box-shadow .25s, opacity .2s, color .2s; }
.press:active { transform: scale(.95); transition-duration: .1s; }
.btn-primary {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 0 22px;
  border-radius: 999px; background: linear-gradient(135deg, var(--p1), var(--p2)); color: #fff; font-size: 18px; font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 10px 28px var(--p-glow), inset 0 1px 0 rgba(255, 255, 255, .35); text-shadow: 0 1px 2px rgba(150, 60, 70, .18);
}
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: shine 4.5s ease-in-out 1.2s infinite;
}
.btn-primary[disabled] { background: var(--ink-faint); box-shadow: none; cursor: default; transform: none; text-shadow: none; }
.btn-primary[disabled]::after { display: none; }
.btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 0 22px;
  border-radius: 999px; background: var(--glass); backdrop-filter: blur(12px); color: var(--p-ink); font-size: 17px; font-weight: 600;
  box-shadow: inset 0 0 0 1.2px color-mix(in srgb, var(--p2) 40%, transparent), 0 4px 16px var(--shadow);
}
.btn-ghost[disabled] { opacity: .5; cursor: default; transform: none; }
.mode-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; padding: 16px 18px;
  border-radius: 20px; text-align: left; background: var(--glass); color: var(--ink);
  box-shadow: inset 0 0 0 1.2px color-mix(in srgb, var(--p2) 30%, transparent), 0 4px 16px var(--shadow);
}
.mode-card b { font-size: 17px; font-weight: 650; }
.mode-card small { font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.mode-card:active { background: color-mix(in srgb, var(--p2) 10%, var(--glass)); }
.icon-btn {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%; background: var(--glass); backdrop-filter: blur(10px); color: var(--ink-soft); box-shadow: 0 2px 12px var(--shadow);
}
.link-btn { align-self: center; padding: 6px 12px; font-size: 15px; color: var(--p-ink); cursor: pointer; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .8s linear infinite; }
.spinner.dark { border-color: var(--line); border-top-color: var(--p2); }

/* 头像：照片或柔和渐变 + 名字的第一个字 */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; overflow: hidden; object-fit: cover;
  color: #fff; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .1);
}
img.avatar { background: var(--surface-muted); }
.halo { position: relative; display: inline-flex; flex-shrink: 0; }
.halo::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--p1), var(--accent), var(--p2), var(--p1)); opacity: .55; filter: blur(6px); animation: breathe 3.6s ease-in-out infinite;
}
.halo > * { position: relative; }

/* 标志 */
.logo { position: relative; flex-shrink: 0; border-radius: 50%; background: var(--surface); box-shadow: 0 12px 44px var(--shadow); display: flex; align-items: center; justify-content: center; }
.logo::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, var(--p-glow), transparent 70%); animation: breathe 3.2s ease-in-out infinite; z-index: -1; }
.logo .heart { position: absolute; animation: beat 2.6s ease-in-out infinite; }
.up { animation: up .8s cubic-bezier(.2, .8, .2, 1) both; }

/* 欢迎页的对话演示：一个迷你聊天窗，顶部的心情签名跟着对话变 */
.demo-window { width: 100%; border-radius: 28px; background: var(--glass); backdrop-filter: blur(16px); box-shadow: 0 14px 40px var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .55); overflow: hidden; }
.demo-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); background: color-mix(in srgb, var(--surface) 45%, transparent); }
.demo-head .mood { font-size: 12.5px; }
.demo { height: 168px; padding: 14px 16px 16px; display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; }
.demo .row { display: flex; align-items: flex-end; gap: 8px; }
.demo .row.me { justify-content: flex-end; }
.demo .b { max-width: 78%; padding: 9px 13px; border-radius: 18px; font-size: 14px; line-height: 1.5; animation: pop-in .45s cubic-bezier(.34, 1.4, .64, 1) both; }
.demo .row.me .b { background: var(--bubble-me); border-top-right-radius: 6px; }
.demo .row.ta .b { background: var(--surface); border-top-left-radius: 6px; box-shadow: 0 2px 10px var(--shadow); }
.demo.leaving .row { animation: fade-out .5s ease both; }

/* 弹出页 */
.sheet-layer { position: absolute; inset: 0; z-index: 20; }
.sheet-layer .scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .3s ease both; cursor: pointer; }
.sheet {
  position: absolute; left: 0; right: 0; top: calc(var(--safe-top) + 18px); bottom: 0; border-radius: 34px 34px 0 0;
  background: linear-gradient(180deg, var(--bg-top), var(--bg) 220px); box-shadow: 0 -8px 40px rgba(0, 0, 0, .14); overflow-y: auto;
  animation: sheet-in .55s cubic-bezier(.2, .9, .25, 1) both;
}
.sheet-layer.closing .scrim { animation: fade-out .25s ease both; }
.sheet-layer.closing .sheet { animation: sheet-out .3s cubic-bezier(.4, 0, 1, 1) both; }
.grabber { width: 40px; height: 5px; border-radius: 999px; background: var(--line); align-self: center; margin-top: 10px; }
.card { padding: 18px; border-radius: 26px; background: var(--surface); box-shadow: 0 8px 30px var(--shadow); }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--p-ink); letter-spacing: .04em; }
.title { font-family: var(--font-title); font-weight: 600; font-size: 27px; line-height: 1.3; letter-spacing: .02em; }
.hint { font-size: 15px; color: var(--ink-soft); margin-top: 2px; line-height: 1.5; }
.field-label { padding-left: 4px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--surface-muted); box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s, background-color .2s; }
.field:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--p2) 60%, transparent), 0 4px 14px var(--shadow); }
.field > svg { flex-shrink: 0; color: var(--p-deep); }
.field input { flex: 1; min-width: 0; font-size: 17px; }
.eye { display: flex; color: var(--ink-faint); cursor: pointer; padding: 2px; }
.toast-inline { display: flex; align-items: center; gap: 8px; align-self: center; padding: 10px 14px; border-radius: 999px; background: var(--surface); box-shadow: 0 4px 20px var(--shadow); font-size: 13px; line-height: 1.45; animation: drop .4s cubic-bezier(.34, 1.4, .64, 1) both; }
.toast-inline svg { flex-shrink: 0; color: var(--p2); }

/* 设定流程 */
.progress-track { flex: 1; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--line) 80%, transparent); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--p1), var(--p2)); transition: width .55s cubic-bezier(.34, 1.3, .64, 1); }
.step-no { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 10px 16px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 15px; box-shadow: inset 0 0 0 1px var(--line), 0 3px 12px var(--shadow); }
.chip.on { background: linear-gradient(135deg, var(--p1), var(--p2)); color: #fff; font-weight: 600; box-shadow: 0 6px 18px var(--p-glow); animation: chip-pop .35s cubic-bezier(.34, 1.6, .64, 1); }
.chips.full .chip:not(.on) { opacity: .45; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.suggest span { font-size: 13px; color: var(--ink-soft); }
.suggest button { padding: 6px 12px; border-radius: 999px; background: var(--p-soft); color: var(--p-ink); font-size: 13px; cursor: pointer; }
.counter { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.counter.shake { animation: shake .4s ease; color: var(--p-ink); }
.big-input { width: 100%; padding: 18px 20px; border-radius: 22px; background: var(--surface); box-shadow: 0 6px 22px var(--shadow); font-size: 22px; font-weight: 500; transition: box-shadow .2s; }
.big-input:focus { box-shadow: 0 6px 22px var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--p2) 60%, transparent); }
.memo { display: block; width: 100%; min-height: 180px; padding: 20px; border-radius: 24px; background: var(--surface); box-shadow: 0 6px 22px var(--shadow); font-size: 17px; line-height: 1.6; resize: none; transition: box-shadow .2s; }
.memo.small { min-height: 96px; font-size: 16px; }
.memo:focus { box-shadow: 0 6px 22px var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--p2) 60%, transparent); }
.styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.style-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 13px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 4px 14px var(--shadow); text-align: left; }
.style-card b { font-family: var(--font-title); font-weight: 600; font-size: 17px; letter-spacing: .04em; }
.style-card small { font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
.style-card .tick { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: transparent; transition: all .25s; }
.style-card.on { background: linear-gradient(160deg, var(--p-soft), var(--surface) 75%); box-shadow: inset 0 0 0 1.5px var(--p2), 0 8px 22px var(--p-glow); animation: chip-pop .35s cubic-bezier(.34, 1.6, .64, 1); }
.style-card.on .tick { background: linear-gradient(135deg, var(--p1), var(--p2)); box-shadow: none; color: #fff; }
.styles.full .style-card:not(.on) { opacity: .5; }
.trait { padding: 6px 12px; border-radius: 999px; background: var(--p-soft); color: var(--p-ink); font-size: 13px; font-weight: 500; }
.step-body { animation: slide-in .45s cubic-bezier(.2, .9, .25, 1) both; }
.step-body.back { animation-name: slide-back; }
.uploader { position: relative; cursor: pointer; border-radius: 50%; }
.uploader .badge { position: absolute; right: -2px; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--p1), var(--p2)); color: #fff; box-shadow: 0 4px 12px var(--p-glow), 0 0 0 3px var(--surface); }
.upload-tip { font-size: 12px; color: var(--ink-soft); }

/* 聊天 */
.chat { background-color: var(--bg); background-image: var(--paper), linear-gradient(180deg, var(--bg), var(--bg-deep)); background-size: 120px 120px, 100% 100%; }
:root { --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='%23F2C9C4' fill-opacity='.35'%3E%3Cpath d='M22 30c0-3 4-4 5-1 1-3 5-2 5 1 0 3-5 6-5 6s-5-3-5-6z'/%3E%3Cpath d='M86 84l1.5 3.5L91 89l-3.5 1.5L86 94l-1.5-3.5L81 89l3.5-1.5z'/%3E%3Ccircle cx='96' cy='22' r='1.6'/%3E%3Ccircle cx='30' cy='98' r='1.4'/%3E%3C/g%3E%3C/svg%3E"); }
:root[data-palette="mint"] { --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='%23B9DCCB' fill-opacity='.35'%3E%3Cpath d='M22 30c0-3 4-4 5-1 1-3 5-2 5 1 0 3-5 6-5 6s-5-3-5-6z'/%3E%3Cpath d='M86 84l1.5 3.5L91 89l-3.5 1.5L86 94l-1.5-3.5L81 89l3.5-1.5z'/%3E%3Ccircle cx='96' cy='22' r='1.6'/%3E%3Ccircle cx='30' cy='98' r='1.4'/%3E%3C/g%3E%3C/svg%3E"); }
:root[data-palette="lavender"] { --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='%23D3C6F5' fill-opacity='.4'%3E%3Cpath d='M22 30c0-3 4-4 5-1 1-3 5-2 5 1 0 3-5 6-5 6s-5-3-5-6z'/%3E%3Cpath d='M86 84l1.5 3.5L91 89l-3.5 1.5L86 94l-1.5-3.5L81 89l3.5-1.5z'/%3E%3Ccircle cx='96' cy='22' r='1.6'/%3E%3Ccircle cx='30' cy='98' r='1.4'/%3E%3C/g%3E%3C/svg%3E"); }
:root[data-theme="dark"] { --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='%23FFFFFF' fill-opacity='.05'%3E%3Cpath d='M22 30c0-3 4-4 5-1 1-3 5-2 5 1 0 3-5 6-5 6s-5-3-5-6z'/%3E%3Cpath d='M86 84l1.5 3.5L91 89l-3.5 1.5L86 94l-1.5-3.5L81 89l3.5-1.5z'/%3E%3Ccircle cx='96' cy='22' r='1.6'/%3E%3Ccircle cx='30' cy='98' r='1.4'/%3E%3C/g%3E%3C/svg%3E"); }
.chat-head { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-top) + 6px) 12px 10px 14px; background: color-mix(in srgb, var(--bg) 88%, transparent); box-shadow: 0 2px 18px var(--shadow); backdrop-filter: blur(14px); }
.icon-btn.call-btn { background: var(--p-soft); color: var(--p-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p2) 26%, transparent), 0 2px 10px var(--shadow); }
.voice-call-tag { display: inline-flex; align-items: center; gap: 4px; padding: 8px 15px 0; font-size: 11px; font-weight: 600; color: var(--p-ink); letter-spacing: .02em; }
.voice-call-tag + .bubble-text { padding-top: 4px; }
.online { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #7FD3A5; box-shadow: 0 0 0 2.5px var(--bg); }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.who h1 { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mood { display: flex; align-items: center; gap: 4px; min-width: 0; font-family: var(--font-title); font-weight: 500; font-size: 12.5px; color: var(--ink-soft); letter-spacing: .02em; }
.mood span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mood svg { flex-shrink: 0; color: var(--p2); animation: beat 2.4s ease-in-out infinite; }
.mood.busy { color: var(--p-ink); font-family: var(--font); font-size: 12px; }
.mood.changed span { animation: mood-in .7s cubic-bezier(.2, .9, .25, 1) both; }
.pill { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: var(--p-soft); color: var(--p-ink); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill.low { background: #FFE3D6; color: #D0623F; }
.list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 14px 8px; overscroll-behavior: contain; }
.loading-older { display: flex; justify-content: center; padding: 12px 0; }
.time-sep { display: flex; justify-content: center; padding: 18px 0 4px; }
.time-sep span { padding: 4px 11px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 11px; color: var(--ink-faint); }
.msg { display: flex; align-items: flex-start; gap: 8px; transition: opacity .25s; }
.list.menu-open .msg { opacity: .35; }
.list.menu-open .msg.lifted { opacity: 1; position: relative; z-index: 6; }
.msg .col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg.user .col { align-items: flex-end; max-width: 290px; }
.msg.companion .col { align-items: flex-start; max-width: 266px; }
.spacer-user { flex: 1; min-width: 48px; }
.spacer-companion { flex: 1; min-width: 40px; }
.bubble { display: flex; flex-direction: column; background: var(--bubble-ta); box-shadow: 0 3px 14px var(--shadow); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s, opacity .25s; }
.bubble.enter { animation: bubble-in .45s cubic-bezier(.34, 1.3, .64, 1) backwards; }
.bubble.mine { background: var(--bubble-me); box-shadow: 0 3px 12px color-mix(in srgb, var(--shadow) 60%, transparent); }
.bubble.pending { opacity: .7; }
.bubble.hl { box-shadow: 0 0 0 2px var(--p2), 0 3px 14px var(--shadow); }
.msg.lifted .bubble { transform: scale(1.02); box-shadow: 0 14px 36px var(--shadow-strong); }
.bubble-text { display: block; width: 100%; padding: 11px 15px; text-align: left; font-size: var(--chat-font-size, 16.5px); line-height: 1.55; white-space: pre-wrap; word-break: break-word; cursor: pointer; }
.bubble-text.after-quote { padding-top: 8px; }
.proactive-label { padding: 8px 15px 0; font-size: 10.5px; line-height: 1.3; color: var(--ink-faint); letter-spacing: .02em; }
.quote { display: flex; align-items: stretch; gap: 8px; margin: 11px 15px 0; padding: 7px 10px; border-radius: 12px; background: var(--surface-muted); text-align: left; cursor: pointer; }
.bubble.mine .quote { background: rgba(255, 255, 255, .55); }
:root[data-theme="dark"] .bubble.mine .quote { background: rgba(0, 0, 0, .18); }
.quote-bar { width: 3px; flex-shrink: 0; border-radius: 2px; background: var(--p2); }
.quote-text { font-size: 13px; line-height: 1.45; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dots { display: flex; align-items: center; gap: 5px; height: 12px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--p2); animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .16s; }
.dots i:nth-child(3) { animation-delay: .32s; }
.status-spin { width: 14px; height: 14px; margin-top: 13px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--p2); animation: spin .8s linear infinite; }
.status-queued { margin-top: 12px; font-size: 11px; color: var(--ink-faint); flex-shrink: 0; }
.retry { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 4px; flex-shrink: 0; color: #E2725B; font-size: 11px; cursor: pointer; }
.menu { margin-top: 6px; min-width: 150px; border-radius: 16px; background: var(--surface); box-shadow: 0 14px 36px var(--shadow-strong); overflow: hidden; transform-origin: top left; animation: pop .22s cubic-bezier(.34, 1.4, .64, 1) both; }
.msg.user .menu { transform-origin: top right; }
.menu button { display: flex; align-items: center; justify-content: space-between; gap: 28px; width: 100%; padding: 12px 16px; font-size: 16px; cursor: pointer; transition: background-color .15s; }
.menu button + button { border-top: 1px solid var(--line); }
.menu button:hover { background: var(--surface-muted); }
.menu-scrim { position: absolute; inset: 0; z-index: 5; cursor: default; }
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 0 24px; text-align: center; }
.starter { padding: 10px 18px; border-radius: 999px; background: var(--surface); color: var(--p-ink); font-size: 15px; box-shadow: 0 4px 14px var(--shadow); }
.composer { position: relative; z-index: 3; padding: 10px 12px calc(var(--safe-bottom) + 8px); background: color-mix(in srgb, var(--bg) 90%, transparent); box-shadow: 0 -2px 18px var(--shadow); backdrop-filter: blur(14px); }
.ai-companion-note { margin: 0 4px 7px; font-size: 11px; line-height: 1.3; color: var(--ink-faint); letter-spacing: .03em; }
.quoting { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 8px 14px; border-radius: 16px; background: var(--surface-muted); animation: up .25s cubic-bezier(.2, .9, .25, 1) both; }
.composer-field { flex: 1; min-width: 0; display: flex; padding: 11px 18px; border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.composer-field:focus-within { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--p2) 55%, transparent), 0 4px 14px var(--shadow); }
.composer-field textarea { display: block; width: 100%; height: 24px; max-height: 144px; resize: none; font-size: var(--chat-font-size, 16.5px); line-height: 24px; overflow-y: auto; }
.send { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ink-faint); opacity: .55; color: #fff; transform: scale(.9); cursor: default; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), background-color .25s, box-shadow .25s, opacity .25s; }
.send.ready { background: linear-gradient(135deg, var(--p1), var(--p2)); opacity: 1; transform: scale(1); box-shadow: 0 6px 18px var(--p-glow); cursor: pointer; }
.send.ready:active { transform: scale(.85); transition-duration: .1s; }
.banner { position: absolute; left: 24px; right: 24px; top: calc(var(--safe-top) + 78px); z-index: 8; display: flex; justify-content: center; pointer-events: none; }
.banner button { pointer-events: auto; display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 10px 14px; border-radius: 999px; background: var(--surface); box-shadow: 0 6px 22px var(--shadow-strong); font-size: 13px; line-height: 1.45; text-align: left; cursor: pointer; animation: drop .4s cubic-bezier(.34, 1.4, .64, 1) both; }

/* 设置 */
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; border-radius: 18px; background: var(--surface-muted); }
.stat strong { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink-soft); }
.row-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--p-soft); color: var(--p-deep); display: flex; align-items: center; justify-content: center; }
.row-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 0; font-size: 17px; text-align: left; cursor: pointer; transition: opacity .15s; }
.row-btn:active { opacity: .55; }
.row-glyph { display: flex; width: 20px; justify-content: center; color: var(--p-deep); }
.link-btn.quiet { padding: 4px 12px; font-size: 13px; color: var(--ink-faint); }
.back-link { align-self: flex-start; display: flex; align-items: center; gap: 2px; margin: -6px 0 -10px -8px; padding: 6px 10px 6px 4px; border-radius: 999px; font-size: 15px; color: var(--p-ink); }
.btn-danger {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 0 22px;
  border-radius: 999px; background: #E2725B; color: #fff; font-size: 18px; font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 10px 26px rgba(226, 114, 91, .3), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn-danger[disabled] { background: var(--ink-faint); box-shadow: none; cursor: default; transform: none; }
.lose-list { display: flex; flex-direction: column; gap: 14px; }
.lose-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.45; }
.lose-list li > span { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: color-mix(in srgb, #E2725B 12%, transparent); color: #E2725B; }
.page-in { animation: slide-in .38s cubic-bezier(.2, .9, .25, 1) both; }
.page-back { animation: slide-back .38s cubic-bezier(.2, .9, .25, 1) both; }
.flash { position: absolute; left: 16px; right: 16px; top: calc(var(--safe-top) + 14px); z-index: 40; display: flex; justify-content: center; pointer-events: none; }
.flash.leaving { animation: fade-out .3s ease both; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border-radius: 18px; background: var(--surface-muted); font-size: 13px; color: var(--ink-soft); cursor: pointer; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .25s; }
.swatch i { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 4px 12px rgba(0, 0, 0, .1), inset 0 0 0 2px rgba(255, 255, 255, .7); }
.swatch.on { box-shadow: inset 0 0 0 1.5px var(--p2); color: var(--p-ink); font-weight: 600; }
.mood-card { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 18px; background: var(--p-soft); color: var(--p-ink); font-family: var(--font-title); font-weight: 500; font-size: 14px; }

/* iOS 风格确认面板 */
.dialog-layer { position: absolute; inset: 0; z-index: 30; }
.dialog-layer .scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .32); animation: fade .25s ease both; cursor: pointer; }
.action-sheet { position: absolute; left: 8px; right: 8px; bottom: calc(var(--safe-bottom) + 8px); display: flex; flex-direction: column; gap: 8px; animation: rise .35s cubic-bezier(.2, .9, .25, 1) both; }
.action-group { border-radius: 14px; background: var(--ios-group); backdrop-filter: blur(20px); overflow: hidden; }
.action-head { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-align: center; font-size: 13px; color: var(--ios-caption); line-height: 1.45; }
.action-head strong { font-weight: 600; }
.action-btn { display: block; width: 100%; padding: 18px 16px; font-size: 20px; text-align: center; cursor: pointer; transition: background-color .12s; border-top: 1px solid var(--ios-sep); }
.action-btn:active { background: rgba(127, 127, 127, .18); }
.action-btn.danger { color: var(--ios-red); }
.action-btn.plain { color: var(--ios-blue); }
.action-btn.cancel { border-top: 0; border-radius: 14px; background: var(--ios-group); color: var(--ios-blue); font-weight: 600; }

@keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes slide-back { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes sheet-in { from { transform: translateY(70px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes sheet-out { from { transform: none; opacity: 1; } to { transform: translateY(100%); opacity: .6; } }
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes beat { 0%, 100% { transform: scale(.94); } 45% { transform: scale(1.1); } 60% { transform: scale(1); } }
@keyframes breathe { 0%, 100% { transform: scale(.94); opacity: .45; } 50% { transform: scale(1.06); opacity: .8; } }
@keyframes drift-a { from { transform: translate(110px, -260px); } to { transform: translate(60px, -200px); } }
@keyframes drift-b { from { transform: translate(-120px, 230px); } to { transform: translate(-60px, 290px); } }
@keyframes drift-c { from { transform: translate(-90px, -80px); } to { transform: translate(100px, 40px); } }
@keyframes float-up { 0% { opacity: 0; transform: translate(0, 0) scale(.7) rotate(0deg); } 12% { opacity: var(--alpha); } 50% { transform: translate(var(--sway), -420px) scale(1) rotate(10deg); } 85% { opacity: var(--alpha); } 100% { opacity: 0; transform: translate(0, -880px) scale(.9) rotate(-8deg); } }
@keyframes shine { 0%, 70% { left: -80px; } 100% { left: 120%; } }
@keyframes chip-pop { 0% { transform: scale(.92); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes mood-in { from { opacity: 0; transform: translateY(6px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: .95; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bubble-in { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* 聊天图片：发送入口、待发送预览、气泡缩略图和全屏查看 */
.pick-image { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-soft); font-size: 24px; line-height: 1; }
.pick-image:active { transform: scale(.92); }
.pending-image { display: flex; align-items: center; gap: 8px; padding: 8px; margin-bottom: 8px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pending-image img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.pending-image button { margin-left: auto; margin-right: 4px; display: flex; color: var(--ink-faint); }
.bubble:has(.bubble-image) { padding: 6px; }
.bubble-image { display: block; border: 0; padding: 0; margin: 0; background: none; cursor: zoom-in; border-radius: 14px; overflow: hidden; }
.bubble-image img { display: block; width: auto; height: auto; max-width: 240px; max-height: 300px; object-fit: cover; }
.bubble-image + .bubble-text { padding-top: 8px; }
.image-viewer { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; border: 0; background: rgba(0, 0, 0, .88); cursor: zoom-out; }
.image-viewer img { max-width: 100%; max-height: 100%; border-radius: 12px; }
@media (max-width: 420px) {
  .bubble-image img { max-width: 200px; max-height: 260px; }
}

/* 字号档位与回到底部浮窗 */
:root[data-font-scale="sm"] { --chat-font-size: 15px; }
:root[data-font-scale="md"] { --chat-font-size: 16.5px; }
:root[data-font-scale="lg"] { --chat-font-size: 18.5px; }
.to-bottom-wrap { position: absolute; right: 16px; bottom: 86px; z-index: 6; pointer-events: none; }
.to-bottom-btn {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); color: var(--p-ink); font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 20px var(--shadow-strong), inset 0 0 0 1px var(--line);
  animation: pop-in .28s cubic-bezier(.34, 1.4, .64, 1) both; cursor: pointer;
}

/* 分段标签、验证码行、记忆中心与恢复卡片 */
.seg-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-muted); }
.seg-tab { flex: 1; padding: 8px 10px; border-radius: 12px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); text-align: center; cursor: pointer; transition: all .2s; }
.seg-tab.on { background: var(--surface); color: var(--p-ink); font-weight: 600; box-shadow: 0 2px 8px var(--shadow); }
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row .field { flex: 1; min-width: 0; }
.btn-code {
  flex-shrink: 0; padding: 0 14px; border-radius: 16px; background: var(--p-soft); color: var(--p-ink);
  font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: opacity .2s;
}
.btn-code[disabled] { opacity: .5; cursor: default; }
.field-hint { padding-left: 4px; font-size: 12px; color: var(--ink-soft); }
.field-hint.ok { color: #4A9B7F; }
.field-hint.warn { color: #D0623F; }
.mode-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 12px; font-weight: 500; }
.rp-box { width: 100%; padding: 14px; border-radius: 18px; background: var(--surface-muted); font-size: 14px; line-height: 1.6; white-space: pre-wrap; color: var(--ink); }
.rp-box small { display: block; margin-bottom: 4px; font-size: 11.5px; font-weight: 600; color: var(--p-ink); }
.mem-search { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 2px 10px var(--shadow); }
.mem-search input { flex: 1; min-width: 0; font-size: 14.5px; }
.prov-box { margin-top: 4px; padding: 12px 14px; border-radius: 16px; background: var(--surface-muted); display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); animation: fade .22s ease both; }
.prov-quote { padding: 8px 10px; border-left: 3px solid var(--p2); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 13px; }
.restore-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface-muted); }
.badge-verified { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--p-soft); color: var(--p-ink); font-size: 11px; font-weight: 600; }

/* 日记本与月卡充值 */
.pill.clickable { cursor: pointer; transition: transform .18s, box-shadow .2s; }
.pill.clickable:active { transform: scale(.94); }
.diary-paper {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: 22px;
  background: var(--surface); box-shadow: 0 8px 24px var(--shadow), inset 0 0 0 1px var(--line);
}
.diary-paper.secret {
  background: linear-gradient(160deg, color-mix(in srgb, var(--p-soft) 55%, var(--surface)), var(--surface));
  box-shadow: 0 8px 26px var(--shadow), inset 0 0 0 1.2px color-mix(in srgb, var(--p2) 38%, transparent);
}
.diary-date { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.diary-lock-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 26px 20px;
  border-radius: 24px; background: var(--surface); box-shadow: 0 10px 28px var(--shadow), inset 0 0 0 1px var(--line);
}
.diary-blur {
  width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--surface-muted);
  font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); filter: blur(3.5px); user-select: none;
}
.plan-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 18px 18px;
  border-radius: 22px; background: var(--surface); text-align: left; cursor: pointer;
  box-shadow: 0 6px 20px var(--shadow), inset 0 0 0 1.5px var(--line); transition: box-shadow .22s, transform .18s;
}
.plan-card.on {
  background: linear-gradient(155deg, color-mix(in srgb, var(--p-soft) 45%, var(--surface)), var(--surface));
  box-shadow: 0 10px 28px var(--p-glow), inset 0 0 0 2px var(--p2);
}
.plan-badge {
  position: absolute; top: -10px; right: 16px; padding: 3px 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--p1), var(--p2)); color: #fff; font-size: 11px; font-weight: 600;
  box-shadow: 0 4px 10px var(--p-glow);
}
.plan-price { font-size: 24px; font-weight: 700; color: var(--p-ink); font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 12.5px; font-weight: 500; color: var(--ink-soft); }
.plan-perks { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.plan-perks li { display: flex; align-items: center; gap: 6px; }
.plan-perks li svg { flex-shrink: 0; color: var(--p-deep); }

/* 声音工坊（0-100 四维滑块调音 & 描述生成） */
.voice-studio { display: flex; flex-direction: column; gap: 14px; }
.voice-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.voice-preset-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 12px;
  border-radius: 14px; background: var(--surface-muted); color: var(--ink); font-size: 13.5px; font-weight: 500;
  cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: all .2s;
}
.voice-preset-pill.on {
  background: linear-gradient(135deg, color-mix(in srgb, var(--p1) 24%, var(--surface)), color-mix(in srgb, var(--p2) 18%, var(--surface)));
  color: var(--p-ink); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--p2), 0 4px 12px var(--shadow);
}
.voice-slider-list { display: flex; flex-direction: column; gap: 12px; }
.voice-slider-row { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 16px; background: var(--surface-muted); }
.voice-slider-top { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.voice-slider-val { font-size: 12.5px; font-weight: 700; color: var(--p-ink); font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 999px; background: var(--p-soft); }
.voice-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--p1), var(--p2)); outline: none; cursor: pointer; margin: 6px 0 2px;
}
.voice-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); border: 2.5px solid var(--p2); box-shadow: 0 2px 8px var(--p-glow); cursor: pointer;
}
.voice-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--p2);
  box-shadow: 0 2px 8px var(--p-glow); cursor: pointer;
}
.voice-slider-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-soft); }
.voice-actions-row { display: flex; gap: 10px; align-items: center; }
.voice-actions-row > * { flex: 1; min-width: 0; }
.voice-sample-note { font-size: 12px; line-height: 1.5; color: var(--ink-soft); padding: 8px 12px; border-radius: 12px; background: var(--surface-muted); }
.voice-design-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.voice-summary-box { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--surface-muted); font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.voice-summary-box strong { color: var(--ink); font-weight: 600; }

/* 全屏暖色实时语音通话浮层 */
.vc-overlay-layer { position: absolute; inset: 0; z-index: 35; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); animation: fade .28s ease both; }
.vc-content {
  position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-top) + 12px) 20px calc(var(--safe-bottom) + 18px); gap: 14px; overflow-y: auto;
}
.vc-top { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.vc-compliance {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(12px); color: var(--p-ink); font-size: 12px; font-weight: 600;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p2) 32%, transparent), 0 4px 14px var(--shadow);
}
.vc-metrics { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vc-timer { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); padding: 5px 12px; border-radius: 999px; background: var(--glass); }
.vc-sub-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: var(--glass); color: var(--ink-soft); font-size: 12px; font-weight: 600; cursor: pointer; }
.vc-sub-toggle.on { color: var(--p-ink); background: var(--p-soft); }
.vc-stage { flex: 1; min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.vc-avatar-wrap { position: relative; width: 144px; height: 144px; display: flex; align-items: center; justify-content: center; }
.vc-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--p2) 45%, transparent); opacity: 0; pointer-events: none; }
.vc-avatar-wrap.listening .vc-ring.r1 { opacity: .55; animation: vc-breathe 2.6s ease-in-out infinite; }
.vc-avatar-wrap.speaking .vc-ring.r1 { opacity: .8; animation: vc-ripple 1.6s ease-out infinite; }
.vc-avatar-wrap.speaking .vc-ring.r2 { opacity: .6; animation: vc-ripple 1.6s ease-out .55s infinite; }
.vc-avatar-wrap.thinking .vc-ring.r1 { opacity: .7; border-style: dashed; animation: spin 5s linear infinite; }
.vc-state-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(10px); font-size: 13.5px; font-weight: 600; color: var(--p-ink);
  box-shadow: 0 4px 14px var(--shadow);
}
.vc-mic-bars { display: inline-flex; align-items: center; gap: 3px; height: 14px; }
.vc-mic-bars i { width: 3px; border-radius: 999px; background: var(--p2); transition: height .1s ease; }
.vc-subtitles {
  width: 100%; max-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px; border-radius: 20px; background: var(--glass); backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--line) 75%, transparent);
}
.vc-sub-line { font-size: 13.5px; line-height: 1.55; color: var(--ink); text-align: left; word-break: break-word; }
.vc-sub-line.user { color: var(--ink-soft); font-size: 12.5px; }
.vc-sub-line b { color: var(--p-ink); font-weight: 600; margin-right: 4px; }
.vc-inline-input { width: 100%; display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 20px; background: var(--surface); box-shadow: 0 6px 22px var(--shadow); }
.vc-inline-input input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 14.5px; }
.vc-barge-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--p1), var(--p2)); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 22px var(--p-glow); cursor: pointer; animation: pop-in .25s ease both;
}
.vc-controls { width: 100%; display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 4px; }
.vc-ctrl { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); cursor: pointer; }
.vc-ctrl-circle {
  width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--glass); backdrop-filter: blur(12px); color: var(--ink);
  box-shadow: 0 6px 20px var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent);
}
.vc-ctrl.on .vc-ctrl-circle { background: var(--p-soft); color: var(--p-ink); box-shadow: inset 0 0 0 1.5px var(--p2), 0 6px 18px var(--p-glow); }
.vc-ctrl.hangup .vc-ctrl-circle {
  width: 64px; height: 64px; background: linear-gradient(135deg, #F0806D, #E25E4A); color: #fff;
  box-shadow: 0 10px 26px rgba(226, 94, 74, .35);
}
@keyframes vc-breathe { 0%, 100% { transform: scale(.96); opacity: .45; } 50% { transform: scale(1.06); opacity: .85; } }
@keyframes vc-ripple { 0% { transform: scale(.9); opacity: .75; } 100% { transform: scale(1.28); opacity: 0; } }

/* 对话导入（旧识搬家）与时间线标签 */
.imported-tag { display: inline-flex; align-items: center; gap: 4px; padding: 8px 15px 0; font-size: 11px; font-weight: 600; color: var(--ink-soft); letter-spacing: .02em; }
.bubble.mine .imported-tag { color: var(--p-ink); }
.imported-tag + .bubble-text { padding-top: 4px; }
.import-entry-card { background: linear-gradient(155deg, color-mix(in srgb, var(--p-soft) 52%, var(--glass)), var(--glass)); }
.import-pending-box { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--p-soft); text-align: left; }
.import-session-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; }
.import-session-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--surface-muted); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: all .2s; }
.import-session-card.on { background: linear-gradient(160deg, color-mix(in srgb, var(--p-soft) 50%, var(--surface)), var(--surface)); box-shadow: inset 0 0 0 1.5px var(--p2); }
.import-session-head { display: flex; align-items: flex-start; gap: 10px; }
.import-check { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--p2); cursor: pointer; }
.import-session-title-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.import-session-title { font-size: 14.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-session-meta { font-size: 11.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.import-session-preview { display: flex; flex-direction: column; gap: 4px; padding-left: 28px; font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); }
.import-session-preview p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.import-session-preview b { color: var(--ink); font-weight: 600; }
.import-upgrade-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--p-soft); color: var(--p-ink); font-size: 12px; line-height: 1.5; }
.import-options { display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.import-toggle { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.import-toggle input { width: 17px; height: 17px; accent-color: var(--p2); cursor: pointer; }
