/* Oralia — design system. No framework, no web font, no external resource (CSP: 'self' only).
   Palette: deep violet (brand) + warm coral (accent) on a soft lavender background. */
:root {
  --brand: #5b3df5; --brand-2: #9a5cf6; --brand-soft: #efeafe;
  --accent: #ff7a59; --accent-soft: #fff0eb;
  --bg: #f6f4fd; --surface: #fff; --surface-2: #faf9ff; --ink: #1d1b2e; --muted: #6b6880;
  --line: #e7e3f5; --ok: #12a37f; --ok-soft: #e3f6f0; --warn: #c27c0e; --warn-soft: #fdf3e1;
  --danger: #e5484d; --danger-soft: #fdecec;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(43 24 140 / 5%), 0 8px 24px rgb(43 24 140 / 7%);
  --shadow-lift: 0 2px 4px rgb(43 24 140 / 6%), 0 16px 40px rgb(43 24 140 / 12%);
  --gradient: linear-gradient(135deg, var(--brand), var(--brand-2));
  --src-0: #5b3df5; --src-1: #0c8599; --src-2: #c2255c; --src-3: #e8590c; --src-4: #12a37f;
  --src-5: #9a5cf6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #8b74ff; --brand-2: #b48cff; --brand-soft: #2a2350;
    --accent: #ff9475; --accent-soft: #3a2420;
    --bg: #110f1c; --surface: #1b1829; --surface-2: #211d33; --ink: #ece9f8; --muted: #a29fb8;
    --line: #2f2a45; --ok: #3ccf9f; --ok-soft: #13342b; --warn: #f0b350; --warn-soft: #3a2c12;
    --danger: #ff6b6f; --danger-soft: #3d1a1d;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 35%), 0 16px 40px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; font-size: 16px; }
a { color: var(--brand); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; margin: 0 0 .4rem; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; margin: 0 0 .9rem; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------------------------------------------------------------- logo */
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: inherit; font-weight: 750; font-size: 1.2rem; letter-spacing: -.02em; }
.logo-mark { display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 8px; border-radius: 9px; background: var(--gradient); }
.logo-mark i { display: block; width: 3px; border-radius: 2px; background: #fff; }
.logo-mark i:nth-child(1) { height: 8px; } .logo-mark i:nth-child(2) { height: 16px; }
.logo-mark i:nth-child(3) { height: 11px; } .logo-mark i:nth-child(4) { height: 18px; }
.logo-mark i:nth-child(5) { height: 9px; }
.logo-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: -3px; }

/* ---------------------------------------------------------------- app shell */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1.5rem; padding: .75rem clamp(1rem, 4vw, 2rem); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar nav { display: flex; gap: .3rem; flex: 1; overflow-x: auto; }
.topbar nav a { padding: .45rem .8rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 550; white-space: nowrap; }
.topbar nav a:hover { color: var(--ink); background: var(--surface-2); }
.topbar nav a.active { color: var(--brand); background: var(--brand-soft); }
.user-menu { position: relative; }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 0; background: var(--gradient); color: #fff; font-weight: 700; cursor: pointer; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); }
.menu[hidden] { display: none; }
.menu .who { padding: .5rem .7rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .35rem; overflow-wrap: anywhere; }
.menu .who strong { display: block; }
.menu a, .menu button { display: block; width: 100%; padding: .55rem .7rem; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.container { max-width: 1120px; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.25rem) clamp(1rem, 4vw, 2rem) 4rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head p { margin: 0; }

/* ---------------------------------------------------------------- surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.6rem); box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.meeting-card { display: flex; flex-direction: column; gap: .6rem; min-height: 150px; padding: 1.2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.meeting-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.meeting-card .date { color: var(--muted); font-size: .85rem; }
.meeting-card h3 { margin: 0; font-size: 1.08rem; line-height: 1.35; overflow-wrap: anywhere; }
.meeting-card .meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; color: var(--muted); font-size: .875rem; margin-top: auto; }
.new-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 150px; border-radius: var(--radius); border: 2px dashed color-mix(in srgb, var(--brand) 35%, var(--line)); color: var(--brand); font-weight: 650; text-decoration: none; background: var(--surface-2); }
.new-card:hover { background: var(--brand-soft); }
.new-card .plus { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--gradient); color: #fff; font-size: 1.5rem; line-height: 1; }
.empty { text-align: center; padding: 3rem 1.5rem; }
.empty .wave { justify-content: center; margin: 0 auto 1.25rem; }
.empty h2 { font-size: 1.35rem; }
.empty p { max-width: 46ch; margin: 0 auto 1.5rem; }

/* ---------------------------------------------------------------- controls */
label { display: block; font-weight: 600; font-size: .92rem; margin: 1rem 0 .4rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: .35rem; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input:disabled { opacity: .7; }
textarea { min-height: 16rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
input.code-input { text-align: center; font-size: 1.6rem; letter-spacing: .45em; font-variant-numeric: tabular-nums; }
.choices { display: grid; gap: .5rem; }
.choices label { display: flex; align-items: flex-start; gap: .6rem; margin: 0; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-weight: 500; cursor: pointer; }
.choices label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choices input { margin-top: .25rem; accent-color: var(--brand); }

button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.15rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .1s, box-shadow .15s, background .15s, border-color .15s; }
button:hover:not(:disabled), .button:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--gradient); color: #fff; border-color: transparent; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 30%, transparent); }
.primary:hover:not(:disabled) { box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 40%, transparent); border-color: transparent; }
.danger { color: var(--danger); }
.danger:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }
.block { width: 100%; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.25rem; }
.link-button { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- feedback */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 650; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.done { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.error { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.badge.active { color: var(--brand); background: var(--brand-soft); border-color: transparent; }
.badge.active::before { animation: pulse 1.2s ease-in-out infinite; }
.notice { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .95rem; }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.notice.success { background: var(--ok-soft); color: var(--ok); }
.notice.info { background: var(--brand-soft); color: var(--ink); }

/* ---------------------------------------------------------------- auth pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: clamp(2rem, 5vw, 3.5rem); background: var(--gradient); color: #fff; }
.auth-hero::after { content: ""; position: absolute; width: 440px; height: 440px; right: -150px; bottom: -170px; border-radius: 50%; background: radial-gradient(circle, rgb(255 122 89 / 55%), transparent 65%); pointer-events: none; }
.auth-hero .logo { color: #fff; }
.auth-hero .logo-mark { background: rgb(255 255 255 / 18%); }
.auth-hero h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 1rem; max-width: 15ch; }
.auth-hero p { font-size: 1.05rem; opacity: .92; max-width: 40ch; }
.auth-hero .wave i { background: rgb(255 255 255 / 80%); }
.auth-hero .features { display: grid; gap: .55rem; padding: 0; margin: 0; list-style: none; position: relative; z-index: 1; }
.auth-hero .features li { display: flex; gap: .6rem; align-items: center; opacity: .95; }
.auth-hero .features li::before { content: "✓"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgb(255 255 255 / 20%); font-size: .75rem; font-weight: 700; }
.auth-panel { display: grid; place-items: center; padding: clamp(1.5rem, 5vw, 3rem); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin-bottom: .35rem; }
.auth-card .lead { color: var(--muted); margin-bottom: 1.5rem; }
.auth-card .switch { margin-top: 1.5rem; text-align: center; color: var(--muted); font-size: .92rem; }
.auth-card .primary.block { margin-top: 1.5rem; padding: .85rem 1.15rem; }
.auth-mobile-logo { display: none; margin-bottom: 2rem; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-mobile-logo { display: inline-flex; }
  .auth-panel { place-items: start center; padding-top: 3rem; }
}
.qr { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.qr img { width: 180px; height: 180px; border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--line); }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; word-break: break-all; padding: .6rem .8rem; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--line); }
.steps-list { padding-left: 1.2rem; margin: 0 0 1rem; } .steps-list li { margin-bottom: .4rem; }

/* ---------------------------------------------------------------- animated waveform */
.wave { display: flex; align-items: center; gap: 5px; height: 64px; }
.wave i { display: block; width: 6px; height: 40%; border-radius: 4px; background: var(--gradient); animation: wave 1.6s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: -.4s; } .wave i:nth-child(3n) { animation-delay: -.8s; } .wave i:nth-child(5n) { animation-delay: -1.2s; }
@keyframes wave { 0%, 100% { height: 18%; } 50% { height: 100%; } }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .wave i, .badge.active::before { animation: none; }
  .meeting-card, button { transition: none; }
}

/* ---------------------------------------------------------------- meeting page */
.dropzone { border: 2px dashed color-mix(in srgb, var(--brand) 35%, var(--line)); border-radius: var(--radius); padding: 2.5rem 1.25rem; text-align: center; background: var(--surface-2); cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone strong { display: block; font-size: 1.05rem; margin-bottom: .3rem; }
.dropzone.over, .dropzone:hover { background: var(--brand-soft); border-color: var(--brand); }
.file-row { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: .35rem; }
.bar span { display: block; height: 100%; width: 0; background: var(--gradient); transition: width .2s; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.steps li { display: flex; align-items: center; gap: .7rem; }
.steps .icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .8rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.steps li.done .icon { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.steps li.active .icon { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.steps li.error .icon { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.steps li.pending { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.tabs { display: inline-flex; gap: .25rem; padding: .3rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 1.25rem; }
.tabs button { border: 0; background: none; padding: .5rem .9rem; border-radius: 9px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.transcript { display: grid; gap: .25rem; }
.segment { display: grid; grid-template-columns: 5.5rem 8rem 1fr; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.segment time { font-variant-numeric: tabular-nums; color: var(--muted); }
.segment .text { margin: 0; }
.src { font-size: .78rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-0 { color: var(--src-0); } .src-1 { color: var(--src-1); } .src-2 { color: var(--src-2); }
.src-3 { color: var(--src-3); } .src-4 { color: var(--src-4); } .src-5 { color: var(--src-5); }
.summary { line-height: 1.7; } .summary h1 { font-size: 1.4rem; } .summary h2 { font-size: 1.15rem; margin-top: 1.4rem; }
.key-status { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .75rem; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.list-row .who { min-width: 0; overflow-wrap: anywhere; }
.list-row .who strong { display: block; }
.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.inline-form > div { flex: 1 1 260px; }
.inline-form label { margin-top: 0; }
@media (max-width: 640px) {
  .segment { grid-template-columns: 4.5rem 1fr; } .segment .src { display: none; }
  .file-row { grid-template-columns: 1fr auto; } .file-row > :nth-child(2) { display: none; }
  .topbar { gap: .75rem; } .topbar .logo .word { display: none; }
}

/* ---------------------------------------------------------------- transcript workspace (REQ-25..32) */
mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-input { width: 100%; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font: inherit; }
.search-form { display: flex; gap: .6rem; }
.transcript-tools { display: grid; gap: .6rem; margin-bottom: .75rem; position: sticky; top: 64px; z-index: 5; background: var(--surface); padding: .5rem 0; }
.search-row { display: flex; gap: .4rem; align-items: center; }
.search-row button { padding: .55rem .8rem; }
.search-row .counter { white-space: nowrap; min-width: 6rem; }
.tool-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
button.validated { color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.actions.compact { margin-top: .6rem; gap: .45rem; }
.small-button, .actions.compact button, .actions.compact .button { padding: .45rem .8rem; font-size: .9rem; border-radius: 10px; }
.shortcuts { margin: .4rem 0 .8rem; } .shortcuts ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.reliability { position: relative; height: 14px; border-radius: 7px; background: var(--ok-soft); border: 1px solid var(--line); margin: .4rem 0 .6rem; overflow: hidden; }
.reliability .slice { position: absolute; top: 0; bottom: 0; padding: 0; border: 0; border-radius: 0; min-width: 3px; cursor: pointer; }
.slice.low { background: color-mix(in srgb, var(--warn) 35%, transparent); }
.slice.mid { background: var(--warn); } .slice.high { background: var(--accent); } .slice.crit { background: var(--danger); }
.slice.fixed { background: var(--ok); } .slice.hit { background: var(--brand); z-index: 1; }
.segment { grid-template-columns: 6.5rem 7rem 1fr auto; align-items: start; scroll-margin-top: 180px; }
.segment.current { background: var(--brand-soft); border-radius: 8px; }
.segment.flagged.crit { box-shadow: inset 3px 0 0 var(--danger); } .segment.flagged.high { box-shadow: inset 3px 0 0 var(--accent); }
.segment.flagged.mid { box-shadow: inset 3px 0 0 var(--warn); }
.segment .seg-body { min-width: 0; }
.segment .seg-extra { grid-column: 1 / -1; }
.segment .seg-extra:empty { display: none; }
.time { border: 0; background: none; padding: .1rem .3rem; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; border-radius: 6px; white-space: nowrap; }
.time:hover:not(:disabled) { color: var(--brand); background: var(--brand-soft); }
.time.inline { display: inline; padding: 0 .2rem; color: var(--brand); }
.speaker { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--brand); margin-right: .4rem; }
.seg-badges { display: inline-flex; gap: .35rem; margin-left: .3rem; }
.score { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: .75rem; font-weight: 750; background: var(--warn-soft); color: var(--warn); }
.score.high { background: var(--accent-soft); color: var(--accent); } .score.crit { background: var(--danger-soft); color: var(--danger); }
.fixed-badge { font-size: .72rem; font-weight: 650; color: var(--ok); }
.seg-tools { display: flex; gap: .15rem; opacity: .35; transition: opacity .15s; }
.segment:hover .seg-tools, .segment.current .seg-tools, .seg-tools:focus-within, .note-row .seg-tools { opacity: 1; }
.seg-tools button { border: 0; background: none; padding: .2rem .35rem; border-radius: 6px; }
.seg-tools button:hover:not(:disabled) { background: var(--surface-2); }
.editor textarea, textarea.short { min-height: 0; font-family: inherit; font-size: .95rem; }
.editor-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .45rem; }
.editor-row input { max-width: 16rem; padding: .5rem .7rem; }
.inline-check { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 500; font-size: .88rem; }
.mini-form { display: grid; gap: .45rem; padding: .6rem; margin: .4rem 0; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.mini-form input { padding: .5rem .7rem; }
.replace-inputs { display: grid; gap: .45rem; grid-template-columns: 1fr 1fr; }
.replace-preview { max-height: 18rem; overflow: auto; padding-left: 1.2rem; }
del { color: var(--danger); } ins { color: var(--ok); text-decoration: none; font-weight: 600; }
.history ul { padding-left: 1.2rem; margin: .3rem 0; }
.dictate.recording { color: #fff; background: var(--danger); border-color: var(--danger); }
.dictate-wrap { display: inline-flex; gap: .5rem; align-items: center; }
.player { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 20; width: min(1080px, calc(100% - 24px)); display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; padding: .55rem .8rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.player audio { display: none; }
.player button, .player select { padding: .4rem .7rem; font-size: .9rem; width: auto; }
.player-play { min-width: 2.6rem; }
.player-clock { font-variant-numeric: tabular-nums; font-weight: 650; }
.player-label { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .9rem; }
.player-loop { margin: 0; display: inline-flex; gap: .3rem; align-items: center; font-size: .88rem; }
body:has(.player) .container { padding-bottom: 7rem; }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.flag-list { display: grid; gap: .75rem; }
.flag-card { padding: .9rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--warn); background: var(--surface-2); }
.flag-card.high { border-left-color: var(--accent); } .flag-card.crit { border-left-color: var(--danger); }
.flag-card.handled { opacity: .65; }
.flag-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .35rem; }
.flag-text { margin: .2rem 0; }
.flag-card .muted.small { margin: .2rem 0; }
.suggestion { margin: .4rem 0; padding: .5rem .7rem; border-radius: 8px; background: var(--ok-soft); }
.notes-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 1.25rem; }
.notes-grid h3, .note-group h3 { font-size: 1rem; margin: 0 0 .3rem; }
.note-group { margin-top: 1rem; }
.note-row { display: flex; justify-content: space-between; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.note-main { display: flex; gap: .6rem; align-items: flex-start; min-width: 0; }
.note-main p { margin: .1rem 0; overflow-wrap: anywhere; }
audio.voice { display: block; height: 32px; margin-top: .3rem; max-width: 100%; }
.qa-list { display: grid; gap: .9rem; margin-top: 1rem; }
.qa { padding: .8rem 1rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.qa .q { margin-bottom: .4rem; } .qa .a { white-space: pre-wrap; margin: 0; }
.search-group h2 { display: flex; flex-wrap: wrap; gap: .3rem; align-items: baseline; }
.hits { list-style: none; padding: 0; margin: 0; display: grid; gap: .2rem; }
.hits a { display: grid; grid-template-columns: 5.5rem 8rem 1fr; gap: .6rem; padding: .45rem .5rem; border-radius: 8px; color: inherit; text-decoration: none; }
.hits a:hover { background: var(--surface-2); }
.hit-time { font-variant-numeric: tabular-nums; color: var(--brand); font-weight: 600; }
.hit-src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .segment { grid-template-columns: 5.5rem 1fr; } .segment .seg-tools { grid-column: 1 / -1; opacity: 1; }
  .hits a { grid-template-columns: 4.5rem 1fr; } .hit-src { display: none; }
  .replace-inputs { grid-template-columns: 1fr; }
  .transcript-tools { position: static; }
}
/* ---------------------------------------------------------------- documents (REQ-36) */
.doc-list { display: grid; gap: .9rem; margin-top: 1rem; }
.doc-card { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); scroll-margin-top: 120px; }
.doc-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.doc-icon { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .85rem; }
.doc-main { min-width: 0; }
.doc-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .4rem; }
.doc-head strong { overflow-wrap: anywhere; }
.doc-text { max-height: 28rem; overflow: auto; padding: .4rem .2rem; }
.doc-text p { margin: 0 0 .35rem; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) { .doc-card { grid-template-columns: 1fr; } }
