:root {
  color-scheme: light;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  color: #252743;
  background: #efedf7;
  --surface: #faf9ff;
  --muted: #5e5f76;
  --border: #e4e2ef;
  --accent: #5240b4;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p, ul { margin: 0; }
header { background: var(--surface); border-bottom: 1px solid var(--border); }
.wrap { width: min(1000px, calc(100% - 36px)); margin-inline: auto; }
.brand { display: flex; align-items: center; justify-content: space-between; min-height: 65px; font-size: 19px; font-weight: 700; }
.brand span { color: var(--muted); font-size: 14px; font-weight: 500; }
main { padding-block: 36px 60px; }
h1 { font-size: clamp(28px, 5vw, 49px); line-height: 1.1; letter-spacing: -.055em; margin-bottom: 23px; }
h2 { font-size: 20px; line-height: 1.25; letter-spacing: -.025em; margin-bottom: 9px; }
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; min-width: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 14px; }
.gateway { background: #262443; color: white; border-color: #262443; }
.gateway p { color: #e6e0ff; }
.secondary { color: #2c2452; background: #e1d8ff; margin-top: 13px; }
.devices { margin-top: 14px; }
label { display: block; margin-block: 8px 5px; font-size: 14px; font-weight: 600; }
input, select, button { font: inherit; }
input, select { width: 100%; min-width: 0; border: 1px solid #c5bfdc; border-radius: 8px; background: white; padding: 8px 10px; }
button { border: 0; background: var(--accent); color: white; padding: 9px 12px; border-radius: 8px; font-weight: 650; cursor: pointer; flex-shrink: 0; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #8471f1; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .6; }
.inline { display: flex; gap: 8px; }
form p, .feedback, li span, #empty, .join section p { color: var(--muted); font-size: 14px; }
form p { margin-top: 10px; }
.join a { color: var(--accent); }
.feedback { margin-top: 12px; }
.feedback[data-error="true"] { color: #8d294b; }
ul { list-style: none; padding: 0; }
li { padding-block: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 7px; }
li + li { border-top: 1px solid var(--border); }
li strong { display: block; overflow-wrap: anywhere; }
li span { display: block; }
li button { background: #eee9fd; color: #4e359e; }
.join { max-width: 570px; }
.join button { margin-top: 14px; }
pre { overflow: auto; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 630px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  main { padding-top: 27px; }
}
@media (max-width: 370px) { .inline { flex-wrap: wrap; } }
