/* Shared look for the game pages, from the demo's purple theme. Phone first. */
:root {
  --ink: #ecebff;
  --muted: #b9b0ff;
  --panel: rgba(10, 6, 40, 0.55);
  --line: rgba(160, 150, 240, 0.3);
  --field: #120c3c;
  --pink: #d23fc0;
  --purple: #3b3190;
  --good: #4fd98a;
  --bad: #ff6b7d;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: #0c0626; }
body {
  min-height: 100vh;
  margin: 0;
  padding: 16px;
  background: radial-gradient(ellipse at 50% 30%, #6a3fcf 0%, #2a1463 45%, #0c0626 100%) fixed;
  color: var(--ink);
  font: 16px/1.4 system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

main { max-width: 480px; margin: 0 auto; display: grid; gap: 16px; }
h1 { margin: 8px 0 0; font: 900 28px/1.1 'Nunito', system-ui, sans-serif; }
h2 { margin: 0; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
p { margin: 0; }
a { color: var(--muted); }

.card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
}
details.card { display: block; }
details summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.stack { display: grid; gap: 12px; }
details .stack { margin-top: 12px; }
.hint { font-size: 14px; color: var(--muted); }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; min-width: 0; }
.list { display: grid; gap: 8px; }
.list:empty { display: none; }
.code { font-family: 'Nunito', system-ui, sans-serif; font-weight: 900; letter-spacing: 0.12em; }

button, .button {
  display: inline-block;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--pink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button.secondary, .button.secondary { background: var(--purple); }
button.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
button:disabled { opacity: 0.45; cursor: default; }
button:not(:disabled):active { filter: brightness(1.2); }
@media (hover: hover) {
  button:not(:disabled):hover, .button:hover { filter: brightness(1.15); }
}

/* 16px or more stops iOS zooming in on focus. */
input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #6c62c8;
  border-radius: 8px;
  background: var(--field);
  color: #fff;
  font: inherit;
  font-size: 18px;
}
label { display: grid; gap: 6px; }

.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: #6c62c8; }
.dot.on { background: var(--good); }

.connection {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 30;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: #a3243a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
