/* THE FOUNDATION - shared by the three surfaces.
   Palette is the one the room already knows: violet field, yellow for the thing you touch, lime for
   right, and OpenDyslexic for every word.
   Deliberately old-fashioned CSS: this has to work on Via, older Opera, Firefox and a cheap television
   browser, so no container queries, no :has(), no subgrid, no color-mix(). */
@font-face {
  font-family: 'OpenDyslexic';
  src: url('/fonts/OpenDyslexic-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'OpenDyslexic';
  src: url('/fonts/OpenDyslexic-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --violet: #4a1fa0;
  --violet-deep: #2c1269;
  --ink: #1d0a4a;
  --ink-deep: #12062e;
  --paper: #ffffff;
  --yellow: #ffd200;
  --lime: #a6e22e;
  --orange: #ff8a2b;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.18);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--paper);
  font-family: 'OpenDyslexic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: linear-gradient(165deg, var(--violet) 0%, var(--violet-deep) 52%, var(--ink) 100%) fixed;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p { margin: 0; }

button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink);
  background: var(--yellow);
}

button:disabled { background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.4); cursor: default; }

input {
  font: inherit;
  width: 100%;
  padding: 14px 16px;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.28);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}

input:focus { outline: 3px solid var(--yellow); outline-offset: 2px; }

.label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 700;
}

.muted { color: var(--muted); }

.qr {
  display: block;
  background: #fff;
  padding: 10px;
  border-radius: 16px;
}

.qr canvas { display: block; width: 100%; height: auto; }

.offline { color: var(--orange); }
