:root {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-synthesis: none;
  color: #23324c;
  background: #f5f7fc;
  --blue: #285cde;
  --blue-dark: #1749c4;
  --blue-soft: #edf3ff;
  --ink: #23324c;
  --muted: #63718a;
  --line: #e0e6f0;
  --radius: 16px;
  --sidebar-width: 216px;
}
* { box-sizing: border-box; }
body { margin: 0; padding-left: var(--sidebar-width); font-size: 16px; line-height: 1.7; }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border: 1px solid #cbd5e5; border-radius: 9px; color: #334561; background: white; cursor: pointer; line-height: 1.5; transition: background .16s, border-color .16s, box-shadow .16s; }
button:hover:not(:disabled) { background: #f4f7ff; border-color: #9cb3e3; }
button:disabled { color: #7b879c; background: #f1f4f8; border-color: #dce2eb; cursor: not-allowed; }
.primary { background: var(--blue); border-color: var(--blue); color: white; font-weight: 600; }
.primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); box-shadow: 0 3px 10px #285cde1c; }
.primary:disabled { background: #b7c9f3; border-color: #b7c9f3; color: #334a78; }
svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #285cde; outline-offset: 4px; }
h1:focus { outline: none; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: 28px; font-weight: 650; letter-spacing: -.035em; line-height: 1.4; margin-bottom: 12px; }
h2 { font-size: 19px; line-height: 1.5; margin-bottom: 0; font-weight: 650; }
h3 { font-size: 19px; line-height: 1.6; margin-bottom: 12px; }
h4 { font-size: 16px; margin-bottom: 10px; }
.hint { color: var(--muted); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 600; letter-spacing: .12em; margin-bottom: 10px; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar-width); height: 100dvh; overflow-y: auto; padding: 24px 16px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: white; }
.new-recording { width: 100%; margin-bottom: 24px; font-size: 14px; }
.steps, .sidebar-secondary { display: grid; gap: 8px; width: 100%; }
.steps button, .sidebar-secondary button { width: 100%; justify-content: flex-start; gap: 10px; padding: 12px; border-color: transparent; background: transparent; font-size: 14px; text-align: left; white-space: nowrap; }
.steps button:disabled { color: #7b879c; background: transparent; border-color: transparent; }
.steps button[aria-current], .sidebar-secondary button[aria-current] { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.step-number { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border: 1px solid #d7e0ef; border-radius: 8px; background: white; color: #687b9b; font-size: 13px; }
.steps button[aria-current] .step-number { background: var(--blue); border-color: var(--blue); color: white; }
.steps i { margin-left: auto; font-size: 10px; font-style: normal; font-weight: 400; color: #7b6033; }
.steps i:empty { display: none; }
.sidebar-secondary { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: #243551; text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; margin-bottom: 24px; }
.brand-symbol { display: grid; place-items: center; width: 37px; height: 37px; background: var(--blue); color: white; border-radius: 11px; }
.brand-symbol svg { width: 24px; height: 24px; stroke-width: 2; }
main { width: min(1184px, calc(100% - 64px)); min-width: 0; margin: 0 auto; padding: 28px 0; min-height: calc(100dvh - 110px); }
.page-intro { text-align: left; margin: 0 0 20px; }
.notice { padding: 14px 18px; margin: 16px 0; border: 1px solid #d3e0fc; background: #eff5ff; color: #354d79; border-radius: 10px; overflow-wrap: anywhere; }
.notice:empty { display: none; }
#message.error, #record-error:not(:empty), .error { color: #a73730; }
#message.error { background: #fff2ef; border-color: #edcbc5; }
.warning { color: #81541c; background: #fff8e9; border-color: #ecd5a9; }
.capture-sheet { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 8px 32px #263f7004; }
.sheet-heading { padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf0f6; }
.sheet-heading h2 { font-size: 16px; font-weight: 600; }
body:has(#live-panel:not([hidden])) .page-intro { margin-bottom: 20px; }
body:has(#live-panel:not([hidden])) .page-intro h1 { font-size: 25px; }
.badge { display: inline-block; font-size: 12px; line-height: 1.5; padding: 5px 11px; border-radius: 6px; color: #375b9f; background: var(--blue-soft); white-space: nowrap; }
.badge.neutral { color: var(--muted); background: #f0f3f8; }
.badge.recording { color: #ae3b33; background: #fff0ed; }
.badge.recording::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #bd4a43; margin-right: 6px; }
.capture-welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 350px; padding: 36px 24px; text-align: center; }
.microphone-illustration { position: relative; display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: 25px; border: 1px solid #d9e5ff; border-radius: 26px; background: #f1f6ff; color: #4775dc; }
.microphone-illustration svg { width: 40px; height: 44px; stroke-width: 1.6; }
.sound-line { position: absolute; width: 4px; height: 20px; border-radius: 3px; background: #b4c9f8; top: 34px; }
.sound-line.left { left: -18px; box-shadow: -9px 0 #d5e0f8; }
.sound-line.right { right: -18px; box-shadow: 9px 0 #d5e0f8; }
.capture-welcome p { color: var(--muted); font-size: 15px; line-height: 1.9; margin-bottom: 22px; }
.capture-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 0; }
.capture-options > details { border: 1px solid var(--line); background: white; border-radius: 10px; padding: 14px 20px; margin: 0; }
.capture-options summary { color: #52637e; font-size: 14px; }
details { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
summary { cursor: pointer; line-height: 1.7; color: #3e557b; min-height: 28px; }
summary::marker { color: #8ba0bf; }
details[open] > summary { margin-bottom: 18px; }
label { display: block; font-size: 14px; color: #455976; margin-bottom: 8px; }
input[type="text"], input[type="search"], select, textarea { width: 100%; max-width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #c5d0e2; border-radius: 8px; background: white; color: var(--ink); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0; }
.checkbox-label { display: flex; gap: 9px; align-items: center; }
.settings-grid { display: grid; gap: 16px; }
.settings .hint { margin: 10px 0; }
.upload-option form { font-size: 14px; }
.file-label { padding: 18px; border: 1px dashed #b9cbe8; border-radius: 8px; background: #fafcff; }
input[type="file"] { display: block; margin-top: 12px; width: 100%; font-size: 13px; }
#live-panel { padding: 16px 28px 20px; }
#live-label { margin-bottom: 10px; }
.live-scroll { height: clamp(260px, 43vh, 520px); overflow-y: auto; scrollbar-width: thin; padding: 0 8px 16px 0; overflow-anchor: none; }
.transcript { white-space: pre-wrap; font-size: 18px; line-height: 2; overflow-wrap: anywhere; }
.follow-button { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 2; display: flex; margin: 0; border-radius: 24px; background: white; box-shadow: 0 3px 14px #284f8914; color: var(--blue); white-space: nowrap; }
#live-translation-status { margin: 10px 0 0; }
.recording-dock { position: fixed; z-index: 10; bottom: 0; left: var(--sidebar-width); right: 0; background: #fffffff5; border-top: 1px solid #dce4f2; box-shadow: 0 -4px 24px #25406608; backdrop-filter: blur(12px); }
.dock-inner { max-width: 1184px; width: calc(100% - 64px); margin: 0 auto; padding: 20px 0; display: flex; gap: 28px; align-items: center; }
.dock-status { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.dock-status strong { font-size: 15px; font-weight: 600; }
.dock-status .hint { font-size: 12px; line-height: 1.6; margin: 3px 0 0; }
.record-dot { width: 9px; height: 9px; border-radius: 50%; background: #aab7cb; flex-shrink: 0; }
body:has(.recording) .record-dot { background: #c04c46; box-shadow: 0 0 0 5px #fff0ed; }
.dock-metrics { display: flex; align-items: center; gap: 18px; }
.duration { font-size: 24px; font-weight: 550; color: #41516c; font-variant-numeric: tabular-nums; white-space: nowrap; }
meter { width: 72px; height: 12px; accent-color: var(--blue); }
.record-button, .stop-button { min-height: 56px; min-width: 168px; border-radius: 10px; font-size: 18px; }
.stop-button { border-color: #b9433d; background: #b9433d; color: white; font-weight: 600; }
.stop-button:hover:not(:disabled) { border-color: #a53831; background: #a53831; }
.stop-button::before { content: ''; width: 11px; height: 11px; border-radius: 2px; background: currentColor; }
body:has(#recording-dock:not([hidden])) { padding-bottom: 110px; }
.surface { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.section-heading, .record-heading, .paper-heading, .document-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.record-heading { margin-bottom: 16px; }
.record-heading h2 { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.record-heading .hint { margin: 3px 0 0; font-size: 12px; }
.review-notice { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #edf3ff; border: 1px solid #d8e5ff; border-radius: 10px; padding: 14px 20px; margin-bottom: 18px; font-size: 14px; color: #3f5984; }
.review-notice p { margin: 0; }
.review-notice button { flex-shrink: 0; }
.conversation-review { border: 1px solid var(--line); border-radius: 10px; background: white; padding: 15px 20px; margin: 0 0 22px; }
.conversation-review > summary { font-size: 15px; }
.conversation-review summary .hint { margin-left: 8px; }
audio { width: 100%; height: 42px; margin: 0 0 18px; }
#segments { max-height: 440px; overflow-y: auto; scrollbar-width: thin; padding: 0 8px 0 0; }
.segment { border-left: 2px solid #acc3ed; padding: 16px 20px; margin: 12px 0; border-radius: 0 8px 8px 0; background: #f7f9fd; overflow-wrap: anywhere; }
.segment:nth-child(even) { background: #f9fafc; border-color: #bac4d5; }
.segment-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: #637493; }
.segment p { margin: 8px 0 0; font-size: 17px; line-height: 1.95; white-space: pre-wrap; }
.timestamp { border: 0; min-height: 36px; padding: 0 4px; font-size: 13px; color: var(--blue); background: transparent; }
.segment .translation-text { color: #345c8e; border-top: 1px dashed #d6e0ef; padding-top: 10px; margin-top: 12px; }
.segment .translation-warning { color: #91651e; font-size: 14px; }
.translation-outdated { opacity: .7; }
.pipeline-notice { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #425b82; }
.pipeline-notice p { margin: 0; font-size: 14px; }
.status-symbol { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #93acd4; border-radius: 50%; color: #6c89b5; font-size: 12px; flex-shrink: 0; font-family: Georgia, serif; }
.actions, .draft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.pipeline-actions:has(button[hidden]), .task-recovery:has(button[hidden]):not(:has(button:not([hidden]))) { display: none; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.review-grid .hint { margin: 12px 0 20px; }
.key-information { min-height: 350px; }
.key-points { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 16px; line-height: 2; min-height: 180px; margin: 0; }
.key-points:empty::after { content: '正在等待关键信息。整理完成后，会显示在这里。'; display: block; padding: 28px 0; color: var(--muted); font-size: 15px; }
.template-filter { margin-top: 0; padding-top: 0; border: 0; font-size: 14px; }
.template-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.template-filters input, .template-filters select { margin-top: 8px; }
#pipeline-candidate-count { font-size: 12px; margin: 10px 0; }
.pipeline-cards { display: grid; gap: 12px; max-height: 540px; overflow: auto; padding: 4px; margin: 12px -4px; scrollbar-width: thin; }
.pipeline-cards:empty::after { content: '关键信息整理后，会在这里推荐适用模板。'; display: block; color: var(--muted); font-size: 15px; padding: 36px 20px; border: 1px dashed #cbd7ec; border-radius: 9px; background: #fafcff; }
.pipeline-cards h4 { color: #657793; font-size: 13px; margin: 10px 0 0; font-weight: 500; }
.pipeline-card { position: relative; display: block; padding: 20px 20px 20px 46px; border: 1px solid #d2dceb; border-radius: 10px; cursor: pointer; margin: 0; color: #2e4264; }
.pipeline-card:hover { border-color: #94b0e7; background: #fcfdff; }
.pipeline-card input { position: absolute; top: 21px; left: 16px; margin: 0; }
.pipeline-card strong { font-weight: 600; font-size: 16px; }
.pipeline-card .hint { margin: 9px 0 0; font-size: 13px; line-height: 1.8; }
.template-reason { color: #5d6e88; font-size: 14px; line-height: 1.8; margin: 12px 0 0; }
.template-reference { display: block; color: #64738a; font-size: 12px; overflow-wrap: anywhere; margin-top: 12px; }
.pipeline-card:has(input:checked) { border: 2px solid var(--blue); padding: 19px 19px 19px 45px; background: #f3f7ff; box-shadow: 0 2px 8px #285cde0a; }
.pipeline-card:has(input:checked) input { top: 20px; left: 15px; }
.pipeline-card:focus-within { outline: 3px solid #8babef; outline-offset: 2px; }
.selection-status { font-size: 14px; color: var(--blue); }
.confirm-button { width: 100%; margin-top: 6px; justify-content: space-between; padding: 15px 20px; }
.selected-template { padding: 14px; border-radius: 8px; background: #f0f5ff; color: #425d88; font-size: 14px; }
.selected-template:empty, .selection-status:empty { display: none; }
.readiness { margin-top: 24px; border-color: #e5d5b6; background: #fffcf5; }
.readiness ul { padding-left: 22px; }
.readiness li { margin-bottom: 12px; }
.supplement { margin-top: 18px; }
.supplement label { color: var(--ink); font-size: 17px; font-weight: 600; margin-bottom: 12px; }
textarea { resize: vertical; font-size: 16px; }
.document-toolbar { margin: 20px 0 24px; }
.document-toolbar h2 { font-size: 17px; }
.document-toolbar p { margin: 4px 0 0; }
.document-paper { max-width: 960px; padding: 36px 48px; margin: 0 auto 24px; background: white; border: 1px solid #dce3ef; border-radius: 5px; box-shadow: 0 8px 36px #27436a08; }
.paper-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.paper-heading h3 { margin-bottom: 0; font-size: 22px; }
.paper-heading .eyebrow { color: #64738b; letter-spacing: .08em; margin-bottom: 5px; }
.draft-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 16px; line-height: 2.1; }
#pipeline-text { margin: 28px 0; font-size: 17px; }
#pipeline-preview { max-height: 60vh; overflow: auto; padding-right: 8px; scrollbar-width: thin; }
.paper-footnote { font-size: 13px; color: #65748d; padding-top: 18px; margin: 0; border-top: 1px solid var(--line); }
.document-empty { text-align: center; padding: 60px 24px; max-width: 960px; margin: auto; }
.loading-indicator { width: 28px; height: 28px; border: 3px solid #dce6fb; border-top-color: var(--blue); border-radius: 50%; margin: 0 auto 20px; animation: rotate 1.2s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.more-options { padding: 18px 0; color: #65758f; font-size: 14px; }
.more-options select { max-width: 600px; }
#pipeline-config, #pipeline-status { margin-top: 12px; }
.record-actions, .audio-version-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.audio-version-bar select { width: auto; }
.append-source { display: flex; align-items: center; gap: 10px; }
.append-source label { margin: 0; }
.append-source select { width: auto; }
.append-task { padding: 16px 0; border-bottom: 1px solid var(--line); }
.append-task button { margin: 6px 8px 0 0; }
.template-type-options { display: grid; gap: 8px; max-height: 240px; overflow: auto; margin: 16px 0; }
.template-type-options label { display: flex; align-items: start; gap: 8px; }
.history-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill,minmax(min(100%,320px),1fr)); }
.history-button { display: block; width: 100%; padding: 20px; text-align: left; }
.history-button.selected { border-color: #86a9ec; background: var(--blue-soft); }
.history-name { display: block; font-size: 16px; overflow-wrap: anywhere; }
.history-meta { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin: 18px 0; }
.pagination button { padding: 8px 14px; font-size: 14px; }
.empty-state { text-align: center; padding: 70px 24px; }
.empty-state p, .empty-hint { color: var(--muted); }
.empty-state .actions { justify-content: center; }
dl { font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0 0 14px; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: calc(var(--sidebar-width) + 12px); top: -80px; z-index: 50; padding: 12px 20px; background: white; border: 2px solid var(--blue); border-radius: 8px; }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }
@media (min-width: 601px) and (max-height: 800px) {
  main { padding-top: 24px; }
  .page-intro { margin-bottom: 22px; }
  h1 { font-size: 30px; margin-bottom: 8px; }
  .sheet-heading { padding: 16px 28px; }
  .capture-welcome { min-height: 230px; padding: 20px 24px; }
  .microphone-illustration { width: 56px; height: 56px; margin-bottom: 12px; border-radius: 18px; }
  .microphone-illustration svg { width: 28px; height: 32px; }
  .sound-line { top: 20px; height: 16px; }
  .capture-welcome p { font-size: 14px; line-height: 1.8; margin-bottom: 14px; }
  .live-scroll { height: clamp(150px, calc(100dvh - 500px), 300px); }
}
@media (max-width: 850px) {
  :root { --sidebar-width: 176px; }
  .app-sidebar { padding: 24px 12px; }
  main, .dock-inner { width: calc(100% - 40px); }
  .review-grid { grid-template-columns: 1fr; }
  .dock-inner { gap: 18px; }
  .dock-status .hint { max-width: 340px; }
  .duration { font-size: 20px; }
  .dock-metrics { gap: 10px; }
  meter { width: 48px; }
  .record-button, .stop-button { min-width: 144px; font-size: 17px; }
}
@media (max-width: 600px) {
  :root { --sidebar-width: 128px; }
  .app-sidebar { padding: 20px 12px; }
  .steps button, .sidebar-secondary button { font-size: 13px; gap: 6px; padding: 10px 4px; }
  .step-number { width: 22px; height: 22px; flex-basis: 22px; font-size: 12px; }
  .steps i { display: none; }
  .new-recording { padding: 10px 6px; font-size: 13px; }
  .pagination { flex-wrap: wrap; }
  .brand { font-size: 16px; gap: 6px; }
  .brand-symbol { width: 28px; height: 30px; border-radius: 8px; }
  main { width: calc(100% - 24px); padding: 20px 0; }
  .page-intro { margin-bottom: 24px; }
  h1 { font-size: 22px; }
  .capture-welcome { min-height: 340px; padding: 32px 18px; }
  .capture-welcome p { font-size: 14px; }
  .sheet-heading { padding: 16px 20px; }
  .capture-options { grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
  .capture-options > details { padding: 12px 18px; }
  #live-panel { padding: 14px 18px; }
  .live-scroll { height: 44vh; min-height: 250px; }
  .segment { padding: 12px 14px; }
  .segment-head { flex-wrap: wrap; gap: 4px; font-size: 12px; }
  .segment p { font-size: 16px; }
  .dock-inner { width: calc(100% - 24px); margin: 0 auto; padding: 14px 0; display: grid; grid-template-columns: 1fr auto; gap: 12px; }
  .dock-status { grid-column: 1 / -1; }
  .dock-status strong { font-size: 13px; }
  .dock-status .hint { font-size: 12px; max-width: none; max-height: 42px; overflow-y: auto; }
  .dock-metrics { flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; }
  .record-button, .stop-button { min-height: 48px; min-width: 128px; padding: 10px 12px; font-size: 16px; }
  body:has(#recording-dock:not([hidden])) { padding-bottom: 160px; }
  .surface { padding: 22px 18px; border-radius: 12px; }
  .review-notice { flex-direction: column; align-items: start; padding: 14px 16px; }
  .review-notice button { width: 100%; }
  .record-heading { gap: 10px; }
  .section-heading { gap: 10px; flex-wrap: wrap; }
  h2 { font-size: 18px; }
  .template-filters { grid-template-columns: 1fr; }
  .conversation-review { padding: 14px 16px; }
  .pipeline-card { padding: 18px 16px 18px 42px; }
  .pipeline-card input { top: 19px; left: 14px; }
  .pipeline-card:has(input:checked) { padding: 17px 15px 17px 41px; }
  .pipeline-card:has(input:checked) input { top: 18px; left: 13px; }
  .document-toolbar, .paper-heading { align-items: start; flex-wrap: wrap; }
  .document-paper { padding: 24px 20px; }
  #pipeline-text { font-size: 16px; }
  .actions > button { flex: 1 1 auto; }
  .append-source { flex-wrap: wrap; }
  .audio-version-bar select, .append-source select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

