:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #171a20;
  --text: #f4f7fb;
  --muted: #a9b1bd;
  --line: #2c323b;
  --accent: #4fb477;
  --warn: #d9a441;
  --danger: #d75f5f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
}

.status-panel {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}

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

h1 {
  margin: 0;
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

#detailLabel {
  min-height: 48px;
  margin: 14px 0 0;
  color: var(--muted);
}

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

.meters div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.meters span,
.meters strong {
  display: block;
}

.meters span {
  color: var(--muted);
  font-size: 12px;
}

.meters strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

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

.voice-test {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr);
  align-items: center;
  gap: 12px;
}

.voice-test label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.voice-test select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #20252d;
  color: var(--text);
  font: inherit;
  padding: 0 12px;
}

button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #20252d;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

button:first-child {
  background: var(--accent);
  color: #07110b;
  border-color: var(--accent);
}

button:disabled {
  opacity: 0.45;
}

.transcript {
  min-height: 220px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11141a;
}

.event {
  margin: 0 0 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.event strong {
  color: var(--text);
}

@media (max-width: 520px) {
  .meters,
  .controls,
  .voice-test {
    grid-template-columns: 1fr;
  }
}
