:root {
  color-scheme: light;
  --bg: #f5f7fa; --card: #ffffff; --text: #1f2329; --muted: #6b7280;
  --primary: #2563eb; --primary-hover: #1d4ed8; --danger: #dc2626;
  --border: #e5e7eb; --ring: rgba(37, 99, 235, .35);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
       background: var(--bg); color: var(--text); }
.page { min-height: 100vh; display: flex; flex-direction: column; align-items: center;
        justify-content: center; padding: 24px; }
.card { background: var(--card); width: 100%; max-width: 420px; border-radius: 16px;
        padding: 32px 32px 28px; box-shadow: 0 8px 30px rgba(15,23,42,.08); }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.brand-mark { background: var(--primary); color: #fff; font-weight: 700; border-radius: 8px;
              padding: 6px 10px; font-size: 15px; letter-spacing: 2px; }
.brand-name { font-weight: 600; color: var(--text); }
h1 { font-size: 20px; margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; }
.small { font-size: 12.5px; }
.error { color: var(--danger); font-size: 13px; margin: 8px 0; }
.hidden { display: none !important; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
        font-size: 14px; outline: none; }
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
button, .btn { display: inline-block; width: 100%; margin-top: 14px; padding: 11px 16px;
        border-radius: 8px; border: 0; font-size: 14px; font-weight: 600; cursor: pointer;
        text-align: center; text-decoration: none; }
button.primary, .btn.primary { background: var(--primary); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--primary-hover); }
button.ghost, .btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
button:disabled { opacity: .6; cursor: wait; }
.actions { display: flex; gap: 10px; }
.vcode { font-family: ui-monospace, Consolas, monospace; font-size: 30px; letter-spacing: 10px;
         text-align: center; padding: 18px 0; margin: 14px 0; background: #f3f4f6;
         border-radius: 10px; font-weight: 700; }
.footer { color: var(--muted); font-size: 12px; margin-top: 18px; }
#remote-list { margin: 12px 0; }
.device { display: flex; align-items: center; justify-content: space-between;
          padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot.on { background: #16a34a; } .dot.off { background: #9ca3af; }
.badge { font-size: 11px; color: var(--muted); }
#remote-stream { background: #0f172a; color: #d1d5db; font-family: ui-monospace, Consolas, monospace;
                 font-size: 12.5px; border-radius: 10px; padding: 14px; min-height: 140px;
                 max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
