html, body { margin: 0; height: 100%; background: #000; overflow: hidden; cursor: none; }
#preview_canvas { position: fixed; top: 0; right: 0; bottom: 0; left: 0; }
/* The renderer's preview chrome is not wanted on a real screen. */
.preview-ended, .play-back-preview { display: none !important; }

.dx-screen {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center;
  justify-content: center; background: #0f0f10; color: #f5f5f5; text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding: 4vw; box-sizing: border-box;
}
.dx-screen[hidden] { display: none; }
/* Spacing with margins, not `gap`/`inset`: old TV browsers (Chrome 47) ignore those. */
.dx-screen > * + * { margin-top: 1.2vh; }
.dx-logo { width: 14vh; height: 14vh; margin-bottom: 2vh; }
.dx-title, .dx-screen h1 { font-size: 4.5vh; font-weight: 600; margin: 0; }
.dx-detail { font-size: 2.6vh; color: #c9c9c9; margin: 0; max-width: 60ch; }
.dx-meta { position: absolute; bottom: 3vh; left: 0; right: 0; font-size: 2vh; color: #8a8a8a; margin: 0; letter-spacing: .04em; }
#dx-setup form { display: flex; flex-direction: column; width: 80vw; max-width: 560px; text-align: left; font-size: 2.4vh; }
#dx-setup form > * + * { margin-top: 2vh; }
#dx-setup input { display: block; width: 100%; box-sizing: border-box; margin-top: .6vh; padding: 1.4vh; font-size: 2.6vh; border-radius: 8px; border: 1px solid #555; background: #1c1c1e; color: #fff; }
#dx-setup button { padding: 1.6vh; font-size: 2.6vh; border: 0; border-radius: 8px; background: #c41e3a; color: #fff; cursor: pointer; }
#dx-setup, #dx-setup * { cursor: auto; }
#dx-progress {
  position: fixed; right: 2vw; bottom: 2vh; z-index: 10000; padding: .8vh 1.4vh; border-radius: 6px;
  background: rgba(0,0,0,.6); color: #ddd; font: 1.8vh system-ui, sans-serif;
}

.dx-code-value {
  font: 700 16vh/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .08em;
  color: #fff; background: #1c1c1e; border: 2px solid #c41e3a; border-radius: 3vh; padding: 3vh 5vh; margin: 2vh 0;
}
.dx-detail b { color: #fff; }
.dx-pair { display: flex; align-items: center; justify-content: center; margin: 2vh 0; }
.dx-pair-qr { margin-right: 7vh; }
.dx-pair-qr { display: flex; flex-direction: column; align-items: center; }
.dx-qr { width: 36vh; height: 36vh; background: #fff; padding: 2.4vh; border-radius: 2vh; box-sizing: content-box; }
.dx-qr svg, .dx-qr img, .dx-qr canvas { width: 100%; height: 100%; display: block; }
.dx-pair-text { display: flex; flex-direction: column; align-items: center; }
.dx-pair-text .dx-code-value { font-size: 12vh; }
.dx-small { font-size: 2vh; color: #8a8a8a; }

/* Brands (class set in index.html from the address): DISPLAX red, XRest orange. */
.brand-xrest .only-displax, .brand-displax .only-xrest { display: none !important; }
.dx-logo-xrest { height: 13vh; width: auto; margin-bottom: 2vh; }
.brand-xrest .dx-code-value { border-color: #E4572E; }
