:root {
  color-scheme: dark;
  --background: #101112;
  --surface: #191b1d;
  --foreground: #ffffff;
  --muted: #aaa9b2;
  --border: rgba(255, 255, 255, .1);
  --accent: #8b5cf6;
  --accent-strong: #7c3aed;
  --accent-light: #c4b5fd;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--foreground); }
a { color: var(--accent-light); text-underline-offset: 4px; }
button, input { font: inherit; }
button, a, input { outline-color: var(--accent-light); outline-offset: 4px; }
button { cursor: pointer; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--foreground); text-decoration: none; font-weight: 650; letter-spacing: -.02em; }
.brand svg { width: 32px; height: 32px; color: var(--accent-light); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; padding: 13px 20px; min-height: 48px; border: 1px solid transparent; border-radius: 8px; background: var(--accent-strong); color: white; font-weight: 600; text-decoration: none; }
.button:hover { background: #6d28d9; }
.button svg { width: 18px; height: 18px; }
.private-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.private-label svg { width: 15px; height: 15px; }
.landing { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.site-header, .site-footer { width: min(1120px, calc(100% - 64px)); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px 0; }
.site-header { border-bottom: 1px solid var(--border); }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.welcome { width: min(980px, calc(100% - 64px)); margin: auto; padding: 64px 0; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 80px; }
.eyebrow { margin: 0 0 20px; color: var(--accent-light); font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.15; letter-spacing: -.045em; margin: 0 0 20px; font-weight: 650; }
.intro { color: var(--muted); font-size: 16px; line-height: 1.75; max-width: 410px; margin: 0; }
.welcome-note { display: flex; gap: 10px; margin: 28px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.welcome-note svg { color: var(--accent-light); width: 18px; height: 18px; flex: none; margin-top: 2px; }
.connection-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 32px; }
.card-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(139, 92, 246, .28); border-radius: 10px; color: var(--accent-light); background: rgba(139, 92, 246, .08); margin-bottom: 24px; }
.card-icon svg { width: 24px; height: 24px; }
h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 600; }
.connection-card > p { font-size: 14px; line-height: 1.65; color: var(--muted); margin: 0 0 24px; }
.connection-card .button { width: 100%; }
.steps { list-style: none; padding: 24px 0 0; margin: 24px 0 0; border-top: 1px solid var(--border); display: grid; gap: 16px; }
.steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.steps span { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 6px; color: var(--accent-light); font-size: 11px; }
.login-panel { position: fixed; inset: 0; z-index: 10; background: rgba(0, 0, 0, .75); display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.login-card { width: min(100%, 400px); padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.login-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.login-head h2 { margin: 0; }
.close { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--muted); font-size: 24px; }
.close:hover { color: white; background: rgba(255, 255, 255, .06); }
.login-description { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 24px; }
.qr-box { width: 232px; max-width: 100%; aspect-ratio: 1; margin: 0 auto 24px; display: grid; place-items: center; border: 12px solid white; border-radius: 8px; background: white; }
.qr-box svg { width: 100%; height: 100%; }
.status { text-align: center; font-size: 14px; }
.status strong { font-weight: 600; }
.status p { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 8px 0 0; }
.refresh { width: 100%; margin-top: 20px; }
.loader { width: 28px; height: 28px; border: 3px solid #ede9fe; border-top-color: #7c3aed; border-radius: 50%; animation: spin .8s linear infinite; }
.hidden { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loader { animation: none; } }
@media (max-width: 800px) {
  .welcome { grid-template-columns: 1fr; gap: 32px; max-width: 460px; padding: 40px 0; }
  .site-header, .site-footer, .welcome { width: calc(100% - 40px); }
  .site-header, .site-footer { padding: 20px 0; }
  .site-header .private-label { font-size: 12px; }
  .welcome-note { margin-top: 20px; }
  .connection-card { padding: 24px; }
}
@media (max-width: 380px) { .site-header .private-label svg { display: none; } .site-header { gap: 8px; } .brand { font-size: 15px; gap: 8px; } .brand svg { width: 26px; height: 26px; } .login-card { padding: 20px; } }
