:root {
  color-scheme: light;
  --cp-bg: #f7f4ef;
  --cp-bg-elevated: #fcfbf8;
  --cp-surface: #ffffff;
  --cp-surface-soft: #f5f5f5;
  --cp-border: #dedede;
  --cp-border-strong: #919191;
  --cp-text: #242424;
  --cp-text-muted: #5c5c5c;
  --cp-text-soft: #6f6f6f;
  --cp-accent: #b11f4b;
  --cp-accent-hover: #9a1a41;
  --cp-accent-soft: rgba(177, 31, 75, 0.08);
  --cp-accent-fg: #ffffff;
  --cp-success: #15803d;
  --cp-danger: #dc2626;
  --cp-warning: #f59e0b;
  --cp-link: #0078d4;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  --cp-overlay: rgba(255, 255, 255, 0.8);
  --cp-panel: rgba(255, 255, 255, 0.86);
  --cp-panel-strong: rgba(255, 255, 255, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.55);
  --cp-highlight: rgba(177, 31, 75, 0.12);
  --cp-video: #000000;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --cp-bg: #3d3b3a;
  --cp-bg-elevated: #343231;
  --cp-surface: #292929;
  --cp-surface-soft: #2e2e2e;
  --cp-border: #474747;
  --cp-border-strong: #5f5f5f;
  --cp-text: #dedede;
  --cp-text-muted: #999999;
  --cp-text-soft: #b0b0b0;
  --cp-accent: #fd8ea1;
  --cp-accent-hover: #fb7b91;
  --cp-accent-soft: rgba(253, 142, 161, 0.14);
  --cp-accent-fg: #1a1a1a;
  --cp-success: #4ade80;
  --cp-danger: #f87171;
  --cp-warning: #fbbf24;
  --cp-link: #4da6ff;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --cp-overlay: rgba(41, 41, 41, 0.88);
  --cp-panel: rgba(41, 41, 41, 0.72);
  --cp-panel-strong: rgba(41, 41, 41, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.04);
  --cp-highlight: rgba(253, 142, 161, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; letter-spacing: 0; }
body {
  background: var(--cp-video);
  color: var(--cp-text);
  font-family: "Segoe UI", Aptos, Calibri, sans-serif;
}
[hidden] { display: none !important; }
#player {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--cp-video);
  cursor: none;
}
.playing { overflow: hidden; }
#enrolment {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: var(--cp-surface);
}
.pairing { width: 100%; max-width: 380px; min-width: 0; }
.terminal-label { margin: 0 0 8px; font-size: 12px; color: var(--cp-text-soft); }
h1 { margin: 0 0 32px; font-size: 36px; font-weight: 650; line-height: 1.15; }
.field { margin-bottom: 24px; }
label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--cp-border-strong);
  border-radius: 4px;
  padding: 12px 10px;
  font: 14px Consolas, "Courier New", monospace;
  background: var(--cp-surface-soft);
  color: var(--cp-text);
}
.field-help { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--cp-text-soft); }
button {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 4px;
  font: 600 14px "Segoe UI", Aptos, Calibri, sans-serif;
  background: var(--cp-accent);
  color: var(--cp-accent-fg);
  cursor: pointer;
  touch-action: manipulation;
}
button:hover:not(:disabled) { background: var(--cp-accent-hover); }
button:disabled { opacity: 0.65; cursor: wait; }
input:focus-visible, button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 4px; }
a { color: var(--cp-link); overflow-wrap: anywhere; }
#status { margin: 20px 0; min-height: 40px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; color: var(--cp-text-soft); }
noscript { position: relative; display: block; padding: 32px; background: var(--cp-surface); }