/* Shared look of the admin and viewer pages: the dark palette of the M1 dev viewer.
   Contrast (WCAG): text 15:1, muted 10:1, accent 8:1 against the background. */
:root {
  color-scheme: dark;
  --bg: #111418;
  --panel: #1d2228;
  --border: #3a424d;
  --text: #e9edf2;
  --muted: #b3bcc8;
  --accent: #8ab4ff;
  --warn: #ffcf7a;
  --ok: #7ddc9a;
  --bad: #ff9a9a;
}
/* "hidden" must always hide. The browser's own rule for it is weaker than any rule of ours, so an
   element styled with display: flex stayed on screen while "hidden" (the viewer's invisible message
   layer then sat on top of the panorama and swallowed every drag and wheel). This closes that trap
   for every page. */
[hidden] {
  display: none !important;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px / 1.45 system-ui,
    "Segoe UI",
    Arial,
    sans-serif;
}
a {
  color: var(--accent);
}

/* Touch targets at least 44x44 px, a visible pointer and focus ring on everything clickable */
button,
select,
input,
.button {
  min-height: 44px;
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  max-width: 100%;
}
button,
select,
.button,
label[for] {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-width: 44px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.warn {
  color: var(--warn);
}
.ok {
  color: var(--ok);
}
.bad {
  color: var(--bad);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
