/* 咿呀记 · 本地语音记录原型 —— 变量与写法照 /workspace/work/mt/设计规范.md（颜色 / 圆角 / 间距 / 字号阶 / 顶部咿呀岛 / 底部主按钮 / 保存条） */
:root {
  --bg-grad: linear-gradient(170deg, #FDF9F4 0%, #F6F0E5 55%, #F2EBDF 100%);
  --bg-top: #FDF9F4;
  --surface: #FFFFFF; --surface-2: #F7F1EA;
  --text: #33302B; --muted: #675E56;
  --primary: #D06B51; --primary-fill: #E8907C; --primary-text: #9A4634; --primary-weak: rgba(232, 144, 124, .12); --on-primary: #3B211A;
  --ok: #4F9475; --warn: #C08A3E; --warn-text: #8A5E15; --warn-bg: #FBF3E6; --danger: #C2402E;
  --border: rgba(122, 114, 104, .10); --border-input: #8F8578;
  --radius-xs: 8px; --radius-sm: 14px; --radius-md: 16px; --radius: 18px; --radius-lg: 24px; --radius-pill: 999px;
  --space-xs: 6px; --space-sm: 10px; --space-md: 14px; --space-lg: 20px;
  --fs-mul: 1; --t-xs: 11px; --fs-badge: 12px; --fs-xs: 13px; --t-sm: 13px; --t-body: 15px; --fs-h2: 16px; --t-md: 17px; --fs-title: 19px; --t-lg: 20px; --t-xl: 28px;
  --shadow-card: 0 1px 2px rgba(90, 74, 62, .05), 0 10px 24px -14px rgba(90, 74, 62, .14);
  --shadow-hover: 0 2px 4px rgba(90, 74, 62, .08), 0 14px 28px -14px rgba(90, 74, 62, .22);
  --shadow-on-dark: 0 8px 20px -10px rgba(0, 0, 0, .6);
  --ease: cubic-bezier(.25, .1, .25, 1); --ease-ios: cubic-bezier(.32, .72, 0, 1); --spring: cubic-bezier(.34, 1.4, .64, 1);
  --dur-in: .42s; --dur-out: .3s;
  --sat-pad: max(env(safe-area-inset-top), 12px);
  --cta-b: calc(28px + env(safe-area-inset-bottom));
  color-scheme: light;
}
body.dark {
  --bg-grad: linear-gradient(170deg, #221E1A 0%, #26211C 55%, #231F1B 100%);
  --bg-top: #221E1A;
  --surface: #2E2924; --surface-2: #282320;
  --text: #F0EBE4; --muted: #BAB1A4;
  --primary: #F0A891; --primary-fill: #F0A891; --primary-text: #F5BFAE; --primary-weak: rgba(240, 168, 145, .16); --on-primary: #3B211A;
  --ok: #7DC0A0; --warn: #E0B46A; --warn-text: #E8C487; --warn-bg: rgba(224, 180, 106, .14);
  --border: rgba(255, 255, 255, .10); --border-input: #8A8177;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 24px -14px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
[data-accent="bottle"] { --tile: #EDCF45; --tile-text: #745D00; --tile-weak: #FBF5D6; --tile-on: #3A2E00; }
[data-accent="breast"] { --tile: #EE8FB8; --tile-text: #A23F68; --tile-weak: #FCEEF4; --tile-on: #3A1426; }
[data-accent="pump"]   { --tile: #F2DE6B; --tile-text: #6E5A00; --tile-weak: #FBF6DA; --tile-on: #332900; }
[data-accent="diaper"] { --tile: #A6832B; --tile-text: #7A5A0F; --tile-weak: #F6F1E6; --tile-fill: #8F7125; }
[data-accent="sleep"]  { --tile: #686BAF; --tile-text: #454896; --tile-weak: #EDEEF4; }
[data-accent="meds"]   { --tile: #A45F7C; --tile-text: #8A4660; --tile-weak: #F5EEF1; }
[data-accent="temp"]   { --tile: #2E8FA0; --tile-text: #176F80; --tile-weak: #E9F1F2; --tile-fill: #297F8E; }
body.dark [data-accent="bottle"] { --tile: #EBD866; --tile-text: #EBD866; --tile-weak: rgba(235,216,102,.16); --tile-on: #2A2508; }
body.dark [data-accent="breast"] { --tile: #F09CC6; --tile-text: #F09CC6; --tile-weak: rgba(240,156,198,.16); --tile-on: #2A1520; }
body.dark [data-accent="pump"]   { --tile: #EEDF75; --tile-text: #EEDF75; --tile-weak: rgba(238,223,117,.16); --tile-on: #2A2508; }
body.dark [data-accent="diaper"] { --tile: #E2C27E; --tile-text: #E2C27E; --tile-weak: rgba(226,194,126,.16); --tile-on: #322A1E; }
body.dark [data-accent="sleep"]  { --tile: #ABADD6; --tile-text: #ABADD6; --tile-weak: rgba(171,173,214,.16); --tile-on: #2B2729; }
body.dark [data-accent="meds"]   { --tile: #D6A5BA; --tile-text: #D6A5BA; --tile-weak: rgba(214,165,186,.16); --tile-on: #312625; }
body.dark [data-accent="temp"]   { --tile: #7FC4D0; --tile-text: #7FC4D0; --tile-weak: rgba(127,196,208,.16); --tile-on: #262A28; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background-color: var(--bg-top); }
body.dark, html:has(body.dark) { background-color: #221E1A; }
body {
  margin: 0; min-height: 100vh; background: var(--bg-grad) fixed; color: var(--text);
  font: var(--t-body)/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
.nw { white-space: nowrap; }

/* 页面 */
#view { padding: calc(var(--sat-pad) + 40px) var(--space-lg) calc(env(safe-area-inset-bottom) + 48px); max-width: 560px; margin: 0 auto; will-change: auto; }
.pg-title { font-size: var(--t-xl); font-weight: 800; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
.pg-sub { color: var(--muted); font-size: var(--t-sm); margin: 6px 0 var(--space-lg); }
.sec-title { color: var(--muted); font-size: var(--t-sm); font-weight: 600; margin: var(--space-lg) 4px var(--space-sm); }

/* 模型状态：说明类浅色横幅（无边框无阴影） */
.mdl-bar { display: flex; align-items: center; gap: var(--space-sm); padding: 12px var(--space-md); border-radius: var(--radius); background: var(--primary-weak); font-size: var(--t-sm); }
.mdl-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.mdl-bar.ready .dot { background: var(--ok); }
.mdl-bar.busy .dot { background: var(--warn); animation: pulse 1.2s var(--ease) infinite; }
.mdl-bar .txt { flex: 1; min-width: 0; }
.mdl-bar .txt b { font-weight: 600; }
.mdl-bar .lnk { color: var(--primary-text); font-weight: 600; white-space: nowrap; padding: 6px 2px; }
@keyframes pulse { 50% { opacity: .35; } }

/* 分组列表 */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px var(--space-md); min-height: 56px; }
.list li + li { border-top: 1px solid var(--border); }
.r-ico { width: 36px; height: 36px; border-radius: var(--radius-xs); background: var(--tile-weak); flex: none; display: flex; align-items: center; justify-content: center; }
.r-ico img { width: 26px; height: 26px; }
.r-main { flex: 1; min-width: 0; }
.r-main b { display: block; font-weight: 600; }
.r-main small { color: var(--muted); font-size: var(--fs-xs); }
.r-time { color: var(--muted); font-size: var(--t-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); font-size: var(--t-sm); padding: var(--space-lg) var(--space-md); text-align: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.empty q { color: var(--text); font-weight: 600; quotes: "「" "」"; white-space: nowrap; }

/* 半屏面板（记录卡 / 下载模型） */
.scrim { position: fixed; inset: 0; background: rgba(40, 32, 26, .32); z-index: 40; opacity: 0; pointer-events: none; transition: opacity var(--dur-out) var(--ease); }
.scrim.on { opacity: 1; pointer-events: auto; transition-duration: var(--dur-in); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 560px; margin: 0 auto; max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: 0 -10px 40px -20px rgba(90, 74, 62, .4);
  transform: translateY(105%); transition: transform var(--dur-out) var(--ease-ios); padding-bottom: env(safe-area-inset-bottom);
}
.sheet.on { transform: none; transition-duration: var(--dur-in); }
.rs-head { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-lg) var(--space-lg) var(--space-sm); }
.rs-head h2 { flex: 1; margin: 0; font-size: var(--t-md); font-weight: 700; }
.rs-x { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.rs-x svg { width: 16px; height: 16px; }
.rs-body { padding: 0 var(--space-lg); }
.heard { font-size: var(--t-sm); color: var(--muted); margin: 0 0 var(--space-md); }
.heard q { color: var(--text); quotes: "「" "」"; }
.ask { display: flex; gap: var(--space-sm); align-items: flex-start; padding: 12px var(--space-md); border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); font-size: var(--t-sm); font-weight: 600; margin-bottom: var(--space-md); }
.ask svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.fields { list-style: none; margin: 0; padding: 0; background: var(--surface-2); border-radius: var(--radius); }
.fields li { display: flex; align-items: center; gap: var(--space-sm); padding: 12px var(--space-md); min-height: 52px; flex-wrap: wrap; }
.fields li + li { border-top: 1px solid var(--border); }
.fields .k { color: var(--muted); font-size: var(--t-sm); width: 4.5em; flex: none; }
.fields .v { flex: 1; min-width: 0; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; text-align: right; }
.tag { font-size: var(--fs-badge); font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.tag.need { background: var(--warn-bg); color: var(--warn-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent); }
.tag.prev { background: var(--surface); color: var(--muted); }
li.need .k { color: var(--warn-text); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { min-height: 36px; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-input); font-size: var(--t-body); font-weight: 600; white-space: nowrap; }
.chip.on { background: var(--tile, var(--primary-fill)); color: var(--tile-on, #fff); box-shadow: none; }
body:not(.dark) [data-accent="diaper"] .chip.on, body:not(.dark) [data-accent="sleep"] .chip.on, body:not(.dark) [data-accent="meds"] .chip.on, body:not(.dark) [data-accent="temp"] .chip.on { background: var(--tile-fill, var(--tile)); color: #fff; }
.num { width: 86px; min-height: 40px; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-input); background: var(--surface); color: var(--text); font: 600 16px/1.2 inherit; text-align: right; }
.num.txt { width: 140px; text-align: left; }
.unit { color: var(--muted); font-weight: 500; font-size: var(--t-sm); }
.rs-savebar { position: sticky; bottom: 0; display: flex; gap: var(--space-sm); padding: var(--space-md) var(--space-lg) var(--space-lg); background: linear-gradient(to bottom, transparent, var(--surface) 14px); margin-top: var(--space-sm); }
.btn { min-height: 50px; border-radius: var(--radius-pill); font-size: var(--t-md); font-weight: 700; padding: 0 var(--space-lg); white-space: nowrap; transition: transform .2s var(--spring); }
.btn:active { transform: scale(.97); }
.btn-2 { background: var(--surface-2); color: var(--text); }
.rs-save { flex: 1; background: var(--tile-fill, var(--tile, var(--primary-fill))); color: #fff; }
[data-accent="bottle"] .rs-save, [data-accent="breast"] .rs-save, [data-accent="pump"] .rs-save { background: var(--tile); color: var(--tile-on); }
body.dark .rs-save { color: var(--tile-on, #2A2116); box-shadow: var(--shadow-on-dark); background: var(--tile, var(--primary-fill)); }
.rs-save[disabled] { opacity: .4; }
.btn-primary { flex: 1; background: var(--primary-fill); color: var(--on-primary); }

/* 下载模型 */
.opt { display: flex; gap: 12px; align-items: flex-start; padding: var(--space-md); border-radius: var(--radius); background: var(--surface-2); margin-bottom: var(--space-sm); width: 100%; text-align: left; box-shadow: inset 0 0 0 2px transparent; }
.opt.on { box-shadow: inset 0 0 0 2px var(--primary); background: var(--primary-weak); }
.opt .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-input); flex: none; margin-top: 1px; }
.opt.on .radio { border: 7px solid var(--primary); }
.opt b { display: block; font-size: var(--t-body); }
.opt small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.opt .sz { margin-left: auto; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.note { color: var(--muted); font-size: var(--fs-xs); margin: var(--space-sm) 2px 0; }
.prog { margin: var(--space-md) 0 0; }
.prog .bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.prog .bar i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 3px; transition: width .2s linear; }
.prog .row { display: flex; justify-content: space-between; font-size: var(--t-sm); color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 顶部咿呀岛（所有提示都在这里，屏幕下半部不出提示） */
/* 咿呀岛 = 语音发光体（交互 v4：同一个元素；几何由 js/siri-fx.js 的弹簧每帧写 width / height / border-radius / transform） */
#island { position: fixed; top: 0; left: 0; right: 0; height: 0; z-index: 100; pointer-events: none; }
.vi-probe { position: absolute; top: calc(var(--sat-pad) + 2px); width: 0; height: 0; }
.toast-island { position: absolute; left: 0; top: 0; width: 126px; height: 40px; border-radius: 20px; opacity: 0; font-weight: 600; pointer-events: none;
  --ap: 0; --lv: 0; --th: 0; --land: 1; --cont: 0; --ink: 1; will-change: transform, width, height; contain: layout style; }
.toast-island.on { pointer-events: auto; }
.vi-clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; isolation: isolate;
  background: color-mix(in srgb, var(--surface) calc(78% * var(--land)), transparent);
  -webkit-backdrop-filter: blur(18px) saturate(190%); backdrop-filter: blur(18px) saturate(190%);
  box-shadow: 0 1px 1px rgba(90, 74, 62, calc(.06 * var(--land))), 0 12px 30px -12px rgba(90, 74, 62, calc(.45 * var(--land))), inset 0 1.5px 1.5px -.5px rgba(255, 255, 255, calc(.6 * var(--land))),
    0 6px calc(22px + var(--lv) * 30px) calc(-2px + var(--lv) * 6px) rgba(238, 127, 102, calc(var(--ap) * (.32 + var(--lv) * .4))),
    0 -4px calc(24px + var(--lv) * 26px) -4px rgba(140, 143, 224, calc(var(--ap) * (.26 + var(--lv) * .35))); }
body.dark .vi-clip { background: color-mix(in srgb, var(--surface) calc(86% * var(--land)), transparent);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, calc(.75 * var(--land))), inset 0 1px 1px rgba(255, 255, 255, calc(.14 * var(--land))),
    0 6px calc(22px + var(--lv) * 30px) calc(-2px + var(--lv) * 6px) rgba(255, 154, 130, calc(var(--ap) * (.3 + var(--lv) * .4))),
    0 -4px calc(24px + var(--lv) * 26px) -4px rgba(169, 172, 240, calc(var(--ap) * (.24 + var(--lv) * .35))); }
body.night .vi-clip { box-shadow: 0 12px 30px -12px rgba(0, 0, 0, calc(.75 * var(--land))), 0 4px calc(20px + var(--lv) * 24px) -2px rgba(200, 40, 30, calc(var(--ap) * (.25 + var(--lv) * .3))); }
/* 灵动岛机型：岛 = 黑色（接住硬件灵动岛），展开后内容在摄像头那一行下面 */
.toast-island.di .vi-clip { background: rgba(0, 0, 0, var(--land)); -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 6px calc(22px + var(--lv) * 30px) calc(-2px + var(--lv) * 6px) rgba(238, 127, 102, calc(var(--ap) * (.32 + var(--lv) * .4))), 0 -4px calc(24px + var(--lv) * 26px) -4px rgba(140, 143, 224, calc(var(--ap) * (.26 + var(--lv) * .35))); }
.toast-island.m-gl.fxon .vi-clip { background: transparent; }   /* GL：底色由着色器画（land 时过渡到同一底色）；CSS 版：底色一直在，SVG 在上面按 1-land 淡出——同一个元素里换皮 */
.toast-island.di.fxon .vi-clip { -webkit-backdrop-filter: blur(18px) saturate(190%); backdrop-filter: blur(18px) saturate(190%); }
.toast-island.di.m-gl.fxon .vi-clip { background: transparent; }
.vi-cv, .vi-svg { position: absolute; left: 0; top: 0; display: block; pointer-events: none; transform-origin: 0 0; }
.toast-island:not(.fxon) .vi-cv, .toast-island.m-css .vi-cv { visibility: hidden; }
.toast-island.m-gl .vi-svg, .toast-island:not(.fxon) .vi-svg { display: none; }
/* 交互 v5：身体（水滴 / 球 / 搜索框）离开胶囊后，壳 = 外接框，形状全由画布 / SVG 画；盒子本身不裁切、不画底和阴影 */
.toast-island.drop .vi-clip { overflow: visible; background: transparent !important; box-shadow: none; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.vi-blur { position: absolute; left: 0; top: 0; pointer-events: none; display: none; -webkit-backdrop-filter: blur(18px) saturate(190%); backdrop-filter: blur(18px) saturate(190%); }
.toast-island.drop.fxon .vi-blur { display: block; }
/* 搜索框内容（输入框就在壳里：球横向拉伸成框，键盘弹给这个输入框） */
.vi-search { position: absolute; left: 0; top: 0; display: none; align-items: center; gap: 8px; padding: 0 14px; box-sizing: border-box; color: var(--muted); opacity: var(--sq); pointer-events: none; overflow: hidden; }
.toast-island.srch .vi-search { display: flex; pointer-events: auto; }
.vi-search svg { width: 18px; height: 18px; flex: none; }
.vi-search input { flex: 1; min-width: 0; border: 0; background: none; font: 16px/1.3 inherit; color: var(--text); outline: none; -webkit-appearance: none; }
body.dark .vi-search input, body.night .vi-search input { color: var(--text); }
.vi-content { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(calc(.94 + var(--cont) * .06)); width: max-content; opacity: var(--cont);
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 6px; box-sizing: border-box; color: var(--text); }
.toast-island.di .vi-content { top: auto; bottom: 0; transform: translate(-50%, 0) scale(calc(.94 + var(--cont) * .06)); height: 47px; min-height: 0; padding: 4px 8px 4px 4px; color: #fff; }
.toast-island.di .vi-content .toast-action { background: rgba(255, 255, 255, .18); color: #fff; }
body.night .toast-island.di .vi-content { color: #F0C9C3; }
body.night .toast-island.di .vi-content .toast-action { background: rgba(224, 100, 90, .22); color: #F08A80; }
/* CSS 版（无 WebGL）：同一套几何画成 SVG（js/siri-fx.js paintSvg），这里只管颜色 */
.vi-svg .v-glow { stroke-linejoin: round; }
/* 截图 / 测试用：模拟硬件灵动岛 + 状态栏（?di=1） */
body.sim-di { --sat-pad: 59px; }
.hw-island { position: fixed; top: 11px; left: 50%; width: 126px; height: 37px; margin-left: -63px; border-radius: 18.5px; background: #000; z-index: 1000; pointer-events: none; }
.hw-island::after { content: ''; position: absolute; right: 22px; top: 12px; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #1d2a3a, #05070a 60%); }
.sim-sb { position: fixed; top: 0; left: 0; right: 0; height: 54px; z-index: 90; pointer-events: none; display: flex; align-items: center; justify-content: space-between; padding: 4px 34px 0 46px; box-sizing: border-box; font: 600 16px/1 -apple-system, system-ui, sans-serif; color: var(--text); }
.sim-sb i { width: 25px; height: 12px; border-radius: 4px; border: 1.5px solid currentColor; opacity: .9; box-sizing: border-box; background: linear-gradient(90deg, currentColor 70%, transparent 70%) content-box; padding: 1.5px; }
.toast-island .ava { width: 36px; height: 36px; border-radius: 50%; background: var(--tile-weak, var(--primary-weak)); flex: none; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.toast-island .ava img { width: 34px; height: 34px; }
.toast-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.toast-action { margin-left: 2px; background: var(--text); color: var(--surface); min-height: 36px; padding: 6px 14px; border-radius: var(--radius-pill); font-weight: 700; white-space: nowrap; flex: none; }

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

/* ================= 交互 v2 ================= */
/* 夜间暗红：深夜降档（与主 App body.dark.deep-night 同值）+ 强调色改暗红单色 */
body.dark.deep-night {
  --bg-grad: linear-gradient(170deg, #1B1815 0%, #1E1A17 55%, #1B1815 100%); --bg-top: #1B1815;
  --surface: #262220; --surface-2: #201C19;
}
body.night { --warn: #C9483E; --warn-text: #F08A80; --warn-bg: rgba(224, 100, 90, .14); --ok: #E0645A; --primary: #E0645A; --primary-fill: #C9483E; --primary-text: #F08A80; --primary-weak: rgba(224, 100, 90, .14); --on-primary: #1B0D0B; --text: #E9D6D2; --muted: #B39C97; }
body.night .r-ico img, body.night .ava img, body.night .tile img { filter: grayscale(1) sepia(1) hue-rotate(-50deg) saturate(3) brightness(.8); }
body.dark.night [data-accent], body.dark.night [data-accent="bottle"], body.dark.night [data-accent="breast"], body.dark.night [data-accent="diaper"], body.dark.night [data-accent="sleep"], body.dark.night [data-accent="meds"], body.dark.night [data-accent="temp"], body.dark.night [data-accent="pump"] { --tile: #E0645A; --tile-text: #F08A80; --tile-weak: rgba(224, 100, 90, .14); --tile-on: #1B0D0B; }

/* 页头：大标题 + 右上「说一句」 */
.hd { display: flex; align-items: flex-end; gap: var(--space-sm); margin-bottom: var(--space-md); }
.hd-t { flex: 1; min-width: 0; }
.hd .pg-sub { margin: 4px 0 0; }
.say-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border-radius: var(--radius-pill); background: var(--primary-weak); color: var(--primary-text); font-weight: 700; font-size: var(--t-sm); white-space: nowrap; transition: transform .2s var(--spring); }
.say-btn svg { width: 20px; height: 20px; }
.say-btn:active { transform: scale(.96); }
body.listening .say-btn { background: var(--primary-fill); color: var(--on-primary); }
.foot-hint { text-align: center; color: var(--muted); font-size: var(--fs-xs); margin: var(--space-lg) 0 0; }
.sec-title small { font-weight: 500; margin-left: 8px; font-size: var(--fs-xs); }
.mdl-bar + section, .mdl-bar + .tiles { margin-top: var(--space-md); }

/* 三格概览 */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); margin-top: var(--space-md); }
.tile { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 12px; min-width: 0; }
.tile .t-k { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.tile b { display: block; font-size: var(--t-lg); font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--tile-text); white-space: nowrap; }
.tile b i { font-style: normal; font-size: var(--fs-xs); font-weight: 600; margin: 0 1px; }
.tile small { display: block; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 列表：待补 */
.list li.is-need .r-main b { color: var(--text); }
.list .tag.need { flex: none; }
.list-pend li { cursor: pointer; }
.chev { color: var(--muted); font-size: 20px; line-height: 1; margin-left: -4px; }
.r-note { background: var(--warn-bg); color: var(--warn-text); }
.r-note svg { width: 20px; height: 20px; }

/* 下拉条（同主 App .pull-search 的位置与玻璃底） */
.pull-search { position: fixed; top: calc(var(--sat-pad) + 4px); left: 50%; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-pill); background: color-mix(in srgb, var(--surface) 80%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card); color: var(--muted); font-weight: 600; font-size: var(--t-sm); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.pull-search svg { width: 18px; height: 18px; display: block; }
.pull-search.is-armed { color: var(--primary-text); box-shadow: var(--shadow-card), inset 0 0 0 1.5px var(--primary); }
body.ps-pull .pull-search { transition: none; }

/* 下拉听的时候：全屏接一下点击 = 改成打字 */
#tapCatch { position: fixed; inset: 0; z-index: 70; background: transparent; }
#tapCatch[hidden] { display: none; }

/* 文字搜索 */
#search { position: fixed; inset: 0; z-index: 80; background: var(--bg-grad); animation: s-in .22s ease-out; padding: calc(var(--sat-pad) + 8px) var(--space-lg) 0; overflow: auto; }
#search[hidden] { display: none; }
.s-top { display: flex; align-items: center; gap: var(--space-sm); }
.s-box { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-input); color: var(--muted); }
.s-slot { flex: 1; height: 44px; }   /* 交互 v5：搜索框由语音球变形而成（在 #island 的壳里），这里只占位 */
.s-box svg { width: 18px; height: 18px; flex: none; }
.s-box input { flex: 1; min-width: 0; border: 0; background: none; font: 16px/1.3 inherit; color: var(--text); outline: none; -webkit-appearance: none; }
#sCancel { color: var(--primary-text); font-weight: 700; padding: 8px 2px; }
#sres { padding: var(--space-md) 0 var(--space-lg); }
.s-tip { color: var(--muted); font-size: var(--t-sm); }
.s-tip q { quotes: "「" "」"; color: var(--text); font-weight: 600; white-space: nowrap; }
.s-answer { background: var(--primary-weak); border-radius: var(--radius); padding: 12px var(--space-md); margin-bottom: var(--space-md); }

/* 详情 / 补记 */
.answer { font-weight: 700; margin: 0 0 var(--space-md); }
.fields.rows li { flex-wrap: nowrap; min-height: 56px; }
.fields .v.l { justify-content: flex-start; text-align: left; font-weight: 600; }
.btn.w { flex: 1; }
.txt-full { width: 100%; min-height: 46px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-input); background: var(--surface); color: var(--text); font: 600 16px/1.3 inherit; }
.preview { font-size: var(--t-sm); color: var(--muted); margin: var(--space-sm) 2px 0; }
.preview b { color: var(--text); }
.btn[disabled] { opacity: .4; }

/* ---------- Siri 式动效层 ---------- */
.sfx { position: fixed; inset: 0; z-index: 60; pointer-events: none; visibility: hidden; --ap: 0; --lv: 0; --th: 0; --oy: 220px; }
.sfx.on { visibility: visible; }
.sfx-scrim { position: absolute; inset: 0; opacity: calc(var(--ap) * 1); background: rgba(40, 30, 24, .30); }
.sfx[data-theme="dark"] .sfx-scrim { background: rgba(0, 0, 0, .42); }
.sfx[data-theme="night"] .sfx-scrim { background: rgba(0, 0, 0, .55); }
.sfx-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sfx.m-css .sfx-cv { display: none; }
.sfx.m-gl .sfx-css { display: none; }
.sfx-hint { position: absolute; left: 0; right: 0; top: calc(var(--oy) + 24px); text-align: center; color: #fff; font-weight: 600; font-size: var(--t-body); text-shadow: 0 1px 8px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s var(--ease); white-space: nowrap; }
.sfx-hint.on { opacity: var(--ha, var(--ap)); }
.sfx.rm[data-theme="light"] .sfx-hint { color: var(--text); text-shadow: 0 1px 6px rgba(255, 255, 255, .8); }   /* 减少动态效果：没有压暗层，浅色底上用正文色 */
.sfx[data-theme="night"] .sfx-hint { color: #F08A80; }
/* CSS 版边缘流光（conic 渐变环 + 模糊一层）；球体的 CSS 版是壳里的 SVG */
@property --sfx-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.sfx-css { position: absolute; inset: 0; opacity: var(--ap); }
.sfx-edge { position: absolute; inset: 0; border-radius: 47px; padding: calc(3px + var(--lv) * 5px);
  background: conic-gradient(from var(--sfx-a), #EE7F66, #F2C14E, #EC7FB5, #8C8FE0, #EE7F66);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: sfx-spin 4s linear infinite; }
.sfx-edge-b { animation: none; filter: blur(14px); padding: 16px; opacity: calc(.3 + var(--lv) * .7); will-change: opacity; }   /* 光晕层不转、不改模糊半径：只改透明度（合成层，不重绘） */
.sfx[data-theme="dark"] .sfx-edge { background: conic-gradient(from var(--sfx-a), #FF9A82, #F6D66A, #F59BC8, #A9ACF0, #FF9A82); }
.sfx[data-theme="night"] .sfx-edge { background: conic-gradient(from var(--sfx-a), #FF453A, #B3261E, #FF6B5E, #7A140E, #FF453A); opacity: .7; }
@keyframes sfx-spin { to { --sfx-a: 360deg; } }
@media (prefers-reduced-motion: reduce) { .sfx-edge { animation: none !important; } }
.s-model { display: flex; align-items: center; gap: var(--space-sm); padding: 10px 10px 10px var(--space-md); border-radius: var(--radius); background: var(--primary-weak); font-size: var(--t-sm); margin-bottom: var(--space-md); }
.s-model span { flex: 1; min-width: 0; }
.s-model button { color: var(--primary-text); font-weight: 700; padding: 6px 8px; white-space: nowrap; }

/* ---------- 交互 v3：收件箱（待补 + 待确认）· 行编辑面板「复制」 ---------- */
.tag.conf { background: transparent; color: var(--primary-text); box-shadow: inset 0 0 0 1.5px var(--primary); flex: none; }
.list li.is-conf .r-main small { color: var(--muted); }
.list-pend li.is-conf { cursor: pointer; }
.list .via { flex: none; font-size: var(--fs-badge); color: var(--muted); }
.list-recent li[data-id] { cursor: pointer; }
.conf-why { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px var(--space-md); border-radius: var(--radius-sm); background: var(--primary-weak); color: var(--text); font-size: var(--t-sm); }
.conf-why svg { width: 18px; height: 18px; flex: none; color: var(--primary-text); margin-top: 1px; }
.rs-savebar.rs-col { flex-direction: column; }
.rs-row { display: flex; gap: var(--space-sm); }
.rs-row .btn-primary { flex: 1; }
.btn.danger { color: var(--danger, #C0392B); }
body.dark .btn.danger { color: #F08A80; }

/* 截图 / 测试用：模拟键盘（?di=1 时，输入框聚焦后跟着搜索框成形升起，位移由 siri-fx.js 写；真机是系统键盘） */
.sim-kb { position: fixed; left: 0; right: 0; bottom: 0; height: 291px; z-index: 95; background: #D1D3D9; transform: translateY(100%); pointer-events: none;
}
.sim-kb i { position: absolute; left: 3px; right: 3px; height: 42px; border-radius: 6px; background: repeating-linear-gradient(90deg, #fff 0 32px, transparent 32px 38.6px); }
body.dark .sim-kb, body.night .sim-kb { background: #2B2B2D; }
body.dark .sim-kb i, body.night .sim-kb i { background: repeating-linear-gradient(90deg, #6B6B6E 0 32px, transparent 32px 38.6px); }
@keyframes s-in { from { opacity: 0; } }   /* 只是搜索页底色；搜索框本身是球形变来的，不淡入 */
