:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #65717d;
  --line: #d9e0e5;
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --danger: #b42318;
  --shadow: 0 18px 55px rgba(21, 35, 48, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 32px auto;
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 18px;
}

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

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

.header.compact {
  align-items: center;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

.status {
  min-width: 112px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.status.live {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.09);
  color: var(--primary-dark);
}

.status.error {
  border-color: rgba(180, 35, 24, 0.28);
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
}

.controls {
  margin-top: 32px;
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

.button,
.talk {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.button {
  min-height: 44px;
  padding: 0 16px;
}

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

.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
}

.talk {
  height: 164px;
  background: #12231f;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.talk.active {
  background: var(--primary);
}

.button:disabled,
.talk:disabled,
.field input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.meter {
  height: 8px;
  margin-top: 18px;
  border-radius: 999px;
  background: #e8edf0;
  overflow: hidden;
}

#meterBar {
  width: 0%;
  height: 100%;
  background: var(--primary);
  transition: width 80ms linear;
}

.details {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.details > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.label {
  color: var(--muted);
}

.transcript-panel {
  min-height: 540px;
}

.log {
  height: 472px;
  margin-top: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
  font-size: 14px;
  line-height: 1.45;
}

.log-entry {
  margin-bottom: 10px;
}

.log-entry .time {
  color: var(--muted);
  margin-right: 6px;
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
    margin-top: 16px;
  }

  .talk {
    height: 140px;
  }

  .transcript-panel {
    min-height: 380px;
  }

  .log {
    height: 320px;
  }
}
