/* Notex Studio · 设计令牌与组件。主题通过 html[data-theme] 切换；无构建步骤。 */

:root {
  --fs: 1;
  --font: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --sp: 8px;
  --side-w: 236px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 120ms; --t: 200ms; --t-slow: 360ms;
  color-scheme: light;
}

/* ---------- 浅色主题 ---------- */
[data-theme="mist"] { --bg:#f5f6f8; --bg-2:#eef0f3; --surface:#ffffff; --surface-2:#f2f4f7; --line:#e3e6eb; --line-2:#cfd4dc; --text:#1a1d23; --text-2:#4a515c; --text-3:#676e79; --accent:#4f5bd5; --accent-2:#3f4ac2; --on-accent:#fff; --accent-soft:#eceefd; --wave-a:#6a74e8; --wave-b:#a3a9f5; --accent-ink:var(--accent); --control:#8a919c; }
[data-theme="paper"] { --bg:#f6f2ea; --bg-2:#efe9de; --surface:#fffdf8; --surface-2:#f4efe5; --line:#e6dfd1; --line-2:#d3c9b6; --text:#2a241c; --text-2:#5a5043; --text-3:#746a5c; --accent:#b4532a; --accent-2:#9c4521; --on-accent:#fff; --accent-soft:#f7e8de; --wave-a:#c4683f; --wave-b:#e3ab8b; --accent-ink:#a94e27; --control:#968b7b; }
[data-theme="sage"] { --bg:#f1f4f0; --bg-2:#e8ede6; --surface:#fbfcfa; --surface-2:#eef2ec; --line:#dfe6dc; --line-2:#c6d1c2; --text:#1b241d; --text-2:#47554a; --text-3:#627065; --accent:#2f7d5b; --accent-2:#25694b; --on-accent:#fff; --accent-soft:#e3f0e8; --wave-a:#3d9470; --wave-b:#8cc7aa; --accent-ink:#2d7756; --control:#839185; }
[data-theme="sakura"] { --bg:#faf3f4; --bg-2:#f4e9eb; --surface:#fffbfb; --surface-2:#f7eef0; --line:#eedfe2; --line-2:#dfc8cd; --text:#2a1d21; --text-2:#5c464c; --text-3:#7d666c; --accent:#c2457a; --accent-2:#a93a69; --on-accent:#fff; --accent-soft:#f9e4ed; --wave-a:#d2588c; --wave-b:#eda3c3; --accent-ink:#af3e6e; --control:#9c858b; }
[data-theme="sky"] { --bg:#f1f5fa; --bg-2:#e7eef6; --surface:#fbfdff; --surface-2:#edf2f8; --line:#dce5ef; --line-2:#c3d1e0; --text:#16202b; --text-2:#43505e; --text-3:#626e7c; --accent:#1f74d4; --accent-2:#1863b8; --on-accent:#fff; --accent-soft:#e1edfb; --wave-a:#3a8ae3; --wave-b:#94c1f2; --accent-ink:#1c68bf; --control:#808d9b; }
[data-theme="sand"] { --bg:#f8f3e8; --bg-2:#f1eadb; --surface:#fffcf4; --surface-2:#f5eedf; --line:#ebe1cc; --line-2:#d9cbaf; --text:#2b2418; --text-2:#5d523d; --text-3:#756a52; --accent:#a56719; --accent-2:#8f5915; --on-accent:#fff; --accent-soft:#f6ead2; --wave-a:#bd7d26; --wave-b:#e2bd7e; --accent-ink:#945c17; --control:#9a8d72; }
[data-theme="lavender"] { --bg:#f5f3fa; --bg-2:#ece9f5; --surface:#fdfcff; --surface-2:#f1eef8; --line:#e4dff0; --line-2:#cfc7e3; --text:#1f1b2b; --text-2:#4e4762; --text-3:#6f6883; --accent:#6d4fe0; --accent-2:#5b3fca; --on-accent:#fff; --accent-soft:#ece6fd; --wave-a:#8168ea; --wave-b:#bdb0f6; --accent-ink:#6b4ddc; --control:#8e87a3; }
/* ---------- 深色主题 ---------- */
[data-theme="graphite"] { color-scheme: dark; --bg:#131417; --bg-2:#18191d; --surface:#1c1e22; --surface-2:#24262b; --line:#2c2f35; --line-2:#3a3e46; --text:#ecedef; --text-2:#b4b8bf; --text-3:#8a8f97; --accent:#8d96ff; --accent-2:#a4abff; --on-accent:#11131c; --accent-soft:#262a45; --wave-a:#8d96ff; --wave-b:#4d5499; --accent-ink:var(--accent); --control:#666b74; }
[data-theme="midnight"] { color-scheme: dark; --bg:#0c111c; --bg-2:#101726; --surface:#131b2c; --surface-2:#1a2438; --line:#212c42; --line-2:#2e3b56; --text:#e7edf7; --text-2:#a9b5c9; --text-3:#7e8da9; --accent:#5cb2ff; --accent-2:#7cc1ff; --on-accent:#08111d; --accent-soft:#16304a; --wave-a:#5cb2ff; --wave-b:#2a5a87; --accent-ink:var(--accent); --control:#5a6987; }
[data-theme="ink"] { color-scheme: dark; --bg:#000000; --bg-2:#070707; --surface:#0e0e0f; --surface-2:#171718; --line:#1f1f21; --line-2:#2e2e31; --text:#f2f2f0; --text-2:#b9b9b5; --text-3:#82827e; --accent:#f0a83a; --accent-2:#f5bb62; --on-accent:#140d02; --accent-soft:#2a1f0d; --wave-a:#f0a83a; --wave-b:#6b4a16; --accent-ink:var(--accent); --control:#61615f; }
[data-theme] { --danger:#cd4242; --ok:#23805a; --warn:#b07a0e; }
[data-theme="graphite"], [data-theme="midnight"], [data-theme="ink"] { --danger:#ff6b6b; --ok:#46c38a; --warn:#e3a83c; }
:root { --ring: 0 0 0 1px rgb(0 0 0 / .07), 0 1px 2px -1px rgb(0 0 0 / .06), 0 2px 4px 0 rgb(0 0 0 / .04); --ring-hover: 0 0 0 1px rgb(0 0 0 / .1), 0 2px 4px -1px rgb(0 0 0 / .08), 0 6px 14px -4px rgb(0 0 0 / .08); --shadow-1: 0 1px 2px rgb(16 20 30 / .05), 0 1px 1px rgb(16 20 30 / .03); --shadow-2: 0 10px 30px -12px rgb(16 20 30 / .22), 0 2px 6px rgb(16 20 30 / .06); --shadow-3: 0 30px 80px -20px rgb(10 12 20 / .38); --scrim: rgb(14 16 22 / .32); }
[data-theme="graphite"], [data-theme="midnight"], [data-theme="ink"] { --ring: 0 0 0 1px rgb(255 255 255 / .08); --ring-hover: 0 0 0 1px rgb(255 255 255 / .14); --shadow-1: 0 0 0 1px rgb(255 255 255 / .02); --shadow-2: 0 14px 36px -12px rgb(0 0 0 / .6); --shadow-3: 0 30px 90px -20px rgb(0 0 0 / .75); --scrim: rgb(0 0 0 / .55); }

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: calc(14.5px * var(--fs)) / 1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }
.muted { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }

/* ---------- 按钮与表单 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 500; font-size: .93em; white-space: nowrap; transition-property: background-color, border-color, color, scale; transition-duration: 150ms; transition-timing-function: ease-out; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--surface-2); border-color: var(--line-2); }

.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: transparent; }
.btn.sm { height: 28px; padding: 0 9px; font-size: .86em; border-radius: 7px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--text-2); transition: background var(--t-fast), color var(--t-fast); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn.on { color: var(--accent); }
.field { display: grid; gap: 6px; }
.field > span { font-size: .86em; color: var(--text-2); font-weight: 500; }
.field small, .hint { font-size: .82em; color: var(--text-3); line-height: 1.5; }
.input, .field input, .field select, .field textarea, select.input, textarea.input { width: 100%; min-height: 36px; padding: 7px 11px; border: 1px solid var(--control); border-radius: var(--r-sm); background: var(--surface); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.field textarea, textarea.input { resize: vertical; min-height: 84px; line-height: 1.55; }
.input:focus-visible, .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 34px; height: 20px; border-radius: 99px; background: var(--control); position: relative; transition: background var(--t); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform var(--t) var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: .86em; white-space: nowrap; }
button.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: .8em; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 99px; font-size: .76em; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge.ok { color: var(--ok); }
.badge.err { color: var(--danger); }
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; font: 600 11px var(--mono); color: var(--text-3); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-2); }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 8px; color: var(--text-2); font-size: .88em; font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* ---------- 外壳 ---------- */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100vh; height: 100dvh; }
.sidebar { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px 10px; background: var(--bg-2); border-right: 1px solid var(--line); min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font-weight: 650; letter-spacing: -.01em; font-size: 1.02em; }
.brand img { width: 26px; height: 26px; }
.nav { display: grid; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); font-weight: 500; text-align: left; transition: background var(--t-fast), color var(--t-fast); }
.nav button:hover { background: var(--surface-2); color: var(--text); }
.nav button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.nav button.on svg { color: var(--accent); }
.nav .count { margin-left: auto; font-size: .8em; color: var(--text-3); font-variant-numeric: tabular-nums; }
.side-section { margin-top: 18px; padding: 0 10px 6px; display: flex; align-items: center; justify-content: space-between; font-size: .76em; font-weight: 600; letter-spacing: .04em; color: var(--text-3); }
.projects { display: grid; gap: 1px; overflow: auto; min-height: 0; }
.projects button { display: flex; align-items: center; gap: 10px; height: 31px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-size: .92em; text-align: left; }
.projects button:hover { background: var(--surface-2); color: var(--text); }
.projects button.on { color: var(--text); background: var(--surface); }
.projects .n { margin-left: auto; color: var(--text-3); font-size: .85em; }
.side-hint { margin: 2px 10px; }
.side-foot { margin-top: auto; display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.account-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: var(--r-sm); background: transparent; text-align: left; }
.account-chip:hover { background: var(--surface-2); }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; font-size: .82em; flex: none; }
.account-chip .who { min-width: 0; display: grid; line-height: 1.25; }
.account-chip .who b { font-weight: 600; font-size: .92em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chip .who small { color: var(--text-3); font-size: .78em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot-row { display: flex; align-items: center; gap: 2px; }
.sync-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text-3); font-size: .8em; }
.sync-pill:hover { background: var(--surface-2); color: var(--text-2); }
.sync-pill .dot.ok { background: var(--ok); } .sync-pill .dot.err { background: var(--danger); } .sync-pill .dot.run { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.main { min-width: 0; min-height: 0; overflow: auto; scroll-behavior: smooth; }
.view { max-width: 980px; margin: 0 auto; padding: 26px 32px 120px; }
.view.wide { max-width: 1180px; }
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; min-height: 36px; }
.view-head h1 { margin: 0; font-size: 1.36em; font-weight: 650; letter-spacing: -.015em; }
.view-head .sub { color: var(--text-3); font-size: .9em; }
.tabbar { display: none; }

/* ---------- 录音 ---------- */
.capture-head { display: flex; align-items: center; gap: 8px; }
.stage { position: relative; display: grid; justify-items: center; gap: 18px; padding: 34px 0 22px; }
.wave-wrap { position: relative; width: 100%; height: 132px; }
.wave-wrap canvas { width: 100%; height: 100%; display: block; }
.timer { font: 300 calc(46px * var(--fs)) / 1 var(--font); letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--text); }
.stage[data-status="idle"] .timer { color: var(--text-3); }
.rec-controls { display: flex; align-items: center; gap: 22px; }
.round { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); box-shadow: var(--shadow-1); transition: transform var(--t-fast), background var(--t-fast), opacity var(--t); }
.round:hover { background: var(--surface-2); color: var(--text); }
.round:disabled { opacity: 0; pointer-events: none; }
.rec-btn { position: relative; width: 78px; height: 78px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; box-shadow: 0 10px 28px -10px var(--accent), inset 0 0 0 1px rgb(255 255 255 / .12); transition: transform var(--t) var(--ease), background var(--t), box-shadow var(--t); }

.rec-btn:not(:disabled):active { transform: scale(.96); }
.rec-btn .core { width: 26px; height: 26px; border-radius: 50%; background: currentColor; transition: border-radius var(--t) var(--ease), width var(--t) var(--ease), height var(--t) var(--ease); }
.rec-btn::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; transform: scale(.9); transition: opacity var(--t), transform var(--t); }
.stage[data-status="recording"] .rec-btn { background: var(--danger); box-shadow: 0 10px 30px -10px var(--danger); }
.stage[data-status="recording"] .rec-btn .core { width: 24px; height: 24px; border-radius: 6px; }
.stage[data-status="recording"] .rec-btn::before { border-color: var(--danger); animation: ring 2s var(--ease) infinite; }
.stage[data-status="paused"] .rec-btn { background: var(--warn); }
.stage[data-status="paused"] .rec-btn .core { width: 24px; height: 24px; border-radius: 6px; }
.stage[data-status="connecting"] .rec-btn, .stage[data-status="stopping"] .rec-btn { opacity: .75; }
@keyframes ring { 0% { opacity: .5; transform: scale(.95); } 100% { opacity: 0; transform: scale(1.35); } }
.rec-hint { min-height: 22px; font-size: .88em; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.rec-hint.err { color: var(--danger); }
.live-card { margin: 4px 0 26px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid transparent; box-shadow: var(--ring); animation: rise var(--t-slow) var(--ease); }
.live-text { font-size: calc(17px * var(--fs)); line-height: 1.8; white-space: pre-wrap; word-break: break-word; min-height: 1.8em; max-height: 46vh; overflow: auto; }
.live-text .pending { color: var(--text-3); }
.live-text .caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.live-actions { display: flex; gap: 8px; margin-top: 14px; justify-content: flex-end; }

/* ---------- 笔记卡片 ---------- */
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 12px; }
.section-head h2 { margin: 0; font-size: 1.02em; font-weight: 650; }
.section-head .count { color: var(--text-3); font-size: .86em; }
.note-list { display: grid; gap: 10px; }
.note-card { position: relative; display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid transparent; box-shadow: var(--ring); transition-property: box-shadow, border-color; transition-duration: 150ms; transition-timing-function: ease-out; cursor: pointer; }

.note-card.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.note-card.fresh { animation: rise var(--t-slow) var(--ease); }
.note-card .pick { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.nc-body { flex: 1; min-width: 0; }
.nc-top { display: flex; align-items: center; gap: 8px; font-size: .8em; color: var(--text-3); margin-bottom: 4px; flex-wrap: wrap; }
.nc-top .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.nc-title { margin: 0 0 3px; font-size: 1em; font-weight: 600; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.nc-text { margin: 0; color: var(--text-2); font-size: .93em; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.nc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.nc-actions { display: flex; align-items: flex-start; gap: 2px; opacity: 0; transition: opacity var(--t-fast); }
.note-card:hover .nc-actions, .note-card:focus-within .nc-actions { opacity: 1; }
.star-on { color: var(--warn); }
.group { margin-bottom: 18px; }
.group-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 2px; border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: .9em; position: sticky; top: 0; z-index: 2; backdrop-filter: blur(8px); }
.group-head .chev { transition: transform var(--t); }
.group.closed .chev { transform: rotate(-90deg); }
.group.closed .note-list { display: none; }
.group-head .count { color: var(--text-3); font-weight: 500; }
.empty { display: grid; justify-items: center; gap: 10px; padding: 56px 20px; color: var(--text-3); text-align: center; }
.empty svg { width: 34px; height: 34px; opacity: .6; }
.empty b { color: var(--text-2); font-weight: 600; }

/* ---------- 工具栏 / 批量 ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.search { position: relative; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search input { width: 100%; height: 36px; padding: 0 12px 0 36px; border-radius: var(--r-sm); border: 1px solid var(--control); background: var(--surface); }

.batchbar { position: fixed; left: calc(var(--side-w) + 50%); transform: translateX(calc(-50% - var(--side-w) / 2)); bottom: 22px; z-index: 30; display: flex; align-items: center; gap: 6px; padding: 7px 8px 7px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3); animation: rise var(--t) var(--ease); max-width: calc(100vw - var(--side-w) - 32px); overflow-x: auto; }
.batchbar b { font-weight: 600; margin-right: 6px; white-space: nowrap; }

/* ---------- 抽屉（笔记详情） ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity var(--t); }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(640px, 100vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-3); transform: translateX(104%); transition: transform var(--t-slow) var(--ease); }
.drawer.on { transform: none; }
.dr-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px 0; }
.dr-title { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.22em; font-weight: 650; padding: 6px 8px; border-radius: 8px; letter-spacing: -.01em; }
.dr-title:hover { background: var(--surface-2); }
.dr-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; background: var(--surface-2); }
.dr-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 22px 12px; font-size: .84em; color: var(--text-3); }
.dr-meta select { height: 28px; border-radius: 99px; border: 1px solid var(--control); background: var(--surface); padding: 0 10px; font-size: .95em; color: var(--text-2); }
.tag-edit { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tag-edit .tag button { border: 0; background: none; padding: 0 0 0 4px; color: var(--text-3); line-height: 1; }
.tag-edit input { width: 90px; height: 24px; border: 1px dashed var(--control); border-radius: 6px; background: transparent; padding: 0 7px; font-size: .95em; }
.dr-tabs { padding: 0 20px 10px; display: flex; align-items: center; gap: 10px; }
.dr-body { flex: 1; overflow: auto; padding: 4px 22px 24px; }
.editor { width: 100%; min-height: 50vh; border: 0; resize: none; background: transparent; font-size: calc(16px * var(--fs)); line-height: 1.85; padding: 2px 0; }
.editor:focus { outline: none; }
.editor:focus-visible { box-shadow: none; }
.raw-text { white-space: pre-wrap; color: var(--text-2); line-height: 1.85; font-size: calc(15.5px * var(--fs)); }
.pipe { display: flex; align-items: center; gap: 8px; margin: 0 22px 10px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: .86em; }
.pipe.err { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.ai-card { padding: 14px 16px; border-radius: var(--r); border: 1px solid transparent; box-shadow: var(--ring); background: var(--surface); margin-bottom: 12px; }
.ai-card header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .86em; color: var(--text-3); }
.ai-card header b { color: var(--text); font-size: 1.05em; }
.dr-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); }

/* ---------- Markdown ---------- */
.md { line-height: 1.75; word-break: break-word; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { margin: 1.1em 0 .5em; line-height: 1.35; font-weight: 650; }
.md h1 { font-size: 1.3em; } .md h2 { font-size: 1.14em; } .md h3 { font-size: 1.02em; }
.md p { margin: .55em 0; }
.md ul, .md ol { margin: .5em 0; padding-left: 1.4em; }
.md li { margin: .2em 0; }
.md code { font-family: var(--mono); font-size: .88em; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); }
.md pre { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); overflow: auto; }
.md pre code { padding: 0; background: none; }
.md blockquote { margin: .6em 0; padding: 2px 12px; border-left: 3px solid var(--line-2); color: var(--text-2); }

/* ---------- 全屏专注录音 ---------- */
.focus { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto auto 1fr auto; background: var(--bg); opacity: 0; pointer-events: none; transition: opacity var(--t-slow) var(--ease); }
.focus.on { opacity: 1; pointer-events: auto; }
.focus-top { display: flex; align-items: center; justify-content: space-between; padding: 20px 26px; }
.focus-time { font: 200 calc(30px * var(--fs)) / 1 var(--font); font-variant-numeric: tabular-nums; color: var(--text-2); display: flex; align-items: center; gap: 12px; }
.focus-time .live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: pulse 1.4s ease-in-out infinite; }
.focus[data-status="paused"] .live-dot { background: var(--warn); animation: none; }
.focus[data-status="idle"] .live-dot { background: var(--text-3); animation: none; }
.focus-wave { height: 28vh; min-height: 150px; padding: 0 6vw; }
.focus-wave canvas { width: 100%; height: 100%; display: block; }
.focus-text { overflow: auto; padding: 6px max(6vw, calc(50vw - 420px)) 30px; font-size: calc(22px * var(--fs)); line-height: 1.85; white-space: pre-wrap; word-break: break-word; mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 40px), transparent); }
.focus-text .pending { color: var(--text-3); }
.focus-text .placeholder { color: var(--text-3); font-size: .8em; }
.focus-controls { display: flex; justify-content: center; align-items: center; gap: 26px; padding: 18px 0 max(30px, env(safe-area-inset-bottom)); }
.focus .rec-btn { width: 70px; height: 70px; }
.focus[data-status="recording"] .rec-btn { background: var(--danger); }
.focus[data-status="recording"] .rec-btn .core, .focus[data-status="paused"] .rec-btn .core { width: 22px; height: 22px; border-radius: 6px; }
.focus[data-status="paused"] .rec-btn { background: var(--warn); }

/* ---------- 待办 ---------- */
.todo-add { display: flex; gap: 8px; margin-bottom: 18px; }
.todo-list { display: grid; gap: 2px; }
.todo { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; transition: background var(--t-fast); }
.todo:hover { background: var(--surface); }
.todo input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; cursor: pointer; }
.todo .t { flex: 1; min-width: 0; line-height: 1.6; }
.todo.done .t { color: var(--text-3); text-decoration: line-through; }
.todo .src { font-size: .8em; color: var(--text-3); border: 0; background: none; padding: 0; }
.todo .src:hover { color: var(--accent); }
.todo .icon-btn { opacity: 0; }
.todo:hover .icon-btn { opacity: 1; }

/* ---------- AI ---------- */
.ai-layout { display: grid; grid-template-rows: auto 1fr auto; height: calc(100dvh - 0px); max-width: 900px; margin: 0 auto; padding: 22px 28px 18px; }
.ai-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; }
.ai-head select { height: 32px; border-radius: 8px; border: 1px solid var(--control); background: var(--surface); padding: 0 10px; }
.ai-msgs { overflow: auto; display: flex; flex-direction: column; gap: 16px; padding: 8px 2px 18px; }
.msg { max-width: 88%; }
.msg.user { align-self: flex-end; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--accent-soft); white-space: pre-wrap; word-break: break-word; }
.msg.assistant { align-self: flex-start; padding: 2px 2px; }
.msg .msg-actions { display: flex; gap: 2px; margin-top: 6px; opacity: .0; transition: opacity var(--t-fast); }
.msg:hover .msg-actions { opacity: 1; }
.ai-composer { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-2); padding: 10px 10px 8px 14px; }
.ai-composer textarea { width: 100%; border: 0; resize: none; background: transparent; min-height: 52px; max-height: 32vh; line-height: 1.6; }
.ai-composer textarea:focus { outline: none; }
.ai-composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-2); }
.ai-composer .row { justify-content: space-between; }
.prompt-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.ai-empty { margin: auto; text-align: center; color: var(--text-3); display: grid; gap: 8px; justify-items: center; }
.ai-empty h2 { margin: 0; color: var(--text); font-weight: 650; font-size: 1.2em; }

/* ---------- 云端 ---------- */
.cloud-item { display: grid; gap: 3px; padding: 13px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid transparent; box-shadow: var(--ring); cursor: pointer; transition-property: box-shadow; transition-duration: 150ms; transition-timing-function: ease-out; }

.cloud-item small { color: var(--text-3); }
.cloud-item p { margin: 0; color: var(--text-2); font-size: .92em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meter { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid transparent; box-shadow: var(--ring); }
.meter .bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.meters { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.card { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid transparent; box-shadow: var(--ring); }
.card h3 { margin: 0 0 4px; font-size: 1em; }

/* ---------- 设置 ---------- */
dialog { border: 0; padding: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
.settings { width: min(1020px, calc(100vw - 32px)); height: min(760px, calc(100dvh - 32px)); display: grid; grid-template-columns: 220px 1fr; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-3); border: 1px solid var(--line); }
dialog[open] .settings, dialog[open] .confirm { animation: pop var(--t) var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.98) translateY(6px); } }
.set-nav { background: var(--bg-2); border-right: 1px solid var(--line); padding: 16px 10px; overflow: auto; display: grid; align-content: start; gap: 2px; }
.set-nav h2 { margin: 0 0 12px; padding: 0 10px; font-size: 1.05em; }
.set-nav button { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); text-align: left; font-size: .93em; }
.set-nav button:hover { background: var(--surface-2); color: var(--text); }
.set-nav button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.set-main { display: flex; flex-direction: column; min-height: 0; }
.set-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 26px 6px; }
.set-head h3 { margin: 0; font-size: 1.15em; }
.set-body { overflow: auto; padding: 8px 26px 30px; }
.set-group { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 14px; }
.set-group:last-child { border-bottom: 0; }
.set-group > h4 { margin: 0; font-size: .9em; color: var(--text-2); font-weight: 600; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.set-row .label { display: grid; gap: 2px; min-width: 0; }
.set-row .label b { font-weight: 550; font-size: .95em; }
.set-row .label small { color: var(--text-3); font-size: .83em; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.theme-card { display: grid; gap: 8px; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.theme-card:hover { border-color: var(--line-2); }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-card .sw { height: 54px; border-radius: 8px; position: relative; overflow: hidden; border: 1px solid rgb(0 0 0 / .06); }
.theme-card .sw i { position: absolute; left: 10px; right: 26px; height: 6px; border-radius: 4px; }
.theme-card .sw i:nth-child(1) { top: 12px; } .theme-card .sw i:nth-child(2) { top: 24px; right: 44px; opacity: .5; }
.theme-card .sw b { position: absolute; right: 9px; bottom: 9px; width: 16px; height: 16px; border-radius: 50%; }
.theme-card span { font-size: .84em; font-weight: 500; padding: 0 2px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.choice { display: grid; gap: 2px; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.choice:hover { border-color: var(--line-2); }
.choice.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.choice b { font-weight: 600; font-size: .93em; }
.choice small { color: var(--text-3); font-size: .8em; }
.list { display: grid; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; border: 1px solid transparent; box-shadow: var(--ring); background: var(--surface); }
.list-item .main-col { flex: 1; min-width: 0; display: grid; gap: 2px; }
.list-item .main-col b { font-weight: 600; font-size: .94em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .main-col small { color: var(--text-3); font-size: .82em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vocab-row { display: grid; grid-template-columns: 1fr auto 1fr auto auto auto; gap: 8px; align-items: center; }
.vocab-row .arrow { color: var(--text-3); }
.editor-box { padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 12px; }
.status-line { display: flex; flex-wrap: wrap; gap: 6px; }
.err-text { color: var(--danger); margin: 8px 0 0; }

/* ---------- 菜单 / 提示 / 确认 ---------- */
.menu { position: fixed; z-index: 80; min-width: 190px; max-width: 320px; max-height: 70vh; overflow: auto; padding: 5px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3); animation: pop var(--t-fast) var(--ease); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: .92em; color: var(--text); }
.menu button:hover, .menu button:focus-visible { background: var(--surface-2); outline: none; }
.menu button.danger { color: var(--danger); }
.menu .mh { padding: 8px 10px 4px; font-size: .74em; font-weight: 600; color: var(--text-3); letter-spacing: .04em; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu .menu-search { width: 100%; height: 32px; margin-bottom: 4px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-3); font-size: .92em; animation: rise var(--t) var(--ease); }
.toast.err { background: var(--danger); color: #fff; }
.toast button { border: 0; background: none; color: inherit; font-weight: 650; text-decoration: underline; padding: 0; }
.confirm { width: min(420px, calc(100vw - 32px)); padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-3); border: 1px solid var(--line); display: grid; gap: 14px; }
.confirm h3 { margin: 0; font-size: 1.08em; }
.confirm p { margin: 0; color: var(--text-2); white-space: pre-wrap; }
.confirm .row { justify-content: flex-end; }

/* ---------- 解锁页（Cloudflare） ---------- */
.unlock-page { display: grid; place-items: center; min-height: 100dvh; }
.unlock-card { width: min(360px, calc(100vw - 32px)); padding: 30px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); display: grid; gap: 16px; justify-items: center; }
.unlock-card h1 { margin: 0; font-size: 1.2em; }
.unlock-card form { width: 100%; display: grid; gap: 12px; }

/* ---------- 密度 ---------- */
[data-density="compact"] .note-card { padding: 10px 13px; }
[data-density="compact"] .nc-text { -webkit-line-clamp: 2; }
[data-density="compact"] .note-list { gap: 6px; }
[data-density="compact"] .view { padding-top: 18px; }

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .sidebar { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: var(--bg-2); padding: 4px 4px max(4px, env(safe-area-inset-bottom)); }
  .tabbar button { display: grid; justify-items: center; gap: 1px; padding: 6px 0; border: 0; background: none; color: var(--text-3); font-size: .7em; }
  .tabbar button.on { color: var(--accent); }
  .view { padding: 18px 16px 110px; }
  .settings { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: calc(100dvh - 16px); }
  .set-nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .set-nav h2 { display: none; }
  .set-nav button { flex: none; }
  .set-body, .set-head { padding-left: 16px; padding-right: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .batchbar { left: 50%; transform: translateX(-50%); bottom: 76px; max-width: calc(100vw - 16px); }
  .nc-actions { opacity: 1; }
  .ai-layout { padding: 14px 12px 10px; height: calc(100dvh - 62px); }
  .vocab-row { grid-template-columns: 1fr; }
  .timer { font-size: calc(40px * var(--fs)); }
  input, select, textarea { font-size: 16px; }
}

/* =================== v0.3 打磨（jakubkrehel-router：accessibility → layout → typography → colors → ui） =================== */

/* 按压反馈 0.96 · 只在可用控件上 */
@media (prefers-reduced-motion: no-preference) {
  .btn:not(:disabled):active, .chip:not(:disabled):active, .round:not(:disabled):active, .icon-btn:not(:disabled):active { scale: .96; }
  .chip, .round, .icon-btn { transition-property: background-color, color, scale, opacity; transition-duration: 150ms; transition-timing-function: ease-out; }
}

/* 悬停样式只给能悬停的指针；触屏上常显操作按钮 */
@media (hover: hover) {
  .note-card:hover, .cloud-item:hover { box-shadow: var(--ring-hover); }
  .rec-btn:not(:disabled):hover { transform: scale(1.04); }
}
@media (hover: none) {
  .nc-actions, .todo .icon-btn, .msg .msg-actions { opacity: 1; }
}

/* 浮层内滚动不带动背景 */
.dr-body, .menu, .set-body, .set-nav, .ai-msgs, .live-text, .focus-text, .palette-list, .settings, .drawer { overscroll-behavior: contain; }

/* 主题切换时暂停所有过渡，避免颜色一起抹过去 */
.theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }

/* 排版：标题均衡换行，正文避免孤字 */
h1, h2, h3, .nc-title, .empty b, .confirm h3 { text-wrap: balance; }
p, .nc-text, .hint, .md p, .md li { text-wrap: pretty; }
.md, .raw-text, .live-text, .focus-text, .nc-text { overflow-wrap: break-word; }
.md { max-width: 72ch; }

/* 命中区 ≥ 24px */
.tag-edit .tag button { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; margin: -4px -6px -4px 0; border-radius: 6px; }
.tag-edit .tag button:hover { color: var(--text); }
.todo .src { min-height: 24px; display: inline-flex; align-items: center; gap: 4px; }
.chip-x { display: inline-grid; place-items: center; width: 24px; height: 24px; margin: 0 -8px 0 -2px; border: 0; border-radius: 99px; background: transparent; color: inherit; }
.chip-x:hover { background: rgb(0 0 0 / .06); }
span.chip.on { padding-inline-end: 10px; }

/* 实时文字：新定稿片段淡入 */
.live-text .final, .focus-text .final { color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .fresh { animation: wordIn 520ms cubic-bezier(.2, 0, 0, 1) both; }
  @keyframes wordIn { from { opacity: .15; filter: blur(2px); } to { opacity: 1; filter: blur(0); } }
}
@media (prefers-reduced-motion: reduce) {
  .fresh { animation: wordFade 300ms ease-out both; }
  @keyframes wordFade { from { opacity: .3; } to { opacity: 1; } }
  .live-card, .note-card.fresh, .toast, .menu, .batchbar { animation-name: fadeOnly !important; }
  @keyframes fadeOnly { from { opacity: 0; } }
}
.focus-text .final, .focus-text .pending { transition: none; }

/* 抽屉里的录音 */
.audio-slot { display: grid; gap: 6px; padding: 0 22px 10px; }
.audio-slot:empty { display: none; }
.audio-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 6px; border-radius: 12px; background: var(--surface-2); }
.audio-row audio { flex: 1; min-width: 0; height: 34px; }

/* 待办分组 */
.todo-group { margin-bottom: 16px; }
.todo-group-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: .9em; color: var(--text-2); }
.todo-group-head .count { margin-inline-start: auto; color: var(--text-3); font-size: .85em; }
.todo-check { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; margin-top: 1px; cursor: pointer; }
.todo-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
button.link { border: 0; background: none; padding: 0; color: var(--text); font-weight: 600; text-align: start; min-height: 24px; }
button.link:hover { color: var(--accent-ink); text-decoration: underline; }

/* AI 来源 */
.sources { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: .86em; }
.sources .muted { display: inline-flex; align-items: center; gap: 4px; margin-inline-end: 2px; }

/* 云端 */
.cloud-item.sel { box-shadow: 0 0 0 2px var(--accent); }
.cloud-item .pick { width: 17px; height: 17px; accent-color: var(--accent); }
.dr-title-static { flex: 1; min-width: 0; margin: 0; padding: 6px 8px; font-size: 1.22em; font-weight: 650; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dr-sub { margin: 18px 0 8px; font-size: .86em; color: var(--text-2); font-weight: 600; }
.btn-row { width: 100%; text-align: start; cursor: pointer; color: var(--text); font: inherit; }
.btn-row:hover { box-shadow: var(--ring-hover); }
.ai-card details summary { cursor: pointer; font-size: .86em; margin-bottom: 6px; min-height: 24px; }

/* 命令面板 */
.palette-dlg { margin: 12vh auto auto; }
.palette { width: min(620px, calc(100vw - 24px)); border-radius: 18px; background: var(--surface); border: 1px solid transparent; box-shadow: var(--ring), var(--shadow-3); overflow: hidden; }
dialog[open] .palette { animation: pop var(--t) var(--ease); }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.palette-search input { flex: 1; height: 52px; border: 0; background: transparent; font-size: 1.05em; color: var(--text); }
.palette-search input:focus { outline: none; }
.palette-list { max-height: min(56vh, 460px); overflow: auto; padding: 6px; }
.palette-group { padding: 10px 10px 4px; font-size: .74em; font-weight: 600; letter-spacing: .04em; color: var(--text-3); }
.palette-item { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.palette-item small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.palette-item.on { background: var(--accent-soft); color: var(--accent-ink); }
.palette-item.on small { color: inherit; }
.palette-empty { padding: 26px; text-align: center; color: var(--text-3); }
.palette-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: .78em; color: var(--text-3); }
.palette-foot > span { display: inline-flex; align-items: center; gap: 4px; }

/* 强制颜色模式：阴影被移除时保留边界 */
@media (forced-colors: active) {
  .note-card, .cloud-item, .card, .meter, .list-item, .ai-card, .live-card, .palette { border-color: CanvasText; }
  .switch .track { border: 1px solid CanvasText; }
}

/* 窄屏：命令面板贴近顶部 */
@media (max-width: 860px) {
  .palette-dlg { margin-top: 8px; }
  .audio-slot { padding-inline: 16px; }
}

/* =================== v0.4 =================== */

/* 说明文字开关：关闭后隐藏功能介绍，只留状态与必要信息 */
[data-hints="off"] .set-group > p.hint, [data-hints="off"] .set-row .label small, [data-hints="off"] .editor-box > p.hint,
[data-hints="off"] .field > small, [data-hints="off"] .empty > span, [data-hints="off"] .side-hint, [data-hints="off"] #cloudBody > p.hint,
[data-hints="off"] .dr-body > p.hint, [data-hints="off"] .help, [data-hints="off"] .field .opt { display: none; }
[data-hints="off"] .set-row { min-height: 44px; }

/* 详情：顶栏 + 阅读列。整页模式铺满窗口，侧栏模式保留原抽屉 */
.drawer { overflow: hidden; }
.dr-bar { display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.dr-bar .crumbs { font-size: .84em; color: var(--text-3); font-variant-numeric: tabular-nums; padding-inline: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-bar .save-state { font-size: .8em; color: var(--text-3); min-width: 3em; text-align: end; padding-inline-end: 6px; }
.dr-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scroll-padding-top: 24px; }
.dr-col { width: 100%; max-width: 780px; margin: 0 auto; padding: 8px 28px 40px; }
.dr-scroll .dr-body { overflow: visible; padding: 4px 0 16px; }
.dr-scroll .pipe { margin: 0 0 12px; }
.dr-scroll .dr-tabs { padding: 6px 0 12px; position: sticky; top: 0; z-index: 3; background: var(--surface); }
.dr-scroll .dr-meta { padding: 4px 0 14px; }
.dr-scroll .audio-slot { padding: 0 0 12px; }
.drawer.as-page { left: 0; width: auto; border-left: 0; box-shadow: none; background: var(--surface); transform: none; opacity: 0; pointer-events: none; transition-property: opacity, translate; transition-duration: 150ms; transition-timing-function: ease-out; }
.drawer.as-page.on { opacity: 1; pointer-events: auto; transition-duration: 300ms; }
@media (prefers-reduced-motion: no-preference) { .drawer.as-page { translate: 0 -12px; } .drawer.as-page.on { translate: 0 0; } }
.drawer.as-page .dr-col { padding-top: 28px; }
.drawer.as-page .dr-foot { justify-content: center; }
.drawer.as-page .dr-foot > * { flex: none; }
.drawer.as-page .dr-foot .grow { flex: 1; max-width: 360px; }
.flip { transform: scaleX(-1); }
.dr-titlebox { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.dr-titlebox .done-mark { color: var(--ok); margin-top: 10px; flex: none; }
.dr-titlebox .done-mark svg { width: 24px; height: 24px; }
.dr-titlebox .icon-btn { margin-top: 8px; opacity: .55; }
.dr-titlebox:hover .icon-btn, .dr-titlebox .icon-btn:focus-visible { opacity: 1; }
textarea.dr-title { flex: 1; resize: none; overflow: hidden; font: inherit; font-size: 1.62em; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; padding: 6px 2px; border: 0; background: transparent; color: var(--text); }
textarea.dr-title::placeholder { color: var(--text-3); font-weight: 600; }
textarea.dr-title:hover, textarea.dr-title:focus-visible { background: transparent; outline: none; }
.drawer:not(.as-page) textarea.dr-title { font-size: 1.3em; }
.drawer .editor { font-size: calc(16.5px * var(--fs)); line-height: 1.9; min-height: 240px; }
.icon-btn.done-on { color: var(--ok); }
.chip-select { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding-inline: 10px 4px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.chip-select select { border: 0; background: transparent; height: 26px; padding: 0 4px; color: inherit; font: inherit; font-size: .95em; cursor: pointer; }
.chip-select:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.dr-meta .chip-select select { border: 0; }
.model-pick { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding-inline: 10px 4px; border-radius: var(--r-sm); color: var(--text-3); }
.model-pick select { border: 0; background: transparent; height: 32px; max-width: 180px; color: var(--text-2); font: inherit; font-size: .88em; cursor: pointer; text-overflow: ellipsis; }
@media (hover: hover) { .model-pick:hover { background: var(--surface-2); } }
.model-pick:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.pipe.suggest { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--text); }
.pipe.suggest svg { color: var(--warn); }
.selbar { position: sticky; top: 52px; z-index: 4; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px 6px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--surface); box-shadow: var(--ring), var(--shadow-2, 0 6px 20px -8px rgb(0 0 0 / .18)); animation: rise var(--t) var(--ease); }
.selbar > svg { color: var(--accent-ink); }
.selbar.busy { color: var(--accent-ink); }

/* 笔记卡片：完成标记、未命名、紧凑模式 */
.done-btn { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -3px -4px 0 -6px; border: 0; border-radius: 50%; background: transparent; color: var(--control); transition-property: color, scale; transition-duration: 150ms; transition-timing-function: ease-out; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: no-preference) { .done-btn:not(:disabled):active { scale: .96; } }
.done-btn.on { color: var(--ok); }
@media (hover: hover) { .done-btn:hover { color: var(--ok); } }
.note-card.is-done .nc-title, .note-card.is-done .nc-text { color: var(--text-3); }
.note-card.is-done .nc-title { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-3) 60%, transparent); }
.untitled { color: var(--text-2); font-weight: 500; }
.note-card .nc-top { margin: 6px 0 0; }
.note-card .nc-top .tag { height: 20px; }
.note-card.compact { padding: 10px 14px; align-items: center; }
.note-card.compact .nc-top { margin: 2px 0 0; }
.note-card.compact .nc-title { margin: 0; }
.note-card.compact .done-btn { margin-top: 0; }
.note-card.compact .nc-actions { align-items: center; }

/* 待办中心 */
.todo-add .date { width: 150px; flex: none; }
.todo-group { margin-bottom: 20px; }
.todo-group-head { display: flex; align-items: center; gap: 8px; padding: 4px 12px 6px; font-size: .9em; color: var(--text-2); }
.todo-group[data-g="late"] .todo-group-head { color: var(--danger); }
.todo-group[data-g="today"] .todo-group-head { color: var(--accent-ink); }
.todo-group-head .count { color: var(--text-3); margin-inline-start: 2px; }
.todo-group-head .link { border: 0; background: none; padding: 0; color: inherit; font-weight: 600; }
.todo-empty { margin: 0; padding: 8px 12px; color: var(--text-3); font-size: .9em; }
.todo .t-text { cursor: text; overflow-wrap: anywhere; }
.todo .t-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; font-size: .8em; }
.todo .t-meta:empty { display: none; }
.todo .due { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--text-3); font: inherit; }
.todo .due.today { color: var(--accent-ink); font-weight: 600; }
.todo .due.late { color: var(--danger); font-weight: 600; }
.todo .src { display: inline-flex; align-items: center; gap: 4px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo .icon-btn.on { opacity: 1; }
.todo .icon-btn.reveal { opacity: 0; }
@media (hover: hover) { .todo:hover .icon-btn.reveal, .todo:focus-within .icon-btn.reveal { opacity: 1; } }
@media (hover: none) { .todo .icon-btn.reveal { opacity: 1; } }
.todo.completing .t { color: var(--text-3); text-decoration: line-through; transition: color var(--t); }
.todo.fresh { animation: rise var(--t-slow) var(--ease); }
.group .todo-list { margin-top: 4px; }
.group.closed .todo-list { display: none; }

/* 用量 */
.usage-acc { display: grid; gap: 10px; margin-bottom: 12px; }
.usage-acc .meters { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.usage-acc .meter { box-shadow: none; background: var(--surface-2); padding: 12px 14px; }
.meter.hot .bar i { background: var(--danger); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); }
.stat b { font-size: 1.5em; font-weight: 700; letter-spacing: -.02em; }
.stat small { color: var(--text-3); font-size: .8em; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 64px; padding: 6px 2px; margin-bottom: 14px; }
.spark i { flex: 1; min-height: 2px; border-radius: 3px 3px 1px 1px; background: color-mix(in srgb, var(--accent) 70%, transparent); }
@media (hover: hover) { .spark i:hover { background: var(--accent); } }

/* 设置：模型多选、账号分项 */
.pick-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow: auto; padding: 2px; }
.field .opt { font-style: normal; font-weight: 400; color: var(--text-3); margin-inline-start: 6px; font-size: .92em; }

/* 查找替换 */
.confirm.replace { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; }
.confirm.replace .vocab-row { grid-template-columns: 1fr auto 1fr auto; }
.confirm.replace .row { justify-content: flex-start; }
.confirm.replace > .row:last-child { justify-content: flex-end; }
.rp-preview { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); font-size: .9em; display: grid; gap: 8px; }
.rp-preview .list { max-height: 180px; overflow: auto; }
.rp-preview .list-item { box-shadow: none; padding: 6px 10px; }
select.input.sm { min-height: 28px; height: 28px; padding: 0 8px; width: auto; font-size: .86em; }

@media (max-width: 860px) {
  .dr-col { padding: 8px 18px 28px; }
  textarea.dr-title { font-size: 1.36em; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .model-pick select { max-width: 120px; }
  .todo-add { flex-wrap: wrap; }
  .todo-add .input:first-of-type { flex-basis: 100%; }
}
@media (forced-colors: active) {
  .done-btn.on, .dr-titlebox .done-mark { color: Highlight; }
  .stat, .rp-preview, .selbar { border: 1px solid CanvasText; }
}

/* =================== v0.5 =================== */
/* 写笔记：主按钮 + 模板下拉 */
.split-btn { display: inline-flex; }
.split-btn .btn:first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
.split-btn .btn:last-child { border-start-start-radius: 0; border-end-start-radius: 0; border-inline-start: 1px solid var(--line); padding-inline: 8px; }

/* 子笔记 */
.sub-mark { display: inline-flex; vertical-align: -2px; color: var(--text-3); margin-inline-end: 4px; }
.nc-title .badge { vertical-align: 2px; }
.parent-link { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin: 0 0 6px; padding: 4px 8px 4px 4px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); font: inherit; font-size: .86em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .parent-link:hover { background: var(--surface-2); color: var(--text); } }
.dr-section { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.dr-section-head { display: flex; align-items: center; gap: 8px; font-size: .9em; color: var(--text-2); }
.sub-card { display: grid; gap: 4px; padding: 10px 14px; border-radius: var(--r); background: var(--surface-2); cursor: pointer; transition-property: background-color; transition-duration: 150ms; transition-timing-function: ease-out; }
.sub-card b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-card p { margin: 0; color: var(--text-2); font-size: .9em; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) { .sub-card:hover { background: var(--bg-2); } }
.sub-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sub-card .done-ic { color: var(--ok); }
.sub-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 8px; }
.sub-row .sub-card { flex: 1; min-width: 0; }
.sub-tools { margin-bottom: 14px; }

/* 录音分段按钮 */
.seg-btn { position: relative; }
.seg-btn b { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: 11px; line-height: 18px; text-align: center; }

/* 待办看板 */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 12px; }
.col { display: grid; gap: 8px; padding: 10px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid transparent; min-height: 160px; transition-property: border-color, background-color; transition-duration: 150ms; transition-timing-function: ease-out; }
.col.over { border-color: var(--accent); background: var(--accent-soft); }
.col header { display: flex; align-items: center; gap: 6px; padding: 2px 4px 4px; font-size: .9em; color: var(--text-2); }
.col header .count { color: var(--text-3); }
.col[data-stage="doing"] header { color: var(--accent-ink); }
.col[data-stage="done"] header { color: var(--ok); }
.col-body { display: grid; gap: 8px; }
.kcard { display: grid; gap: 4px; padding: 10px 10px 10px 8px; border-radius: var(--r); background: var(--surface); border: 1px solid transparent; box-shadow: var(--ring); cursor: grab; }
.kcard .row { align-items: flex-start; gap: 8px; }
.kcard .k-text { line-height: 1.5; overflow-wrap: anywhere; cursor: text; }
.kcard .todo-check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); }
.kcard .t-meta { display: flex; flex-wrap: wrap; gap: 8px; padding-inline-start: 24px; font-size: .8em; }
.kcard .icon-btn { opacity: 0; }
@media (hover: hover) { .kcard:hover .icon-btn, .kcard:focus-within .icon-btn { opacity: 1; } }
@media (hover: none) { .kcard .icon-btn { opacity: 1; } }
.kcard.done .k-text { color: var(--text-3); text-decoration: line-through; }
.kcard.dragging { opacity: .5; }
.kcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.k-add .input { min-height: 32px; height: 32px; border-style: dashed; background: transparent; }
.k-add .input:focus-visible { border-style: solid; background: var(--surface); }
.kcard .due, .kcard .src { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--text-3); font: inherit; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .due.late { color: var(--danger); font-weight: 600; }
.kcard .due.today { color: var(--accent-ink); font-weight: 600; }

@media (max-width: 860px) {
  .board { grid-template-columns: repeat(5, minmax(240px, 82vw)); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
}
@media (forced-colors: active) { .kcard, .sub-card, .col { border-color: CanvasText; } }

/* =================== v0.6 =================== */
/* 转录阅读器 */
.dr-col.wide-col { max-width: 900px; }
.drawer.as-page .dr-title-static { font-size: 1.62em; font-weight: 700; line-height: 1.3; padding: 6px 0; -webkit-line-clamp: 3; }
.reader { display: grid; gap: 10px; }
.rd-audio { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.rd-audio audio { flex: 1; min-width: 240px; height: 36px; }
.rd-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rd-tools .search { min-width: 180px; }
.rd-count { min-width: 4em; font-size: .84em; }
.icon.up, svg.up { transform: rotate(180deg); }
.rd-speakers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rd-chip .dot { background: var(--spk, var(--text-3)); }
.rd-chip.on { box-shadow: inset 0 0 0 1px var(--spk, var(--accent)); }
.rd-editbar, .rd-selbar { position: sticky; top: 56px; z-index: 3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px 8px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: .9em; }
.rd-selbar { background: var(--surface-2); color: var(--text); }
.rd-lines { display: grid; gap: 2px; }
.rd-line { position: relative; display: grid; grid-template-columns: 56px 1fr 24px; gap: 10px; align-items: start; padding: 6px 8px; border-radius: 10px; transition-property: background-color; transition-duration: 150ms; transition-timing-function: ease-out; }
@media (hover: hover) { .rd-line:hover { background: var(--surface-2); } }
.rd-line.now { background: var(--accent-soft); }
.rd-line.now .rd-time { color: var(--accent-ink); font-weight: 600; }
.rd-line.sel { box-shadow: inset 3px 0 0 var(--accent); }
.rd-line.edited .rd-text { color: var(--text); }
.rd-line.edited::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--warn); }
.rd-time { justify-self: start; min-height: 24px; padding: 2px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); font: inherit; font-size: .8em; line-height: 1.9; cursor: pointer; }
@media (hover: hover) { .rd-time:hover { background: var(--bg-2); color: var(--text); } }
.rd-spk { display: block; margin: 0 0 2px; padding: 0; border: 0; background: none; color: var(--spk, var(--text-2)); font: inherit; font-size: .82em; font-weight: 650; cursor: pointer; }
.rd-text { line-height: 1.85; overflow-wrap: anywhere; color: var(--text); }
.rd-text.editable { cursor: text; }
.rd-text mark { background: color-mix(in srgb, var(--warn) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.rd-edit { width: 100%; resize: none; border: 1px solid var(--accent); border-radius: 8px; padding: 4px 8px; font: inherit; line-height: 1.8; background: var(--surface); color: var(--text); }
.rd-pick { margin-top: 6px; width: 16px; height: 16px; accent-color: var(--accent); opacity: 0; }
.rd-line.sel .rd-pick, .rd-pick:focus-visible { opacity: 1; }
@media (hover: hover) { .rd-line:hover .rd-pick { opacity: 1; } }
@media (hover: none) { .rd-pick { opacity: 1; } }

/* 诊断 */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.kv { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); }
.kv span { font-size: .78em; color: var(--text-3); }
.kv b { font-weight: 600; overflow-wrap: anywhere; }
.warn-text { color: var(--warn); }
.err-list { max-height: 360px; overflow: auto; }
.err-list small { overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .rd-line { grid-template-columns: 46px 1fr 20px; gap: 6px; padding-inline: 4px; }
  .rd-audio audio { min-width: 0; width: 100%; }
}
@media (forced-colors: active) { .rd-line.now, .rd-line.sel { outline: 1px solid Highlight; } .kv { border: 1px solid CanvasText; } }

/* =================== v0.7 =================== */
/* 卡片上的属性：图标代替文字徽标，减少干扰 */
.mini-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--text-3); }
.mini-ic.warn { color: var(--warn); }
.kind-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: .78em; font-weight: 500; }

/* 祖先路径 */
.crumb-path { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 0 0 6px; }
.crumb-path .parent-link { margin: 0; max-width: 220px; }
.crumb-sep { color: var(--text-3); font-size: .86em; }

/* 子笔记树：每层缩进 + 左侧竖线 */
.tree { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tree .tree { margin-top: 6px; padding-inline-start: 22px; border-inline-start: 1px solid var(--line); margin-inline-start: 11px; }
.tree-row { display: flex; align-items: flex-start; gap: 6px; }
.tree-row .sub-card { flex: 1; min-width: 0; }
.tree-tog { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-top: 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); }
.tree-tog svg { transition-property: rotate; transition-duration: 150ms; transition-timing-function: ease-out; }
.tree-tog svg.closed { rotate: -90deg; }
@media (hover: hover) { .tree-tog:hover { background: var(--surface-2); color: var(--text); } }
.tree-dot { flex: none; width: 24px; height: 24px; margin-top: 8px; position: relative; }
.tree-dot::after { content: ""; position: absolute; inset: 0; margin: auto; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.tree-acts { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; opacity: 0; transition-property: opacity; transition-duration: 150ms; }
.tree-row:focus-within .tree-acts { opacity: 1; }
@media (hover: hover) { .tree-row:hover .tree-acts { opacity: 1; } }
@media (hover: none) { .tree-acts { opacity: 1; } }
.sub-card.is-done b { color: var(--text-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-3) 60%, transparent); }
.sub-card .row { gap: 6px; }

/* 待办排序结果 */
.rank-list { margin: 0; padding-inline-start: 1.4em; display: grid; gap: 6px; }
.rank-list li { padding-inline-start: 4px; }
.rank-list li > * { vertical-align: middle; }
.rank-list li { display: list-item; }
.rank-list .badge { margin-inline-start: 6px; }

@media (max-width: 860px) {
  .tree .tree { padding-inline-start: 12px; margin-inline-start: 6px; }
  .crumb-path .parent-link { max-width: 140px; }
}
@media (forced-colors: active) { .tree .tree { border-color: CanvasText; } }

/* =================== v0.8 =================== */
/* 正文编辑框聚焦时不再出现左侧绿线（用户反馈：点进笔记就有一条线，很突兀） */
.editor:focus, .editor:focus-visible, .dr-title:focus-visible { outline: none; box-shadow: none; }

/* ---------- 录音舞台：按电平呼吸的光晕 ---------- */
:root { --lv: 0; }
.stage { isolation: isolate; }
.stage::before { content: ""; position: absolute; z-index: -1; inset: -30px -12% auto; height: 340px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
              radial-gradient(40% 60% at 30% 40%, color-mix(in srgb, var(--wave-b) 26%, transparent), transparent 70%),
              radial-gradient(40% 60% at 70% 60%, color-mix(in srgb, var(--wave-a) 20%, transparent), transparent 70%);
  opacity: 0; filter: blur(10px); transform: scale(.9); transition-property: opacity, transform; transition-duration: 600ms; transition-timing-function: cubic-bezier(.2, 0, 0, 1); }
.stage[data-status="recording"]::before { opacity: calc(.45 + var(--lv) * .55); transform: scale(calc(.96 + var(--lv) * .12)); }
.stage[data-status="recording"] .timer { color: var(--text); }
.timer { font-size: 2.6em; font-weight: 300; letter-spacing: .02em; font-variant-numeric: tabular-nums; transition: color 300ms; }
.rec-btn::after { content: ""; position: absolute; inset: -16px; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--danger) 40%, transparent), transparent);
  opacity: 0; transform: scale(.8); transition: opacity 200ms, transform 120ms linear; }
.stage[data-status="recording"] .rec-btn::after, .focus[data-status="recording"] .rec-btn::after { opacity: calc(.25 + var(--lv) * .75); transform: scale(calc(.9 + var(--lv) * .55)); }
.wave-wrap { position: relative; }
[data-motion="rich"] .stage[data-status="recording"] .wave-wrap::after { content: ""; position: absolute; inset: 50% 0 auto; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 50%, transparent), transparent); opacity: .6; }
/* 动效强度：calm 去掉背景光晕与呼吸，off 全部静止 */
[data-motion="calm"] .stage::before { display: none; }
[data-motion="off"] .stage::before, [data-motion="off"] .rec-btn::after, [data-motion="off"] .rec-btn::before { display: none; }
[data-motion="off"] .fresh, [data-motion="off"] .note-card.fresh, [data-motion="off"] .live-card { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .stage::before { display: none; } .rec-btn::after { transition: none; } }

/* ---------- 实时文字：字号与定稿效果可调 ---------- */
.live-card { padding: 22px 26px; }
.live-text { font-size: calc(var(--live-fs, 19px) * var(--fs)); line-height: 1.85; letter-spacing: .01em; max-height: 52vh; text-wrap: pretty; }
.focus-text { font-size: calc(var(--live-fs, 19px) * 1.28 * var(--fs)); }
.live-text .pending, .focus-text .pending { color: color-mix(in srgb, var(--text-3) 85%, transparent); }
[data-motion="rich"] .live-text .pending, [data-motion="rich"] .focus-text .pending {
  background: linear-gradient(90deg, var(--text-3) 0%, var(--accent) 50%, var(--text-3) 100%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: no-preference) {
  [data-fx="fade"] .fresh { animation: fxFade 420ms ease-out both; }
  [data-fx="blur"] .fresh { animation: wordIn 560ms cubic-bezier(.2, 0, 0, 1) both; }
  [data-fx="rise"] .fresh { display: inline; animation: fxRise 420ms cubic-bezier(.2, 0, 0, 1) both; }
  [data-fx="glow"] .fresh { animation: fxGlow 1400ms ease-out both; }
  [data-fx="none"] .fresh { animation: none; }
  @keyframes fxFade { from { opacity: .2; } }
  @keyframes fxRise { from { opacity: 0; filter: blur(1px); } 60% { opacity: 1; } }
  @keyframes fxGlow { from { color: var(--accent-ink); text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent); } }
}

/* ---------- 首页：折叠为标题、已完成 ---------- */
.section-head { align-items: center; }
.chip.sm { height: 24px; padding: 0 8px; font-size: .8em; }
.empty.slim { padding: 24px 12px; }
.empty.slim svg { width: 22px; height: 22px; color: var(--ok); opacity: .9; }
.compact-list { gap: 6px; }
.compact-list .note-card { padding: 9px 14px; }
.compact-list .note-card .nc-top { display: none; }
/* 一键完成：悬停时预览对勾，点下去打勾弹一下 */
.done-btn { width: 32px; height: 32px; margin: -5px -6px 0 -8px; }
.done-btn svg { width: 19px; height: 19px; }
.done-btn .i-on { display: none; }
.done-btn.on .i-off { display: none; }
.done-btn.on .i-on { display: inline-grid; }
@media (hover: hover) {
  .done-btn:hover { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
  .done-btn:not(.on):hover .i-off { display: none; }
  .done-btn:not(.on):hover .i-on { display: inline-grid; opacity: .55; }
}
.done-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.note-card.checking .done-btn { color: var(--ok); }
.note-card.checking .done-btn .i-off { display: none; }
.note-card.checking .done-btn .i-on { display: inline-grid; opacity: 1; animation: checkPop 380ms cubic-bezier(.3, 1.6, .5, 1) both; }
.note-card.checking .nc-title { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-3) 60%, transparent); color: var(--text-3); transition: color 200ms; }
.note-card.leaving { animation: cardOut 260ms cubic-bezier(.4, 0, 1, 1) forwards; pointer-events: none; }
@keyframes checkPop { 0% { scale: .5; } 100% { scale: 1; } }
@keyframes cardOut { to { opacity: 0; transform: translateX(14px); } }
[data-motion="off"] .note-card.leaving, [data-motion="off"] .note-card.checking .i-on { animation: none; }

/* 详情顶栏：子笔记与复制 */
.split-btn { display: inline-flex; align-items: center; border-radius: 10px; }
.split-btn .caret { width: 22px; margin-inline-start: -6px; color: var(--text-3); }
.bar-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }

/* ---------- 待办看板 ---------- */
.board { grid-template-columns: repeat(5, minmax(236px, 1fr)); gap: 14px; padding: 2px 2px 16px; }
.col { --c: var(--text-3); position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px 10px 10px; min-height: 220px; background: color-mix(in srgb, var(--bg-2) 80%, transparent); border: 1px solid transparent; border-radius: 16px; }
.col::before { content: ""; position: absolute; inset: 0 14px auto; height: 3px; border-radius: 0 0 3px 3px; background: var(--c); opacity: .75; }
.col[data-stage="inbox"] { --c: var(--text-3); }
.col[data-stage="next"] { --c: var(--accent); }
.col[data-stage="doing"] { --c: var(--warn); }
.col[data-stage="waiting"] { --c: color-mix(in srgb, var(--accent) 50%, var(--text-3)); }
.col[data-stage="done"] { --c: var(--ok); }
.col header { display: flex; align-items: center; gap: 8px; padding: 2px 4px; color: var(--text); font-size: .92em; }
.col header b { font-weight: 650; }
.col-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.col header .pill { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; display: inline-grid; place-items: center; background: var(--surface); color: var(--text-2); font-size: .82em; font-variant-numeric: tabular-nums; box-shadow: var(--ring); }
.col-body { display: grid; gap: 8px; align-content: start; flex: 1; }
.col.over { border-color: color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 8%, var(--bg-2)); }
.col.over .col-empty { border-color: var(--c); color: var(--text-2); }
.col-empty { margin: 0; padding: 18px 8px; border: 1.5px dashed var(--line-2); border-radius: 12px; text-align: center; color: var(--text-3); font-size: .85em; }
.kcard { gap: 6px; padding: 10px 10px 10px 8px; border-radius: 12px; background: var(--surface); box-shadow: var(--ring), 0 1px 2px rgb(0 0 0 / .04); cursor: grab; transition-property: box-shadow, transform, opacity; transition-duration: 160ms; transition-timing-function: ease-out; }
@media (hover: hover) { .kcard:hover { box-shadow: var(--ring), 0 6px 18px -8px rgb(0 0 0 / .22); transform: translateY(-1px); } .kcard:hover .k-acts .icon-btn { opacity: 1; } }
.kcard:focus-within .k-acts .icon-btn { opacity: 1; }
@media (hover: none) { .k-acts .icon-btn { opacity: 1; } }
.kcard.important { box-shadow: inset 3px 0 0 var(--warn), var(--ring); }
.kcard.late { box-shadow: inset 3px 0 0 var(--danger), var(--ring); }
.kcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.k-row { display: flex; align-items: flex-start; gap: 8px; }
.k-text { flex: 1; min-width: 0; line-height: 1.5; overflow-wrap: anywhere; cursor: text; }
.kcard.done .k-text { color: var(--text-3); text-decoration: line-through; }
.k-acts { display: flex; gap: 0; margin: -3px -4px 0 0; }
.k-acts .icon-btn { opacity: 0; transition: opacity 150ms; }
.k-acts .icon-btn.on { opacity: 1; }
.k-check { position: relative; flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-top: 0; cursor: pointer; }
.k-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.k-box { width: 18px; height: 18px; border-radius: 50%; border: 1.6px solid var(--control); display: grid; place-items: center; color: transparent; transition-property: background-color, border-color, color; transition-duration: 150ms; }
.k-box svg { width: 12px; height: 12px; }
.k-check input:checked + .k-box { background: var(--ok); border-color: var(--ok); color: #fff; }
.k-check input:focus-visible + .k-box { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .k-check:hover .k-box { border-color: var(--ok); color: color-mix(in srgb, var(--ok) 60%, transparent); } }
.k-meta { display: flex; flex-wrap: wrap; gap: 6px; padding-inline-start: 30px; }
.k-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; max-width: 100%; padding: 0 7px; border: 0; border-radius: 7px; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: .78em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-chip span { overflow: hidden; text-overflow: ellipsis; }
.k-chip.late { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-weight: 600; }
.k-chip.today { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
button.k-chip { cursor: pointer; }
.k-add { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 10px; color: var(--text-3); transition: background-color 150ms; }
.k-add input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .9em; }
.k-add input:focus { outline: none; }
.k-add:focus-within { background: var(--surface); box-shadow: var(--ring); color: var(--accent-ink); }
@media (hover: hover) { .k-add:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); } }
@media (max-width: 860px) { .board { grid-template-columns: repeat(5, minmax(250px, 84vw)); } }
@media (forced-colors: active) { .col::before, .k-box { forced-color-adjust: none; } .col { border-color: CanvasText; } }
/* 设置：同步种类、录音页效果预览、隐藏的内置 Prompt */
.sync-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.sync-kind { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); cursor: pointer; transition: background-color 150ms; }
.sync-kind input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.sync-kind b { display: block; font-weight: 600; font-size: .92em; }
.sync-kind small { display: block; color: var(--text-3); font-size: .8em; line-height: 1.45; margin-top: 2px; }
.sync-kind:has(input:not(:checked)) { opacity: .6; }
@media (hover: hover) { .sync-kind:hover { background: var(--accent-soft); } }
.fx-preview { margin-top: 6px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); max-height: none; }
.list-item.is-hidden .main-col { opacity: .55; }
/* 快捷键设置 */
.key-list { display: grid; gap: 2px; }
.key-row { display: grid; grid-template-columns: 1fr auto 28px; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.key-row:last-child { border-bottom: 0; }
.key-row .label b { display: block; font-weight: 550; }
.key-row .label small { color: var(--text-3); font-size: .82em; }
.key-btn { min-width: 120px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-size: .88em; cursor: pointer; transition-property: border-color, box-shadow; transition-duration: 150ms; }
.key-btn.off .kbd { opacity: .5; }
.key-btn.capturing { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent-ink); }
@media (hover: hover) { .key-btn:hover { border-color: var(--line-2); } }
.key-sp { width: 28px; }

/* =================== v0.9 · 手机适配 =================== */
.sheet-scrim { display: none; }
.tb-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font: 600 10px/16px var(--font); font-style: normal; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  /* 底栏：更大的点按区、毛玻璃、安全区 */
  .tabbar { position: relative; z-index: 30; gap: 0; padding: 4px 6px max(6px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg-2) 88%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
  .tabbar button { position: relative; min-height: 50px; font-size: .72em; border-radius: 12px; transition: color 150ms; }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button.on { color: var(--accent-ink); }
  .tabbar button.on svg { transform: translateY(-1px); }
  .tabbar button:active { background: color-mix(in srgb, var(--accent) 8%, transparent); }

  /* 「更多」：侧栏变成底部弹出面板 */
  .sidebar { display: flex; position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; max-height: min(82dvh, 720px); overflow: auto; overscroll-behavior: contain;
    padding: 10px 14px max(16px, env(safe-area-inset-bottom)); border: 0; border-radius: 22px 22px 0 0; background: var(--surface); box-shadow: 0 -18px 50px -20px rgb(0 0 0 / .35);
    transform: translateY(105%); visibility: hidden; transition: transform 320ms cubic-bezier(.2, .9, .3, 1), visibility 0s 320ms; }
  .sidebar::before { content: ""; align-self: center; flex: none; width: 38px; height: 4px; margin: 0 0 8px; border-radius: 99px; background: var(--line-2); }
  body.sheet-open .sidebar { transform: none; visibility: visible; transition: transform 320ms cubic-bezier(.2, .9, .3, 1), visibility 0s; }
  .sheet-scrim { display: block; position: fixed; inset: 0; z-index: 44; background: rgb(0 0 0 / .32); animation: fadeOnly 200ms ease-out; }
  .sheet-scrim[hidden] { display: none; }
  .sidebar .brand { display: none; }
  .sidebar .nav { grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 6px; }
  .sidebar .nav button { flex-direction: column; height: auto; min-height: 58px; padding: 8px 2px; gap: 4px; justify-content: center; font-size: .78em; border-radius: 14px; background: var(--surface-2); }
  .sidebar .nav button .count { display: none; }
  .sidebar .projects button, .sidebar .side-section { min-height: 44px; }
  .side-foot { position: static; margin-top: 8px; padding-top: 10px; }
  .account-chip { min-height: 48px; }
  @media (prefers-reduced-motion: reduce) { .sidebar, body.sheet-open .sidebar { transition: none; } }

  /* 页面与顶部安全区（加到主屏幕后全屏显示时） */
  .main { padding-top: env(safe-area-inset-top); }
  .view { padding: 12px 14px 96px; }
  .view-head h1 { font-size: 1.3em; }

  /* 录音页 */
  .capture-head { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .capture-head::-webkit-scrollbar { display: none; }
  .capture-head .chip { flex: none; height: 34px; }
  .stage { padding: 18px 0 14px; gap: 14px; }
  .wave-wrap { height: 104px; }
  .rec-btn { width: 84px; height: 84px; }
  .rec-controls { gap: 30px; }
  .rec-controls .round { width: 48px; height: 48px; }
  .live-card { padding: 16px 16px; margin-bottom: 18px; }
  .live-text { max-height: 40dvh; }
  .live-actions { flex-wrap: wrap; }
  .live-actions .btn { flex: 1; min-height: 44px; }

  /* 卡片：手机上只留最常用的操作，其他在「更多」里 */
  .note-card { padding: 12px 12px 12px 14px; gap: 10px; }
  .nc-actions { gap: 0; }
  .nc-actions [data-act="note-pack"], .nc-actions [data-act="note-ai"], .nc-actions [data-act="note-copy"] { display: none; }
  .nc-actions .icon-btn { width: 36px; height: 36px; }
  .done-btn { width: 40px; height: 40px; margin: -9px -8px 0 -10px; }
  .section-head { flex-wrap: wrap; row-gap: 6px; }

  /* 详情页：顶栏横向滚动，正文留出底部空间 */
  .drawer { width: 100vw; border-left: 0; padding-top: env(safe-area-inset-top); }
  .dr-bar { overflow-x: auto; scrollbar-width: none; gap: 2px; padding-inline: 8px; }
  .dr-bar::-webkit-scrollbar { display: none; }
  .dr-bar .icon-btn { flex: none; width: 40px; height: 40px; }
  .dr-bar [data-act="detail-layout"], .dr-bar .bar-sep { display: none; }
  .dr-bar .crumbs { display: none; }
  .dr-col { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .dr-tabs { overflow-x: auto; scrollbar-width: none; }
  .dr-tabs::-webkit-scrollbar { display: none; }

  /* 弹出菜单：贴底的面板，点按区更大 */
  .menu { left: 8px !important; right: 8px !important; top: auto !important; bottom: max(8px, env(safe-area-inset-bottom)) !important; max-width: none; max-height: 70dvh; padding: 8px; border-radius: 18px; animation: sheetUp 220ms cubic-bezier(.2, .9, .3, 1); }
  .menu button { min-height: 46px; font-size: 1em; }
  @keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } }

  /* 提示条在底栏上方 */
  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .toast { max-width: 100%; }

  /* 全屏专注录音 */
  .focus { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  .focus-top { padding: 14px 18px; }
  .focus-wave { height: 22dvh; min-height: 120px; padding: 0 4vw; }
  .focus-text { padding-inline: 20px; }

  /* 设置：全屏 */
  #settingsDlg { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .settings { height: 100dvh; padding-top: env(safe-area-inset-top); }
  .set-row { flex-wrap: wrap; }
  .key-row { grid-template-columns: 1fr auto; }
  .key-row .key-sp, .key-row > .icon-btn { display: none; }
  .sync-kinds { grid-template-columns: 1fr; }

  /* 待办：看板一屏一列，可左右滑 */
  .board { grid-template-columns: repeat(5, 86vw); gap: 10px; margin: 0 -14px; padding: 2px 14px 16px; scroll-padding-inline: 14px; }
  .kcard { cursor: default; }
  .k-acts .icon-btn { width: 34px; height: 34px; }
  .k-check { width: 30px; height: 30px; }

  /* 输入框 16px，避免 iOS 聚焦时自动放大 */
  input, select, textarea, .k-add input { font-size: 16px; }
}
@media (max-width: 380px) {
  .tabbar button span { font-size: .95em; }
  .sidebar .nav { grid-template-columns: repeat(3, 1fr); }
}
/* 触屏设备：没有悬停，快捷键提示不显示 */
@keyframes fadeOnly { from { opacity: 0; } }
@media (hover: none) {
  .help .kbd { display: none; }
  .nc-actions, .tree-acts, .k-acts .icon-btn { opacity: 1; }
}

