:root {
  --bg: #0c0d10;
  --panel: #16181d;
  --panel-2: #1f2229;
  --line: #2b2f38;
  --text: #ecedf0;
  --muted: #8b90a0;
  --accent: #ff6b35;
  --ok: #34c759;
  --warn: #ffcc00;
  --bad: #ff3b30;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; }
input { font: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }

.btn {
  appearance: none; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 12px 18px; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer;
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { background: #262a33; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #111; }
.btn.primary:hover { background: #ff7f52; }
.btn.ghost { background: transparent; }
.btn.big { font-size: 20px; padding: 18px 26px; min-height: 64px; border-radius: 14px; }

.text {
  background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 10px;
  padding: 12px 14px; font-size: 16px; min-height: 48px; outline: none; width: 100%;
}
.text:focus { border-color: var(--accent); }

.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); vertical-align: middle; }
.dot.open { background: var(--ok); }
.dot.reconnecting, .dot.connecting { background: var(--warn); animation: blink 1s infinite; }
.dot.dead { background: var(--bad); }
@keyframes blink { 50% { opacity: .35; } }

.center { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 28px;
  width: min(100%, 560px); display: flex; flex-direction: column; gap: 18px;
}
.card h1 { margin: 0; font-size: 28px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); line-height: 1.5; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .text { flex: 1 1 200px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.switch .label { font-size: 17px; }
.switch .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.toggle {
  appearance: none; width: 58px; height: 34px; border-radius: 34px; background: #3a3f4b; position: relative;
  border: 0; cursor: pointer; flex: none; margin: 0;
}
.toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle:checked { background: var(--accent); }
.toggle:checked::after { transform: translateX(24px); }

.qr { background: #fff; padding: 12px; border-radius: 14px; display: inline-block; line-height: 0; }
.qr svg { width: 220px; height: 220px; display: block; }
.code { font-family: var(--mono); font-size: 72px; font-weight: 800; letter-spacing: .18em; line-height: 1; }
