/* Recording panel — plain CSS, no framework, works on a phone. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #e3e6ea;
  --text: #15181d;
  --text-2: #6b7280;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px 48px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body.centre { display: grid; place-items: center; min-height: 100vh; padding: 16px; }

h1 { font-size: 20px; margin: 0 0 2px; }
h2 { font-size: 17px; margin: 0 0 2px; }
p { margin: 0 0 8px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 880px; margin: 0 auto; padding: 24px 0 8px;
}

main { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.card.empty { text-align: center; padding: 48px 18px; }

.login { width: min(360px, 100%); display: flex; flex-direction: column; gap: 10px; }
.login label { font-size: 13px; color: var(--text-2); }
.login input {
  width: 100%; padding: 10px 12px; font: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
}

.episode-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: #eef0f3; color: var(--text-2); white-space: nowrap;
}
.badge.status-recorded { background: #dbeafe; color: #1d4ed8; }
.badge.status-rendering { background: #fef3c7; color: #92400e; }
.badge.status-received { background: #dcfce7; color: #166534; }
.badge.status-rejected { background: #fee2e2; color: #991b1b; }

details { margin: 12px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; }

.transcript {
  max-height: 340px; overflow-y: auto; white-space: pre-wrap;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-top: 8px;
  font-size: 17px; line-height: 2.1; text-align: right; background: #fcfcfd;
}

.recorder { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }

button, .btn {
  font: inherit; padding: 9px 16px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: #f3f4f6; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
button.primary:hover { background: #1d4ed8; }

.timer { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 52px; }

.level { display: inline-block; width: 120px; height: 8px; background: #eef0f3; border-radius: 999px; overflow: hidden; }
.level i { display: block; height: 100%; width: 0; background: var(--green); transition: width .08s linear; }

.preview { width: 100%; margin-bottom: 10px; }

.note { font-size: 13px; color: var(--text-2); margin: 0; min-height: 20px; }
.note.live { color: var(--red); font-weight: 600; }
.note.ok { color: var(--green); font-weight: 600; }
.note.error { color: var(--red); }
.error { color: var(--red); font-size: 13px; }

.sent { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.sent li { margin-bottom: 4px; }

@media (max-width: 560px) {
  .episode-head { flex-direction: column; }
  .transcript { font-size: 16px; line-height: 1.95; }
}
