:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --ink: #17211b;
  --muted: #69736d;
  --panel: #ffffff;
  --line: #d9ddd6;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.workspace {
  display: grid;
  gap: 18px;
}

.topbar,
.actions,
.recorder {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.panel,
.prompt {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.identity {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 12px;
  max-width: 520px;
}

.identity input,
.identity select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  padding: 12px 14px;
  outline: none;
}

label,
.prompt span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  padding: 12px 14px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 132px;
  line-height: 1.8;
  font-size: 20px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.prompt p {
  margin: 0;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.7;
}

.recorder {
  background: #e8eee9;
  border-radius: 8px;
  padding: 12px;
}

button,
.export {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 14px;
  text-decoration: none;
  white-space: nowrap;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

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

.meter {
  flex: 1;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ccd5cf;
}

#durationBar {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 120ms linear;
}

#timer {
  min-width: 56px;
  text-align: right;
  font-weight: 700;
}

audio {
  width: 100%;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.transcript {
  min-height: 132px;
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  line-height: 1.8;
  font-size: 20px;
  background: #fbfcfb;
}

#status {
  margin: 0;
  color: var(--muted);
}

#status.error {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 760px) {
  .topbar,
  .actions,
  .recorder {
    align-items: stretch;
    flex-direction: column;
  }

  .row {
    grid-template-columns: 1fr;
  }

  button,
  .export {
    width: 100%;
    text-align: center;
  }
}
