/* 手机端。概念：一张干净的家用便笺——暖白纸、墨色大字、一个沉稳的绿色。 */
:root {
  --bg: #f6f3ee; --surface: #ffffff; --raised: #efebe4; --text: #1c1b19; --text-2: #57524b; --line: #ddd6cc;
  --accent: #0a7f4f; --accent-press: #086a42; --on-accent: #ffffff; --mine: #dff1e7;
  --warn-bg: #fff4d6; --warn: #7a5100; --danger: #b42318; --danger-bg: #fde8e6;
  --shadow: 0 1px 2px rgba(40, 30, 10, .06), 0 2px 8px rgba(40, 30, 10, .04);
  --scrim: rgba(20, 18, 14, .42);
  --glow: rgba(10, 127, 79, .10); --accent-soft: rgba(10, 127, 79, .16); --card-line: transparent;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --vvh: 100vh;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121412; --surface: #1c1f1c; --raised: #262a26; --text: #f1f0ec; --text-2: #b5b1a8; --line: #343833;
    --accent: #3fbf7f; --accent-press: #35a86f; --on-accent: #06140c; --mine: #1f3d2c;
    --warn-bg: #3a2f12; --warn: #f2c35b; --danger: #ff7a6b; --danger-bg: #3d1d1a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --scrim: rgba(0, 0, 0, .6);
    --glow: rgba(63, 191, 127, .13); --accent-soft: rgba(63, 191, 127, .22); --card-line: #2c302c;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
body {
  font: 400 1.125rem/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  position: fixed; inset: 0; overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg.i { width: 24px; height: 24px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.icon-btn { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; color: var(--text); flex: none; }
.icon-btn:active { background: var(--raised); }

/* ---------- 登录 ---------- */
/* 像一张放在桌上的信笺：顶上一圈很淡的绿光，名字用宋体，号码和密码是一格一格的方块（和手机付款输密码一样）。 */
.login {
  height: var(--vvh); overflow-y: auto; display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 24px) 16px calc(var(--safe-b) + 24px);
  background: radial-gradient(130% 46% at 50% 0%, var(--glow), transparent 70%), var(--bg);
}
.login-in { width: 100%; max-width: 380px; margin: auto; padding-bottom: 6vh; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 28px; }
.login-brand img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 2px 4px rgba(10, 60, 35, .12), 0 10px 24px rgba(10, 80, 45, .16); }
.login-brand h1 {
  margin: 0; font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  font-size: 2.25rem; font-weight: 700; line-height: 1.2; letter-spacing: .24em; padding-left: .24em;
}
.login-card {
  background: var(--surface); border: 1px solid var(--card-line); border-radius: 24px; padding: 20px 20px 24px;
  box-shadow: 0 1px 2px rgba(40, 30, 10, .05), 0 12px 32px rgba(40, 30, 10, .07);
}
.field + .field { margin-top: 12px; }
.field-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; min-height: 48px; }
.field-head label { grid-column: 2; text-align: center; font-size: 1.125rem; font-weight: 600; color: var(--text-2); }
.field-head .icon-btn { grid-column: 3; color: var(--text-2); }
.slots { position: relative; display: flex; justify-content: center; gap: 12px; margin-top: 4px; }
.slot {
  width: clamp(56px, 18vw, 68px); height: 68px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg);
  display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 650; font-variant-numeric: tabular-nums;
  transition: border-color .12s, background-color .12s, box-shadow .12s;
}
.slot.dot::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--text); }
.slot.on { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
/* 真正收键盘输入的是盖在方块上的透明输入框：点哪一格都能输，退格照常用 */
.slot-input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0;
  font-size: 16px; color: transparent; background: transparent; caret-color: transparent; z-index: 1;
}
.slots.shake { animation: shake .36s ease-in-out; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.primary {
  height: 56px; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 1.125rem; font-weight: 650;
  letter-spacing: .3em; padding-left: .3em; margin-top: 28px;
}
.primary:active { background: var(--accent-press); }
.primary:disabled { opacity: .55; }
.login .primary { width: 100%; margin-top: 24px; border-radius: 16px; letter-spacing: .2em; padding-left: .2em; }
.login-err { min-height: 3.4em; margin-top: 14px; padding: 0 8px; color: var(--danger); font-size: 1.125rem; line-height: 1.7; text-align: center; }

/* ---------- 对话主界面 ---------- */
.chat { height: var(--vvh); display: flex; flex-direction: column; }
.topbar {
  flex: none; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center;
  padding: var(--safe-t) 4px 0; min-height: calc(52px + var(--safe-t)); background: var(--bg); border-bottom: 1px solid var(--line);
}
.topbar .icon-btn { justify-self: center; }
.brain-pick {
  justify-self: center; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 12px;
  font-size: 1.0625rem; font-weight: 600; white-space: nowrap; max-width: 100%; min-width: 0;
}
.brain-pick #brainName { min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* 320 宽的小屏：模型名太长就省略，右上角「新的聊天」不能被挤出去 */
@media (max-width: 380px) { .topbar { grid-template-columns: 48px minmax(0, 1fr) 48px; } .brain-pick { padding: 0 8px; gap: 4px; } } /* 375 宽（SE / mini）：两边按钮窄一点，名字和「想得最深」才放得下 */
@media (max-width: 340px) { .brain-pick .dot, .brain-pick #effortName { display: none; } } /* 最窄的手机只留模型名，想多深在点开的面板里看 */
.brain-pick:active { background: var(--raised); }
.brain-pick .dot { color: var(--text-2); font-weight: 400; }
.brain-pick svg.i { width: 18px; height: 18px; color: var(--text-2); }
.netbar { flex: none; background: var(--warn-bg); color: var(--warn); font-size: .9375rem; padding: 8px 16px; text-align: center; }

.log { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px 16px 20px; position: relative; }
.log-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.load-more { align-self: center; color: var(--text-2); font-size: .9375rem; height: 48px; padding: 0 16px; }

/* 空白页 */
.empty { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 0 12vh; max-width: 520px; margin: 0 auto; width: 100%; }
.empty h2 { text-align: center; font-size: 1.625rem; font-weight: 650; margin: 0 0 24px; }
.examples { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.example {
  min-height: 84px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); font-size: 1.0625rem; line-height: 1.45;
}
.example:active { background: var(--raised); }
.example svg.i { color: var(--accent); width: 26px; height: 26px; }

/* 我的消息 */
.m-user { align-self: flex-end; max-width: 82%; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bubble { background: var(--mine); border-radius: 18px 6px 18px 18px; padding: 10px 16px; white-space: pre-wrap; word-break: break-word; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.thumbs button { width: 112px; height: 112px; border-radius: 14px; overflow: hidden; background: var(--raised); }
.thumbs.one button { width: 200px; height: auto; max-height: 260px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-chip { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 1rem; max-width: 100%; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip small { color: var(--text-2); font-size: .9375rem; flex: none; }
.send-fail { color: var(--danger); font-size: .9375rem; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }

/* 回答 */
.m-ai { align-self: stretch; max-width: 94%; display: flex; flex-direction: column; gap: 6px; }
.ai-note { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 6px 12px; font-size: .9375rem; line-height: 1.4; }
.ai-note svg.i { width: 18px; height: 18px; }
.card { background: var(--surface); border-radius: 6px 18px 18px 18px; padding: 12px 16px; box-shadow: var(--shadow); word-break: break-word; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { .card { border: 1px solid var(--line); box-shadow: none; } }
.status { display: flex; align-items: center; gap: 12px; color: var(--text-2); min-height: 32px; }
.status svg.i { color: var(--accent); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: .3; animation: breathe 1.4s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes breathe { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
.caret { display: inline-block; width: 3px; height: 1.05em; background: var(--accent); vertical-align: -0.15em; margin-left: 2px; border-radius: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ai-error { color: var(--danger); }
.stopped-tag { color: var(--text-2); }
.ai-meta { display: flex; align-items: center; gap: 2px; min-height: 48px; }
.ai-meta .who { flex: 1; color: var(--text-2); font-size: .9375rem; padding-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-meta .icon-btn { color: var(--text-2); }
.ai-meta .icon-btn.ok { color: var(--accent); }

/* 回答里的排版 */
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .75em; }
.md h1, .md h2, .md h3 { margin: 1em 0 .4em; line-height: 1.45; font-weight: 700; }
.md h1 { font-size: 1.25rem; } .md h2 { font-size: 1.1875rem; } .md h3 { font-size: 1.125rem; }
.md ul, .md ol { margin: 0 0 .75em; padding-left: 1.5em; }
.md li { margin: .3em 0; }
.md li::marker { color: var(--accent); font-weight: 700; }
.md strong { font-weight: 700; }
.md em { font-style: normal; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.md a { color: var(--accent); word-break: break-all; }
.md code { background: var(--raised); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.md pre { background: var(--raised); border-radius: 12px; padding: 12px; overflow-x: auto; font-size: .9375rem; line-height: 1.5; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 .75em; padding: 2px 0 2px 14px; border-left: 4px solid var(--accent); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.md-table { overflow-x: auto; margin: 0 0 .75em; border: 1px solid var(--line); border-radius: 12px; }
.md table { border-collapse: collapse; min-width: 100%; font-size: 1rem; line-height: 1.5; }
.md th, .md td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.md th { background: var(--raised); font-weight: 650; }
.md tr:last-child td { border-bottom: 0; }

/* 对话里居中的小条 */
.note-row { align-self: center; max-width: 92%; text-align: center; background: var(--raised); color: var(--text-2); border-radius: 12px; padding: 8px 14px; font-size: .9375rem; line-height: 1.5; }

.tobottom {
  position: absolute; right: 16px; bottom: 12px; width: 52px; height: 52px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; color: var(--text);
}
.log-wrap { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }

/* 输入栏 */
.composer { flex: none; background: var(--surface); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + var(--safe-b)); }
.tray { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 8px 12px; max-width: 760px; margin: 0 auto; }
.tray-item { position: relative; width: 64px; height: 64px; border-radius: 12px; background: var(--raised); flex: none; }
.tray-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.tray-item.file { width: auto; max-width: 220px; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: .9375rem; line-height: 1.3; }
.tray-item.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-item .prog { position: absolute; inset: 0; border-radius: 12px; background: rgba(0, 0, 0, .45); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .9375rem; font-weight: 600; }
.tray-item.bad { outline: 2px solid var(--danger); }
.tray-x { position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.tray-x span { width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.tray-x svg.i { width: 16px; height: 16px; stroke-width: 2.6; }
.row { display: flex; align-items: flex-end; gap: 6px; max-width: 760px; margin: 0 auto; }
.row textarea {
  flex: 1; min-width: 0; resize: none; border: 1px solid var(--line); background: var(--raised); border-radius: 14px; padding: 10px 14px;
  min-height: 48px; max-height: calc(var(--vvh) * .3); line-height: 1.5; font-size: 1.125rem; display: block;
}
.row textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.row textarea::placeholder { color: var(--text-2); }
.hold {
  flex: 1; height: 48px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); font-size: 1.125rem; font-weight: 650;
  letter-spacing: .2em; padding-left: .2em; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none;
}
.hold.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hold.cancel { background: var(--danger); border-color: var(--danger); color: #fff; }
.send { min-width: 68px; height: 48px; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 1.125rem; font-weight: 650; padding: 0 14px; flex: none; }
.send:active { background: var(--accent-press); }
.send:disabled { opacity: .5; }
.stop { min-width: 84px; height: 48px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 1.125rem; font-weight: 650; padding: 0 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.stop svg.i { width: 18px; height: 18px; fill: currentColor; stroke: none; }

/* ---------- 侧栏 ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 360px); background: var(--bg); z-index: 21; transform: translateX(-102%);
  transition: transform .22s ease-out, visibility 0s .22s; display: flex; flex-direction: column; padding-top: var(--safe-t); visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; transition: transform .22s ease-out; box-shadow: 2px 0 16px rgba(0, 0, 0, .12); }
.new-chat { margin: 12px 16px 8px; height: 56px; border-radius: 14px; border: 2px solid var(--accent); color: var(--accent); font-weight: 650; display: flex; align-items: center; justify-content: center; gap: 8px; flex: none; }
.new-chat:active { background: var(--mine); }
.threads { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 12px; }
.group { font-size: .9375rem; color: var(--text-2); padding: 14px 12px 4px; }
.thread { display: flex; align-items: center; width: 100%; min-height: 56px; padding: 8px 12px 8px 14px; border-radius: 12px; text-align: left; position: relative; }
.thread span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread:active { background: var(--raised); }
.thread.on { background: var(--mine); font-weight: 600; }
.thread.on::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 2px; background: var(--accent); }
.threads .empty-tip { color: var(--text-2); padding: 24px 12px; font-size: 1rem; }
.drawer-foot { flex: none; border-top: 1px solid var(--line); padding: 4px 8px calc(8px + var(--safe-b)); }
.foot-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 12px; border-radius: 12px; text-align: left; }
.foot-row:active { background: var(--raised); }
.foot-row .who { flex: 1; font-weight: 600; }
.ghost { height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--text-2); font-size: 1rem; flex: none; }

/* ---------- 底部弹层 ---------- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 22; background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(16px + var(--safe-b)); transform: translateY(105%); transition: transform .22s ease-out; max-height: 88vh; overflow-y: auto;
  max-width: 640px; margin: 0 auto;
}
.sheet { visibility: hidden; transition: transform .22s ease-out, visibility 0s .22s; }
.sheet.open { transform: none; visibility: visible; transition: transform .22s ease-out; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; position: sticky; top: -8px; z-index: 1; background: var(--surface); } /* 弹层内容长了往下滚，标题和关闭按钮钉在顶上 */
.sheet-head h3 { margin: 0; font-size: 1.25rem; font-weight: 650; }
.sheet h4 { margin: 18px 0 6px; font-size: 1.125rem; font-weight: 650; }
.radio { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 8px; border-radius: 12px; text-align: left; }
.radio:active { background: var(--raised); }
.radio .ring { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: flex; align-items: center; justify-content: center; }
.radio.on .ring { border-color: var(--accent); }
.radio.on .ring::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.radio .name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.radio .tag { color: var(--text-2); font-size: .9375rem; flex: 1; min-width: min-content; text-align: right; line-height: 1.3; } /* 给完整的状态/恢复时间留足宽度，路名可换行。 */
.radio .tag.off { color: var(--danger); }
.radio .tag .nw { white-space: nowrap; }
/* 每一路下面一排型号（只有一个型号的路不显示）；正在用的那一路选中型号是绿的，其他路只是灰框记着各自选了哪个 */
.route + .route { border-top: 1px solid var(--line); }
.route { padding: 2px 0; }
.models { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 2px 0 12px; }
.models button {
  min-height: 48px; border-radius: 12px; border: 2px solid var(--line); font-size: 1rem; font-weight: 600; line-height: 1.25;
  padding: 4px 6px; color: var(--text-2); overflow-wrap: anywhere;
}
.models button.on { border-color: var(--text-2); color: var(--text); background: var(--raised); }
.route.on .models button.on { border-color: var(--accent); background: var(--mine); }
.route.dim .radio .name, .route.dim .models button { color: var(--text-2); font-weight: 500; }
.route.dim .radio .ring { border-style: dashed; }
@media (max-width: 340px) { .models { gap: 6px; } .models button { font-size: .9375rem; padding: 4px 2px; } }
@media (max-width: 340px) {
  .radio { display: grid; grid-template-columns: 26px minmax(0, 1fr); row-gap: 0; padding: 6px 8px; }
  .radio .ring { grid-column: 1; grid-row: 1 / span 2; }
  .radio .name { grid-column: 2; grid-row: 1; }
  .radio .tag { grid-column: 2; grid-row: 2; min-width: 0; text-align: left; }
}
.hint { color: var(--text-2); font-size: .9375rem; margin: 6px 8px 0; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button { min-height: 56px; border-radius: 14px; border: 2px solid var(--line); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; padding: 4px; }
.seg button.on { border-color: var(--accent); background: var(--mine); color: var(--text); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 8px 0 4px; }
.tile { min-height: 104px; border-radius: 16px; background: var(--raised); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }
.tile:active { background: var(--line); }
.tile svg.i { width: 32px; height: 32px; color: var(--accent); }
.howto { margin: 4px 0 8px; padding-left: 1.4em; }
.howto li { margin: 8px 0; }
.howto b { font-weight: 650; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.confirm-actions button { height: 56px; border-radius: 14px; font-weight: 650; }
.confirm-actions .no { background: var(--raised); }
.confirm-actions .yes { background: var(--danger); color: #fff; }

/* ---------- 按住说话 ---------- */
.voice { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .5); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: calc(96px + var(--safe-b)); pointer-events: none; }
.voice-bubble { width: 232px; min-height: 120px; border-radius: 22px; background: var(--accent); color: var(--on-accent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
.voice.cancel .voice-bubble { background: var(--danger); color: #fff; }
.wave { display: flex; align-items: center; gap: 4px; height: 44px; }
.wave i { width: 5px; border-radius: 3px; background: currentColor; height: 6px; transition: height .08s linear; }
.voice-time { font-size: 1.125rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.voice-x { font-size: 1.375rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.voice-hint { color: #fff; text-align: center; margin-top: 18px; font-size: 1.125rem; line-height: 1.6; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.voice-hint small { display: block; font-size: 1rem; opacity: .9; }

/* ---------- 其他 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(110px + var(--safe-b)); transform: translateX(-50%); z-index: 40; width: max-content; max-width: calc(100vw - 48px);
  background: rgba(28, 27, 25, .94); color: #fff; padding: 14px 20px; border-radius: 14px; font-size: 1.125rem; line-height: 1.5; text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.viewer { position: fixed; inset: 0; z-index: 35; background: #000; display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .icon-btn { position: absolute; top: calc(var(--safe-t) + 8px); right: 8px; color: #fff; background: rgba(255, 255, 255, .15); border-radius: 50%; }
.copybox { position: fixed; inset: 0; z-index: 36; background: var(--surface); display: flex; flex-direction: column; padding: calc(var(--safe-t) + 8px) 16px calc(16px + var(--safe-b)); }
.copybox p { margin: 8px 0 12px; font-weight: 600; }
.copybox textarea { flex: 1; width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 1.125rem; line-height: 1.6; background: var(--bg); resize: none; }
.copybox .primary { margin-top: 12px; letter-spacing: .1em; }

.wechat { position: fixed; inset: 0; z-index: 50; background: var(--surface); display: flex; flex-direction: column; align-items: center; padding: calc(var(--safe-t) + 16px) 28px calc(var(--safe-b) + 24px); text-align: center; }
.wechat .arrow { align-self: flex-end; width: 120px; height: 120px; color: var(--accent); margin-right: -8px; }
.wechat .arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.wechat h2 { font-size: 1.625rem; line-height: 1.6; font-weight: 650; margin: 12px 0 16px; }
.wechat .dots3 { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; gap: 4px; background: var(--raised); border-radius: 10px; padding: 8px 12px; margin: 0 4px; }
.wechat .dots3 i { width: 7px; height: 7px; border-radius: 50%; background: var(--text); }
.wechat p { color: var(--text-2); margin: 0 0 auto; }
.link-btn { min-height: 48px; padding: 0 16px; color: var(--accent); font-size: 1.125rem; text-decoration: underline; text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .dots i { opacity: .8; }
}
