:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #101215;
  color: #f4f7fb;
}

body {
  margin: 0;
}

main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}

button {
  border: 0;
  border-radius: 8px;
  background: #f4f7fb;
  color: #101215;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0 18px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.home-shell,
.speaker-shell {
  place-items: stretch;
}

.home-panel,
.speaker-panel {
  width: min(720px, 100%);
  display: grid;
  gap: 22px;
}

.eyebrow {
  color: #8fb7ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  margin: 0;
}

input {
  background: #171b21;
  border: 1px solid #2b313a;
  border-radius: 8px;
  color: #f4f7fb;
  font: inherit;
  min-height: 44px;
  padding: 0 12px;
}

.room-form {
  display: grid;
  gap: 10px;
}

.room-form label {
  color: #93a2b7;
  font-size: 0.78rem;
  font-weight: 700;
}

.speaker-topline {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.timer {
  color: #f4f7fb;
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
}

.banner {
  background: #4c1d1d;
  border: 1px solid #f87171;
  border-radius: 8px;
  color: #fee2e2;
  padding: 12px 14px;
}

.hidden {
  display: none;
}

.meter-wrap {
  background: #242932;
  border-radius: 8px;
  height: 18px;
  overflow: hidden;
}

.meter-fill {
  background: #37d67a;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 80ms linear;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.status {
  color: #c9d3e3;
  margin: 0;
}

.share-panel {
  align-items: center;
  background: #171b21;
  border: 1px solid #2b313a;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
}

.share-panel div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.share-panel span {
  color: #93a2b7;
  font-size: 0.78rem;
  font-weight: 700;
}

.share-panel a {
  color: #f4f7fb;
  overflow-wrap: anywhere;
}

.share-panel canvas {
  background: #f4f7fb;
  border-radius: 8px;
  flex: 0 0 auto;
}

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

.stats-grid div {
  background: #171b21;
  border: 1px solid #2b313a;
  border-radius: 8px;
  padding: 14px;
}

.stats-grid dt {
  color: #93a2b7;
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.stats-grid dd {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.chip-row span {
  background: #1c2a22;
  border: 1px solid #37d67a;
  border-radius: 8px;
  color: #d7ffe5;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 8px 10px;
}

.transcript-panel {
  display: grid;
  gap: 10px;
}

.transcript-panel h2 {
  font-size: 1rem;
  margin: 0;
}

.utterance-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 0;
}

.utterance-list li {
  background: #171b21;
  border: 1px solid #2b313a;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.utterance-list span {
  color: #93a2b7;
  font-size: 0.78rem;
  font-weight: 700;
}

.utterance-list p {
  margin: 0;
}

.listener-shell {
  align-content: start;
  gap: 18px;
  place-items: stretch;
}

.listener-toolbar {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  width: min(960px, 100%);
}

.listener-actions {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 260px) auto;
}

.select-label {
  color: #93a2b7;
  font-size: 0.78rem;
  font-weight: 700;
  grid-column: 1 / -1;
}

select {
  background: #171b21;
  border: 1px solid #2b313a;
  border-radius: 8px;
  color: #f4f7fb;
  font: inherit;
  min-height: 44px;
  padding: 0 12px;
}

.listener-status {
  color: #c9d3e3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(960px, 100%);
}

.listener-status span {
  background: #171b21;
  border: 1px solid #2b313a;
  border-radius: 8px;
  padding: 8px 10px;
}

.audio-unlock-overlay {
  align-items: center;
  background: #171b21;
  border: 1px solid #4b5563;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  width: min(960px, 100%);
}

.audio-unlock-overlay div {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  width: 100%;
}

.audio-unlock-overlay p {
  color: #f4f7fb;
  font-weight: 700;
  margin: 0;
}

.audio-unlock-overlay.hidden {
  display: none;
}

.transcript-stream {
  background: #171b21;
  border: 1px solid #2b313a;
  border-radius: 8px;
  min-height: 0;
  width: min(960px, 100%);
}

.transcript-stream ol {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  max-height: min(68vh, 760px);
  overflow: auto;
  padding: 0;
}

.transcript-stream li {
  border-bottom: 1px solid #2b313a;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.transcript-stream li:last-child {
  border-bottom: 0;
}

.transcript-stream span {
  color: #93a2b7;
  font-size: 0.78rem;
  font-weight: 800;
}

.transcript-stream p {
  margin: 0;
}

.transcript-stream .original {
  color: #c9d3e3;
}

.transcript-stream .translated {
  color: #f4f7fb;
  font-size: 1.08rem;
  font-weight: 700;
}

@media (max-width: 720px) {
  .listener-toolbar {
    align-items: stretch;
    display: grid;
  }

  .listener-actions {
    grid-template-columns: 1fr auto;
  }

  .audio-unlock-overlay div {
    align-items: stretch;
    display: grid;
  }
}
