:root {
  color-scheme: light;
  --canvas: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-soft: #f4f5fa;
  --surface-strong: #e9ebf4;
  --ink: #111318;
  --muted: #676d78;
  --faint: #9aa0aa;
  --line: rgba(17, 19, 24, 0.08);
  --line-strong: rgba(17, 19, 24, 0.14);
  --primary: #050506;
  --blue: #346bf1;
  --red: #ff4641;
  --green: #34a853;
  --yellow: #fbbc04;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --panel-radius: 24px;
  --pill-radius: 999px;
  font-family:
    "Hanken Grotesk", Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.94), rgba(247, 245, 239, 0.84) 42%, rgba(228, 233, 229, 0.72) 100%),
    #f7f5ef;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#shaderCanvas {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.92;
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template:
    "top top top" 64px
    "main main main" minmax(0, 1fr)
    "foot foot foot" 64px / minmax(0, 1fr);
  gap: 0;
  width: 100vw;
  height: 100dvh;
  padding: 0;
}

.app-shell.is-source-collapsed {
  grid-template:
    "top top top" 64px
    "main main main" minmax(0, 1fr)
    "foot foot foot" 64px / minmax(0, 1fr);
}

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(22px);
}

.brand,
.topbar__actions,
.footer-group,
.prompt-meta,
.timer-row,
.ghost-pill,
.primary-pill {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 220px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.brand__name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: var(--pill-radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.segment {
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 54px;
  min-height: 30px;
  padding: 0 14px;
  border-radius: var(--pill-radius);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.segment small {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.segment.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.topbar__actions {
  justify-content: flex-end;
  gap: 10px;
  min-width: 320px;
}

.ghost-pill,
.primary-pill {
  min-height: 40px;
  border-radius: var(--pill-radius);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.ghost-pill {
  gap: 8px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  border: 1px solid var(--line);
  max-width: 210px;
}

.ghost-pill span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-pill {
  justify-content: center;
  padding: 0 22px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.icon {
  font-size: 16px;
}

.side-panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
  overflow: hidden;
}

.source-panel {
  position: fixed;
  z-index: 12;
  top: 80px;
  left: 24px;
  bottom: 80px;
  width: 288px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  margin: 0;
  padding: 18px;
  overflow: hidden;
}

.app-shell.is-source-collapsed .source-panel {
  display: none;
}

.source-panel-toggle {
  position: fixed;
  z-index: 12;
  top: 80px;
  left: 24px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 950;
  backdrop-filter: blur(26px);
}

.task-panel-toggle {
  position: fixed;
  z-index: 12;
  top: 80px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 950;
  backdrop-filter: blur(26px);
}

.source-panel-toggle[hidden],
.task-panel-toggle[hidden] {
  display: none;
}

.task-panel {
  position: fixed;
  z-index: 12;
  top: 80px;
  right: 24px;
  bottom: 80px;
  width: 288px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin: 0;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 70px rgba(15, 23, 42, 0.08);
}

.app-shell.is-task-collapsed .task-panel {
  display: none;
}

.panel-heading,
.list-header,
.progress-card__row,
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading {
  min-height: 42px;
}

.panel-heading h2,
.list-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
}

.panel-heading p,
.list-header p,
.microcopy,
.output-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mini-icon,
.panel-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.panel-close {
  flex: 0 0 30px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.panel-close:hover,
.source-panel-toggle:hover {
  background: var(--primary);
  color: #fff;
}

.stack {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.source-stack {
  grid-template-rows: auto auto minmax(66px, 0.55fr) auto;
  align-content: start;
  overflow: hidden;
}

.output-stack {
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.section-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-options {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.source-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.source-card.is-active {
  background: var(--surface-soft);
  color: var(--primary);
  border-color: rgba(0, 0, 0, 0.1);
}

.radio-dot {
  width: 15px;
  height: 15px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.source-card.is-active .radio-dot {
  border: 5px solid var(--primary);
}

.upload-card {
  display: grid;
  place-items: center;
  min-height: 66px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.upload-card:hover {
  background: var(--surface-soft);
  color: var(--primary);
}

.upload-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.upload-card__icon {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.settings-row {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.settings-row:hover {
  background: var(--surface-soft);
}

.output-card {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.output-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.output-card code {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 11px;
}

.recording-stage {
  grid-area: main;
  display: grid;
  grid-template-rows: auto minmax(0, auto) auto;
  justify-items: center;
  align-content: center;
  min-width: 0;
  min-height: 0;
  width: min(760px, calc(100vw - 120px));
  min-width: 0;
  margin: 0 auto;
  padding: 28px 20px 22px;
  text-align: center;
}

.app-shell.is-task-collapsed .recording-stage {
  width: min(920px, calc(100vw - 120px));
}

.prompt-area {
  width: min(860px, 100%);
  min-width: 0;
}

.prompt-meta {
  display: inline-grid;
  grid-template-columns: auto minmax(120px, 220px) minmax(0, 280px);
  justify-content: center;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.prompt-progress-label {
  padding: 5px 10px;
  border-radius: var(--pill-radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}

.prompt-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: var(--pill-radius);
  background: rgba(17, 19, 24, 0.08);
}

.prompt-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 240ms ease;
}

.prompt-next {
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-meta.is-compact {
  grid-template-columns: auto;
}

.prompt-meta.is-compact .prompt-progress-track,
.prompt-meta.is-compact .prompt-next {
  display: none;
}

.prompt-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  margin: 14px 0 0;
  padding: 0 18px;
  font-size: clamp(26px, 2.9vw, 38px);
  font-weight: 900;
  line-height: 1.32;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.recorder-surface {
  display: grid;
  justify-items: center;
  align-content: start;
  grid-template-rows: auto auto auto auto;
  gap: 14px;
  width: min(720px, 100%);
  min-height: 0;
  margin-top: 10px;
}

.status-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--pill-radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.status-dot--recording {
  background: var(--red);
  animation: pulse 1s infinite;
}

.status-strip.is-recording {
  background: rgba(255, 70, 65, 0.1);
  border-color: rgba(255, 70, 65, 0.24);
  color: var(--red);
}

.status-dot--pending {
  background: var(--yellow);
}

.status-dot--done {
  background: var(--blue);
}

.vocal-aura {
  position: relative;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  margin: 0;
}

.vocal-aura.is-recording .aura-ring {
  border-color: rgba(255, 70, 65, 0.34);
  animation-duration: 1.45s;
}

.vocal-aura.is-recording .aura-ring--two {
  box-shadow: 0 0 54px rgba(255, 70, 65, 0.18);
}

.aura-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  opacity: 0.5;
  animation: auraPulse 4s ease-in-out infinite;
}

.aura-ring--one {
  width: 88px;
  height: 88px;
}

.aura-ring--two {
  width: 130px;
  height: 130px;
  animation-delay: -1s;
}

.aura-ring--three {
  width: 170px;
  height: 170px;
  animation-delay: -2s;
}

.record-orb {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow:
    0 26px 44px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.record-orb:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
}

.record-orb:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.record-orb.is-recording {
  background: var(--red);
  box-shadow:
    0 26px 44px rgba(255, 70, 65, 0.32),
    0 0 0 16px rgba(255, 70, 65, 0.12);
}

.record-led {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.16);
}

.record-led.is-recording {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  animation: pulse 1s infinite;
}

.timer {
  min-width: 112px;
  color: var(--primary);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

#waveform {
  display: block;
  width: min(420px, 72vw);
  height: 82px;
  border: 0;
  background: transparent;
}

audio {
  width: min(420px, 78vw);
  height: 42px;
  opacity: 0.96;
  margin-top: 0;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

audio:not([src]) {
  display: none;
}

.control-row {
  display: none;
}

.shortcut-hints {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.list-header {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.list-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}

.icon-button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.task-list {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  margin: 0;
  padding: 14px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.task-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  list-style: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-list li::before {
  content: counter(list-item);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.task-list li.is-current {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.task-list li.is-current::before {
  content: "▶";
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 9px;
}

.task-list li.is-done {
  background: rgba(52, 168, 83, 0.1);
  color: var(--green);
}

.task-list li.is-done::before {
  content: "✓";
  border-color: rgba(52, 168, 83, 0.22);
  color: var(--green);
}

.progress-card {
  display: grid;
  gap: 12px;
  padding: 20px 22px;
  border-top: 1px solid var(--line);
  background: rgba(244, 245, 250, 0.82);
}

.progress-card__row {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-card__row strong {
  color: var(--ink);
  font-size: 14px;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: var(--pill-radius);
  background: #fff;
  border: 1px solid var(--line);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 240ms ease;
}

.progress-card__row--muted {
  align-items: flex-end;
  font-size: 11px;
}

.quality-badge {
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.status-footer {
  grid-area: foot;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 64px;
  padding: 0 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(22px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.footer-group {
  gap: 28px;
  min-width: 0;
}

.footer-group strong {
  color: var(--ink);
}

.footer-group--right {
  justify-content: flex-end;
}

.sample-rate-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
}

.sample-rate-control > span {
  padding: 0 7px;
  color: var(--muted);
}

.sample-rate-button {
  min-width: 34px;
  height: 24px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.sample-rate-button.is-active {
  background: var(--primary);
  color: #fff;
}

.sample-rate-button:disabled {
  opacity: 0.48;
}

.device-control {
  position: relative;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 330px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
}

.device-control > span {
  flex: 0 0 auto;
  padding: 0 7px;
  color: var(--muted);
}

.audio-input-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: min(210px, 24vw);
  min-width: 118px;
  height: 24px;
  min-height: 24px;
  padding: 0 8px 0 10px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.audio-input-trigger:hover,
.audio-input-trigger.is-open {
  background: rgba(17, 19, 24, 0.06);
}

.audio-input-trigger:focus-visible,
.refresh-device-button:focus-visible {
  outline: 2px solid rgba(17, 19, 24, 0.22);
  outline-offset: 2px;
}

.audio-input-trigger > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-input-caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.8;
  transition: transform 160ms ease;
}

.audio-input-trigger.is-open .audio-input-caret {
  transform: translateY(2px) rotate(225deg);
}

.audio-input-trigger:disabled {
  opacity: 0.48;
}

.audio-device-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  bottom: calc(100% + 10px);
  display: grid;
  gap: 4px;
  width: min(232px, calc(100vw - 40px));
  max-height: 176px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(24px);
  overflow-x: hidden;
  overflow-y: auto;
}

.audio-device-menu.is-left {
  right: 0;
  left: auto;
}

.audio-device-menu::-webkit-scrollbar {
  width: 4px;
}

.audio-device-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.22);
}

.audio-device-option {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 34px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-device-option:hover {
  background: rgba(17, 19, 24, 0.06);
}

.audio-device-option.is-selected {
  background: var(--primary);
  color: #fff;
}

.refresh-device-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.refresh-device-button:disabled {
  opacity: 0.48;
}

.system-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(52, 168, 83, 0.12);
}

.toast-region {
  position: fixed;
  z-index: 30;
  top: 82px;
  right: 24px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(22px);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.38;
  }
}

@keyframes auraPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.18;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.5;
  }
}

@media (max-width: 1120px) {
  body {
    overflow-y: auto;
  }

  .app-shell {
    grid-template:
      "top" auto
      "main" auto
      "left" auto
      "right" 420px
      "foot" auto / minmax(0, 1fr);
    height: auto;
    min-height: 100dvh;
    padding: 0;
  }

  .app-shell.is-source-collapsed {
    grid-template:
      "top" auto
      "main" auto
      "left" auto
      "right" 420px
      "foot" auto / minmax(0, 1fr);
  }

  .topbar,
  .status-footer {
    position: sticky;
    z-index: 5;
  }

  .topbar {
    top: 0;
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    padding: 12px 18px;
  }

  .topbar__actions,
  .brand {
    min-width: 0;
  }

  .source-panel {
    position: static;
    grid-area: left;
    width: auto;
    height: auto;
    margin: 0 18px;
    max-height: none;
  }

  .source-panel-toggle {
    position: static;
    grid-area: left;
    justify-self: start;
    margin: 0 18px;
  }

  .task-panel-toggle {
    position: static;
    grid-area: right;
    justify-self: start;
    margin: 0 18px;
  }

  .task-panel {
    position: static;
    grid-area: right;
    width: auto;
    height: auto;
    margin: 0 18px;
    min-height: 0;
  }

  .recording-stage {
    width: min(860px, calc(100vw - 36px));
    min-width: 0;
    min-height: 680px;
  }

  .status-footer {
    bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 14px 18px;
  }

  .footer-group {
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 0;
  }

  .topbar__counts {
    order: 3;
    width: 100%;
  }

  .topbar__actions {
    width: 100%;
  }

  .ghost-pill,
  .primary-pill {
    flex: 1;
  }

  .recording-stage {
    min-height: 610px;
    padding: 14px 0;
  }

  .prompt-text {
    min-height: 118px;
    padding: 0 12px;
    font-size: 24px;
    line-height: 1.35;
  }

  .vocal-aura {
    width: 180px;
    height: 180px;
  }

  .aura-ring--three {
    width: 160px;
    height: 160px;
  }
  }

  .shortcut-hints {
    white-space: normal;
  }
}
