* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #111; color: #eee;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
body { display: flex; flex-direction: column; }

#bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .5rem .8rem;
  background: #1c1c1f; border-bottom: 1px solid #000; flex: 0 0 auto; }
.brand { font-weight: 700; letter-spacing: .5px; color: #4ea1ff; }
#code { padding: .35rem .5rem; border: 1px solid #444; border-radius: 4px;
  background: #0d0d0f; color: #eee; width: 11rem; }
#connect { padding: .35rem .8rem; border: 0; border-radius: 4px;
  background: #4ea1ff; color: #04122a; font-weight: 600; cursor: pointer; }
#connect:disabled { opacity: .5; cursor: default; }
#fullscreen { padding: .35rem .7rem; border: 1px solid #444; border-radius: 4px;
  background: #2a2a2e; color: #eee; cursor: pointer; }
#fullscreen:hover { background: #34343a; }
.status { padding: .2rem .5rem; border-radius: 10px; background: #333; font-size: .85rem; }
.status.ok { background: #14532d; color: #b7f7c8; }
.status.warn { background: #5a3a00; color: #ffd591; }
.status.err { background: #5a1414; color: #ffb3b3; }
.hint { margin-left: auto; color: #888; font-size: .8rem; }

#stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex;
  align-items: flex-start; justify-content: flex-start; overflow: auto; }
#surface { flex: 0 0 auto; margin: auto; background: #000; cursor: crosshair; outline: none; }
#surface:focus-visible { outline: 2px solid #4ea1ff; outline-offset: -2px; }
#screen, #video { display: block; width: 100%; height: 100%; }
[hidden] { display: none !important; }
select { color: #eee; background: #2a2a2e; padding: .3rem; border: 1px solid #555; border-radius: 4px; }
#bar label { font-size: .85rem; white-space: nowrap; }
#stats { flex: 0 0 auto; min-height: 1.7rem; padding: .3rem .8rem; color: #aaa; font-size: .75rem; }
#overlay { position: absolute; inset: 40% 0 auto; color: #aaa; pointer-events: none;
  font-size: 1rem; text-align: center; padding: 1rem; }
#overlay.hidden { display: none; }
