:root { color-scheme: dark; font-family: system-ui, sans-serif; color: #eef2f8; background: #10151f; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { height: var(--viewport-height, 100dvh); display: flex; flex-direction: column; }
header { min-height: 58px; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: #192231; border-bottom: 1px solid #344052; flex-wrap: wrap; }
header strong { margin-right: auto; }
#session-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#session-controls button { font-size: 13px; padding: 9px 11px; }
#session-controls button[aria-pressed="true"] { background: #22533e; box-shadow: inset 0 0 0 1px #72d7a1; }
.toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: #d7dfeb; font-size: 13px; white-space: nowrap; }
.toggle input { appearance: auto; width: 17px; height: 17px; margin: 0; padding: 0; border: 0; accent-color: #4c8cff; }
#status { color: #bfcadb; font-size: 14px; }
main { flex: 1; display: grid; place-items: center; padding: 24px; }
main { overflow: auto; min-height: 0; }
form { width: min(100%, 420px); padding: 32px; border: 1px solid #344052; border-radius: 16px; background: #192231; }
h1 { font-size: 24px; line-height: 1.3; margin: 0 0 12px; }
p { color: #bfcadb; line-height: 1.5; }
label { display: block; font-size: 14px; margin-top: 24px; margin-bottom: 8px; }
input { width: 100%; padding: 12px; border: 1px solid #5b6d84; border-radius: 8px; font: inherit; background: #10151f; color: #fff; }
button { cursor: pointer; border: 0; border-radius: 8px; padding: 10px 14px; font: inherit; background: #3c79ec; color: white; }
button:disabled { opacity: .6; cursor: wait; }
form button { width: 100%; margin-top: 16px; padding: 12px; font-weight: 650; }
.hint { font-size: 13px; margin-bottom: 0; }
#screen { flex: 1; min-height: 0; overflow: hidden; background: #000; }
#remote-pointer { position: fixed; z-index: 10000; width: 25px; height: 25px; border: 2px solid #69baff; border-radius: 50%; background: #3c92ff26; box-shadow: 0 0 0 1px #0009, 0 0 12px #158aff80; pointer-events: none; transform: translate(-50%, -50%); }
#remote-pointer::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; top: 8px; left: 8px; box-shadow: 0 0 2px #000; }
#remote-pointer[data-origin="remote"] { border-color: #ffd166; background: #ffd16626; box-shadow: 0 0 0 1px #0009, 0 0 12px #ffd16680; }
#keyboard-input { position: fixed; left: 1px; bottom: 1px; width: 1px; height: 1px; opacity: 0; pointer-events: none; padding: 0; border: 0; resize: none; font-size: 16px; caret-color: transparent; }
@media (max-width: 700px) {
  header { padding: 9px 12px; gap: 8px; min-height: 48px; }
  header strong { font-size: 15px; }
  #status { font-size: 12px; }
  #session-controls { flex-basis: 100%; gap: 6px; }
  #session-controls button { padding: 8px 9px; font-size: 12px; }
  .toggle { font-size: 12px; }
  main { padding: 16px; }
  form { padding: 24px; }
}
[hidden] { display: none !important; }
