/* play — one stylesheet. Each page has ONE loud thing: the newest build, in a
   card whose band carries the game's own hue (--h, set per page from its slug in
   app.js), and the one button that gets it onto the visitor's device, in that
   store's colour. Everything else is near-black text on white, smaller, or grey:
   other devices, older builds, commit ids, sizes, dates, help. */
:root {
  --h: 150;
  --page: #f3f4f7;
  --card: #ffffff;
  --ink: #111318;
  --ink-2: #353844;
  --muted: #6a6d79;
  --line: #e6e7ec;
  --soft: #f3f4f7;
  --accent: hsl(var(--h) 68% 40%);
  --accent-2: hsl(calc(var(--h) + 38) 74% 48%);
  --accent-soft: hsl(var(--h) 80% 95%);
  --accent-ink: hsl(var(--h) 72% 30%);
  /* the stores' own colours: data colour, the same on every game */
  --tf: #5b3ee6;  --tf-soft: #eeebfd;
  --gp: #0b8a4c;  --gp-soft: #e2f4ea;
  --gh: #24292f;  --gh-soft: #eaeef2;
  --web: #c2410c; --web-soft: #fdeee6;
  --bad: #c9352b;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e0f12; --card: #181a1f; --ink: #f2f3f6; --ink-2: #d2d4db; --muted: #9a9daa;
    --line: #2a2c33; --soft: #22242a;
    --accent: hsl(var(--h) 60% 42%); --accent-2: hsl(calc(var(--h) + 38) 66% 46%);
    --accent-soft: hsl(var(--h) 35% 15%); --accent-ink: hsl(var(--h) 75% 76%);
    --tf: #7b63ff; --tf-soft: #241f42; --gp: #18a862; --gp-soft: #11291c;
    --gh: #e6edf3; --gh-soft: #262b33; --web: #f0763a; --web-soft: #33200f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--page);
  font: 16px/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(18px, env(safe-area-inset-top)) 16px max(36px, env(safe-area-inset-bottom));
}
main { width: min(600px, 100%); }
footer { margin-top: 36px; font-size: 13px; color: var(--muted); }
footer a { color: inherit; font-weight: 700; text-decoration: none; }
a { color: var(--accent-ink); }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }

/* ---- the game's mark and name: small, at the top ---- */
.mark {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 19px; font-weight: 850; color: #fff;
  background: linear-gradient(140deg, hsl(var(--gh, var(--h)) 68% 46%), hsl(calc(var(--gh, var(--h)) + 38) 74% 52%));
}
.mark.big { width: 56px; height: 56px; border-radius: 17px; font-size: 26px; }
.top { display: flex; gap: 12px; align-items: center; padding: 4px 4px 4px; }
.names { min-width: 0; }
.names .game { font-size: 17px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.names .track { font-size: 14.5px; color: var(--muted); line-height: 1.3; }
.hello { font-size: 22px; font-weight: 800; letter-spacing: -.015em; padding: 0 4px; }

/* ---- layout: one column on a phone; on a computer the build left, the rest right ---- */
.layout { display: flex; flex-direction: column; gap: 14px; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 900px) {
  main:has(.layout) { width: min(1040px, 100%); }
  .layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 22px; align-items: start; }
  .col.side { padding-top: 62px; }
}

/* ---- the headline card ---- */
.hero, .req, .qr, .track-card, .game-card {
  background: var(--card); border-radius: 24px;
  box-shadow: 0 1px 2px rgba(17,19,24,.05), 0 10px 30px -14px rgba(17,19,24,.14);
}
.hero { overflow: hidden; }
.band {
  position: relative; overflow: hidden; color: #fff; padding: 20px 22px 22px;
  background:
    radial-gradient(90% 160% at 100% 0%, rgba(255,255,255,.20), transparent 60%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
}
.band::after {   /* one soft disc of light, so the band isn't a flat swatch */
  content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%;
  right: -50px; bottom: -120px; background: rgba(255,255,255,.13);
}
.band .eyebrow { font-size: 14px; font-weight: 700; opacity: .92; }
.headline { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.headline .n { font-size: 44px; line-height: 1; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.headline .n::before { content: "Build "; font-weight: 600; letter-spacing: -.02em; }
.headline .when { font-size: 16px; font-weight: 600; opacity: .92; }
.headline.small { font-size: 18px; font-weight: 700; line-height: 1.35; }
.hero .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.lede { font-size: 16.5px; color: var(--ink-2); white-space: pre-line; margin-bottom: 4px; }
.label { font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: -.005em; }
ul.changes { margin: 0 0 4px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
ul.changes li { position: relative; padding-left: 20px; font-size: 16.5px; line-height: 1.4; overflow-wrap: anywhere; }
ul.changes li::before {
  content: ""; position: absolute; left: 2px; top: .52em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.get { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.fine { font-size: 14px; color: var(--muted); text-align: center; }

/* the one button, in the colour of where it takes you */
.btn {
  appearance: none; border: 0; border-radius: 16px; padding: 17px 18px; width: 100%;
  font: inherit; font-size: 17px; font-weight: 800; letter-spacing: -.005em; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center;
  background: var(--accent); color: #fff;
  box-shadow: 0 10px 20px -12px rgba(0,0,0,.5);
  transition: filter .15s, transform .05s;
}
.btn.tf { background: var(--tf); }
.btn.gp { background: var(--gp); }
.btn.gh { background: var(--gh); color: var(--card); }
.btn.web { background: var(--web); }
.btn.ink { background: var(--ink); color: var(--card); }
.btn.quiet { background: transparent; color: var(--ink); box-shadow: none; border: 1.5px solid var(--line); }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--soft); color: var(--muted); box-shadow: none; cursor: not-allowed; filter: none; transform: none; }

/* the other ways for this same device: a quiet line each, under the button */
a.alt {
  display: grid; grid-template-columns: 10px 1fr; gap: 0 10px; align-items: center;
  margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: var(--soft);
  text-decoration: none; color: var(--ink);
}
a.alt .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
a.alt.gp .dot { background: var(--gp); }
a.alt.tf .dot { background: var(--tf); }
a.alt.gh .dot { background: var(--gh); }
a.alt.web .dot { background: var(--web); }
.caveat { font-size: 13.5px; color: var(--ink-2); background: var(--soft); border-radius: 10px; padding: 8px 11px; }
a.alt .caveat { grid-column: 2; background: none; padding: 2px 0 0; }
.way .caveat { background: none; padding: 2px 0 0; }
.gh-quiet { align-self: center; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; }
.gh-quiet:hover { color: var(--ink); }
a.alt .t { font-size: 15.5px; font-weight: 700; }
a.alt small { grid-column: 2; font-size: 13.5px; color: var(--muted); }

/* on a computer: one row per way, the words left, its button right */
.ways { display: flex; flex-direction: column; gap: 10px; }
.way { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 14px 14px 14px 18px; border-radius: 18px; background: var(--soft); }
.way .who { min-width: 0; flex: 1 1 180px; }
@media (max-width: 560px) {   /* a narrow computer window: the button goes under its words */
  .way { flex-direction: column; align-items: stretch; gap: 12px; }
  .way .who { flex: none; }
  .way .btn { width: auto; }
}
.way .who span { font-size: 13.5px; }
.way .btn { flex: none; width: 250px; font-size: 15.5px; padding: 13px 14px; border-radius: 13px; }
.who { display: flex; flex-direction: column; line-height: 1.3; }
.who b { font-size: 16px; font-weight: 800; }
.who span { font-size: 14px; color: var(--muted); }

/* ---- the quieter cards ---- */
.elsewhere { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 20px; border: 1px solid var(--line); }
.elsewhere b { font-size: 16px; font-weight: 800; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  flex: none; font-size: 14.5px; font-weight: 800; text-decoration: none; padding: 9px 14px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap;
}
.pill.tf { background: var(--tf-soft); color: var(--tf); }
.pill.gp { background: var(--gp-soft); color: var(--gp); }
.pill.gh { background: var(--gh-soft); color: var(--gh); }
.pill.web { background: var(--web-soft); color: var(--web); }

/* ---- asking for Google Play access ---- */
.access { display: flex; flex-direction: column; gap: 12px; }
.way.form { display: block; padding: 16px 18px 18px; }
.access .who { flex: none; }
.access-form { display: flex; gap: 10px; flex-wrap: wrap; }
.access-form .field { flex: 1 1 220px; min-width: 0; }
.access-form .btn { flex: 1 1 160px; width: auto; }
.field {
  font: inherit; font-size: 16.5px; padding: 15px 16px; border-radius: 14px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); outline: none;
}
.field:focus { border-color: var(--gp); box-shadow: 0 0 0 3px var(--gp-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.asked { font-size: 15px; color: var(--ink-2); }
.asked b { display: block; font-size: 17px; color: var(--gp); font-weight: 800; }
.already { font-size: 14.5px; color: var(--ink-2); }
.already summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.already div { margin-top: 6px; }
.access-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; border-radius: 20px; background: var(--card);
  box-shadow: 0 1px 2px rgba(17,19,24,.05), 0 10px 30px -14px rgba(17,19,24,.14); }
.access-card > b { font-size: 17px; font-weight: 800; }
.access.in-card > .who b { display: none; }
.access-card.fold { display: block; padding: 14px 18px; box-shadow: none; border: 1px solid var(--line); background: transparent; }
.access-card.fold summary { cursor: pointer; font-size: 16px; font-weight: 800; }
.access-card.fold[open] summary { margin-bottom: 12px; }
.nothing { font-size: 15.5px; color: var(--ink-2); background: var(--soft); border-radius: 14px; padding: 12px 14px; }

.qr { display: flex; gap: 18px; align-items: center; padding: 18px; }
.qr img { width: 128px; height: 128px; border-radius: 14px; background: #fff; padding: 8px; border: 1px solid var(--line); flex: none; }
.qr div { font-size: 14.5px; color: var(--ink-2); }
.qr b { display: block; color: var(--ink); font-size: 18px; font-weight: 800; margin-bottom: 4px; }

.older { padding: 6px 4px 0; }
.older h2 { font-size: 14px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.older ul { list-style: none; margin: 0; padding: 0; }
.older li { display: flex; gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.older li:first-child { border-top: 0; }
.older .n { flex: none; min-width: 40px; font-weight: 800; font-size: 15.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.older .main { flex: 1; min-width: 0; font-size: 15px; color: var(--ink-2); }
.older .main small { display: block; font: 12.5px/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.older .end { font-size: 14.5px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.older .end.gone { color: var(--muted); font-weight: 500; }
.older .end.links { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.older .end.links a { text-decoration: none; }

.help { padding: 2px 4px; font-size: 14.5px; color: var(--ink-2); }
.help summary { cursor: pointer; font-weight: 700; color: var(--muted); font-size: 14.5px; }
.help ol { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

/* ---- requesting a build (link and invite tracks) ---- */
.req { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.req h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
/* while a build runs, this card is what the visitor is watching: it takes the game's tint */
.req.running { background: linear-gradient(170deg, var(--accent-soft), var(--card) 75%); box-shadow: 0 0 0 2px var(--accent), 0 10px 30px -14px rgba(17,19,24,.14); }
.req.running h2 { color: var(--accent-ink); font-size: 15px; }
.req.running .bar { background: var(--card); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.tip { background: var(--soft); border-radius: 16px; padding: 14px 16px; }
.tip .label { font-size: 13px; font-weight: 700; color: var(--muted); }
.tip .subject { font-size: 17.5px; font-weight: 800; margin: 3px 0 4px; line-height: 1.35; overflow-wrap: anywhere; }
.tip .meta { font-size: 13.5px; color: var(--muted); }
.ask { font-size: 15px; color: var(--ink-2); }
.ask b { display: block; color: var(--ink); font-size: 17.5px; font-weight: 800; margin-bottom: 3px; }
.built { color: var(--gp); font-weight: 750; }
.note { font-size: 14px; color: var(--muted); text-align: center; }
.meta { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.status { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.bar { height: 12px; border-radius: 99px; background: var(--soft); overflow: hidden; position: relative; }
.bar > i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); 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%; } }
.err { color: var(--bad); font-size: 14px; font-weight: 700; }
.err:empty { display: none; }

/* ---- the front page and a game's page ---- */
.intro { padding: 18px 4px 22px; }
.intro h1 { font-size: 34px; font-weight: 850; letter-spacing: -.03em; line-height: 1.1; }
.intro p { margin-top: 6px; font-size: 16.5px; color: var(--ink-2); }
.games, .tracks { display: flex; flex-direction: column; gap: 12px; }
.tracks { margin-top: 14px; }
.game-card { display: flex; gap: 16px; align-items: center; padding: 16px 18px; text-decoration: none; color: inherit; }
.game-card .names { flex: 1; }
.game-card .names .game { font-size: 19px; }
.go { font-size: 20px; color: var(--muted); }
.track-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 20px; text-decoration: none; color: inherit; }
.track-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.track-card .title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.fresh { font-size: 14px; font-weight: 700; color: var(--accent-ink); }
.blurb { font-size: 15.5px; color: var(--ink-2); }
.blurb { margin-top: 6px; }
.stores { margin-top: 6px; font-size: 14px; color: var(--muted); }
@media (hover: hover) {
  .game-card, .track-card { transition: transform .12s, box-shadow .12s; }
  .game-card:hover, .track-card:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(17,19,24,.05), 0 16px 34px -14px rgba(17,19,24,.22); }
}

/* ---- empty and missing ---- */
.empty { text-align: center; padding: 56px 16px; color: var(--ink-2); }
.empty .big { font-size: 52px; display: block; margin-bottom: 10px; }
.empty b { color: var(--ink); display: block; font-size: 21px; font-weight: 800; margin-bottom: 6px; }

.loading { display: flex; gap: 7px; justify-content: center; padding: 70px 0; }
.loading i { width: 10px; height: 10px; 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(--accent); } }

@media (prefers-reduced-motion: reduce) {
  .bar.waiting > i { animation: none; left: 0; width: 100%; opacity: .35; }
  .btn, .game-card, .track-card { transition: none; }
}
