:root {
  --haiti: #16163a;
  --haiti-2: #242450;
  --purple: #6c4ae6;
  --purple-soft: #eee9ff;
  --orange: #ff4f0f;
  --sunglow: #ffc742;
  --pink: #ff87b7;
  --cream: #fffcf5;
  --paper: #f7f4ed;
  --panel: #fffefa;
  --ink: #16163a;
  --ink-soft: #4e4d6a;
  --muted: #7d7b91;
  --line: #e5e0d7;
  --red: #bd382f;
  --red-soft: #fff0ed;
  --shadow: 0 18px 55px rgba(22, 22, 58, .09);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { min-width: 320px; color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--cream); font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { border: 0; font: inherit; }
button { color: inherit; }
button, select, input[type="checkbox"] { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }
.page { width: min(calc(100% - 56px), 1400px); margin: 0 auto; }
.panel { border: 1px solid rgba(205, 199, 187, .72); border-radius: var(--radius); background: rgba(255, 254, 250, .96); box-shadow: var(--shadow); }
.eyebrow, .step-label { margin: 0 0 10px; color: var(--purple); font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.muted-small { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.topbar { position: sticky; top: 0; z-index: 40; height: calc(70px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(28px, env(safe-area-inset-right)) 0 max(28px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(209, 204, 195, .65); background: rgba(255, 252, 245, .9); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 118px; height: auto; display: block; }
.brand span { padding-left: 12px; border-left: 1px solid #d6d0c5; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.workspace-label { color: var(--muted); font-size: 11px; }

.button { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 600; transition: transform .18s, box-shadow .18s, background .18s, border-color .18s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, .tab:focus-visible, .editor-turn:focus-visible { outline: 3px solid rgba(108, 74, 230, .28); outline-offset: 2px; }
.button:disabled { cursor: wait; opacity: .55; }
.button.primary { color: #fff; background: var(--purple); box-shadow: 0 9px 22px rgba(108, 74, 230, .24); }
.button.primary:hover:not(:disabled) { background: #5b3ad0; box-shadow: 0 12px 28px rgba(108, 74, 230, .3); }
.button.success { border-color: #cfc5ef; color: var(--purple); background: var(--purple-soft); }
.button.secondary { border-color: #d8d1c8; color: var(--ink); background: #fff; }
.button.secondary:hover:not(:disabled), .button.quiet:hover:not(:disabled) { border-color: #bbb0d8; background: var(--purple-soft); }
.button.quiet { border-color: transparent; color: var(--ink-soft); }
.button.large { min-height: 54px; padding: 0 25px; border-radius: 15px; }
.button.wide { width: 100%; }
.button.danger { color: #fff; background: var(--orange); box-shadow: 0 9px 22px rgba(255, 79, 15, .2); }
.button.destructive { border-color: #f0c1b8; color: var(--red); background: var(--red-soft); }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: 18px; }
.icon-button:hover { background: var(--purple-soft); }
.text-button { min-height: 38px; padding: 0 5px; color: var(--purple); background: none; cursor: pointer; font-size: 10px; font-weight: 700; }
.stop-square { width: 10px; height: 10px; border-radius: 2px; background: currentColor; }

.setup-page { padding-bottom: 84px; }
.hero-block { min-height: 330px; padding: 76px 0 50px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .55fr); align-items: end; gap: 70px; }
.hero-block h1 { margin: 0; color: var(--haiti); font-size: clamp(43px, 5.5vw, 78px); line-height: 1.03; letter-spacing: -.055em; }
.hero-block h1 span { color: var(--purple); }
.hero-copy { max-width: 520px; margin: 0 0 7px; color: var(--ink-soft); font-size: 16px; line-height: 1.8; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(330px, .72fr); gap: 22px; align-items: stretch; }
.encounter-panel { padding: 33px; }
.panel-heading { margin-bottom: 27px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-heading h2 { margin: 0; font-size: 25px; line-height: 1.2; letter-spacing: -.035em; }
.secure-chip { min-height: 32px; padding: 0 11px; display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; color: var(--purple); background: var(--purple-soft); font-size: 10px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 4px rgba(108, 74, 230, .13); }
.form-grid { display: grid; gap: 18px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-two { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; }
.field > span, .field-label { color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.field em { margin-left: 4px; color: #9a96aa; font-style: normal; font-weight: 400; }
.text-input { width: 100%; min-height: 49px; padding: 0 14px; outline: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; transition: border-color .18s, box-shadow .18s; }
.text-input::placeholder { color: #aaa5b4; }
.text-input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(108, 74, 230, .09); }
.text-input.textarea { min-height: 150px; padding: 14px; resize: vertical; line-height: 1.65; }
.mic-card { margin: 24px 0 13px; padding: 16px; display: grid; grid-template-columns: 43px minmax(170px, 1fr) minmax(200px, 270px) auto; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 16px; background: #faf7f1; }
.mic-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--orange), var(--pink)); }
.mic-icon span { width: 11px; height: 18px; border: 2px solid #fff; border-radius: 8px; position: relative; }
.mic-icon span::after { content: ''; position: absolute; width: 15px; height: 9px; left: -4px; bottom: -7px; border: 2px solid #fff; border-top: 0; border-radius: 0 0 10px 10px; }
.mic-copy { min-width: 0; display: grid; }
.mic-copy strong { font-size: 12px; }
.mic-copy span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.device-select { width: 100%; min-height: 42px; padding: 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: #fff; font-size: 11px; text-overflow: ellipsis; }
.dual-mic-toggle { margin: 0 0 13px; padding: 13px 15px; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 11px; border: 1px solid #ded7ef; border-radius: 14px; background: #fbf9ff; cursor: pointer; }
.dual-mic-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--purple); }
.dual-mic-toggle > span { display: grid; }
.dual-mic-toggle strong { font-size: 10px; }
.dual-mic-toggle small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.dual-mic-toggle em { padding: 5px 8px; border-radius: 7px; color: #fff; background: var(--purple); font-size: 8px; font-style: normal; font-weight: 700; text-transform: uppercase; }
.second-mic-card { margin-top: 0; grid-template-columns: 43px minmax(170px, 1fr) minmax(200px, 270px); }
.channel-badge { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--haiti); font-size: 9px; font-weight: 700; }
.capture-note { margin-bottom: 22px; padding: 14px 16px; display: grid; grid-template-columns: 37px 1fr; gap: 12px; border: 1px solid #e7dff8; border-radius: 14px; color: var(--ink-soft); background: #fbf9ff; }
.capture-note .capture-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--haiti); font-size: 9px; font-weight: 700; }
.capture-note strong { display: block; color: var(--ink); font-size: 11px; }
.capture-note p { margin: 3px 0 0; font-size: 10px; line-height: 1.55; }
.consent-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.check-label { max-width: 480px; display: flex; align-items: flex-start; gap: 10px; color: var(--ink-soft); cursor: pointer; font-size: 11px; line-height: 1.5; }
.check-label input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--purple); }
.form-error { min-height: 20px; margin: 12px 0 0; color: var(--red); font-size: 11px; }

.accuracy-panel { position: relative; overflow: hidden; padding: 34px; color: #f7f3ff; border: 0; border-radius: var(--radius); background: var(--haiti); box-shadow: 0 24px 65px rgba(22, 22, 58, .2); }
.accuracy-panel::before { content: ''; position: absolute; width: 420px; height: 420px; right: -235px; top: -230px; border: 1px solid rgba(255, 135, 183, .2); border-radius: 50%; box-shadow: 0 0 0 55px rgba(108, 74, 230, .05), 0 0 0 110px rgba(255, 79, 15, .025); }
.accuracy-panel .eyebrow { position: relative; color: var(--pink); }
.accuracy-panel h3 { position: relative; margin: 0 0 30px; font-size: 28px; font-weight: 600; line-height: 1.25; letter-spacing: -.04em; }
.brand-orbit { position: absolute; right: 27px; top: 25px; width: 72px; height: 72px; padding: 20px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; background: rgba(255, 255, 255, .05); }
.brand-orbit img { width: 100%; height: 100%; filter: brightness(0) invert(1); opacity: .9; }
.feature-list { position: relative; margin: 0; padding: 0; list-style: none; }
.feature-list li { padding: 16px 0; display: grid; grid-template-columns: 28px 1fr; gap: 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.feature-list li > span { color: var(--sunglow); font-size: 10px; }
.feature-list div { display: grid; gap: 4px; }
.feature-list strong { color: #fff; font-size: 12px; font-weight: 600; }
.feature-list small { color: #bcb8d0; font-size: 10px; line-height: 1.55; }

.auth-screen { min-height: 100svh; padding: max(30px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); display: grid; place-items: center; grid-template-rows: auto 1fr auto; background: radial-gradient(circle at 52% 42%, #fff 0, var(--cream) 47%, #eee8df 100%); }
.auth-brand { justify-self: start; width: min(100%, 1120px); margin: auto; }
.auth-brand img { width: 125px; }
.auth-card { position: relative; width: min(520px, 100%); padding: 46px; overflow: hidden; border: 1px solid rgba(205, 199, 187, .85); border-radius: 28px; background: rgba(255, 254, 250, .95); box-shadow: 0 30px 100px rgba(22, 22, 58, .12); }
.auth-card h1 { position: relative; margin: 0; font-size: 37px; letter-spacing: -.045em; }
.auth-copy { position: relative; max-width: 370px; margin: 13px 0 29px; color: var(--ink-soft); line-height: 1.7; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 8px; }
.password-change-form { display: grid; gap: 16px; }
.password-change-form .button { margin-top: 3px; }
.auth-cancel { margin-top: 7px; }
.auth-trust { margin-top: 25px; padding-top: 19px; display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.auth-footer { color: var(--muted); font-size: 10px; text-align: center; }

.live-page { min-height: calc(100dvh - 70px); padding-top: 42px; padding-bottom: 70px; }
.live-header { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.live-kicker { margin-bottom: 9px; display: flex; align-items: center; gap: 9px; color: var(--orange); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.recording-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(255, 79, 15, .13); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(255, 79, 15, 0); } }
.live-kicker .mono { margin-left: 4px; color: var(--ink-soft); }
.live-header h1 { margin: 0; font-size: 34px; letter-spacing: -.045em; }
.live-header p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.transcript-panel { min-height: calc(100dvh - 225px); padding: 27px 29px 15px; }
.transcript-heading { margin-bottom: 15px; align-items: center; }
.transcript-heading h2 { font-size: 18px; }
.audio-meter { height: 31px; display: flex; align-items: center; gap: 3px; }
.audio-meter span { width: 3px; height: 5px; border-radius: 3px; background: var(--purple); transition: height .1s ease; }
.transcript { position: relative; height: calc(100dvh - 345px); min-height: 390px; overflow-y: auto; padding: 11px 4px 28px 0; scroll-behavior: smooth; }
.transcript-empty { height: 100%; display: grid; place-content: center; justify-items: center; color: var(--ink-soft); text-align: center; }
.transcript-empty strong { margin: 17px 0 4px; font-size: 13px; }
.transcript-empty span { color: var(--muted); font-size: 10px; }
.listening-ring { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #d8cef7; border-radius: 50%; animation: breathe 2.5s infinite; }
.listening-ring::before, .listening-ring::after { content: ''; position: absolute; width: 40px; height: 40px; border: 1px solid #e9e3fb; border-radius: 50%; }
.listening-ring i { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 7px rgba(108, 74, 230, .09); }
@keyframes breathe { 50% { opacity: .55; transform: scale(.94); } }
.turn-list { display: grid; gap: 4px; }
.turn { padding: 16px 12px; display: grid; grid-template-columns: 37px 1fr; gap: 12px; border-radius: 13px; transition: background .2s; }
.turn:hover { background: #faf7f1; }
.speaker-avatar { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: #4b2eb4; background: #e9e2ff; font-size: 11px; font-weight: 700; }
.speaker-avatar.color-1 { color: #7e2708; background: #ffe0d4; }
.speaker-avatar.color-2 { color: #644700; background: #fff0bd; }
.speaker-avatar.color-3 { color: #92325c; background: #ffe2ed; }
.speaker-avatar.color-4 { color: #175d72; background: #dff4fa; }
.turn-meta { min-height: 21px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.turn-meta button { min-height: 30px; padding: 0; color: var(--ink); background: none; cursor: pointer; font-size: 11px; font-weight: 700; }
.turn-meta button:hover { color: var(--purple); }
.pending-speaker { color: var(--muted); font-size: 10px; font-weight: 600; }
.turn-meta time, .language-tag { color: #9691a3; font-size: 9px; font-variant-numeric: tabular-nums; }
.language-tag { padding: 3px 6px; border-radius: 6px; background: #f1eee9; }
.turn p { margin: 3px 0 0; color: #292846; font-size: 14px; line-height: 1.75; }
.partial-turn { margin-top: 5px; opacity: .63; }
.shimmer { position: relative; overflow: hidden; background: #eae6df; }
.shimmer::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .8), transparent); transform: translateX(-100%); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.live-sidebar { display: grid; gap: 14px; }
.compact-panel { padding: 19px; border-radius: 17px; }
.sidebar-title { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; }
.speaker-list { display: grid; gap: 8px; }
.speaker-item { min-height: 53px; padding: 8px; display: grid; grid-template-columns: 33px 1fr auto; align-items: center; gap: 9px; border-radius: 11px; background: #f8f5ef; cursor: pointer; text-align: left; }
.speaker-item:hover { background: var(--purple-soft); }
.speaker-item .speaker-avatar { width: 32px; height: 32px; }
.speaker-item div { min-width: 0; display: grid; }
.speaker-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.speaker-item small { color: var(--muted); font-size: 8px; }
.quality-pill { padding: 4px 7px; border-radius: 99px; color: #8a5d00; background: #fff1c8; font-size: 8px; }
.quality-pill.good { color: #4b2eb4; background: var(--purple-soft); }
.quality-row { padding: 10px 0; display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid #eee9e2; color: var(--muted); font-size: 9px; }
.quality-row strong { color: var(--ink-soft); font-weight: 600; text-align: right; }
.privacy-note { padding: 16px 17px; display: grid; gap: 5px; border: 1px dashed #cbbff2; border-radius: 15px; color: var(--purple); background: rgba(238, 233, 255, .42); }
.privacy-note strong { font-size: 10px; }
.privacy-note span { color: var(--ink-soft); font-size: 9px; line-height: 1.55; }
.mobile-finish { display: none; }

.processing-overlay { position: fixed; inset: 0; z-index: 100; padding: max(22px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); display: grid; place-items: center; background: rgba(22, 22, 58, .62); backdrop-filter: blur(14px); }
.processing-card { width: min(540px, 100%); padding: 47px; border-radius: 28px; background: var(--cream); box-shadow: 0 35px 110px rgba(10, 10, 38, .38); text-align: center; }
.processing-mark { width: 76px; height: 76px; margin: 0 auto 24px; padding: 21px; border: 1px solid #ded5fb; border-radius: 50%; background: var(--purple-soft); animation: breathe 2s infinite; }
.processing-mark img { width: 100%; height: 100%; }
.processing-card h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.processing-card > p:not(.eyebrow) { margin: 12px 0 23px; color: var(--ink-soft); }
.processing-track { height: 5px; overflow: hidden; border-radius: 8px; background: #e8e2d9; }
.processing-track span { width: 8%; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--pink), var(--purple)); transition: width .45s ease; }
.processing-card small { display: block; margin-top: 18px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.processing-actions { margin-top: 20px; padding-top: 18px; display: grid; gap: 11px; border-top: 1px solid var(--line); }
.processing-actions span { color: var(--muted); font-size: 9px; }

.result-page { padding: 42px 0 80px; }
.result-header { display: grid; grid-template-columns: 190px 1fr auto; align-items: center; gap: 28px; }
.result-heading { text-align: center; }
.result-heading .eyebrow { margin-bottom: 7px; }
.result-heading h1 { margin: 0; font-size: 34px; letter-spacing: -.045em; }
.result-heading p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.result-actions { display: flex; gap: 8px; }
.audio-card { margin-top: 27px; padding: 15px 17px; display: grid; grid-template-columns: minmax(180px, .48fr) minmax(430px, 1.35fr) auto; align-items: center; gap: 18px; }
.audio-copy { display: flex; align-items: center; gap: 11px; }
.audio-copy div { min-width: 0; display: grid; }
.audio-copy strong { font-size: 11px; }
.audio-copy small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.audio-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(255, 79, 15, .1); }
.aponic-player { min-width: 0; min-height: 58px; padding: 8px 11px 8px 8px; display: grid; grid-template-columns: 42px minmax(130px, 1fr) 34px 72px 60px; align-items: center; gap: 9px; border-radius: 16px; color: #fff; background: var(--haiti); box-shadow: 0 12px 30px rgba(22, 22, 58, .17); }
.player-play { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--orange), var(--pink)); cursor: pointer; box-shadow: 0 7px 18px rgba(255, 79, 15, .23); }
.player-play svg { width: 20px; height: 20px; fill: currentColor; }
.player-main { min-width: 0; display: grid; gap: 5px; }
.player-time { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; color: rgba(255, 255, 255, .66); font-size: 8px; font-variant-numeric: tabular-nums; }
.player-time em { overflow: hidden; color: var(--pink); font-style: normal; font-weight: 600; letter-spacing: .04em; text-align: center; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.player-range, .volume-range { width: 100%; height: 4px; margin: 0; border-radius: 10px; outline: none; appearance: none; background: linear-gradient(90deg, var(--pink) var(--range-progress, 0%), rgba(255, 255, 255, .18) var(--range-progress, 0%)); cursor: pointer; }
.player-range::-webkit-slider-thumb, .volume-range::-webkit-slider-thumb { width: 13px; height: 13px; border: 2px solid var(--haiti); border-radius: 50%; appearance: none; background: #fff; box-shadow: 0 0 0 2px var(--pink); }
.player-range::-moz-range-thumb, .volume-range::-moz-range-thumb { width: 11px; height: 11px; border: 2px solid var(--pink); border-radius: 50%; background: #fff; }
.player-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: rgba(255, 255, 255, .8); background: transparent; cursor: pointer; }
.player-icon:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.player-icon svg { width: 18px; height: 18px; fill: currentColor; }
.volume-range { --range-progress: 100%; height: 3px; }
.speed-select { min-height: 34px; padding: 0 8px; outline: 0; border-radius: 9px; color: #fff; background: rgba(255, 255, 255, .1); cursor: pointer; font-size: 9px; font-weight: 600; }
.audio-actions { display: flex; gap: 6px; }
.audio-actions .button { padding: 0 12px; white-space: nowrap; }
.review-banner { margin: 16px 0 20px; padding: 13px 16px; display: flex; align-items: center; gap: 13px; border: 1px solid #ead69d; border-radius: 13px; color: #6f5216; background: #fff8e7; }
.review-banner span { flex: 0 0 auto; padding: 4px 7px; border-radius: 6px; color: var(--haiti); background: var(--sunglow); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.review-banner p { margin: 0; flex: 1; font-size: 10px; }
.review-banner.stale { margin-bottom: 0; border-color: #d8cdf9; color: var(--ink-soft); background: #f6f2ff; }
.review-banner.stale span { color: #fff; background: var(--purple); }
.review-banner.stale .button { min-height: 38px; }
.review-banner.enriching { border-color: #cddcf8; color: var(--ink-soft); background: #f3f7ff; }
.review-banner.enriching span { color: #fff; background: var(--haiti); }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { min-height: 46px; padding: 0 16px; flex: 0 0 auto; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 600; }
.tab.active { border-bottom-color: var(--purple); color: var(--purple); }
.tab-panel { padding-top: 19px; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.note-document { padding: 42px 46px; }
.note-section { padding: 25px 0; border-bottom: 1px solid #ebe6df; }
.note-section:first-child { padding-top: 0; }
.note-section:last-child { padding-bottom: 0; border: 0; }
.note-section h2 { margin: 0 0 14px; color: var(--purple); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.note-subsection { margin-top: 17px; }
.note-subsection:first-of-type { margin-top: 0; }
.note-subsection h3 { margin: 0 0 5px; color: var(--ink-soft); font-size: 10px; }
.note-subsection p { margin: 0; white-space: pre-wrap; line-height: 1.65; }
.note-document ul { margin: 6px 0 0; padding-left: 19px; }
.note-document li { margin: 5px 0; line-height: 1.55; }
.note-empty-section { margin: 0; color: var(--ink-soft); font-size: 12px; font-style: italic; line-height: 1.65; }
.nonclinical-note { min-height: 370px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 42px; text-align: center; }
.nonclinical-note .eyebrow { margin: 18px 0 8px; }
.nonclinical-note h2 { margin: 0; color: var(--ink); font-size: 25px; letter-spacing: -.04em; }
.nonclinical-note > p:not(.eyebrow) { max-width: 480px; margin: 12px auto 22px; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.nonclinical-mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: rgba(107, 66, 230, .09); }
.nonclinical-mark span { width: 18px; height: 12px; border-left: 2px solid var(--purple); border-bottom: 2px solid var(--purple); transform: rotate(-45deg) translate(2px, -2px); }
.summary-card { position: sticky; top: 91px; padding: 24px; }
.summary-card h2 { margin: 0 0 12px; font-size: 19px; letter-spacing: -.03em; }
.summary-card > p { color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.summary-group { padding-top: 17px; margin-top: 17px; border-top: 1px solid var(--line); }
.summary-group h3 { margin: 0 0 10px; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.summary-group ul { margin: 0; padding-left: 17px; color: var(--ink-soft); font-size: 10px; }
.flag { margin-top: 8px; padding: 10px; border-radius: 9px; color: #765d2d; background: #faf3e4; font-size: 9px; }
.flag.urgent { color: #873f37; background: var(--red-soft); }

.editor-toolbar { padding: 22px 24px; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; justify-content: space-between; gap: 18px; border-radius: 18px 18px 0 0; box-shadow: none; }
.editor-toolbar h2 { margin: 0; font-size: 23px; letter-spacing: -.035em; }
.editor-toolbar p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.editor-actions { display: flex; gap: 8px; }
.edit-save-status { padding: 7px 10px; border-radius: 99px; color: var(--muted); background: #f4f0e9; font-size: 9px; font-weight: 600; white-space: nowrap; }
.transcript-mode { padding: 4px; display: flex; border: 1px solid var(--line); border-radius: 12px; background: #f4f0e9; }
.transcript-mode button { min-height: 34px; padding: 0 12px; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }
.transcript-mode button.active { color: #fff; background: var(--haiti); box-shadow: 0 5px 12px rgba(22, 22, 58, .15); }
.transcript-state { padding: 10px 18px; display: flex; gap: 8px; color: #755613; border-right: 1px solid #ead9a2; border-left: 1px solid #ead9a2; background: #fff9e8; font-size: 9px; }
.transcript-state strong { flex: 0 0 auto; }
.final-transcript { padding: 13px; display: grid; gap: 7px; border-radius: 0 0 18px 18px; box-shadow: none; border-top: 0; }
.editor-turn { width: 100%; min-height: 86px; padding: 15px; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 12px; border: 1px solid transparent; border-radius: 14px; background: transparent; text-align: left; transition: background .18s, border-color .18s; }
.editor-turn:hover { border-color: #ded7ef; background: #fbf9ff; }
.editor-turn.changed { border-color: #e5dcff; background: #fcfaff; }
.editor-turn-body { min-width: 0; display: grid; }
.editor-turn .turn-meta strong { font-size: 11px; }
.editor-turn .turn-meta em { padding: 3px 6px; border-radius: 6px; color: var(--purple); background: var(--purple-soft); font-size: 8px; font-style: normal; font-weight: 700; }
.turn-copy { margin-top: 5px; color: #292846; font-size: 13px; line-height: 1.7; }
.original-preview { margin-top: 7px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.original-preview b { margin-right: 5px; color: #9b7b00; }
.edit-arrow { align-self: center; color: var(--purple); font-size: 9px; font-weight: 600; }
.inline-edit-turn { border-color: #d8d1e8; background: #fff; box-shadow: 0 8px 24px rgba(22, 22, 58, .035); }
.inline-edit-turn:hover { border-color: #cfc4ec; background: #fff; }
.inline-edit-turn:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(108, 74, 230, .08); }
.inline-edit-turn.dirty { border-color: #e9a988; background: #fffaf7; }
.inline-turn-meta { min-height: 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.inline-turn-meta select { max-width: min(220px, 42vw); height: 31px; padding: 0 26px 0 9px; outline: 0; border: 1px solid #ddd6e8; border-radius: 8px; color: var(--ink); background-color: #faf8ff; cursor: pointer; font-size: 10px; font-weight: 600; }
.inline-turn-meta select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(108, 74, 230, .08); }
.inline-turn-meta time { color: #9691a3; font-size: 9px; font-variant-numeric: tabular-nums; }
.inline-row-status { margin-left: auto; color: var(--muted); font-size: 8px; font-style: normal; font-weight: 600; }
.inline-edit-turn.dirty .inline-row-status { color: #b55329; }
.inline-turn-text { width: 100%; min-height: 48px; margin-top: 7px; padding: 10px 11px; overflow: hidden; resize: none; outline: 0; border: 1px solid #ded9e6; border-radius: 10px; color: #292846; background: #fff; font-size: 13px; line-height: 1.7; }
.inline-turn-text:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(108, 74, 230, .07); }
.inline-turn-tools { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px; }
.inline-turn-tools button { min-height: 30px; padding: 0 9px; border: 1px solid #ded9e6; border-radius: 8px; color: var(--ink-soft); background: #faf8f4; cursor: pointer; font-size: 8px; font-weight: 600; }
.inline-turn-tools button:hover { border-color: #c9bbe9; color: var(--purple); background: var(--purple-soft); }
.inline-turn-tools button.destructive { margin-left: auto; border-color: #f0c1b8; color: var(--red); background: var(--red-soft); }
.polished-turn { min-height: 82px; padding: 15px; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 12px; border-radius: 14px; }
.polished-turn + .polished-turn { border-top: 1px solid #eee9e2; border-radius: 0; }
.polished-turn .turn-copy { display: block; }
.correction-list { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.correction-chip { padding: 4px 7px; border-radius: 7px; color: #5936bf; background: var(--purple-soft); font-size: 8px; }
.ai-chip { padding: 3px 6px; border-radius: 6px; color: #fff; background: var(--purple); font-size: 8px; font-style: normal; font-weight: 700; }
.accuracy-review { overflow: hidden; }
.accuracy-review-head { padding: 25px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.accuracy-review-head h2 { margin: 0; font-size: 23px; letter-spacing: -.035em; }
.accuracy-review-head p:last-child { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.accuracy-results { padding: 22px; }
.accuracy-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.accuracy-version { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fbf9f4; }
.accuracy-version.polished { border-color: #dcd1fb; background: #fbf9ff; }
.accuracy-version > div:first-child { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.accuracy-version h3 { margin: 0; font-size: 14px; }
.accuracy-version > div:first-child span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.quality-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.quality-metric { padding: 12px; border-radius: 12px; background: #fff; }
.quality-metric small { display: block; min-height: 25px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.quality-metric strong { display: block; margin-top: 5px; color: var(--haiti); font-size: 19px; letter-spacing: -.04em; }
.entity-metrics { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.entity-metrics h4, .speaker-breakdown h4 { margin: 0 0 9px; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.entity-row { min-height: 34px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 9px; border-top: 1px solid #eee9e2; font-size: 9px; }
.entity-row:first-of-type { border-top: 0; }
.entity-row span { color: var(--muted); }
.speaker-breakdown { margin-top: 20px; padding: 18px; border-radius: 14px; background: var(--haiti); color: #fff; }
.speaker-table { width: 100%; border-collapse: collapse; font-size: 9px; }
.speaker-table th, .speaker-table td { padding: 9px 7px; border-top: 1px solid rgba(255, 255, 255, .12); text-align: left; }
.speaker-table th { color: rgba(255, 255, 255, .55); font-weight: 500; }
.metric-footnote { margin: 16px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.structured-card { overflow: hidden; }
.structured-heading { padding: 22px 25px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.structured-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.structured-card pre { margin: 0; padding: 27px; max-height: 70vh; overflow: auto; color: #eee9ff; background: var(--haiti); font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.changes-card { overflow: hidden; }
.version-chip { padding: 6px 9px; border-radius: 99px; color: var(--purple); background: var(--purple-soft); font-size: 9px; }
.changes-list { padding: 10px 18px 22px; }
.change-row { padding: 15px 5px; display: grid; grid-template-columns: 38px 1fr; gap: 12px; border-bottom: 1px solid var(--line); }
.change-row:last-child { border: 0; }
.change-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--purple); background: var(--purple-soft); font-size: 9px; font-weight: 700; }
.change-row.source .change-icon { color: var(--haiti); background: #ffe9a3; }
.change-row div { min-width: 0; display: grid; }
.change-row strong { font-size: 11px; }
.change-row small { color: var(--muted); font-size: 9px; }
.change-row p { margin: 8px 0 0; display: grid; gap: 4px; font-size: 10px; }
.change-row del { padding: 6px 8px; color: #8e4f46; background: #fff1ee; text-decoration: line-through; }
.change-row ins { padding: 6px 8px; color: #5230bd; background: #f1edff; text-decoration: none; }

.modal { width: min(720px, calc(100% - 32px)); max-height: min(780px, calc(100dvh - 48px)); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); background: var(--cream); box-shadow: 0 35px 110px rgba(12, 12, 42, .32); }
.modal::backdrop { background: rgba(22, 22, 58, .52); backdrop-filter: blur(6px); }
.modal-heading { padding: 23px 25px 18px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.history-list { max-height: 650px; overflow: auto; padding: 10px; }
.history-item { width: 100%; min-height: 70px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.history-item:hover { background: var(--purple-soft); }
.history-item strong { font-size: 12px; }
.history-item small { color: var(--muted); font-size: 9px; }
.history-item span { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--purple); font-size: 9px; }
.history-empty { padding: 60px 20px; color: var(--muted); text-align: center; }
.speaker-modal { width: min(460px, calc(100% - 32px)); }
.speaker-modal form, .turn-modal form { padding: 24px; display: grid; gap: 18px; overflow-y: auto; max-height: calc(100dvh - 130px); }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.modal-actions .destructive { margin-right: auto; }
.manager-modal { width: min(520px, calc(100% - 32px)); }
.manager-list { max-height: 520px; padding: 12px; overflow-y: auto; }
.manager-list > button { width: 100%; min-height: 64px; padding: 10px 12px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 11px; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.manager-list > button:hover { background: var(--purple-soft); }
.manager-list > button > span:not(.speaker-avatar) { display: grid; }
.manager-list strong { font-size: 11px; }
.manager-list small { color: var(--muted); font-size: 9px; }
.manager-list em { color: var(--purple); font-size: 9px; font-style: normal; }
.manager-footer { padding: 14px 22px 22px; }
.turn-modal { width: min(680px, calc(100% - 32px)); }
.original-box { padding: 13px; border: 1px solid #ead9a2; border-radius: 12px; background: #fff9e8; }
.original-box strong { color: #806010; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.original-box p { margin: 5px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.55; }
.turn-tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.turn-tools .button { padding: 0 10px; font-size: 9px; }

.toast-region { position: fixed; z-index: 200; right: max(22px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: min(390px, calc(100vw - 32px)); padding: 13px 15px; border: 1px solid #d4c9f4; border-radius: 12px; color: #4b2eb4; background: #fbf9ff; box-shadow: 0 16px 45px rgba(22, 22, 58, .15); font-size: 11px; animation: toast-in .24s ease both; }
.toast.error { border-color: #e9c0b8; color: var(--red); background: #fff8f6; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Production clinician workspace */
.setup-page { padding: 23px 0 72px; }
.workspace-heading { margin-bottom: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.workspace-heading .eyebrow { margin-bottom: 7px; }
.workspace-heading h1 { margin: 0; font-size: 32px; line-height: 1.1; letter-spacing: -.045em; }
.workspace-heading p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.setup-grid { grid-template-columns: minmax(0, 1fr) 355px; align-items: start; }
.encounter-panel { padding: 24px 27px 20px; box-shadow: 0 12px 38px rgba(22, 22, 58, .065); }
.encounter-panel > .panel-heading { margin-bottom: 20px; }
.encounter-panel > .form-grid { gap: 14px 18px; }
.setup-step { padding: 5px 9px; border-radius: 99px; color: var(--muted); background: #f4f0e9; font-size: 9px; font-weight: 600; }
.defaults-button { min-height: 36px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #ded7ef; border-radius: 10px; color: var(--purple); background: #fbf9ff; cursor: pointer; font-size: 9px; font-weight: 700; }
.defaults-button:hover { border-color: #c9bbe9; background: var(--purple-soft); }
.defaults-button svg { width: 14px; height: 14px; fill: currentColor; }
.keyterms-details { margin-top: -2px; }
.keyterms-details summary { width: max-content; padding: 5px 0; color: var(--purple); cursor: pointer; font-size: 10px; font-weight: 600; list-style: none; }
.keyterms-details summary span { display: inline-block; margin-right: 3px; font-size: 13px; font-weight: 500; }
.keyterms-details summary::-webkit-details-marker { display: none; }
.keyterms-details[open] summary { margin-bottom: 8px; }
.room-section { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.room-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.room-section-heading h3 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.audio-ready-label { align-self: center; color: var(--muted); font-size: 8px; font-weight: 500; }
.room-section .mic-card { margin-top: 12px; padding-top: 12px; padding-bottom: 12px; }
.record-button-dot { width: 10px; height: 10px; display: inline-block; border: 2px solid rgba(255, 255, 255, .55); border-radius: 50%; background: #fff; }
.setup-sidebar { display: grid; gap: 14px; }
.recent-panel { overflow: hidden; box-shadow: 0 12px 38px rgba(22, 22, 58, .055); }
.recent-heading { padding: 22px 22px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.recent-heading .step-label { margin-bottom: 3px; }
.recent-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.recent-list { padding: 7px; display: grid; }
.recent-item { width: 100%; min-height: 67px; padding: 11px 10px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.recent-item:hover { background: var(--purple-soft); }
.recent-item > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.recent-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.recent-item small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.recent-item em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 600; }
.recent-status { width: 7px; height: 7px; border-radius: 50%; background: #bbb6aa; }
.recent-status.ready { background: var(--purple); box-shadow: 0 0 0 4px rgba(108, 74, 230, .1); }
.recent-empty { min-height: 150px; padding: 28px 20px; display: grid; place-content: center; gap: 5px; color: var(--muted); font-size: 10px; text-align: center; }
.recent-empty strong { color: var(--ink); font-size: 12px; }
.workflow-card { padding: 20px; display: grid; grid-template-columns: 42px 1fr; gap: 14px; color: #f8f6ff; background: var(--haiti); border-color: transparent; box-shadow: 0 14px 38px rgba(22, 22, 58, .16); }
.workflow-icon { width: 42px; height: 42px; padding: 12px; border-radius: 13px; background: rgba(255, 255, 255, .09); }
.workflow-icon img { width: 100%; height: 100%; filter: brightness(0) invert(1); }
.workflow-card strong { font-size: 11px; }
.workflow-card p { margin: 5px 0 0; color: #bdb9d2; font-size: 9px; line-height: 1.6; }
.preferences-modal { width: min(590px, calc(100% - 32px)); }
.preferences-modal .modal-heading p:last-child { max-width: 440px; margin: 7px 25px 0 0; color: var(--muted); font-size: 9px; font-weight: 400; letter-spacing: 0; line-height: 1.55; text-transform: none; }
.preferences-modal form { max-height: calc(100dvh - 145px); padding: 24px; display: grid; gap: 17px; overflow-y: auto; }
.preferences-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.preference-toggle { min-height: 57px; padding: 11px 13px; display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 11px; border: 1px solid #ded7ef; border-radius: 13px; background: #fbf9ff; cursor: pointer; }
.preference-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--purple); }
.preference-toggle span { display: grid; gap: 2px; }
.preference-toggle strong { font-size: 10px; }
.preference-toggle small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.preference-storage-note { margin: -3px 0 0; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 8px; }
.preference-storage-note .status-dot { width: 6px; height: 6px; }

.live-page { padding-top: 30px; }
.compact-live-header { margin-bottom: 18px; align-items: center; }
.compact-live-header h1 { font-size: 27px; }
.recording-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: stretch; }
.recording-stage { min-height: calc(100dvh - 205px); padding: 44px; display: grid; place-content: center; justify-items: center; box-shadow: 0 14px 42px rgba(22, 22, 58, .07); text-align: center; }
.recording-visual { display: grid; justify-items: center; }
.recording-orbit { position: relative; width: 86px; height: 86px; display: grid; place-items: center; border: 1px solid #ddd4fa; border-radius: 50%; box-shadow: 0 0 0 18px rgba(108, 74, 230, .035), 0 0 0 36px rgba(108, 74, 230, .018); }
.recording-orbit::before, .recording-orbit::after { content: ''; position: absolute; border-radius: 50%; animation: recording-pulse 2.2s ease-out infinite; }
.recording-orbit::before { inset: 14px; border: 1px solid #e9e3fb; }
.recording-orbit::after { width: 17px; height: 17px; background: var(--orange); box-shadow: 0 0 0 8px rgba(255, 79, 15, .1); }
@keyframes recording-pulse { 50% { transform: scale(.92); opacity: .62; } }
.recording-timer { margin: 43px 0 2px; font-size: 58px; font-weight: 500; line-height: 1; letter-spacing: -.055em; }
.recording-visual > span { color: var(--muted); font-size: 10px; font-weight: 600; }
.recording-stage > p { max-width: 485px; margin: 25px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.recording-meter { height: 38px; margin-top: 27px; gap: 4px; }
.recording-meter span { width: 4px; background: linear-gradient(var(--pink), var(--purple)); }
.live-transcript-store { display: none; }
.recording-sidebar { display: grid; align-content: start; gap: 14px; }

.result-page { padding-top: 30px; }
.result-header { grid-template-columns: 135px minmax(0, 1fr) auto; gap: 18px; }
.result-heading { text-align: left; }
.result-heading h1 { font-size: 29px; }
.transport-dock { position: sticky; z-index: 31; top: calc(78px + env(safe-area-inset-top)); margin-top: 19px; box-shadow: 0 16px 44px rgba(22, 22, 58, .14); }
.audio-card { padding: 11px 12px; grid-template-columns: minmax(142px, .35fr) minmax(520px, 1.5fr) auto; gap: 12px; }
.aponic-player { min-height: 54px; padding: 6px 9px; grid-template-columns: 32px 42px 32px minmax(140px, 1fr) 32px 66px 56px; gap: 7px; border-radius: 14px; }
.player-skip { width: 32px; height: 38px; display: grid; place-content: center; justify-items: center; border-radius: 9px; color: rgba(255, 255, 255, .82); background: transparent; cursor: pointer; line-height: 1; }
.player-skip:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.player-skip span { font-size: 14px; }
.player-skip b { margin-top: -3px; font-size: 7px; }
.player-play { width: 42px; height: 42px; }
.player-main { gap: 3px; }
.player-scrub { position: relative; height: 22px; display: flex; align-items: center; }
.player-waveform { position: absolute; inset: 3px 0; opacity: .58; background: repeating-linear-gradient(90deg, rgba(255,255,255,.28) 0 2px, transparent 2px 5px); -webkit-mask-image: linear-gradient(0deg, transparent 0 10%, #000 10% 90%, transparent 90%); }
.player-range { position: relative; z-index: 1; height: 22px; background: linear-gradient(90deg, rgba(255, 135, 183, .52) var(--range-progress, 0%), transparent var(--range-progress, 0%)); }
.player-range::-webkit-slider-thumb { width: 13px; height: 13px; }
.audio-actions { align-items: center; }
.shortcut-hint { color: var(--muted); font-size: 8px; white-space: nowrap; }
.tabs { position: relative; margin-top: 15px; padding: 0 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 254, 250, .86); }
.tab { min-height: 43px; padding: 0 14px; }
.tab.active { border-bottom-color: var(--purple); }
.editor-toolbar { position: sticky; z-index: 20; top: calc(151px + env(safe-area-inset-top)); }
.final-transcript { background: #fbfaf7; }
.editor-turn { position: relative; min-height: 78px; padding: 14px 15px; background: #fff; border-color: #ebe6df; }
.editor-turn:hover { border-color: #d7cfeb; background: #fff; }
.editor-turn.playing-turn { border-color: #cfc4ef; background: #faf8ff; box-shadow: inset 3px 0 0 var(--purple); }
.turn-timestamp { min-height: 28px; padding: 0 7px; border-radius: 7px; color: #716c82; background: #f2efe9; cursor: pointer; font-size: 9px; font-variant-numeric: tabular-nums; }
.turn-timestamp:hover { color: var(--purple); background: var(--purple-soft); }
.turn-copy { margin-top: 5px; font-size: 13px; line-height: 1.7; }
.inline-turn-meta .turn-timestamp { flex: 0 0 auto; }
.inline-turn-text { padding-left: 0; padding-right: 0; border-color: transparent; border-radius: 0; background: transparent; }
.inline-edit-turn:focus-within .inline-turn-text, .inline-turn-text:focus { padding-left: 11px; padding-right: 11px; border-color: #d8d0ea; border-radius: 10px; background: #fff; }

@media (max-width: 1040px) {
  .hero-block { grid-template-columns: 1fr; gap: 24px; padding-top: 56px; }
  .hero-copy { max-width: 680px; }
  .setup-grid, .live-layout, .recording-layout, .result-grid { grid-template-columns: 1fr; }
  .setup-sidebar { grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); }
  .recording-stage { min-height: 520px; }
  .recording-sidebar { grid-template-columns: 1fr 1fr; }
  .accuracy-panel { min-height: 520px; }
  .live-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy-note { grid-column: 1 / -1; }
  .transcript-panel { min-height: 620px; }
  .transcript { height: 525px; }
  .summary-card { position: static; }
  .result-header { grid-template-columns: 1fr auto; }
  .result-heading { grid-column: 1 / -1; grid-row: 1; }
  .result-header > .button { grid-column: 1; grid-row: 2; justify-self: start; }
  .result-actions { grid-column: 2; grid-row: 2; }
  .audio-card { grid-template-columns: 1fr; }
  .audio-copy { grid-column: 1; }
  .aponic-player { grid-column: 1; }
  .audio-actions { grid-column: 1; justify-content: flex-end; }
  .editor-toolbar { grid-template-columns: 1fr auto; }
  .editor-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 720px) {
  .page { width: min(calc(100% - 28px), 1400px); }
  .topbar { height: calc(62px + env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .brand img { width: 100px; }
  .brand span { padding-left: 9px; font-size: 10px; }
  .workspace-label { display: none; }
  .topbar .quiet { min-height: 42px; padding: 0 7px; font-size: 0; }
  .topbar .quiet::after { content: 'History'; font-size: 10px; }
  .workspace-heading { margin: 24px 0 18px; align-items: flex-start; }
  .workspace-heading h1 { font-size: 30px; }
  .workspace-heading .secure-chip { display: none; }
  .setup-page { padding: 0 0 70px; }
  .setup-sidebar { grid-template-columns: 1fr; }
  .encounter-panel, .accuracy-panel { padding: 22px 18px; }
  .panel-heading { align-items: flex-start; }
  .panel-heading h2 { font-size: 22px; }
  .secure-chip { display: none; }
  .form-grid.two { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .mic-card { grid-template-columns: 42px 1fr; }
  .mic-card .device-select, .mic-card .button { grid-column: 1 / -1; }
  .dual-mic-toggle { grid-template-columns: 18px 1fr; }
  .dual-mic-toggle em { grid-column: 2; justify-self: start; }
  .second-mic-card { grid-template-columns: 42px 1fr; }
  .consent-row { align-items: stretch; flex-direction: column; }
  .consent-row .button { width: 100%; }
  .accuracy-panel { min-height: 0; }
  .brand-orbit { width: 60px; height: 60px; padding: 18px; }
  .live-page { width: 100%; padding: 24px 14px calc(95px + env(safe-area-inset-bottom)); }
  .live-header { align-items: stretch; flex-direction: column; }
  .live-header > .danger { display: none; }
  .live-header h1 { font-size: 29px; }
  .recording-layout, .recording-sidebar { grid-template-columns: 1fr; }
  .recording-stage { min-height: min(54dvh, 520px); padding: 34px 20px; }
  .recording-timer { font-size: 49px; }
  .recording-stage > p { font-size: 11px; }
  .transcript-panel { min-height: 540px; padding: 21px 15px 12px; }
  .transcript { height: min(58dvh, 520px); min-height: 380px; }
  .turn { padding: 13px 8px; grid-template-columns: 34px 1fr; gap: 9px; }
  .turn p { font-size: 13px; }
  .live-sidebar { grid-template-columns: 1fr; }
  .privacy-note { grid-column: auto; }
  .mobile-finish { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; padding: 10px max(14px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); display: block; border-top: 1px solid rgba(209, 204, 195, .8); background: rgba(255, 252, 245, .94); backdrop-filter: blur(15px); }
  .result-page { padding: 24px 0 calc(104px + env(safe-area-inset-bottom)); }
  .result-header { grid-template-columns: 1fr; gap: 18px; }
  .result-heading { grid-column: 1; grid-row: auto; text-align: left; }
  .result-header > .button, .result-actions { grid-column: 1; grid-row: auto; }
  .result-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .transport-dock { position: fixed; z-index: 60; inset: auto 8px max(8px, env(safe-area-inset-bottom)); width: auto; margin: 0; padding: 7px; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; border-color: rgba(255,255,255,.12); border-radius: 17px; background: var(--haiti); box-shadow: 0 18px 55px rgba(8, 8, 30, .3); }
  .audio-copy { display: none; }
  .aponic-player { min-height: 56px; padding: 6px; grid-column: 1; grid-template-columns: 30px 40px 30px minmax(85px, 1fr) 52px; grid-template-rows: 44px; gap: 4px; box-shadow: none; }
  .player-skip { width: 30px; height: 38px; }
  .player-play { width: 40px; height: 40px; }
  .player-main { grid-column: 4; grid-row: 1; }
  .player-icon, .volume-range { display: none; }
  .speed-select { grid-column: 5; grid-row: 1; min-height: 34px; align-self: center; }
  .audio-actions { grid-column: 2; display: flex; }
  .audio-actions .shortcut-hint, .audio-actions #share-audio { display: none; }
  .audio-actions .button { width: auto; min-height: 42px; padding: 0 10px; color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); font-size: 8px; }
  .review-banner { align-items: flex-start; flex-wrap: wrap; }
  .review-banner.stale .button { width: 100%; }
  .tabs { margin-left: -14px; margin-right: -14px; padding: 0 14px; border-left: 0; border-right: 0; border-radius: 0; }
  .note-document { padding: 27px 21px; }
  .editor-toolbar { position: static; align-items: stretch; grid-template-columns: 1fr; }
  .edit-save-status { justify-self: start; }
  .transcript-mode { width: 100%; }
  .transcript-mode button { flex: 1; }
  .editor-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .final-transcript { padding: 8px; }
  .editor-turn { grid-template-columns: 35px minmax(0, 1fr); }
  .editor-turn .edit-arrow { display: none; }
  .inline-edit-turn { padding: 12px 9px; gap: 8px; }
  .inline-turn-meta { align-items: stretch; }
  .inline-turn-meta select { max-width: 100%; flex: 1 1 130px; }
  .inline-row-status { width: 100%; margin-left: 0; }
  .inline-turn-text { font-size: 16px; line-height: 1.55; }
  .inline-turn-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-turn-tools button, .inline-turn-tools button.destructive { width: 100%; margin-left: 0; }
  .original-preview { white-space: normal; }
  .structured-heading { align-items: flex-start; flex-direction: column; }
  .structured-heading .button { width: 100%; }
  .password-row { grid-template-columns: 1fr; }
  .auth-card { padding: 34px 23px; }
  .auth-card h1 { font-size: 32px; }
  .processing-card { padding: 36px 23px; }
  .modal { width: 100%; max-width: none; max-height: calc(100dvh - env(safe-area-inset-top)); margin: env(safe-area-inset-top) 0 0; border-radius: 23px 23px 0 0; }
  .modal[open] { position: fixed; inset: auto 0 0; }
  .speaker-modal form, .turn-modal form { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .turn-tools { display: grid; grid-template-columns: 1fr 1fr; }
  .turn-tools .button { width: 100%; }
  .modal-actions { position: sticky; bottom: 0; padding-top: 8px; background: var(--cream); }
  .toast-region { left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .toast { min-width: 0; width: 100%; }
  .accuracy-review-head { align-items: stretch; flex-direction: column; }
  .accuracy-review-head .button { width: 100%; }
  .accuracy-summary { grid-template-columns: 1fr; }
  .quality-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 390px) {
  .page { width: min(calc(100% - 22px), 1400px); }
  .hero-block h1 { font-size: 38px; }
  .encounter-panel, .accuracy-panel { padding: 19px 15px; }
  .panel-heading h2 { font-size: 20px; }
  .capture-note { grid-template-columns: 1fr; }
  .capture-note .capture-icon { display: none; }
  .result-actions, .editor-actions { grid-template-columns: 1fr; }
  .transport-dock { left: 5px; right: 5px; }
  .aponic-player { grid-template-columns: 28px 38px 28px minmax(68px, 1fr) 47px; padding-right: 4px; }
  .player-skip { width: 28px; }
  .audio-actions .button { max-width: 64px; padding: 0 7px; }
  .editor-turn { padding: 12px 8px; }
  .quality-metrics { grid-template-columns: 1fr; }
  .turn-copy { font-size: 12px; }
  .modal-heading { padding: 20px 18px 16px; }
  .speaker-modal form, .turn-modal form { padding: 18px; }
}

/* The recording launchpad is designed around a single phone viewport. */
@media (max-width: 820px) {
  .topbar { height: calc(56px + env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .brand { gap: 0; }
  .brand img { width: 94px; }
  .brand span { display: none; }
  .topbar-actions { gap: 1px; }
  .topbar .quiet { min-height: 40px; padding: 0 8px; }
  .icon-button { width: 40px; height: 40px; }

  .setup-page { width: min(calc(100% - 20px), 600px); padding: 11px 0 calc(102px + env(safe-area-inset-bottom)); }
  .workspace-heading { margin: 0 2px 10px; align-items: center; }
  .workspace-heading .eyebrow, .workspace-heading p:last-child, .workspace-heading .secure-chip { display: none; }
  .workspace-heading h1 { font-size: 23px; line-height: 1.15; letter-spacing: -.04em; }
  .setup-grid { display: block; }
  .setup-sidebar { display: none; }
  .encounter-panel { padding: 14px; border-radius: 19px; box-shadow: 0 10px 30px rgba(22, 22, 58, .06); }
  .encounter-panel > .panel-heading { margin-bottom: 11px; align-items: center; }
  .panel-heading .step-label { display: none; }
  .panel-heading h2 { font-size: 16px; letter-spacing: -.025em; }
  .defaults-button { min-height: 35px; border-radius: 10px; }

  .encounter-panel > .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .patient-field, .specialty-field, .keyterms-details { grid-column: 1 / -1; }
  .field { min-width: 0; gap: 4px; }
  .field > span, .field-label { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .field em { display: inline; }
  .text-input { min-height: 43px; padding: 0 11px; border-radius: 11px; font-size: 16px; }
  select.text-input { padding-right: 24px; font-size: 12px; }
  .keyterms-details { margin: -1px 0 0; }
  .keyterms-details summary { min-height: 28px; padding: 4px 0 2px; display: flex; align-items: center; font-size: 9px; }
  .keyterms-details[open] summary { margin-bottom: 5px; }

  .room-section { margin-top: 8px; padding-top: 9px; }
  .room-section-heading { align-items: center; }
  .room-section-heading .step-label { display: none; }
  .room-section-heading h3 { font-size: 15px; }
  .audio-ready-label { font-size: 7px; }
  .room-section .mic-card, .mic-card { min-height: 45px; margin: 7px 0 7px; padding: 0; grid-template-columns: minmax(0, 1fr) 70px; gap: 7px; border: 0; border-radius: 0; background: transparent; }
  .mic-icon, .mic-copy { display: none; }
  .mic-card .device-select { grid-column: 1; min-width: 0; min-height: 43px; padding: 0 9px; border-radius: 11px; font-size: 11px; }
  .mic-card .button { grid-column: 2; min-height: 43px; padding: 0 9px; border-radius: 11px; font-size: 9px; }
  .dual-mic-toggle { min-height: 39px; margin: 0; padding: 7px 10px; grid-template-columns: 17px 1fr; gap: 8px; border-radius: 11px; }
  .dual-mic-toggle input { width: 17px; height: 17px; }
  .dual-mic-toggle strong { font-size: 9px; }
  .dual-mic-toggle small, .dual-mic-toggle em { display: none; }
  .second-mic-card { min-height: 43px; margin-top: 6px; grid-template-columns: 1fr; }
  .second-mic-card .channel-badge { display: none; }
  .second-mic-card .device-select { grid-column: 1; }

  .consent-row { position: fixed; z-index: 42; left: 0; right: 0; bottom: 0; min-height: calc(88px + env(safe-area-inset-bottom)); padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(142px, 42%); align-items: center; gap: 10px; border-top: 1px solid rgba(209, 204, 195, .8); background: rgba(255, 252, 245, .95); box-shadow: 0 -12px 34px rgba(22, 22, 58, .08); backdrop-filter: blur(18px); }
  .check-label { max-width: none; align-items: center; gap: 8px; font-size: 9px; line-height: 1.35; }
  .check-label input { width: 20px; height: 20px; }
  .consent-row .button { width: 100%; min-height: 54px; padding: 0 12px; border-radius: 15px; font-size: 11px; }
  .form-error:not(:empty) { position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(91px + env(safe-area-inset-bottom)); min-height: 0; margin: 0; padding: 9px 11px; border: 1px solid #e9c0b8; border-radius: 10px; background: #fff8f6; box-shadow: 0 10px 25px rgba(22, 22, 58, .12); }
  .form-error:empty { display: none; }

  .preferences-modal form { padding: 18px; padding-bottom: max(22px, env(safe-area-inset-bottom)); gap: 14px; }
  .preferences-grid { grid-template-columns: 1fr; gap: 14px; }
  .preferences-modal .modal-heading p:last-child { margin-right: 12px; }
  .preferences-modal .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .preferences-modal .modal-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
