:root {
  --ink: #172326;
  --muted: #6e7e7b;
  --paper: #f3f4f4;
  --card: #ffffff;
  --green: #286b5b;
  --lime: #d7e85f;
  --line: #dcd8ca;
  --warn: #b55435;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, "Noto Sans SC", system-ui, sans-serif; }
main { max-width: 1200px; margin: auto; padding: 28px 28px 56px; }
.pill { margin-left: auto; padding: 7px 12px; border: 1px solid var(--line); border-radius: 30px; font-size: 12px; background: var(--card); }
.workspace { display: grid; grid-template-columns: 320px 1fr; border: 1px solid var(--line); background: var(--card); min-height: 570px; margin-top: 12px; box-shadow: 0 20px 70px #263b3212; }
aside { padding: 24px; border-right: 1px solid var(--line); }
.mic-panel { height: 126px; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: #f8f9f9; }
.mic-panel span { font-size: 11px; color: var(--muted); margin-top: 8px; }
.file-panel { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.file-panel label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 700; }
.file-panel input { width: 100%; font: inherit; font-size: 12px; }
.file-panel p { font-size: 11px; line-height: 1.6; color: var(--muted); }
.file-panel button { margin-top: 0; }
button.primary, button.secondary { width: 100%; border: 0; padding: 13px; margin-top: 16px; font-weight: 800; cursor: pointer; }
.primary { background: var(--green); color: white; }
.secondary { background: #e7e4d8; color: var(--ink); }
button:disabled { opacity: .4; cursor: not-allowed; }
.license { font-size: 10px; color: var(--muted); margin-top: 20px; }
.transcript { display: flex; flex-direction: column; min-width: 0; }
.transcript-head { padding: 20px 25px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; }
.transcript-head time { font-variant-numeric: tabular-nums; color: var(--muted); }
#progress { padding: 8px 25px; color: var(--muted); font-size: 12px; }
#progress:empty { display: none; }
#statusDot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #aaa; margin-right: 8px; }
.running #statusDot { background: var(--lime); box-shadow: 0 0 0 5px #d7e85f33; }
.empty { margin: auto; text-align: center; color: var(--muted); }
.wave { font-size: 29px; color: var(--green); letter-spacing: 4px; }
.empty p { font-size: 12px; }
#segments { padding: 20px 25px; overflow: auto; max-height: 500px; }
.segment { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 15px; padding: 14px 0; border-bottom: 1px solid #ebe8dc; }
.who { font-size: 11px; font-weight: 800; color: var(--speaker, #286b5b); }
.who time { display: block; color: var(--muted); font-weight: 400; margin-top: 5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.words { line-height: 1.65; overflow-wrap: anywhere; }
.words.partial { color: var(--muted); }
.stable { color: var(--ink); }
.unstable { border-bottom: 1px dotted #999; }
.downloads { padding: 18px 25px; border-top: 1px solid var(--line); margin-top: auto; }
.downloads a { display: inline-block; margin: 4px 8px 4px 0; color: var(--green); font-size: 12px; }
.error { color: var(--warn) !important; }

@media (max-width: 760px) {
  main { padding: 18px; }
  .workspace { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); }
  .transcript { min-height: 500px; }
  .segment { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
