:root {
  color-scheme: light;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, Inter, "PingFang SC", sans-serif;
  color: #182131;
  background: #f3f5fa;
  --muted: #566274;
  --line: #dce3ed;
  --surface: #fff;
  --control: #f3f6fa;
  --blue: #075dce;
  --blue-dark: #004caf;
  --blue-tint: #e8f2ff;
  --danger: #af263b;
  --radius: 16px;
  --shadow: 0 2px 5px #20375007, 0 12px 32px #20375008;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p { margin: 0; }
h1 { font-size: clamp(34px, 4.1vw, 52px); line-height: 1.13; letter-spacing: -.055em; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.025em; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
.muted { color: var(--muted); }

button, input, select, textarea { font: inherit; color: inherit; }
button, input, select, textarea {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #d3dce9;
  border-radius: 9px;
  background: var(--surface);
}
button, summary { cursor: pointer; }
button {
  font-weight: 650;
  transition: background-color .15s, border-color .15s;
}
button:not(:disabled):hover { background: #f0f5fc; border-color: #c1d0e4; }
button:disabled { color: #4f5e72; background: #eef2f7; border-color: #e0e6ee; cursor: default; }
button:focus-visible, select:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, summary:focus-visible, audio:focus-visible {
  outline: 3px solid #427fdd;
  outline-offset: 3px;
}
button.primary:not(:disabled) {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 2px 4px #075dce24, inset 0 1px #ffffff26;
}
button.primary:not(:disabled):hover { background: var(--blue-dark); border-color: var(--blue-dark); }
button.plain { background: transparent; border-color: transparent; }
button.plain:not(:disabled):hover { border-color: transparent; }
button.plain:disabled { opacity: .65; }
button.danger:not(:disabled) { color: var(--danger); }
button.danger-button:not(:disabled), #cleanup-delete:not(:disabled) {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}
button.danger-button:not(:disabled):hover, #cleanup-delete:not(:disabled):hover {
  background: #952034;
  border-color: #952034;
}

.shell { min-height: 100vh; min-height: 100dvh; }
html { scrollbar-gutter: stable; }
body:has(dialog[open]) { overflow: hidden; }
.app-bar { position: sticky; top: 0; z-index: 5; background: #f8faffed; backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
#control-heading, #archive-title { scroll-margin-top: 100px; }
.app-bar-inner { max-width: 1120px; margin: auto; display: flex; align-items: center; gap: 20px; padding: 14px 32px; }
.menu-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; flex-shrink: 0; }
.menu-button { background: transparent; border-color: transparent; color: var(--muted); font-size: 13px; }
.menu-button svg, .icon-button svg, .nav-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-button { width: 44px; padding: 8px; background: var(--control); border-color: transparent; }
.app-bar .device-switch { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.app-bar .device-switch select { width: 230px; min-height: 44px; }
.app-bar .device-switch > span { white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand strong { font-size: 17px; letter-spacing: -.025em; }
.mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  color: white;
  border-radius: 12px;
  background: linear-gradient(145deg, #4799fa, #075dce);
  box-shadow: inset 0 1px #ffffff55, 0 3px 7px #1468ba24;
}
.device-switch, .date-label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.device-switch select, .date-label input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  color: #182131;
  font-size: 14px;
}
.device-switch select { font-weight: 650; }
.days { display: grid; gap: 4px; margin: 0; max-height: 260px; overflow: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.days button { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: transparent; border-color: transparent; min-height: 44px; padding: 8px 10px; white-space: nowrap; font-size: 13px; }
.days button[aria-current="date"], .days button[aria-current="date"]:hover { background: var(--blue-tint); border-color: #d4e4fc; color: #084d9f; }
.days span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.disk-card {
  min-width: 0;
  padding: 10px 11px 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f9fbff;
}
.disk-head, .disk-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.disk-head h2 { font-size: 13px; }
.disk-head button { min-height: 34px; padding: 3px 8px; font-size: 12px; }
.disk-foot { min-height: 32px; }
.disk-foot button { min-height: 32px; padding: 3px 4px; white-space: nowrap; font-size: 12px; color: var(--blue-dark); }
#disk-status { color: var(--muted); font-size: 11px; }
.disk-card meter { display: block; width: 100%; height: 12px; margin: 6px 0 3px; accent-color: var(--blue); }
.disk-stats { display: grid; gap: 4px; margin: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.disk-stats div { display: flex; justify-content: space-between; gap: 7px; }
.disk-stats dt { color: var(--muted); }
.disk-stats dd { margin: 0; }

main { width: 100%; max-width: 1080px; margin-inline: auto; padding: 36px 32px 56px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.top h1 { font-size: 40px; }
.top .date-label { flex-shrink: 0; }
.top .date-label input { min-height: 44px; }
.top .muted { margin-top: 6px; }
.controls, .archive, .pairing {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.record-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, .66fr);
  gap: 17px 20px;
  padding: 23px;
  background: linear-gradient(124deg, #fff 25%, #f2f7ff 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 650; margin-bottom: 5px; }
#control-heading { font-size: clamp(23px, 3vw, 32px); overflow-wrap: anywhere; }
.connection-note { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 13px; }
.connection-note::before {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  border-radius: 50%;
  background: #748298;
}
.connection-note[data-ready="true"]::before { background: #198153; }
.controls[data-recording="true"] .connection-note::before { background: #c22940; }
.wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vw, 12px);
  min-width: 0;
  min-height: 76px;
  padding-inline: 8px;
}
.wave span {
  width: clamp(4px, .67vw, 9px);
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(#84b8fa, #b2d5ff);
}
.wave span:nth-child(2n) { height: 27px; }
.wave span:nth-child(3n) { height: 39px; }
.wave span:nth-child(4), .wave span:nth-child(8) { height: 53px; }
.wave span:nth-child(6) { height: 70px; }
.controls[data-recording="true"] .wave span { background: linear-gradient(#f18f9d, #f8bdc6); }
.control-options {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px 18px;
}
.buttons, .fields { display: flex; align-items: center; gap: 8px; }
.buttons button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  white-space: nowrap;
}
.record-dot, .stop-square { flex: 0 0 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stop-square { border-radius: 1.5px; }
#stop:not(:disabled) { color: var(--danger); background: #fdf1f3; border-color: #f2cbd2; }
.fields label { color: var(--muted); white-space: nowrap; font-size: 13px; }
.fields select { min-height: 44px; }
.listen-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
}
.listen-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue-dark);
}
.listen-icon::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 4px;
  background: currentColor;
  box-shadow: -6px 0 0 -1px currentColor, 6px 0 0 -1px currentColor;
}
.listen-row strong { font-size: 14px; }
.listen-row .muted { font-size: 12px; overflow-wrap: anywhere; }
#listen-note:empty { display: none; }
.listen-row button { min-height: 44px; white-space: nowrap; }
.listen-row button:not(:disabled) { background: var(--blue-tint); color: var(--blue-dark); border-color: #d5e6fd; }

#notice:not(:empty), .storage-warning {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 10px;
  padding: 9px 12px;
  font-size: 13px;
}
#notice:not(:empty) { background: var(--blue-tint); color: #17497f; }
#notice.error:not(:empty), .form-error, #login-error { color: var(--danger); }
.storage-warning { background: #fff7e6; color: #724705; border-color: #edd4a5; }

.archive { margin-top: 23px; padding: 19px 20px 20px; }
.archive-head, .archive-heading, .archive-tools { display: flex; align-items: center; gap: 8px; }
.archive-head { justify-content: space-between; flex-wrap: wrap; margin-bottom: 11px; }
.archive-heading h2, .archive-tools button { white-space: nowrap; }
.archive-tools button { min-height: 38px; font-size: 13px; }
.tag {
  padding: 2px 8px;
  border-radius: 12px;
  color: #435571;
  background: #edf2fa;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  white-space: nowrap;
}
.archive-scope {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 11px;
}
.archive-scope select { min-height: 40px; max-width: calc(100% - 67px); }
.empty {
  padding: 32px 15px;
  border: 1px dashed #ccd8e9;
  border-radius: 12px;
  background: #f8faff;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty strong { display: block; margin-bottom: 4px; font-size: 16px; color: #263753; }
#records { display: grid; gap: 8px; }
.hour {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.hour-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 8px 13px;
  list-style: none;
}
.hour-summary::-webkit-details-marker, .pairing > summary::-webkit-details-marker { display: none; }
.hour-summary::before, .pairing > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border: solid #58709a;
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
}
.hour[open] > .hour-summary::before, .pairing[open] > summary::before { transform: rotate(45deg); }
.hour[open] > .hour-summary { background: #f5f8fd; border-radius: 10px 10px 0 0; }
.hour-label, .clip-time { font-variant-numeric: tabular-nums; }
.hour-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.hour-content { padding: 0 13px; border-top: 1px solid var(--line); }
.record { padding: 8px 0; }
.record + .record { border-top: 1px solid var(--line); }
.record-header, .rec-actions, .part, .clip-label { display: flex; align-items: center; gap: 7px 12px; flex-wrap: wrap; }
.record-header, .part { justify-content: space-between; }
.record-title { color: #364861; font-size: 13px; overflow-wrap: anywhere; }
.rec-actions a, .rec-actions button { font-size: 13px; }
.record-status { padding: 6px 0; font-size: 12px; }
.part { padding: 6px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.part audio { display: block; width: min(100%, 330px); height: 40px; }
.clip-time { font-weight: 650; color: #182131; font-size: 14px; }

.pairing { margin-top: 15px; padding: 0 16px; }
.pairing > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  list-style: none;
  font-weight: 650;
}
.pairing[open] { padding-bottom: 15px; }
.pairing p, .pairing label { font-size: 13px; }
.pairing form { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pairing label { display: grid; gap: 5px; font-weight: 650; }
.pairing textarea { width: 100%; margin: 5px 0 7px; font-family: ui-monospace, monospace; resize: vertical; }
#pair-result { margin-top: 12px; padding: 12px; border-radius: 11px; background: var(--control); }
#pair-result p { margin-top: 7px; }
#pair-error:not(:empty) { color: var(--danger); margin-top: 7px; }
.offline-install { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.offline-install summary { padding: 8px 0; }

dialog {
  width: min(450px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: clamp(15px, 4vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #182131;
  background: var(--surface);
  box-shadow: 0 20px 55px #1223402b;
  overflow: auto;
}
dialog::backdrop { background: #17283e60; backdrop-filter: blur(4px); }
dialog h2 { margin-bottom: 5px; }
dialog p { font-size: 13px; }
dialog label { display: block; margin: 13px 0 4px; font-weight: 650; font-size: 13px; }
dialog input, dialog select { width: 100%; min-height: 44px; font-size: 16px; }
.cleanup-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.cleanup-actions button { min-height: 44px; }
#export-note, #cleanup-preview, .form-error:not(:empty) { margin-top: 8px; }

/* Navigation is a modal drawer on both phone and desktop. */
#navigation {
  inset: 0 auto 0 0;
  width: min(360px, calc(100% - 28px));
  height: 100%; height: 100dvh;
  max-height: none;
  margin: 0; padding: 0;
  border: 0; border-right: 1px solid var(--line);
  border-radius: 0 24px 24px 0;
  background: #f5f7fb;
  overflow: hidden;
}
#navigation[open] { display: flex; flex-direction: column; animation: drawer-enter .18s ease-out; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(24px, env(safe-area-inset-top)) 20px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.drawer-head h2 { margin: 0 0 4px; font-size: 23px; }
.drawer-head p { color: var(--muted); font-size: 12px; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 16px; display: flex; flex-direction: column; gap: 22px; }
.nav-group { border: 1px solid var(--line); border-radius: 14px; background: white; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; border: 0; border-radius: 0; padding: 13px 12px; text-align: left; font-size: 14px; background: transparent; }
.nav-item:first-child { border-radius: 13px 13px 0 0; }
.nav-item:last-child { border-radius: 0 0 13px 13px; }
.nav-item + .nav-item { border-top: 1px solid #e9edf4; }
.nav-item small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); font-weight: 400; }
.nav-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; background: var(--blue-tint); color: var(--blue); }
.nav-arrow { margin-left: auto; color: #728097; font-size: 23px; font-weight: 400; }
.nav-section h3 { margin: 0 0 8px 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.dates-panel { border: 1px solid var(--line); border-radius: 14px; background: white; }
.dates-panel > summary { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px; font-size: 14px; font-weight: 650; list-style: none; }
.dates-panel > summary::-webkit-details-marker { display: none; }
.dates-panel > summary .muted { margin-left: auto; font-size: 12px; font-weight: 400; }
.dates-panel > summary::after { content: ""; width: 7px; height: 7px; border: solid #71819b; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: 0 3px 4px; }
.dates-panel[open] > summary::after { transform: rotate(225deg); margin-bottom: 0; }
.drawer-body .disk-card { padding: 10px 12px; background: white; flex-shrink: 0; }
.drawer-body .disk-head h2 { font-size: 14px; margin: 0; }
.drawer-body .disk-head button, .drawer-body .disk-foot button { min-height: 44px; font-size: 13px; }
.drawer-body .disk-foot { margin-top: 3px; }
.drawer-body #disk-status { font-size: 12px; }
.drawer-body .disk-stats { gap: 7px; padding-block: 6px; }
.drawer-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex-shrink: 0; background: #f5f7fb; }
.drawer-foot span { color: var(--muted); font-size: 12px; }
.drawer-foot button { min-height: 44px; font-size: 13px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
#devices-dialog { width: min(560px, calc(100% - 24px)); }
.managed-devices { display: grid; gap: 8px; }
.managed-device { display: flex; align-items: center; gap: 10px; padding: 12px; width: 100%; text-align: left; min-height: 64px; background: var(--control); }
.managed-device > span:first-child { min-width: 0; }
.managed-device strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.managed-device small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.managed-device .device-choice { margin-left: auto; white-space: nowrap; font-size: 12px; font-weight: 500; color: var(--muted); }
.managed-device[aria-pressed="true"] { border-color: #9cc4fa; background: var(--blue-tint); }
.managed-device[aria-pressed="true"] .device-choice { color: var(--blue-dark); }
.device-location { margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.device-location-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.device-location-head .buttons { flex-wrap: wrap; }
.device-location h3 { margin: 0; font-size: 14px; }
.device-location button { min-height: 44px; }
.device-location p { margin: 8px 0; font-size: 13px; }
.device-location details { font-size: 13px; }
#location-command { display: block; width: 100%; margin: 8px 0; background: var(--control); font: 16px/1.4 ui-monospace, monospace; resize: vertical; }
.location-details { display: grid; gap: 4px; margin: 12px 0 4px; }
.location-details > div { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
.location-details dt { color: var(--muted); }
.location-details dd { margin: 0; overflow-wrap: anywhere; }
#location-map { display: inline-flex; align-items: center; min-height: 44px; }
#devices-dialog .pairing { box-shadow: none; margin-top: 20px; padding-inline: 12px; }
#devices-dialog .pairing label { margin: 0; flex: 1; min-width: 0; }
#devices-dialog .pairing input { width: 100%; }
#devices-dialog .pairing button { min-height: 44px; }
#devices-dialog .pairing textarea { font-size: 16px; }
.pairing > summary small { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.install-methods { display: grid; gap: 8px; margin-top: 12px; }
.install-methods section { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--control); }
.install-methods h3 { margin: 0 0 5px; font-size: 13px; }
.install-methods p { font-size: 12px; }
.install-methods a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 650; }
.device-danger { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }
.device-danger p { overflow-wrap: anywhere; }
.device-danger button { min-height: 44px; padding-left: 0; margin-top: 6px; font-size: 13px; }
@keyframes drawer-enter { from { transform: translateX(-100%); } to { transform: translateX(0); } }

.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 18px;
  background: radial-gradient(ellipse at 55% 0%, #dceaff, #f2f5fb 59%, #f7f8fc 100%);
}
.login-card {
  width: min(100%, 404px);
  padding: clamp(24px, 5vw, 36px);
  border: 1px solid #e3eaf4;
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 18px 70px #254d8217, 0 2px 8px #17385b09;
}
.login-card .mark { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 16px; }
.login-card h1 { font-size: 33px; text-align: center; }
.login-card > .muted { margin-top: 6px; text-align: center; font-size: 14px; }
.login-card label { display: block; margin-top: 21px; margin-bottom: 5px; font-size: 13px; font-weight: 650; }
.login-card input, .login-card button { width: 100%; min-height: 46px; font-size: 16px; }
.login-card input { background: #fafcff; }
.login-card button { margin-top: 10px; }
#login-error:not(:empty) { margin-top: 9px; font-size: 13px; }
#login-message:empty { display: none; }

@media (max-width: 760px) {
  #control-heading, #archive-title { scroll-margin-top: calc(144px + env(safe-area-inset-top)); }
  .app-bar-inner { padding: 8px 16px 12px; gap: 4px 10px; flex-wrap: wrap; }
  .app-bar .brand { margin-left: auto; }
  .brand .mark { width: 30px; height: 30px; border-radius: 9px; }
  .brand strong { font-size: 16px; }
  .menu-button { padding-inline: 4px 8px; }
  .app-bar .device-switch { flex-basis: 100%; margin: 2px 0 0; }
  .app-bar .device-switch select { flex: 1; width: 0; font-size: 16px; }
  main { padding: 22px 16px max(28px, env(safe-area-inset-bottom)); }
  .top { margin-bottom: 18px; gap: 10px; }
  .top h1 { font-size: 28px; letter-spacing: -.04em; }
  .top .muted { margin-top: 4px; font-size: 12px; }
  .top .date-label { font-size: 11px; gap: 3px; width: 140px; }
  .top .date-label input { font-size: 16px; padding: 6px; }
  .record-panel { grid-template-columns: minmax(0, 1fr) 79px; padding: 13px; gap: 10px 5px; }
  #control-heading { font-size: 21px; }
  .wave { gap: 3px; padding: 0; min-height: 50px; }
  .wave span { width: 4px; max-height: 38px; }
  .wave span:nth-child(2n) { max-height: 23px; }
  .wave span:nth-child(6) { max-height: 48px; }
  .control-options { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 5px; }
  .buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .buttons button { min-height: 46px; padding-inline: 7px; }
  .fields { justify-content: flex-end; }
  .fields select { padding-block: 4px; }
  .fields select, .device-switch select, .archive-scope select, .pairing input, .pairing textarea { font-size: 16px; }
  .listen-row { padding: 9px 12px; gap: 7px; }
  .listen-icon { width: 27px; height: 29px; }
  .listen-row button { padding-inline: 7px; font-size: 13px; }
  .archive { margin-top: 14px; padding: 11px; }
  .archive-head { gap: 6px; margin-bottom: 8px; }
  .archive-tools button { min-height: 44px; padding-inline: 6px; font-size: 12px; }
  .archive-heading { gap: 5px; }
  .archive-heading h2 { font-size: 17px; }
  .tag { padding-inline: 5px; }
  .archive-scope select, .part button, .pairing button, .pairing input { min-height: 44px; }
  .rec-actions a { display: inline-flex; align-items: center; min-height: 44px; }
  .rec-actions button { min-height: 44px; }
  .record-header { column-gap: 6px; }
  .part audio { flex-basis: 100%; height: 44px; }
  .pairing input { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
  #navigation[open] { animation: none; }
}
