:root {
  color-scheme: light;
  --bg: #f5f3ef;
  --ink: #181716;
  --muted: #6f6a62;
  --line: #d8d2c7;
  --panel: #fffdf8;
  --accent: #1f7a6a;
  --accent-ink: #ffffff;
  --warn: #9a5b12;
}

* { box-sizing: border-box; }

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

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

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

.header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

.status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}

.form {
  margin-top: 28px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

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

input {
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  background: #fff;
}

button {
  height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  font: inherit;
  font-weight: 800;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: progress;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.step {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.step.active {
  border-color: var(--accent);
  background: #edf8f5;
}

.step span, .meta, .note {
  color: var(--muted);
}

.result {
  margin-top: 16px;
}

.hidden { display: none; }

.audio-card {
  display: grid;
  gap: 14px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.meta-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.meta-box strong {
  display: block;
  margin-bottom: 4px;
}

audio {
  width: 100%;
}

.error {
  color: #7c1f1f;
  font-weight: 800;
}

@media (max-width: 760px) {
  .row, .workflow, .meta-grid {
    grid-template-columns: 1fr;
  }

  .header {
    display: grid;
  }

  .actions button {
    width: 100%;
  }
}
