:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --ink: #17211d;
  --muted: #64706a;
  --panel: #ffffff;
  --line: #dbe3dd;
  --teal: #0f766e;
  --teal-dark: #0b5c55;
  --gold: #b7791f;
  --rose: #b42318;
  --shadow: 0 18px 60px rgba(23, 33, 29, 0.1);
}

* {
  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(720px, 100%);
  margin: 0 auto;
  padding: 20px 14px 80px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 2rem;
  line-height: 1;
}

h2 {
  font-size: 1rem;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef6f2;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  white-space: nowrap;
}

.panel {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  margin-bottom: 12px;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

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

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

textarea {
  resize: vertical;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
}

.primary {
  background: var(--teal);
}

.primary:hover {
  background: var(--teal-dark);
}

.secondary {
  background: #263a33;
}

.secondary:hover {
  background: #1b2d27;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  background: #fbfcfb;
  color: var(--teal-dark);
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.file-box {
  border: 1px dashed #a7b9ae;
  border-radius: 8px;
  background: #fbfcfb;
  padding: 14px;
}

.file-box input {
  border: 0;
  padding: 0;
}

.file-box span {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.recordings {
  display: grid;
  gap: 10px;
}

.recording {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.recording strong,
.recording span {
  display: block;
  overflow-wrap: anywhere;
}

.recording strong {
  font-size: 0.95rem;
}

.recording span {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.recording-actions {
  display: flex;
  gap: 8px;
}

.player {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  width: calc(100% - 28px);
  max-width: 692px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 18px;
  z-index: 3;
  max-width: 692px;
  margin: 0 auto;
  border-radius: 8px;
  background: #17211d;
  color: #fff;
  padding: 12px 14px;
  transform: translateY(140%);
  transition: transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
}

.toast.error {
  background: var(--rose);
}

.toast.warn {
  background: var(--gold);
}

@media (max-width: 520px) {
  .shell {
    padding-top: 14px;
  }

  .form-grid,
  .recording {
    grid-template-columns: 1fr;
  }

  .recording-actions {
    justify-content: stretch;
  }

  .recording-actions .icon-button {
    flex: 1;
  }
}
