/* The login page's whole look. The CSP forbids inline styles, so nothing is inline.
   Colours and fonts are the theme's (web/src/theme.css), repeated here because this
   page loads before a session exists and may reach nothing behind the guard. */
@font-face {
  font-family: 'Press Start 2P';
  font-display: swap;
  src: url('/fonts/press-start-2p-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'VT323';
  font-display: swap;
  src: url('/fonts/vt323-latin-400-normal.woff2') format('woff2');
}

:root {
  --page: #120a1a;
  --bar: #2a1838;
  --card: #241532;
  --bg: #1b1026;
  --line: #93e1d8;
  --fg: #ddfff7;
  --accent: #ffa69e;
  --rose: #aa4465;
  --px: 'Press Start 2P', monospace;
  --big: 'VT323', monospace;
  --tap: 44px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--page); color: var(--fg); }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
  font-family: var(--big);
}

main {
  /* Room for the card's hard shadow, so it never touches the page edge. */
  width: min(100%, 356px);
  padding-right: 6px;
  display: grid;
  gap: 20px;
}

h1 {
  font-family: var(--px);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
  text-align: center;
  text-shadow: 3px 3px 0 var(--rose);
}

/* The tiles: the 18 x 23 sprite at twice its size, three times where there is room.
   A slight up and down, so they read as tiles set out by hand. */
.tiles {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 6px;
}
.tiles svg { display: block; width: 36px; height: 46px; }
.tiles svg:nth-child(even) { margin-top: 6px; }

@media (min-width: 420px) {
  main { width: min(100%, 396px); }
  .tiles { gap: 12px; }
  .tiles svg { width: 54px; height: 69px; }
}

form {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--line);
}

label { font-size: 24px; line-height: 1; }

input {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 0 10px;
  /* At least 16 px, or a phone zooms in on focus. */
  font-family: var(--big);
  font-size: 24px;
  color: var(--fg);
  background: var(--bg);
  border: 3px solid var(--line);
  border-radius: 0;
}

button {
  min-height: var(--tap);
  margin: 4px 3px 3px 0;
  padding: 0 12px;
  font-family: var(--px);
  font-size: 11px;
  color: var(--fg);
  background: var(--rose);
  border: 3px solid var(--accent);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--accent);
  cursor: pointer;
}
button:active { transform: translate(3px, 3px); box-shadow: none; }

:focus-visible { outline: 2px dashed var(--accent); outline-offset: 2px; }

.message {
  font-size: 22px;
  line-height: 1.1;
  color: var(--accent);
}
