:root {
  color-scheme: light dark;
  --bg: #f4f7f8;
  --panel: #ffffff;
  --text: #142023;
  --muted: #617174;
  --line: #d8e0e2;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

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

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(680px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 16px 42px rgb(20 32 35 / 10%);
}

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

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
}

p {
  margin: 0;
  color: var(--muted);
}

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

.notice {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #f3b3ad;
  border-radius: 6px;
  background: #fff1f0;
  color: var(--danger);
}

.controls,
.callControls,
.room {
  margin-top: 22px;
}

.controls,
.callControls,
.join,
.roomLink {
  display: flex;
  gap: 10px;
}

.join,
.roomLink {
  flex: 1;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: transparent;
  color: inherit;
}

button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font: 700 15px/1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

button:hover:not(:disabled) {
  background: var(--accent-strong);
}

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

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

#hangup {
  background: var(--danger);
}

@media (max-width: 560px) {
  .topline,
  .controls,
  .callControls,
  .join {
    flex-direction: column;
  }

  button,
  .state {
    width: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101416;
    --panel: #182023;
    --text: #eef4f4;
    --muted: #a3b1b4;
    --line: #2d3a3e;
  }

  .notice {
    background: #331916;
  }
}
