:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: #06100e;
  color: #effffb;
  --surface: #101b19;
  --surface-2: #162522;
  --line: #29423d;
  --mint: #57e6bd;
  --muted: #9bb5af;
  --danger: #ff8b82;
  --amber: #f2c66d;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, #174238 0, transparent 35rem),
    radial-gradient(circle at 90% 20%, #142923 0, transparent 28rem), #06100e;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  color: var(--mint);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 8px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2rem, 5.2vw, 3.8rem);
  line-height: 0.98;
  margin-bottom: 0;
  letter-spacing: -0.05em;
}
h1 span {
  color: var(--mint);
}
h2 {
  font-size: 1.75rem;
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.05rem;
  margin: 8px 0;
}
.privacy,
.status {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}
.privacy i {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--mint);
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 14px var(--mint);
}
.workspace {
  margin-top: 30px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(22, 37, 34, 0.97), rgba(8, 18, 16, 0.97));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}
.auth {
  width: min(560px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.intro p,
article p,
.room-links p {
  color: var(--muted);
  line-height: 1.55;
}
.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}
label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 0.9rem;
}
input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: #effffb;
  background: #091411;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(87, 230, 189, 0.12);
}
button,
.link-card a {
  min-height: 44px;
  padding: 0 16px;
  color: #eafff9;
  background: var(--surface-2);
  border: 1px solid #365a52;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover,
.link-card a:hover {
  border-color: var(--mint);
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(87, 230, 189, 0.32);
  outline-offset: 2px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
.primary {
  color: #042019;
  background: var(--mint);
  border-color: var(--mint);
}
.danger {
  color: #ffe9e7;
  border-color: #70403b;
  background: #281715;
}
.danger.confirming {
  color: #241300;
  border-color: var(--amber);
  background: var(--amber);
}
.text-button {
  min-height: auto;
  padding: 6px 0;
  margin-top: 13px;
  color: var(--mint);
  background: none;
  border: 0;
}
.workspace-head,
.participant-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
}
.account {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
  font-size: 0.86rem;
}
.account .text-button {
  margin: 0;
}
.notice {
  margin: 24px 0;
  padding: 14px 16px;
  color: #c6dcd7;
  background: rgba(87, 230, 189, 0.07);
  border: 1px solid rgba(87, 230, 189, 0.25);
  border-radius: 12px;
  line-height: 1.45;
  font-size: 0.9rem;
}
.notice strong {
  color: var(--mint);
}
.notice.warning {
  color: #ddcfaf;
  background: rgba(242, 198, 109, 0.06);
  border-color: rgba(242, 198, 109, 0.25);
}
.notice.warning strong {
  color: var(--amber);
}
.model-statuses {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: -10px 0 24px;
}
.model-card {
  display: grid;
  gap: 9px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 16, 15, 0.6);
}
.model-card > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.model-card span {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.model-state {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
}
.model-state.active {
  color: var(--mint);
  background: rgba(87, 230, 189, 0.12);
}
.model-state.connecting {
  color: var(--amber);
  background: rgba(242, 198, 109, 0.12);
}
.model-state.unavailable {
  color: var(--danger);
  background: rgba(255, 139, 130, 0.12);
}
.country-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: end;
  margin: 26px 0 22px;
}
.direction {
  color: var(--mint);
  font-size: 1.6rem;
  padding-bottom: 7px;
}
.room-links {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}
.room-links > p {
  font-size: 0.86rem;
  margin: 3px 0 0;
}
.link-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 16, 15, 0.55);
}
.link-card > div:first-child {
  display: grid;
  gap: 4px;
}
.link-card span {
  font-weight: 750;
}
.link-card small {
  color: var(--muted);
}
.link-actions {
  display: flex;
  gap: 8px;
}
.online {
  color: var(--mint);
  border-color: #327661;
}
.offline {
  color: var(--danger);
  border-color: #70403b;
}
.reconnecting {
  color: #f0d978;
  border-color: #8f7b3e;
}
.state-card {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: rgba(7, 16, 15, 0.6);
}
.state-card div {
  display: grid;
  gap: 5px;
}
.state-card span {
  color: var(--muted);
  font-size: 0.8rem;
}
.state-card strong {
  font-size: 0.98rem;
  overflow-wrap: anywhere;
  text-transform: capitalize;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
article {
  position: relative;
  min-height: 260px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(11, 21, 19, 0.75);
}
article button {
  width: 100%;
  margin-top: 12px;
}
.step {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #062019;
  background: var(--mint);
  border-radius: 9px;
  font-weight: 800;
}
.meter {
  height: 8px;
  margin: 20px 0 3px;
  background: #06100e;
  border-radius: 999px;
  overflow: hidden;
}
.meter i {
  display: block;
  width: 3%;
  height: 100%;
  background: var(--mint);
  transition: width 80ms linear;
}
.audio-mode-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  color: #dff9f2;
}
.audio-mode-control select {
  min-height: 42px;
  padding: 8px 10px;
}
.audio-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.35;
}
.volume-control {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #dff9f2;
  font-size: 0.78rem;
}
.volume-control input {
  min-height: 0;
  padding: 0;
  accent-color: var(--mint);
}
.volume-control output {
  min-width: 38px;
  color: var(--mint);
  text-align: right;
}
.audio-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 9px 0 2px;
}
.audio-stats span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}
.audio-stats strong {
  color: #eafff9;
  font-size: 0.78rem;
}
.push-to-talk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  border-color: #3e8f79;
  background: #0c2b23;
  color: #dff9f2;
  touch-action: none;
  user-select: none;
}
.push-to-talk kbd {
  min-width: 30px;
  padding: 3px 8px;
  border: 1px solid #71d8bd;
  border-radius: 6px;
  background: #061713;
  color: var(--mint);
  font: inherit;
  font-weight: 900;
}
.push-to-talk.active {
  border-color: var(--mint);
  background: var(--mint);
  color: #062019;
  box-shadow: 0 0 0 3px rgba(80, 232, 191, 0.2);
}
.push-to-talk.active kbd {
  border-color: #062019;
  background: #062019;
}
.push-to-talk.finishing {
  border-color: #d8c56d;
}
.push-to-talk-hint {
  margin-bottom: 2px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}
.actions #download-transcript,
.actions #download-translated-transcript {
  border-color: #327661;
  color: var(--mint);
}
.error {
  color: var(--danger);
  margin: 0;
  min-height: 1.25em;
  line-height: 1.4;
}
[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .topbar,
  .workspace-head,
  .participant-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .privacy {
    white-space: normal;
  }
  .account {
    justify-items: start;
  }
  .country-grid,
  .steps,
  .state-card,
  .model-statuses {
    grid-template-columns: 1fr;
  }
  .direction {
    transform: rotate(90deg);
    justify-self: center;
    padding: 0;
  }
  .link-card {
    align-items: stretch;
    flex-direction: column;
  }
  .link-actions,
  .link-card > a {
    width: 100%;
  }
  .link-actions > * {
    flex: 1;
  }
  article {
    min-height: auto;
  }
}
