/* Joy's Bingo Mania -- a dark room around a 480x270 cabinet. */

:root {
  --shell: #08060f;
  --ink:   #cfc6dd;
  --dim:   #6d6580;
  --neon:  #e02890;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--shell);
  color: var(--ink);
  font-family: "Consolas", "SF Mono", "Menlo", ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(6px, 2vh, 24px) max(10px, env(safe-area-inset-right))
           clamp(6px, 2vh, 24px) max(10px, env(safe-area-inset-left));

  /* A little light spilling off the cabinet. */
  background:
    radial-gradient(ellipse at 50% 38%, #1d1030 0%, #0c0817 55%, #08060f 100%);
}

#cabinet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#screen {
  display: block;
  /* Content-box, or the 3px border is taken out of the scaled width and an
   * "integer" 2x canvas actually draws at 1.99x -- smearing every column. */
  box-sizing: content-box;
  touch-action: manipulation;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #08060f;

  border: 3px solid #241733;
  border-radius: 3px;
  box-shadow:
    0 0 0 2px #0d0916,
    0 0 26px rgba(224, 40, 144, 0.20),
    0 14px 40px rgba(0, 0, 0, 0.75);
}

#screen:focus { outline: none; }
#screen:focus-visible { outline: 2px solid #2ce8ff; outline-offset: 4px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

#hint, #hint-touch, #note {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--dim);
}

#hint b, #hint-touch b {
  color: var(--ink);
  font-weight: 600;
}

#note {
  max-width: 52ch;
  color: #4f4860;
  font-style: italic;
}

/* A finger gets the finger hints; a keyboard gets the key hints. */
#hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  #hint { display: none; }
  #hint-touch { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  #screen { box-shadow: 0 0 0 2px #0d0916, 0 10px 30px rgba(0, 0, 0, 0.7); }
}

/* ---- dedication -------------------------------------------------------- */

#dedication {
  margin: 6px 0 0;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-align: center;
  color: #6b6478;
}
