:root {
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --text: #1D1D1F;
  --secondary: #86868B;
  --hairline: #D2D2D7;
  --accent: #0071E3;
  --sidebar: #F5F3EE;
  --sidebar-pill: #F2EEE4;
  --sidebar-text: #3A3A3C;
  --sidebar-muted: #8E8E93;
  --modal-rail: #FAF8F4;
  --row-bg: #F3F1EC;
  --change-bg: #EDE9E0;
  --accent-hover: #0077ED;
  --stop: #FF3B30;
  --banner-bg: #FFF3CD;
  --banner-text: #6B5A1E;
  --warn-soft: #8E8E93;
  --low-conf: #FFF4E5;
  --low-conf-border: #F5D9A8;
  --low-conf-text: #9A6700;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --r: 14px;
  --r-lg: 18px;
  --float-surface: #1C1C1E;
  --float-surface-2: #2C2C2E;
  --float-text: #FFFFFF;
  --float-muted: #A1A1A6;
  --float-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  background: #E5E5EA;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; }

.app {
  width: min(1512px, 100%);
  height: min(820px, calc(100vh - 56px));
  background: var(--bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  position: relative;
}

.class-banner {
  background: var(--banner-bg);
  color: var(--banner-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 6px 16px;
  border-bottom: 1px solid rgba(107, 90, 30, 0.12);
  flex-shrink: 0;
}

.meeting-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
  min-height: 48px;
}

.meeting-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--stop);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  user-select: none;
}

.meeting-indicator[hidden] { display: none; }

.meeting-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--stop);
  box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.16);
}

.meeting-indicator.is-paused { color: var(--low-conf-text); }
.meeting-indicator.is-paused .meeting-dot {
  background: var(--low-conf-text);
  box-shadow: 0 0 0 4px rgba(154, 103, 0, 0.16);
}

.meeting-controls {
  display: flex;
  gap: 8px;
  margin-left: auto;
  align-items: center;
}

.meeting-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.meeting-name input,
.detail-meeting-name {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 400;
  padding: 7px 10px;
  width: 280px;
  max-width: 46vw;
}

.meeting-name input:focus,
.detail-meeting-name:focus {
  outline: none;
  border-color: var(--accent);
}

.meeting-controls .btn-primary,
.meeting-controls .btn-muted {
  padding: 6px 14px;
  font-size: 13px;
}

.meeting-alert {
  flex: 1 0 100%;
  color: var(--stop);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.meeting-alert[hidden] { display: none; }

.speaker-model {
  flex: 1 0 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.speaker-model h2 {
  font-size: 14px;
  font-weight: 600;
}

.speaker-model p {
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.4;
  max-width: 72ch;
}

.speaker-model-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

#speaker-token {
  flex: 1 1 220px;
  min-width: 180px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  padding: 7px 10px;
}

#speaker-token:focus {
  outline: none;
  border-color: var(--accent);
}

.speaker-model-note,
.detail-speaker-note {
  color: var(--low-conf-text);
  font-size: 12px;
  font-weight: 600;
}

.speaker-model-ready {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.meeting-live-labels {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.meeting-live-labels[hidden] { display: none; }

.speaker-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 18px;
}

.speaker-add,
.speaker-delete,
.preset-form,
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.speaker-add input,
.preset-form input,
.speaker-search {
  flex: 1 1 180px;
  min-width: 140px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  padding: 7px 10px;
}

.speaker-rename {
  display: grid;
  grid-template-columns: minmax(96px, 160px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.speaker-rename-label {
  font-size: 13px;
  font-weight: 600;
  padding-top: 8px;
}

.speaker-suggest {
  grid-column: 2;
  list-style: none;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--card);
  overflow: hidden;
}

.speaker-suggest button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
}

.speaker-suggest button:hover { background: var(--sidebar-pill); }

.speaker-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.speaker-filter button {
  border: 1px solid var(--hairline);
  background: var(--card);
  color: var(--text);
  border-radius: 980px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.speaker-filter button[aria-pressed="true"] {
  background: var(--text);
  color: var(--card);
  border-color: var(--text);
}

.preset-people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  flex: 1 1 100%;
}

.preset-people label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.meeting-consent {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.meeting-consent[hidden] { display: none; }

.meeting-consent-card {
  width: min(420px, 100%);
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
}

.meeting-consent-card h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.meeting-consent-card p {
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.45;
}

.meeting-consent-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.meeting-consent-actions .btn-primary,
.meeting-consent-actions .btn-muted {
  width: 100%;
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.session-header {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.session-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}
.session-time {
  font-size: 12px;
  color: var(--secondary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.platform-badge,
.capture-chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--secondary);
  background: var(--bg);
  border: 1px solid var(--hairline);
  padding: 3px 8px;
  border-radius: 980px;
  white-space: nowrap;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

.provider-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--secondary);
  padding: 4px 5px 4px 12px;
  border-radius: 980px;
  flex-shrink: 0;
}
.provider-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34C759;
}
.provider-seg {
  display: flex;
  background: var(--card);
  border-radius: 980px;
  padding: 2px;
  box-shadow: var(--shadow-sm);
}
.provider-seg button {
  border: 0;
  background: transparent;
  padding: 4px 10px;
  border-radius: 980px;
  font-size: 11px;
  font-weight: 500;
  color: var(--secondary);
  cursor: pointer;
}
.provider-seg button.active { background: var(--text); color: #fff; }
.provider-seg button:disabled { cursor: default; }
.provider-seg button.muted,
.provider-seg button.muted:disabled {
  color: #AEAEB2;
  background: transparent;
  opacity: 1;
  cursor: default;
}

.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.screen[hidden] { display: none !important; }

.main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 40px 24px;
  gap: 24px;
}
.main.compact {
  padding: 20px 28px 20px;
  gap: 16px;
}
.main.review {
  padding: 16px 24px 16px;
  gap: 12px;
}

.meta-row { display: flex; gap: 28px; align-items: flex-end; }
.field { flex: 1; }
.field.participants { flex: 0.85; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 8px;
}
.field input[type="text"] {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 12px 16px;
  outline: none;
  box-shadow: var(--shadow-sm);
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--hairline);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px 7px 7px;
  border-radius: 980px;
  box-shadow: var(--shadow-sm);
}
.chip.slim {
  font-size: 12px;
  gap: 6px;
  padding: 5px 10px 5px 5px;
  box-shadow: none;
}
.chip .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #E8E8ED;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--secondary);
}
.chip.slim .avatar { width: 20px; height: 20px; font-size: 10px; }
.chip.lead .avatar { background: var(--accent); color: #fff; }
.chip .role { font-size: 12px; font-weight: 400; color: var(--secondary); }

.capture-stage {
  flex: 1;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.empty-hint { text-align: center; max-width: 460px; padding: 0 24px; }
.empty-hint h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.empty-hint p { font-size: 15px; line-height: 1.5; color: var(--secondary); }
.controls { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.btn-record {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--bg);
  color: var(--secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
}
.btn-record:hover { background: #E8E8ED; opacity: 1; }
.btn-record:disabled { cursor: default; opacity: 0.45; }
.btn-record .mic { width: 22px; height: 22px; }
.btn-label { font-size: 13px; font-weight: 500; color: var(--secondary); }
.control-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.hotkey-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary);
  letter-spacing: 0.02em;
}
.hotkey-note {
  font-size: 12px;
  color: var(--secondary);
  text-align: center;
  max-width: 360px;
  line-height: 1.45;
}
.hotkey-note kbd {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--text);
}
.btn-secondary {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 8px;
}
.provider-note {
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
  text-align: center;
  max-width: 280px;
}
.btn-secondary:hover { background: rgba(0, 113, 227, 0.06); }
.btn-secondary:disabled { opacity: 0.55; cursor: default; }

.warning-strip {
  font-size: 12px;
  color: var(--warn-soft);
  text-align: center;
  flex-shrink: 0;
}
.warning-strip strong { color: var(--secondary); font-weight: 600; }
.warning-strip.left { margin-right: auto; text-align: left; }

.meta-slim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.meta-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.elapsed {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--secondary);
  flex-shrink: 0;
}
.meta-slim h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.main.review .meta-slim h1 { font-size: 18px; }
.meta-slim .hint { font-size: 12px; color: var(--secondary); }

.workspace {
  flex: 1;
  display: grid;
  gap: 16px;
  min-height: 0;
}
.live-grid { grid-template-columns: 1fr 300px; }
.meta-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.review-grid { grid-template-columns: 1fr 1.15fr; gap: 14px; }
.accepted-grid { grid-template-columns: 1fr 1.05fr; }

.pane, .transcript-pane, .capture-float {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  min-height: 0;
}
.pane, .transcript-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.capture-float {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 20px;
}
.capture-float.transcribe {
  gap: 16px;
  padding: 32px 24px;
  text-align: center;
}

.pane-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary);
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.main.review .pane-label { padding: 12px 18px; }

.pane-title { display: inline-flex; align-items: center; gap: 8px; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--stop);
  padding: 3px 8px;
  border-radius: 980px;
}
.live-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.transcript, .note-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.transcript {
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.main.review .transcript { padding: 14px 18px 20px; gap: 14px; }
.note-scroll {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.turn { display: flex; gap: 12px; }
.main.review .turn { gap: 10px; }
.turn .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #636366;
}
.main.review .turn .avatar { width: 28px; height: 28px; font-size: 11px; }
.turn.alpha .avatar { background: var(--accent); }
.bubble { flex: 1; min-width: 0; }
.bubble .who { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.main.review .bubble .who { font-size: 11px; margin-bottom: 3px; }
.bubble .who span { font-weight: 400; color: var(--secondary); margin-left: 6px; }
.bubble p { font-size: 15px; line-height: 1.45; letter-spacing: -0.01em; }
.main.review .bubble p { font-size: 13.5px; }
.bubble.interim p {
  color: var(--secondary);
  font-style: italic;
  opacity: 0.85;
  min-height: 1.45em;
}
.bubble.interim p::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
.interim-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--secondary);
  letter-spacing: 0.02em;
  margin-top: 4px;
}
.turn.settling { animation: settle 1.4s ease-out both; }
@keyframes settle {
  0% { opacity: 0.45; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes blink { 50% { opacity: 0; } }

.waveform { display: flex; align-items: center; gap: 3px; height: 56px; }
.waveform span {
  width: 3.5px;
  border-radius: 2px;
  background: var(--stop);
  animation: wave 0.9s ease-in-out infinite;
  transform-origin: center;
}
.waveform span:nth-child(1) { height: 14px; animation-delay: 0s; opacity: 0.55; }
.waveform span:nth-child(2) { height: 28px; animation-delay: 0.08s; opacity: 0.7; }
.waveform span:nth-child(3) { height: 44px; animation-delay: 0.16s; opacity: 0.9; }
.waveform span:nth-child(4) { height: 52px; animation-delay: 0.05s; opacity: 1; }
.waveform span:nth-child(5) { height: 36px; animation-delay: 0.2s; opacity: 0.85; }
.waveform span:nth-child(6) { height: 48px; animation-delay: 0.12s; opacity: 0.95; }
.waveform span:nth-child(7) { height: 22px; animation-delay: 0.24s; opacity: 0.65; }
.waveform span:nth-child(8) { height: 40px; animation-delay: 0.04s; opacity: 0.88; }
.waveform span:nth-child(9) { height: 30px; animation-delay: 0.18s; opacity: 0.75; }
.waveform span:nth-child(10) { height: 46px; animation-delay: 0.1s; opacity: 0.92; }
.waveform span:nth-child(11) { height: 18px; animation-delay: 0.28s; opacity: 0.6; }
.waveform span:nth-child(12) { height: 34px; animation-delay: 0.14s; opacity: 0.8; }
.waveform.metered span { animation: none; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

.timer {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.btn-stop {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: var(--stop);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 59, 48, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.btn-stop:disabled { cursor: default; opacity: 0.75; }
.btn-stop::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 59, 48, 0.35);
  animation: ring 1.6s ease-out infinite;
}
.btn-stop:disabled::before { animation: none; opacity: 0; }
@keyframes ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 0; }
}
.btn-stop .sq { width: 18px; height: 18px; background: #fff; border-radius: 3px; }
.stop-label { font-size: 13px; font-weight: 500; color: var(--secondary); }

.section h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.card:last-child { margin-bottom: 0; }
.card .card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.card-text, .summary-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  resize: none;
  overflow: hidden;
  color: var(--text);
  border-radius: 8px;
  letter-spacing: -0.01em;
}
.card-text {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  padding: 2px 4px;
  margin: -2px 0 -2px -4px;
}
.summary-input {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  padding: 4px 6px;
  margin-left: -6px;
  min-height: 48px;
}
.card-text:focus, .summary-input:focus {
  outline: none;
  border-color: var(--hairline);
  background: var(--card);
}
.conf {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 980px;
  background: #E8F5E9;
  color: #2E7D32;
  white-space: nowrap;
  margin-top: 2px;
}
.conf.low {
  background: var(--low-conf);
  color: var(--low-conf-text);
  border: 1px solid var(--low-conf-border);
}
.card.flagged {
  background: var(--low-conf);
  border-color: var(--low-conf-border);
}
.card.flagged .card-text:focus { background: #fff; }
.meta-fields { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.field-mini { display: flex; flex-direction: column; gap: 3px; }
.field-mini label { font-size: 10px; font-weight: 500; color: var(--secondary); }
.field-mini input, .field-mini select {
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  outline: none;
  min-width: 120px;
}
.flag-note {
  font-size: 11px;
  color: var(--low-conf-text);
  margin-top: 6px;
  font-weight: 500;
}
.empty-line { font-size: 13px; color: var(--secondary); }

.action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  padding-top: 4px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 980px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-export-disabled {
  background: #E8E8ED;
  color: #AEAEB2;
  border: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 980px;
  cursor: not-allowed;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 980px;
  cursor: pointer;
  background: var(--card);
}
.btn-ghost:hover { background: var(--bg); }
.tooltip-wrap { position: relative; display: inline-flex; }
.tooltip-wrap .tip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
}
.tooltip-wrap:hover .tip,
.tooltip-wrap:focus-within .tip {
  opacity: 1;
  visibility: visible;
}
.tooltip-wrap .tip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 18px;
  border: 5px solid transparent;
  border-top-color: var(--text);
}

.accepted-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #E8F5E9;
  color: #1B7A2E;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 980px;
}
.accepted-pill .check { width: 14px; height: 14px; }
.card .meta {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--secondary);
  margin-top: 6px;
}
.accepted-card {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}
.summary-read {
  font-size: 14px;
  line-height: 1.5;
}
.md-preview {
  flex: 1;
  overflow-y: auto;
  background: #FAFAFA;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: #333;
  min-height: 0;
}
.md-preview pre {
  padding: 18px 20px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.md-banner-line { color: #9A6700; font-weight: 600; }
.md-footer-line { color: var(--secondary); }

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 11px 28px;
  background: var(--card);
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--secondary);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button.chip {
  cursor: pointer;
  color: inherit;
  font: inherit;
}
button.chip.selected {
  border-color: var(--accent);
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #1B7A3D;
  background: #E8F8EE;
  border: 1px solid #C6EBD4;
  padding: 5px 10px;
  border-radius: 980px;
  white-space: nowrap;
}
.trust-chip .lock {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #34C759;
  display: inline-block;
}
.asr-pill {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--secondary);
  background: var(--bg);
  border: 1px solid var(--hairline);
  padding: 3px 10px;
  border-radius: 980px;
  white-space: nowrap;
}
.asr-pill em { font-style: normal; color: var(--text); font-weight: 600; }
.done-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #1B7A3D;
  background: #E8F8EE;
  padding: 3px 8px;
  border-radius: 980px;
}
.mic-level { width: 100%; max-width: 160px; }
.mic-level-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--secondary);
  margin-bottom: 6px;
}
.mic-level-track {
  height: 4px;
  background: #E8E8ED;
  border-radius: 980px;
  overflow: hidden;
}
.mic-level-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #34C759, #0071E3);
  border-radius: 980px;
}
.live-error {
  font-size: 12px;
  line-height: 1.4;
  color: var(--secondary);
  text-align: center;
  max-width: 220px;
}

.transcribe-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #E8F1FC;
  color: var(--accent);
  display: grid;
  place-items: center;
}
.transcribe-icon svg { width: 24px; height: 24px; }
.transcribe-title { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.transcribe-sub {
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.4;
  max-width: 200px;
}
.duration {
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}
.progress-quiet { width: 100%; max-width: 180px; margin-top: 8px; }
.progress-track { height: 3px; background: #E8E8ED; border-radius: 980px; overflow: hidden; }
.progress-fill {
  height: 100%;
  width: 62%;
  background: var(--accent);
  border-radius: 980px;
  animation: progress-nudge 2.4s ease-in-out infinite;
}
@keyframes progress-nudge {
  0% { width: 38%; }
  50% { width: 72%; }
  100% { width: 58%; }
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--secondary);
  margin-top: 8px;
}
.handoff-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--secondary);
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  line-height: 1.4;
  text-align: left;
}
.handoff-hint strong { color: var(--text); font-weight: 600; }

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #F2F2F7;
  color: var(--secondary);
  display: grid;
  place-items: center;
  position: relative;
}
.empty-icon svg { width: 30px; height: 30px; opacity: 0.85; }
.empty-icon .slash {
  position: absolute;
  width: 36px;
  height: 2px;
  background: var(--secondary);
  transform: rotate(-42deg);
  border-radius: 1px;
  opacity: 0.7;
}
.denied-copy { max-width: 480px; }
.denied-copy h2 { font-size: 26px; }
.denied-copy > p { margin-bottom: 20px; }
.steps {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 auto;
  max-width: 420px;
}
.steps ol {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--secondary);
}
.steps li { margin-bottom: 4px; }
.steps li:last-child { margin-bottom: 0; }
.steps strong { color: var(--text); font-weight: 600; }
.denied-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.denied-actions .btn-text { font-size: 14px; }
.btn-raised {
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.28);
}
.btn-raised:hover { background: var(--accent-hover); }
.btn-raised:disabled { opacity: 0.6; cursor: default; }
.btn-text {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 8px;
}
.btn-text:hover { background: rgba(0, 113, 227, 0.06); }
.capture-stage .denied-actions { margin-top: -8px; }
.screen[data-screen="denied"] .capture-stage {
  gap: 28px;
  padding: 28px 24px;
  overflow: auto;
}

.app.perm-open .screen[data-screen="ready"] .main {
  filter: blur(1.5px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}
.scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  backdrop-filter: blur(2px);
  padding: 24px;
}
.scrim[hidden] { display: none !important; }
.sheet {
  width: min(420px, 100%);
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 28px 28px 20px;
  text-align: center;
}
.sheet-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #E8F1FC;
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}
.sheet-icon svg { width: 28px; height: 28px; }
.sheet h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.sheet p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--secondary);
}
.path-note {
  font-size: 12px;
  color: var(--secondary);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 14px 0 8px;
  text-align: left;
  line-height: 1.45;
}
.path-note strong { color: var(--text); font-weight: 600; }
.path-note code { font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.perm-extra {
  font-size: 12px;
  line-height: 1.45;
  color: var(--secondary);
  text-align: left;
  margin: 0 0 12px;
}
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.perm-extra[hidden] + .sheet-actions { margin-top: 20px; }
.btn-allow { width: 100%; }
.sheet-fallback {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--secondary);
}
.linkish {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.linkish:hover { text-decoration: underline; }

.app.float-on .capture-stage { padding-bottom: 100px; }
.app.float-on .screen[data-screen="denied"] .main { padding-bottom: 120px; }
.app.float-on .screen[data-screen="denied"] .capture-stage { padding-bottom: 28px; }
.app.float-on .screen[data-screen="live"] .live-grid,
.app.float-on .screen[data-screen="transcribing"] .live-grid {
  grid-template-columns: 1fr;
  padding-bottom: 88px;
}
.screen[data-screen="live"] .capture-float,
.screen[data-screen="transcribing"] .capture-float { display: none; }
.screen[data-screen="live"] .capture-float.has-error {
  display: flex;
  min-height: 0;
  padding: 16px 20px;
  gap: 10px;
}
.capture-float.has-error .waveform,
.capture-float.has-error .timer,
.capture-float.has-error .mic-level,
.capture-float.has-error .btn-stop,
.capture-float.has-error .control-caption { display: none; }

.wispr-float {
  position: absolute;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.wispr-float[hidden] { display: none !important; }
.wispr-float > * { pointer-events: auto; }
.float-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.float-panel[hidden] { display: none !important; }
.float-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--float-surface);
  color: var(--float-text);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.01em;
  padding: 8px 16px;
  border-radius: 980px;
  box-shadow: var(--float-shadow);
  white-space: nowrap;
}
.float-hint .hotkey { font-weight: 600; }
.float-hint .muted { color: var(--float-muted); font-weight: 400; }
.float-hint .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stop);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.28);
  animation: pulse 1.2s ease-in-out infinite;
}
.float-mic {
  width: 72px;
  height: 52px;
  border-radius: 980px;
  border: none;
  background: var(--float-surface-2);
  color: var(--float-text);
  cursor: pointer;
  box-shadow: var(--float-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.12s ease;
}
.float-mic svg { width: 22px; height: 22px; }
.float-mic:hover { background: #3A3A3C; }
.float-mic:active { transform: scale(0.97); }
.float-mic:disabled { cursor: default; opacity: 0.72; }
.float-mic:disabled:hover { background: var(--float-surface-2); }
.float-mic-live {
  position: relative;
  width: auto;
  min-width: 120px;
  padding: 0 18px;
  background: var(--stop);
  gap: 12px;
  box-shadow: 0 8px 28px rgba(255, 59, 48, 0.38), var(--float-shadow);
}
.float-mic-live:hover { background: #E0352B; }
.float-mic-live:disabled:hover { background: var(--stop); }
.float-mic-live::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 980px;
  border: 2px solid rgba(255, 59, 48, 0.4);
  animation: ring 1.6s ease-out infinite;
  pointer-events: none;
}
.float-mic-live:disabled::before { animation: none; opacity: 0; }
.float-mic-live .mic-icon { width: 20px; height: 20px; flex-shrink: 0; }
.mini-wave {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 22px;
}
.mini-wave span {
  width: 3px;
  border-radius: 2px;
  background: #fff;
  animation: wave 0.85s ease-in-out infinite;
  transform-origin: center;
}
.mini-wave span:nth-child(1) { height: 8px; animation-delay: 0s; opacity: 0.65; }
.mini-wave span:nth-child(2) { height: 16px; animation-delay: 0.08s; opacity: 0.85; }
.mini-wave span:nth-child(3) { height: 22px; animation-delay: 0.16s; opacity: 1; }
.mini-wave span:nth-child(4) { height: 14px; animation-delay: 0.05s; opacity: 0.9; }
.mini-wave span:nth-child(5) { height: 18px; animation-delay: 0.2s; opacity: 0.8; }
.mini-wave span:nth-child(6) { height: 10px; animation-delay: 0.12s; opacity: 0.7; }
.mini-wave span:nth-child(7) { height: 20px; animation-delay: 0.18s; opacity: 0.95; }
.float-live-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}
.float-mic-quiet {
  width: auto;
  min-width: 148px;
  height: 52px;
  padding: 0 20px;
  gap: 12px;
  color: var(--float-muted);
  cursor: default;
  pointer-events: none;
}
.float-mic-quiet svg { width: 18px; height: 18px; opacity: 0.55; }
.float-mic-quiet:hover { background: var(--float-surface-2); }
.float-progress {
  width: 56px;
  height: 3px;
  background: #3A3A3C;
  border-radius: 980px;
  overflow: hidden;
}
.float-progress i {
  display: block;
  height: 100%;
  width: 58%;
  background: #8E8E93;
  border-radius: 980px;
  animation: progress-nudge 2.4s ease-in-out infinite;
}
.float-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--float-muted);
  letter-spacing: -0.01em;
}
.float-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}
.float-mic-blocked {
  width: 56px;
  height: 48px;
  color: var(--float-muted);
  position: relative;
  opacity: 0.85;
  cursor: default;
}
.float-mic-blocked svg { width: 20px; height: 20px; }
.float-mic-blocked .slash {
  position: absolute;
  width: 26px;
  height: 2px;
  background: var(--float-muted);
  transform: rotate(-42deg);
  border-radius: 1px;
}
.float-mic-blocked:hover,
.float-mic-blocked:disabled:hover { background: var(--float-surface-2); }
.float-cta {
  height: 48px;
  padding: 0 18px;
  border-radius: 980px;
  border: none;
  background: var(--float-surface);
  color: var(--float-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: var(--float-shadow);
  white-space: nowrap;
}
.float-cta:hover { background: #2C2C2E; }
.float-cta:disabled { opacity: 0.6; cursor: default; }
.app.perm-open .wispr-float { visibility: hidden; }

@media (max-width: 860px) {
  body { padding: 12px; }
  .titlebar, .status-bar { padding-left: 16px; padding-right: 16px; }
  .main, .main.compact, .main.review { padding: 16px; }
  .live-grid, .review-grid, .accepted-grid { grid-template-columns: 1fr; }
  .meta-row { flex-direction: column; align-items: stretch; }
  .field.participants { flex: 1; }
  .capture-float { min-height: 200px; }
  .titlebar { flex-wrap: wrap; }
  .session-header { flex-basis: 100%; justify-content: flex-start; }
}

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

.shell {
  flex: 1;
  display: flex;
  min-height: 0;
}
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
}
.sidebar .brand { padding: 4px 10px 18px; }
.sidebar .brand-mark { width: 24px; height: 24px; font-size: 9px; }
.sidebar .brand-name { font-size: 14px; letter-spacing: -0.015em; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 980px;
  background: transparent;
  color: var(--sidebar-muted);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-item.selected {
  background: var(--sidebar-pill);
  color: var(--text);
  font-weight: 600;
}
.nav-item.foot { font-size: 13px; color: var(--sidebar-muted); }
.nav-item.foot.is-open { color: var(--text); }
.sidebar-spacer { flex: 1; }
.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
}
.hub {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.route {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.route[hidden] { display: none !important; }
.route-canvas {
  flex: 1;
  min-height: 0;
  padding: 28px 36px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.page-head h1,
.route-kicker h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.route-kicker { flex-shrink: 0; min-width: 0; }
.route-kicker h1 { font-size: 18px; }
.page-sub {
  font-size: 14px;
  color: var(--secondary);
  line-height: 1.45;
  max-width: 520px;
  margin-top: 6px;
}
.route-kicker .page-sub {
  font-size: 12px;
  max-width: 240px;
  margin-top: 2px;
}
.btn-muted {
  background: var(--sidebar-pill);
  border: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 980px;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-muted:hover { background: #E7E1D4; }
.btn-muted:disabled { opacity: 0.55; cursor: default; }
.titlebar .btn-muted { align-self: center; }
.surface {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.capture-home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 280px;
  padding: 40px 24px;
  text-align: center;
}
.capture-home h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.capture-home p {
  font-size: 14px;
  color: var(--secondary);
  max-width: 420px;
  line-height: 1.5;
}
.kbd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--secondary);
  background: var(--bg);
  border: 1px solid var(--hairline);
  padding: 6px 12px;
  border-radius: 8px;
}
.kbd kbd {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--text);
}
.speaker-card {
  width: 100%;
  max-width: 640px;
  text-align: left;
  flex-shrink: 0;
}
.speaker-card .sec {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 10px;
}
.speaker-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  background: var(--card);
}
.speaker-row + .speaker-row { border-top: none; }
.speaker-card .speaker-row:first-of-type { border-radius: 12px 12px 0 0; }
.speaker-card .speaker-row:last-of-type { border-radius: 0 0 12px 12px; }
.speaker-channel {
  font-size: 13px;
  font-weight: 600;
}
.speaker-row input {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  padding: 7px 10px;
}
.speaker-row input:focus {
  outline: none;
  border-color: var(--accent);
}
.speaker-hint {
  grid-column: 2;
  font-size: 11px;
  line-height: 1.35;
  color: var(--secondary);
}
.recent-empty { width: 100%; max-width: 640px; flex-shrink: 0; }
.recent-empty .sec {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 10px;
}
.recent-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--card);
}
.recent-row .ts { font-size: 12px; color: var(--secondary); width: 64px; flex-shrink: 0; }
.recent-row .txt { font-size: 13.5px; color: var(--text); flex: 1; }
.placeholder-card {
  padding: 40px 36px;
  text-align: center;
  max-width: 560px;
  margin: 24px auto 0;
}
.placeholder-card h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.placeholder-card p {
  font-size: 14px;
  color: var(--secondary);
  line-height: 1.55;
}
.badge-soon {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
  background: var(--bg);
  border: 1px solid var(--hairline);
  padding: 4px 10px;
  border-radius: 980px;
  margin-bottom: 14px;
}
.sample-terms {
  margin-top: 22px;
  text-align: left;
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px dashed var(--hairline);
}
.sample-terms .label {
  font-size: 11px;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.sample-terms .term {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 13px;
}
.sample-terms .term:last-child { border-bottom: none; }
.sample-terms .term strong { width: 88px; color: var(--secondary); font-weight: 600; flex-shrink: 0; }
.sample-terms .term span { color: #A1A1A6; }
.dim {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 31, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 24px;
}
.dim[hidden] { display: none !important; }
.settings-modal {
  width: min(860px, 100%);
  height: min(620px, 100%);
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  display: flex;
  overflow: hidden;
}
.settings-rail {
  width: 220px;
  flex-shrink: 0;
  background: var(--modal-rail);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  padding: 22px 12px 16px;
}
.rail-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--secondary);
  padding: 8px 12px 6px;
  text-transform: uppercase;
}
.rail-account { margin-top: 14px; }
.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sidebar-text);
  text-align: left;
  cursor: pointer;
}
.rail-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.rail-item.inactive { color: var(--sidebar-muted); }
.rail-item.selected {
  background: var(--sidebar-pill);
  color: var(--text);
  font-weight: 600;
}
.rail-foot {
  margin-top: auto;
  padding: 12px 12px 4px;
  font-size: 11px;
  color: var(--secondary);
  line-height: 1.4;
}
.settings-body {
  flex: 1;
  min-width: 0;
  padding: 28px 32px;
  overflow: auto;
}
.settings-body h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.settings-body [hidden] { display: none !important; }
.settings-group {
  background: var(--row-bg);
  border-radius: 14px;
  padding: 4px 0;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
}
.setting-row + .setting-row { border-top: 1px solid rgba(0, 0, 0, 0.05); }
.setting-row .left { flex: 1; min-width: 0; }
.setting-row .title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.setting-row .desc { font-size: 12.5px; color: var(--secondary); margin-top: 4px; line-height: 1.4; }
.setting-row .desc strong { color: var(--text); font-weight: 600; }
.btn-change {
  background: var(--change-bg);
  border: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 9px;
  flex-shrink: 0;
  cursor: pointer;
}
.btn-change:hover { background: #E4DDD0; }
.btn-change:disabled { opacity: 0.55; cursor: default; }
.readonly-val {
  font-size: 12px;
  color: var(--secondary);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 280px;
  text-align: right;
}
.seg-mini {
  display: flex;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 980px;
  padding: 2px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}
.seg-mini button,
.seg-mini span {
  border: 0;
  background: transparent;
  padding: 5px 10px;
  border-radius: 980px;
  font-size: 11px;
  font-weight: 500;
  color: var(--secondary);
  font-family: inherit;
}
.seg-mini button { cursor: pointer; }
.seg-mini .active { background: var(--text); color: #fff; }
.seg-mini .muted { opacity: 0.55; }
.settings-fixed {
  margin-top: 14px;
  font-size: 12px;
  color: var(--secondary);
}
.app.settings-open .wispr-float { visibility: hidden; }

.notes-library,
.notes-session {
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.notes-library {
  display: grid;
  grid-template-columns: minmax(280px, 40%) minmax(0, 1fr);
}
.notes-library[hidden],
.notes-session[hidden] { display: none !important; }
.notes-session {
  display: flex;
  flex-direction: column;
}
.notes-list-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--hairline);
  padding: 22px 16px 12px;
}
.notes-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 8px 12px;
  flex-shrink: 0;
}
.notes-list-head h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.notes-list-head .page-sub {
  font-size: 12px;
  max-width: 220px;
  margin-top: 4px;
}
.notes-scroll {
  overflow: auto;
  min-height: 0;
  flex: 1;
  padding-bottom: 12px;
}
.note-day {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  padding: 14px 12px 6px;
}
.note-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
}
.note-row:hover { background: rgba(0, 0, 0, 0.03); }
.note-row.selected,
.note-row.selected:hover { background: #EFECE6; }
.note-ico {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  border: 1.5px solid var(--secondary);
  border-radius: 3px;
  position: relative;
}
.note-ico::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 5px;
  height: 1.5px;
  background: var(--secondary);
  box-shadow: 0 3px 0 var(--secondary);
}
.note-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.note-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.note-time { font-size: 12px; color: var(--secondary); }
.notes-error, .detail-empty p, .detail-muted {
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.45;
}
.notes-error { padding: 8px 12px; }
.notes-detail-col {
  min-height: 0;
  overflow: auto;
  background: var(--card);
  padding: 28px 36px 40px;
}
.detail-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 26px 0 10px;
}
.detail-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.detail-when {
  margin-top: 8px;
  font-size: 13px;
  color: var(--secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.detail-summary {
  font-size: 15px;
  line-height: 1.5;
  max-width: 68ch;
}
.detail-block { margin-top: 14px; }
.detail-block h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.detail-block li {
  margin-left: 18px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 4px;
}
.detail-empty h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.tr-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.tr-who {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--secondary);
  margin-bottom: 4px;
}
.tr-who strong { color: var(--text); font-weight: 600; }
.tr-row p { font-size: 14px; line-height: 1.5; max-width: 68ch; }
.notes-back { align-self: center; }

.stats-canvas { gap: 14px; }
.demo-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--banner-text);
  background: var(--banner-bg);
  border-radius: 980px;
  padding: 5px 10px;
  flex-shrink: 0;
}
.stats-top, .stats-mid, .stats-bottom {
  display: grid;
  gap: 14px;
}
.stats-top { grid-template-columns: 0.9fr 1fr 1.05fr; }
.stats-mid { grid-template-columns: 1.05fr 1.15fr; }
.stats-bottom { grid-template-columns: repeat(4, 1fr); }
.stat-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.stat-num {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-top: 6px;
}
.stat-delta, .stat-hint {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--secondary);
  line-height: 1.4;
}
.stat-delta.up { color: #0B6B3A; }
.stat-delta.down { color: #9A3412; }
.wpm-card .stat-kicker { margin-top: 0; }
.gauge-wrap {
  position: relative;
  width: min(220px, 100%);
  margin: 10px auto 0;
}
.gauge { width: 100%; height: auto; display: block; margin: 0; }
.gauge-track, .gauge-value {
  fill: none;
  stroke-width: 18;
  stroke-linecap: round;
}
.gauge-track { stroke: #E6E4DF; }
.gauge-value {
  stroke: #0071E3;
  stroke-dasharray: 0 100;
}
.gauge-num {
  position: absolute;
  left: 0;
  right: 0;
  top: 54%;
  text-align: center;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.mix-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.mix-name {
  font-size: 12px;
  color: var(--secondary);
  white-space: nowrap;
}
.mix-track {
  position: relative;
  height: 28px;
}
.mix-fill {
  height: 28px;
  border-radius: 8px;
  min-width: 0;
  max-width: 100%;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: 0 10px;
  box-sizing: border-box;
  overflow: hidden;
}
.mix-pct { overflow: hidden; text-overflow: ellipsis; }
.mix-tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  background: #1D1D1F;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 4;
  transition: opacity 0.12s ease 0s, visibility 0s linear 0.12s;
}
.mix-track:hover .mix-tip,
.mix-track:focus-within .mix-tip {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.12s ease 0.4s, visibility 0s linear 0.4s;
}
.mix-fill.speak { background: #0071E3; }
.mix-fill.notes { background: #3D8FE0; }
.mix-fill.fixture { background: #9EC5F0; color: #1D1D1F; }
.mix-fill.is-zero {
  background: #E6E4DF;
  color: var(--secondary);
  width: 36px !important;
  padding: 0 8px;
}
.streak-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.streak-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.streak-long { font-size: 12px; color: var(--secondary); }
.heat-wrap { margin-top: 14px; overflow-x: auto; }
.heat {
  display: grid;
  grid-template-rows: repeat(7, 11px);
  grid-auto-flow: column;
  gap: 3px;
  width: max-content;
}
.heat i, .heat-legend i {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: #E8E6E1;
  display: block;
}
.heat i[data-c="1"], .heat-legend i[data-c="1"] { background: #D6E8FA; }
.heat i[data-c="2"], .heat-legend i[data-c="2"] { background: #7EB6F0; }
.heat i[data-c="3"], .heat-legend i[data-c="3"] { background: #0071E3; }
.heat i.is-future { background: transparent; border: 1px solid #E8E6E1; }
.heat-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--secondary);
}
.heat-months {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 14px;
  gap: 0;
  margin-bottom: 4px;
  width: max-content;
  height: 14px;
}
.heat-months span {
  font-size: 10px;
  color: var(--secondary);
  white-space: nowrap;
  overflow: visible;
}

@media (max-width: 1100px) {
  .sidebar { width: 200px; }
  .route-canvas { padding: 20px 16px; }
  .settings-rail { width: 180px; }
  .settings-body { padding: 20px; }
  .settings-body h1 { font-size: 26px; }
  .stats-top, .stats-bottom { grid-template-columns: 1fr 1fr; }
  .stats-mid { grid-template-columns: 1fr; }
  .notes-detail-col { padding: 22px 20px 28px; }
}

@media (max-width: 860px) {
  .notes-library { grid-template-columns: 1fr; grid-template-rows: minmax(180px, 40%) minmax(0, 1fr); }
  .notes-list-col { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .stats-top, .stats-mid, .stats-bottom { grid-template-columns: 1fr; }
  .words-tools { align-items: stretch; }
  .words-search, #words-search { width: 100%; }
  .word-row { grid-template-columns: minmax(0, 1fr) auto; }
  .word-copy, .word-tags { grid-column: 1; }
  .word-actions { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
}

.words-canvas { gap: 14px; overflow: hidden; }
.words-add {
  align-self: center;
  flex-shrink: 0;
  font-size: 13px;
  padding: 8px 16px;
  box-shadow: none;
}
.words-tools {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.words-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.words-tabs,
.words-libraries { display: flex; gap: 4px; flex-wrap: wrap; }
.words-tabs button,
.words-libraries button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.words-tabs button[aria-selected="true"],
.words-libraries button[aria-pressed="true"] {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.words-tabs .tab-count,
.words-libraries .tab-count { font-variant-numeric: tabular-nums; color: var(--secondary); font-weight: 500; }
#words-search {
  width: 220px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 980px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
#words-search:focus { border-color: var(--accent); }
.words-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.words-columns, .word-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}
.words-columns {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
}
.word-row {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.word-row:last-child { border-bottom: 0; }
.word-row:hover { background: rgba(0, 0, 0, 0.025); }
.word-term {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.word-expansion { font-size: 14px; line-height: 1.4; }
.word-notes {
  margin-top: 2px;
  font-size: 12px;
  color: var(--secondary);
  line-height: 1.35;
}
.word-tags { display: flex; gap: 4px; justify-content: flex-end; }
.word-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--secondary);
  background: var(--bg);
  border: 0;
  border-radius: 980px;
  padding: 3px 8px;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.3;
}
button.word-tag { cursor: pointer; }
button.word-tag:hover { color: var(--text); }
button.word-tag[aria-pressed="true"] {
  color: var(--accent);
  background: rgba(0, 113, 227, 0.1);
}
.word-actions { display: flex; gap: 4px; }
.word-icon {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.word-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.word-icon:hover { background: var(--bg); color: var(--text); }
.word-icon.delete:hover { color: var(--stop); }
@media (hover: hover) {
  .word-actions { opacity: 0; }
  .word-row:hover .word-actions,
  .word-row:focus-within .word-actions { opacity: 1; }
}
.words-empty {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 36px 20px;
}
.words-empty h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.words-empty p {
  font-size: 14px;
  color: var(--secondary);
  max-width: 360px;
  line-height: 1.45;
  margin-bottom: 8px;
}
.setting-row.setting-top { align-items: flex-start; }
.dictation-input, .dictation-vocab, .dictation-field textarea {
  width: 220px;
  font: inherit;
  font-size: 13px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
}
.dictation-vocab { min-height: 108px; resize: vertical; }
.dictation-layout { display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: 18px; align-items: start; }
.dictation-list { display: flex; flex-direction: column; gap: 6px; }
.dictation-row {
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--card);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.dictation-row.selected { border-color: var(--text); }
.dictation-row .when { display: block; font-size: 11px; color: var(--secondary); margin-bottom: 4px; }
.dictation-row .snippet { font-size: 13px; line-height: 1.35; }
.dictation-field { display: flex; flex-direction: column; gap: 6px; }
.dictation-field span { font-size: 12px; font-weight: 600; color: var(--secondary); }
.dictation-field textarea { width: 100%; min-height: 160px; }
.dictation-actions { margin-top: 10px; }
.words-error, .words-form-error {
  font-size: 13px;
  color: var(--stop);
  flex-shrink: 0;
}
.words-modal {
  width: min(440px, 100%);
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.words-modal h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.words-field { display: flex; flex-direction: column; gap: 6px; }
.words-field span { font-size: 12px; font-weight: 600; color: var(--secondary); }
.words-field .opt { font-weight: 500; }
.words-field input, .words-field textarea {
  width: 100%;
  border: 1px solid var(--hairline);
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  resize: vertical;
}
.words-field input:focus, .words-field textarea:focus { border-color: var(--accent); background: var(--card); }
.words-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
