:root {
  color-scheme: dark;
  font: 14px/1.5 "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: #e7edf4;
  background: #15191e;
  --surface: #20252c;
  --inset: #191e24;
  --edge: #343d48;
  --muted: #a8b5c4;
  --aqua: #8ae9d7;
  --green: #9fe4b8;
  --yellow: #f3ce86;
  --danger: #ffa6a3;
  --focus: #a1d8ff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button, input, select, summary { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); }
button {
  padding: .46rem .75rem; min-height: 37px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--edge); border-radius: 5px; color: inherit; background: #2c3440; font-weight: 600;
}
button:hover { background: #384451; }
button:disabled { opacity: .52; cursor: default; }
button.primary { background: var(--aqua); color: #112622; border-color: transparent; }
button.primary:hover { background: #adf2e5; }
button.quiet { background: transparent; }
button.quiet:hover { background: #2b323b; }
button.danger { color: var(--danger); }
input, select {
  min-width: 0; width: 100%; min-height: 37px; padding: .45rem .64rem;
  border: 1px solid var(--edge); border-radius: 5px; background: var(--inset); color: inherit;
}
input::placeholder { color: #a2aebc; }
input[readonly] { font: .86rem/1.5 Consolas, monospace; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.2rem; letter-spacing: .025em; }
h2 { font-size: 1.25rem; overflow-wrap: anywhere; }
h3 { font-size: 1rem; }
label, .caption { color: var(--muted); font-size: .85rem; }
.muted { color: var(--muted); font-size: .9rem; }
.panel { width: min(100%, 620px); margin-inline: auto; padding: 16px; }
.director .panel { min-height: 100dvh; }
.app-header, .brand, .row { display: flex; align-items: center; gap: 9px; }
.app-header { justify-content: space-between; padding: 2px 0 16px; border-bottom: 1px solid var(--edge); }
.brand-mark { display: flex; width: 29px; height: 29px; align-items: center; justify-content: center; gap: 2px; background: #263a39; border: 1px solid #416962; border-radius: 6px; }
.brand-mark i { width: 3px; border-radius: 1px; background: var(--aqua); height: 7px; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 10px; }
.spread { justify-content: space-between; }
.end { justify-content: flex-end; }
.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 9px; }
.compact { gap: 5px; }
form.stack > .primary { justify-self: start; margin-top: 5px; }
.activity-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 0 1px; }
.activity-header h2 { margin-top: 2px; }
.card { margin-top: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--edge); border-radius: 8px; }
.card > h2 { margin-bottom: 14px; }
.card-note { margin-top: 3px; }
.pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: .23rem .54rem; border: 1px solid var(--edge);
  background: var(--inset); color: var(--muted); border-radius: 999px; font-size: .79rem; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
[data-state="ok"] { color: var(--green); }
[data-state="wait"] { color: var(--yellow); }
[data-state="error"] { color: var(--danger); }
[data-state="idle"] { color: var(--muted); }
.index { display: inline-flex; min-width: 28px; height: 28px; align-items: center; justify-content: center; color: var(--aqua); background: #283b39; border: 1px solid #41615e; border-radius: 5px; font: .85rem Consolas, monospace; }
.invite {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; align-items: center;
  background: var(--inset); margin-top: 13px; padding: 10px; border: 1px solid var(--edge); border-radius: 6px;
}
.invite img { display: block; background: #fff; border-radius: 3px; }
.invite button { justify-self: start; }
.invite-origin { overflow-wrap: anywhere; }
.address-field { margin-top: 13px; }
.input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 4px; }
.signal-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 0; margin: 12px 0 0; list-style: none; }
.signal-list li { display: grid; gap: 2px; padding: 7px 9px; border-radius: 5px; background: var(--inset); border: 1px solid var(--edge); min-width: 0; }
.signal-list li span { color: var(--muted); font-size: .8rem; }
.signal-list strong { font-size: .89rem; font-weight: 600; overflow-wrap: anywhere; }
.details { margin-top: 13px; border-top: 1px solid var(--edge); padding-top: 8px; }
.details > summary { cursor: pointer; padding: 4px 0; color: #c6d2e0; }
.details[open] > summary { margin-bottom: 7px; }
.notice { border: 1px solid #536b78; border-radius: 6px; padding: 9px 11px; margin-top: 12px; color: inherit; background: #26333c; overflow-wrap: anywhere; }
.notice[data-state="error"] { border-color: #854d50; background: #3a292d; color: #ffd4d2; }
dialog { background: var(--surface); border: 1px solid var(--edge); border-radius: 10px; color: inherit; max-width: min(360px, calc(100vw - 24px)); padding: 16px; }
dialog::backdrop { background: #11161cc8; }
.guest .panel { max-width: 520px; }
.video-box { margin: 10px 0; aspect-ratio: 16 / 9; background: #101419; border: 1px solid var(--edge); border-radius: 6px; position: relative; overflow: hidden; }
.video-box video { width: 100%; height: 100%; object-fit: contain; }
.video-placeholder { pointer-events: none; position: absolute; inset: 0; color: var(--muted); display: grid; place-items: center; }
.meter-row { display: grid; grid-template-columns: max-content 1fr; gap: 10px; align-items: center; margin: 0 0 10px; }
meter { width: 100%; }
.guest button { min-height: 44px; }
.leave { margin-top: 12px; }
@media (max-width: 370px) {
  .panel { padding: 10px; }
  .card { padding: 10px; }
  .invite { gap: 9px; }
  .invite img { width: 86px; height: 86px; }
}
