html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
.viewer { display: flex; flex-direction: column; height: calc(100vh - 140px); }
.viewer-bar { display: flex; gap: .75rem; align-items: center; padding: .25rem 0 .5rem; flex-wrap: wrap; }
.viewer-bar .stats { font-family: Consolas, monospace; font-size: .8rem; color: #555; }
/* On a phone the numbers would take three lines of the picture's height. */
@media (max-width: 575.98px) { .viewer-bar .stats { display: none; } }
/* The picture box: pinch zoom and pan move the video inside it (viewport.js), nothing else scrolls. */
.screen-box { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #111; touch-action: none; }
.screen-box video { display: block; width: 100%; height: 100%; background: #111; object-fit: contain; transform-origin: 0 0; }
/* Phone keyboard target: focusable (so the keyboard opens) but out of sight; 16px stops iOS zooming in. */
.viewer .kbd { position: fixed; left: -1000px; bottom: 0; width: 10px; height: 10px; opacity: 0; font-size: 16px; }

.login-box {
    max-width: 420px;
}

/* Remote control: the video takes mouse, touch and keyboard; a red frame says so. */
.screen-box.controlling video { cursor: default; }
.screen-box.controlling::after { content: ""; position: absolute; inset: 0; border: 3px solid #c82121; pointer-events: none; z-index: 1; }
