:root {
  color-scheme: light;
  --paper: #f5f3ed;
  --ink: #202724;
  --muted: #77807a;
  --line: #d9dcd4;
  --moss: #52735c;
  --moss-dark: #355a43;
  --coral: #c45b47;
  --yellow: #e5c966;
  --sans: 'Avenir Next', 'Trebuchet MS', sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
.topbar { height: 68px; padding: 0 max(24px, calc((100vw - 1040px) / 2)); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 600; }
.brand b { color: var(--moss); }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; background: var(--moss-dark); color: #fff; display: grid; place-items: center; font: 500 15px var(--serif); }
.network-state { font: 11px var(--mono); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.network-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.network-state.online i { background: #57986b; }
main { max-width: 1040px; margin: auto; padding: 0 24px; }
.capture { padding: 54px 0 40px; border-bottom: 1px solid var(--line); background-image: radial-gradient(#c7c9bf 0.55px, transparent 0.55px); background-size: 9px 9px; background-position: right 22px top 28px; background-repeat: no-repeat; }
.section-kicker { display: flex; justify-content: space-between; color: var(--muted); font: 10px var(--mono); letter-spacing: 0; }
h1 { margin: 24px 0 11px; font: 500 clamp(42px, 7vw, 72px)/0.99 var(--serif); letter-spacing: 0; }
h1 em { color: var(--moss); font-weight: 500; }
.intro { color: #606b63; margin: 0 0 28px; font-size: 14px; }
.recorder-row { max-width: 590px; min-height: 78px; margin-inline: auto; padding: 14px 18px 14px 14px; display: flex; align-items: center; gap: 16px; background: #fffefa; border: 1px solid var(--line); }
.record-button { width: 50px; height: 50px; border: 0; border-radius: 50%; background: var(--coral); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; transition: background .2s ease, transform .2s ease; }
.record-button:hover { transform: scale(1.04); }
.record-button.recording { background: var(--ink); }
.record-dot { width: 14px; height: 14px; border-radius: 50%; background: white; }
.record-button.recording .record-dot { width: 15px; height: 15px; border-radius: 3px; }
.record-copy { display: grid; gap: 4px; flex: 1; }
.record-copy strong { font-size: 14px; font-weight: 600; }
.record-copy span { color: var(--muted); font-size: 12px; }
.audio-level { width: min(120px, 100%); height: 3px; overflow: hidden; background: #e4e3dc; }
.audio-level[hidden] { display: none; }
.audio-level span { display: block; width: 0; height: 100%; background: var(--moss); transition: width .08s linear; }
#record-time { color: var(--muted); font: 12px var(--mono); font-variant-numeric: tabular-nums; }
.record-meter { height: 2px; max-width: 590px; margin-inline: auto; background: #e4e3dc; }
.record-meter span { display: block; height: 100%; width: 0; background: var(--coral); transition: width .25s linear; }
.capture-message { height: 20px; max-width: 590px; margin-inline: auto; padding-top: 6px; color: var(--muted); font-size: 11px; text-align: center; }
.queue-section, .archive-section { padding: 30px 0 34px; border-bottom: 1px solid var(--line); }
.section-heading { position: relative; display: flex; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.section-heading .section-kicker { justify-content: center; }
h2 { margin: 8px 0 0; font: 500 25px/1.1 var(--serif); }
#queue-count { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-left: 5px; border-radius: 50%; background: #e6e7df; color: var(--moss-dark); font: 11px var(--mono); vertical-align: 3px; }
.icon-button { position: absolute; right: 0; width: 38px; height: 38px; border: 1px solid var(--line); background: transparent; color: var(--moss-dark); font-size: 22px; cursor: pointer; }
.icon-button:disabled { opacity: .4; cursor: wait; }
.queue-list, .archive-list { list-style: none; margin: 16px 0 0; padding: 0; }
.queue-item, .archive-item { display: flex; align-items: flex-start; gap: 15px; padding: 14px 0; border-top: 1px solid #e3e4dd; animation: reveal .35s ease both; }
.queue-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; background: #e5e8df; color: var(--moss-dark); font-size: 14px; }
.item-body { flex: 1; min-width: 0; }
.item-top { display: flex; justify-content: space-between; gap: 12px; }
.item-name { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.item-meta { margin-top: 5px; color: var(--muted); font: 10px var(--mono); }
.item-status { color: var(--moss-dark); font: 10px var(--mono); white-space: nowrap; }
.delete-note { width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid var(--line); background: transparent; color: var(--coral); font: 20px/1 var(--sans); cursor: pointer; }
.delete-note:disabled { opacity: .45; cursor: wait; }
.empty-state { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.archive-heading { align-items: end; }
.archive-item { padding: 16px 0; }
.archive-date { width: 72px; flex: 0 0 auto; color: var(--muted); font: 10px/1.5 var(--mono); }
.archive-transcript { width: 100%; min-height: 56px; resize: vertical; border: 0; border-bottom: 1px solid #e2e3dc; outline: 0; padding: 0 0 9px; background: transparent; color: var(--ink); font: 13px/1.55 var(--sans); }
.archive-transcript:focus { border-bottom-color: var(--moss); }
.save-transcript { margin-top: 7px; border: 0; padding: 0; color: var(--moss-dark); background: transparent; font: 11px var(--mono); cursor: pointer; }
.archive-status { color: var(--muted); font: 10px var(--mono); margin-top: 7px; }
footer { max-width: 1040px; margin: auto; padding: 18px 24px calc(18px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font: 9px var(--mono); }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .topbar { height: 58px; padding: 0 18px; }
  main { padding: 0 18px; }
  .capture { padding: 38px 0 30px; background-position: right 8px top 25px; }
  h1 { font-size: 48px; }
  .recorder-row { gap: 12px; padding-right: 12px; }
  .record-button { width: 46px; height: 46px; }
  .record-copy strong { font-size: 12px; }
  .record-copy span { font-size: 10px; }
  h2 { font-size: 23px; }
  .archive-date { width: 60px; font-size: 9px; }
  footer { padding-left: 18px; padding-right: 18px; font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }