/* play — one stylesheet. The game's accent (--accent) is set per page from its
   slug (app.js), so each game has its own colour without anyone picking one. */
:root {
  --bg: #f4f4f6;
  --card: #fff;
  --ink: #1b1b1f;
  --muted: #6b6b73;
  --line: #e6e6eb;
  --soft: #f7f7fa;
  --accent: hsl(150 55% 38%);
  --accent-soft: hsl(150 55% 95%);
  --bad: #c0392b;
  --radius: 18px;
  --w: 560px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214; --card: #1c1c20; --ink: #ececf1; --muted: #9a9aa6; --line: #2c2c33;
    --soft: #232328; --accent-soft: color-mix(in srgb, var(--accent) 18%, var(--card));
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; align-items: center;
  padding: max(28px, env(safe-area-inset-top)) 16px max(40px, env(safe-area-inset-bottom));
}
main { width: min(var(--w), 100%); display: flex; flex-direction: column; gap: 16px; }
footer { margin-top: 28px; font-size: 12.5px; color: var(--muted); }
footer a { color: inherit; font-weight: 650; text-decoration: none; }
a { color: var(--accent); }
[hidden] { display: none !important; }

/* ---- the header of a page ---- */
.hero { padding: 18px 4px 6px; display: flex; gap: 16px; align-items: center; }
.mark {
  flex: none; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -.02em;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.hero h1 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.lede { color: var(--muted); margin: 2px 4px 4px; font-size: 15px; white-space: pre-line; }
.hello { margin: 0 4px; font-weight: 650; }

/* ---- cards ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px rgba(0,0,0,.04);
}
.card h2 {
  margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.card.link { text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
.card.link:hover { transform: translateY(-1px); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 14px 34px rgba(0,0,0,.07); }
.card .title { font-size: 17px; font-weight: 700; }
.meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 99px;
  background: var(--soft); color: var(--muted); border: 1px solid var(--line);
}

/* ---- the ways to get a build ---- */
.way { display: flex; flex-direction: column; gap: 8px; }
.way + .way { border-top: 1px solid var(--line); padding-top: 14px; }
.way .what { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.way .what .glyph { font-size: 18px; width: 22px; text-align: center; }
.btn {
  appearance: none; border: 0; border-radius: 13px; padding: 13px 16px; width: 100%;
  font: inherit; font-size: 15.5px; font-weight: 700; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(.96); }
.btn:active { transform: translateY(1px); }
.btn.quiet { background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.btn:disabled { background: var(--soft); color: var(--muted); cursor: not-allowed; transform: none; filter: none; border: 1px solid var(--line); }
.note { font-size: 13px; color: var(--muted); }

/* ---- open on your phone ---- */
.card.qr { flex-direction: row; gap: 18px; align-items: center; }
.qr img { width: 132px; height: 132px; border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--line); flex: none; }
.qr p { margin: 0; font-size: 14px; color: var(--muted); }
.qr b { color: var(--ink); display: block; font-size: 16px; margin-bottom: 2px; }

/* ---- what's new ---- */
ul.changes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
ul.changes li { overflow-wrap: anywhere; }

/* ---- requesting a build ---- */
.tip { background: var(--soft); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; }
.tip .subject { font-size: 15px; font-weight: 700; margin: 3px 0 2px; overflow-wrap: anywhere; }
.ask { font-size: 13.5px; color: var(--muted); }
.ask b { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 2px; }
.built { color: var(--accent); font-weight: 650; }
.status { font-weight: 650; }
.bar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; position: relative; border: 1px solid var(--line); }
.bar > i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: var(--accent); transition: width .9s linear; }
.bar.waiting > i { width: 30%; animation: slide 1.4s ease-in-out infinite alternate; }
@keyframes slide { from { left: 0; } to { left: 70%; } }
@media (prefers-reduced-motion: reduce) {
  .bar.waiting > i { animation: none; left: 0; width: 100%; opacity: .35; }
  .card.link, .btn { transition: none; }
}
.err { color: var(--bad); font-size: 13px; font-weight: 650; }
.err:empty { display: none; }

/* ---- earlier builds ---- */
ul.builds { list-style: none; margin: 0; padding: 0; }
ul.builds li { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
ul.builds li:first-child { border-top: 0; padding-top: 0; }
ul.builds .main { flex: 1; min-width: 0; }
ul.builds .main small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
ul.builds .end { font-size: 13px; font-weight: 650; white-space: nowrap; }
ul.builds .end.gone { color: var(--muted); font-weight: 500; }
ul.builds a.end { text-decoration: none; }

details { font-size: 13.5px; color: var(--muted); }
details summary { cursor: pointer; font-weight: 650; color: var(--ink); }
details ol { margin: 6px 0 0; padding-left: 18px; }

/* ---- empty and missing ---- */
.empty { text-align: center; padding: 44px 12px; color: var(--muted); }
.empty .big { font-size: 42px; display: block; margin-bottom: 6px; }
.empty b { color: var(--ink); display: block; font-size: 17px; margin-bottom: 4px; }

.loading { display: flex; gap: 6px; justify-content: center; padding: 60px 0; }
.loading i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); animation: pulse 1s ease-in-out infinite; }
.loading i:nth-child(2) { animation-delay: .15s; }
.loading i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 50% { background: var(--muted); } }
