/* The invite page (/m/<id>): a game flyer pasted on a wall. Phone first; a desktop just sees the phone column, centred.
   Stands alone (no styles.css), so a link opened on a phone loads one small stylesheet. */

@font-face {
  font-family: "Unbounded";
  src: url("/assets/Unbounded-ExtraBold.woff2") format("woff2"), url("/assets/Unbounded-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  /* The app's palette (ParaBola/Theme.swift). */
  --wall: #0b0b0e;
  --ink: #101014;
  --tarmac: #1c1c21;
  --paper: #f2f0ea;
  --ash: #8c8c96;
  --lime: #c6ff3d;
  --pink: #ff2d95;
  --cyan: #2ee6ff;
  --grape: #8a3ffc;

  --brand: "Unbounded", "Arial Black", sans-serif;
  /* The app's compressed poster face: the system font at its narrowest width (Roboto Condensed on Android). */
  --poster: "sans-serif-condensed", system-ui, -apple-system, "Helvetica Neue", "Arial Narrow", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 20px;
  --column: 480px;
  --edge: 3px;
  --lift: 6px;

  --fast: 150ms;
  --normal: 320ms;
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { background: var(--wall); color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100svh;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  color: var(--paper);
  background:
    radial-gradient(120% 55% at 105% -5%, rgba(255, 45, 149, 0.26), transparent 62%),
    radial-gradient(90% 45% at -10% 38%, rgba(138, 63, 252, 0.2), transparent 60%),
    radial-gradient(80% 40% at 110% 78%, rgba(46, 230, 255, 0.1), transparent 60%),
    var(--wall);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain over everything, like paste on brick. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; padding: 10px 14px; background: var(--lime); color: var(--ink); font-weight: 800; }
.skip:focus { left: 8px; }

.poster { font-family: var(--poster); font-weight: 900; font-stretch: 50%; text-transform: uppercase; }

/* ---------- top ---------- */

.top, main, .bar > * { position: relative; z-index: 1; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: min(100%, var(--column)); margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 6px;
}
.wordmark { font-family: var(--brand); font-weight: 800; font-size: 19px; letter-spacing: -0.08em; text-decoration: none; color: var(--paper); }
.wordmark span { color: var(--lime); }
.top__right { display: flex; align-items: center; gap: 10px; }

.pill {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  padding: 13px 14px; color: var(--paper); border: 1.5px solid rgba(242, 240, 234, 0.35); border-radius: 999px;
  transition: border-color var(--fast), color var(--fast);
}
.pill:hover { border-color: var(--lime); color: var(--lime); }

.me { position: relative; }
.me__chip {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px;
  font-size: 13px; font-weight: 700; color: var(--paper); border: 1.5px solid rgba(242, 240, 234, 0.35); border-radius: 999px;
}
.me__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 150px; padding: 6px;
  background: var(--paper); border: var(--edge) solid var(--ink); box-shadow: 5px 5px 0 var(--pink);
}
.me__menu button { width: 100%; padding: 12px; text-align: left; font-weight: 700; color: var(--ink); }
.me__menu button:hover { background: rgba(16, 16, 20, 0.08); }

/* ---------- the flyer ---------- */

main {
  width: min(100%, var(--column)); margin: 0 auto;
  padding: 18px var(--gutter) calc(190px + env(safe-area-inset-bottom));
}

.hero { padding-top: 8px; }

.kicker {
  display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink); background: var(--pink); padding: 5px 9px; transform: rotate(-2deg);
  box-shadow: 3px 3px 0 var(--ink);
}

.clock { margin-top: 18px; }
.clock__time {
  display: block; color: var(--lime);
  font-size: clamp(84px, 27.5vw, 138px); line-height: 0.84; letter-spacing: -0.01em; white-space: nowrap;
  text-shadow: 0 0 34px rgba(198, 255, 61, 0.22);
}
/* Browsers whose system font has no narrow width (set by m.js): the same block, sized to fit. */
.no-narrow .clock__time { font-size: clamp(54px, 17.5vw, 88px); letter-spacing: -0.045em; }
.clock__day {
  display: block; margin-top: 12px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash);
}
.clock__day b { color: var(--paper); font-weight: 700; }

.title {
  margin-top: 16px;
  font-family: var(--brand); font-weight: 800; font-size: clamp(27px, 8.4vw, 42px); line-height: 1.02; letter-spacing: -0.055em;
  color: var(--paper); text-shadow: -3px 2px 0 var(--pink), 3px -2px 0 var(--cyan);
  overflow-wrap: anywhere; text-wrap: balance;
}
[data-phase="loading"] .title { color: var(--ash); text-shadow: none; animation: breathe 1.4s ease-in-out infinite; }

.lede { margin-top: 12px; color: var(--ash); font-size: 16px; max-width: 34ch; }
.lede:empty { display: none; }

.byline {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash);
}
.byline b { color: var(--paper); font-weight: 700; }

.stickers { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 18px; list-style: none; }
.stickers li {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 10px; color: var(--ink); background: var(--cyan); border: 2px solid var(--ink);
}
.stickers li:nth-child(odd) { transform: rotate(-2deg); }
.stickers li:nth-child(even) { transform: rotate(1.5deg); }
.stickers li[data-tone="ink"] { background: var(--ink); color: var(--lime); border-color: var(--lime); }
.stickers li[data-tone="paper"] { background: var(--paper); }
.stickers li[data-tone="pink"] { background: var(--pink); }
.stickers--ink { margin-top: 12px; }
.stickers--ink li { box-shadow: 2px 2px 0 var(--ink); }

/* The lime tape across the wall: where the game stands. */
.tape {
  width: 100vw; margin: 28px 0 30px calc(50% - 50vw); overflow: hidden;
  background: var(--lime); color: var(--ink); transform: rotate(-2deg) scale(1.04);
  border-block: 2px solid var(--ink);
}
.tape__run { display: flex; width: max-content; animation: slide 22s linear infinite; }
.tape__run span {
  flex: none; padding: 9px 0;
  font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap;
}
.tape__run span::after { content: "///"; margin: 0 16px; opacity: 0.55; }
.tape[data-tone="off"] { background: var(--pink); }
.tape[data-tone="wait"] { background: var(--paper); }

/* ---------- pasted cards ---------- */

.card {
  --shadow: var(--cyan); --tilt: -0.6deg;
  position: relative; margin-top: 30px; padding: 22px 18px 18px;
  color: var(--ink); background: var(--paper);
  background-image: radial-gradient(rgba(16, 16, 20, 0.07) 1px, transparent 1.3px), radial-gradient(rgba(16, 16, 20, 0.05) 1px, transparent 1.3px);
  background-size: 23px 23px, 37px 37px; background-position: 3px 5px, 17px 11px;
  border: var(--edge) solid var(--ink); border-radius: 3px;
  box-shadow: var(--lift) var(--lift) 0 var(--shadow);
  transform: rotate(var(--tilt));
  animation: paste var(--normal) var(--out) both; animation-delay: calc(var(--i, 0) * 70ms);
}
/* A strip of tape holding the sheet up. */
.card::before {
  content: ""; position: absolute; top: -13px; left: 50%; width: 92px; height: 24px; margin-left: -46px;
  background: rgba(198, 255, 61, 0.82); transform: rotate(-3deg);
  box-shadow: 0 1px 0 rgba(16, 16, 20, 0.18);
}
.card--squad { --shadow: var(--cyan); --tilt: -0.6deg; --i: 1; }
.card--where { --shadow: var(--lime); --tilt: 0.5deg; --i: 2; }
.card--gear { --shadow: var(--pink); --tilt: -0.4deg; --i: 3; }
.card--chat { --shadow: var(--grape); --tilt: 0.4deg; --i: 4; }
.card--where::before { transform: rotate(2.5deg); left: 30%; }
.card--gear::before { left: 68%; }

.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.card__label { font-family: var(--brand); font-weight: 800; font-size: 15px; letter-spacing: -0.03em; text-transform: uppercase; }
.card__label + * { margin-top: 10px; }
.card__aside { white-space: nowrap; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(16, 16, 20, 0.55); }
.card__foot { margin-top: 14px; padding-top: 12px; border-top: 2px solid rgba(16, 16, 20, 0.12); font-size: 13px; color: rgba(16, 16, 20, 0.62); }
.card__foot a { color: var(--ink); font-weight: 800; }

.tag {
  display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 6px 10px; border: 2px solid var(--ink); transform: rotate(-1.5deg); white-space: nowrap;
}
.tag--lime { background: var(--lime); }

/* roster */
.roster { list-style: none; }
.roster li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 2px solid rgba(16, 16, 20, 0.1); }
.roster li:first-child { border-top: 0; }
.roster__name { flex: 1; min-width: 0; font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster__you { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 7px; background: var(--lime); border: 2px solid var(--ink); transform: rotate(-3deg); }
.roster__host { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 7px; background: var(--ink); color: var(--paper); transform: rotate(2deg); }
.roster li.is-new { animation: stick var(--normal) var(--pop) both; }

.av {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden;
  font-family: var(--brand); font-weight: 800; font-size: 13px; letter-spacing: -0.04em; color: var(--paper); background: var(--ink);
  border: 2.5px solid var(--lime); border-radius: 50%; box-shadow: 3px 3px 0 var(--pink);
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av--sm { width: 30px; height: 30px; font-size: 9.5px; border-width: 2px; box-shadow: 2px 2px 0 var(--pink); }
.av--xs { width: 26px; height: 26px; font-size: 8.5px; border-width: 2px; box-shadow: none; }

.roster__open { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 2px dashed rgba(16, 16, 20, 0.28);
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(16, 16, 20, 0.6); }
.roster__open i { display: flex; }
.roster__open i::before, .roster__open i::after, .roster__open i b {
  content: ""; width: 26px; height: 26px; margin-right: -8px; border: 2px dashed rgba(16, 16, 20, 0.4); border-radius: 50%; background: var(--paper);
}
.roster__open i::after { margin-right: 0; }

/* Before joining: a wall of initials, no names. */
.roster--faces { display: flex; flex-wrap: wrap; gap: 14px 12px; padding: 4px 0 6px; }
.roster--faces li { position: relative; padding: 0; border: 0; }
.roster--faces li:nth-child(3n + 1) { transform: rotate(-4deg); }
.roster--faces li:nth-child(3n) { transform: rotate(3deg); }
.roster--faces .av { width: 52px; height: 52px; font-size: 16px; }
.roster--faces .roster__host { position: absolute; left: 50%; bottom: -9px; padding: 2px 5px; font-size: 8px; transform: translateX(-50%) rotate(-3deg); }
.roster__lock { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; font-size: 14px; border: 2px dashed rgba(16, 16, 20, 0.45); }
.roster__lock svg { flex: none; width: 34px; height: 34px; padding: 8px; color: var(--paper); background: var(--ink); transform: rotate(-4deg); }
.roster__lock b { font-weight: 800; }

/* where */
.where__name { font-family: var(--brand); font-weight: 800; font-size: clamp(20px, 6.2vw, 28px); line-height: 1.05; letter-spacing: -0.05em; overflow-wrap: anywhere; }
.where__addr { margin-top: 6px; font-size: 14px; color: rgba(16, 16, 20, 0.66); }

.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.row--center { justify-content: center; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform var(--fast) var(--out);
}
.chip:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.chip--dark { color: var(--paper); background: var(--tarmac); border-color: rgba(242, 240, 234, 0.4); box-shadow: none; }
.chip--dark:active { box-shadow: none; }

/* gear */
.gear { list-style: none; }
.gear li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 2px solid rgba(16, 16, 20, 0.1); }
.gear li:first-child { border-top: 0; }
.gear b { font-weight: 800; }
.gear span { font-size: 14px; text-align: right; color: var(--pink); font-weight: 700; }
.gear span[data-set] { color: rgba(16, 16, 20, 0.72); }

/* chat */
.chat { list-style: none; display: grid; gap: 12px; }
.chat li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: end; }
.chat__who { font-size: 12px; font-weight: 800; }
.chat__who time { margin-left: 6px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(16, 16, 20, 0.45); }
.chat__text { display: inline-block; margin-top: 3px; padding: 8px 12px; font-size: 15px; background: rgba(16, 16, 20, 0.06); border: 1.5px solid var(--ink); overflow-wrap: anywhere; }
.chat li[data-mine] { grid-template-columns: 1fr; justify-items: end; }
.chat li[data-mine] .chat__text { background: var(--lime); border-width: 2px; }
.chat__more { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(16, 16, 20, 0.55); text-align: center; }
.chat__lock { display: flex; align-items: center; gap: 12px; padding: 14px; font-size: 14px; border: 2px dashed rgba(16, 16, 20, 0.45); }
.chat__lock svg { flex: none; width: 34px; height: 34px; padding: 8px; color: var(--paper); background: var(--ink); transform: rotate(-4deg); }
.chat__lock b { font-weight: 800; }
.chat:empty { display: none; }
.chat:not(:empty) + .chat__lock { margin-top: 14px; }

/* /account: the games I'm in, and the city search */
.account .card:first-of-type { --i: 1; }
.mygames { list-style: none; }
.mygames li { border-top: 2px solid rgba(16, 16, 20, 0.1); }
.mygames li:first-child { border-top: 0; }
.mygames a { display: grid; gap: 2px; padding: 12px 0; text-decoration: none; color: var(--ink); }
.mygames__when { font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pink); }
.mygames__name { font-family: var(--brand); font-weight: 800; font-size: 18px; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.mygames__status { font-size: 13px; color: rgba(16, 16, 20, 0.62); }
.mygames a:active .mygames__name { transform: translateX(3px); }
.cities { list-style: none; margin-top: 8px; border: var(--edge) solid var(--ink); background: #fff; }
.cities li + li { border-top: 2px solid rgba(16, 16, 20, 0.12); }
.cities button { width: 100%; min-height: 46px; padding: 0 14px; text-align: left; font-weight: 700; color: var(--ink); }
.cities button:hover, .cities button:focus-visible { background: var(--lime); }
.account { padding-bottom: 40px; }
.account .step .card__label { font-size: 20px; }

/* the app */
.app { margin-top: 40px; padding: 22px 18px; border: 2px dashed rgba(242, 240, 234, 0.3); animation: paste var(--normal) var(--out) both; animation-delay: 350ms; }
.app__title { font-family: var(--brand); font-weight: 800; font-size: 18px; letter-spacing: -0.04em; text-transform: uppercase; }
.app__list { margin: 12px 0 18px; list-style: none; color: var(--ash); }
.app__list li { padding: 5px 0 5px 22px; position: relative; }
.app__list li::before { content: ""; position: absolute; left: 0; top: 13px; width: 10px; height: 10px; background: var(--lime); transform: rotate(45deg); }
.app__soon { font-size: 14px; color: var(--ash); }
.app__soon a { color: var(--lime); font-weight: 700; }

.foot { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 34px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--paper); }

/* ---------- buttons ---------- */

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; padding: 0 18px;
  font-family: var(--brand); font-weight: 800; font-size: 16px; letter-spacing: -0.02em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); border: var(--edge) solid var(--ink); border-radius: 5px;
  transition: transform var(--fast) var(--out), box-shadow var(--fast) var(--out);
}
.btn--lime { background: var(--lime); box-shadow: 5px 5px 0 var(--paper); }
.btn--paper { background: var(--paper); box-shadow: 5px 5px 0 var(--lime); }
.btn--pink { background: var(--pink); }
.btn--on-paper { box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--paper); }
.btn--on-paper:active { box-shadow: 2px 2px 0 var(--ink); }
.btn--ghost { min-height: 48px; font-size: 13px; color: rgba(16, 16, 20, 0.7); border-color: transparent; }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none; }
.btn + .btn { margin-top: 10px; }

.link { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- the bar ---------- */

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 22px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  /* Solid under the button and its small print; it only fades at the very top edge. */
  background: linear-gradient(to top, var(--wall) calc(100% - 22px), rgba(11, 11, 14, 0));
  animation: rise var(--normal) var(--out) both; animation-delay: 200ms;
}
.bar > * { width: min(100%, calc(var(--column) - 2 * var(--gutter))); margin-inline: auto; }
.bar__links + .bar__state + .bar__find, .bar__note { margin-top: 14px; }
.bar__note { font-size: 12.5px; font-weight: 600; line-height: 1.35; text-align: center; color: var(--ash); }
.bar__note:empty { display: none; }
.bar__state {
  display: grid; place-items: center; min-height: 56px;
  font-family: var(--brand); font-weight: 800; font-size: 16px; text-transform: uppercase; color: var(--ash);
  border: 2px solid rgba(242, 240, 234, 0.3); border-radius: 5px;
}
.bar__signin { display: block; margin-top: 2px; padding: 6px; font-size: 12.5px; font-weight: 700; color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.bar__joined { display: flex; align-items: center; gap: 16px; }
.bar__calendar { flex: 1; justify-content: center; min-height: 48px; }
.bar__links { display: flex; justify-content: center; gap: 10px; margin-top: 4px; font-size: 13px; color: var(--paper); }
.bar__links .link { min-height: 44px; padding: 0 12px; }

.stamp {
  flex: none; display: inline-block; padding: 9px 12px;
  font-family: var(--brand); font-weight: 800; font-size: 15px; letter-spacing: -0.02em; text-transform: uppercase;
  color: var(--ink); background: var(--lime); border: var(--edge) solid var(--ink); box-shadow: 4px 4px 0 var(--pink);
  transform: rotate(-4deg);
}
.stamp.is-fresh { animation: stamp 520ms var(--pop) both; }
.stamp--big { font-size: clamp(34px, 11vw, 48px); padding: 12px 18px; box-shadow: 7px 7px 0 var(--pink); }

.toast {
  position: fixed; left: 50%; bottom: calc(190px + env(safe-area-inset-bottom)); z-index: 40; transform: translateX(-50%);
  max-width: calc(100vw - 40px); padding: 11px 16px; font-size: 14px; font-weight: 700;
  color: var(--ink); background: var(--lime); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  animation: rise var(--normal) var(--out) both;
}

/* ---------- the sheet ---------- */

.sheet {
  width: 100%; max-width: var(--column); max-height: 92svh; margin: auto auto 0; overflow-y: auto;
  padding: 30px var(--gutter) calc(22px + env(safe-area-inset-bottom));
  color: var(--ink); background: var(--paper);
  background-image: radial-gradient(rgba(16, 16, 20, 0.06) 1px, transparent 1.3px); background-size: 29px 29px;
  border: 0; border-top: 4px solid var(--ink); border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 0 var(--lime);
}
.sheet[open] { animation: sheet var(--normal) var(--out) both; }
.sheet::backdrop { background: rgba(6, 6, 8, 0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet__close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); border: 2px solid var(--ink); border-radius: 50%; background: #fff; }
.step__count { font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--pink); }
.sheet__title { margin-top: 8px; padding-right: 46px; font-family: var(--brand); font-weight: 800; font-size: clamp(25px, 7.6vw, 34px); line-height: 1.04; letter-spacing: -0.055em; }
.sheet__lede { margin-top: 10px; font-size: 15px; color: rgba(16, 16, 20, 0.7); }
.sheet__lede b { color: var(--ink); }
.sheet__error { margin-top: 14px; padding: 10px 12px; font-size: 14px; font-weight: 700; color: var(--ink); background: rgba(255, 45, 149, 0.16); border-left: 4px solid var(--pink); }
.sheet__fine { margin-top: 16px; font-size: 12px; line-height: 1.5; color: rgba(16, 16, 20, 0.62); }
.sheet__fine a { color: var(--ink); font-weight: 700; }
.step .btn { margin-top: 20px; }
.step .btn + .btn { margin-top: 8px; }
.step--done { text-align: center; padding-top: 30px; }
.step--done .sheet__title { padding-right: 0; margin-top: 22px; }

.field { display: block; margin-top: 22px; }
.field__label { display: block; margin-bottom: 8px; font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.field__row { display: flex; align-items: stretch; gap: 8px; }
.field__prefix { display: grid; place-items: center; padding: 0 12px; white-space: nowrap; font-weight: 900; font-size: 15px; background: var(--lime); border: var(--edge) solid var(--ink); }
.field input {
  width: 100%; min-width: 0; height: 56px; padding: 0 14px;
  font: 700 19px/1 var(--body); color: var(--ink); background: #fff;
  border: var(--edge) solid var(--ink); border-radius: 0; box-shadow: 4px 4px 0 var(--pink); appearance: none;
}
.field input::placeholder { color: rgba(16, 16, 20, 0.32); font-weight: 600; }
.field input:focus-visible { outline-offset: 4px; }
.field .field__code { text-align: center; font: 900 30px/1 var(--poster); letter-spacing: 0.42em; padding-left: 0.42em; font-variant-numeric: tabular-nums; }

/* The reCAPTCHA badge is replaced by the notice in the sheet, as Google allows. */
.grecaptcha-badge { visibility: hidden; }
.recaptcha { position: absolute; }

/* ---------- motion ---------- */

@keyframes paste { from { opacity: 0; transform: translateY(18px) rotate(calc(var(--tilt, 0deg) * -3)) scale(0.97); } }
@keyframes stick { from { opacity: 0; transform: scale(0.8) rotate(-4deg); } }
@keyframes stamp { from { opacity: 0; transform: scale(2.4) rotate(14deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
.toast { animation-name: toast; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 16px); } }
@keyframes sheet { from { transform: translateY(100%); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes breathe { 50% { opacity: 0.45; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .tape__run { animation: none; }
}

@media (min-width: 560px) {
  main { padding-top: 28px; }
  .tape { transform: rotate(-1.2deg) scale(1.02); }
}

/* ---------- a real web page on a laptop: the flyer on the left stays put, the cards scroll on the right ---------- */
@media (min-width: 960px) {
  :root { --column: 1140px; --gutter: 44px; }
  .top { padding-top: calc(30px + env(safe-area-inset-top)); padding-bottom: 14px; }
  .wordmark { font-size: 24px; }
  .pill { font-size: 12px; padding: 14px 18px; }

  /* On a tall screen the footer rests on the bottom edge instead of floating under a short page. */
  body { display: flex; flex-direction: column; }
  main {
    flex: 1;
    display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); grid-template-rows: 1fr auto;
    column-gap: 76px; align-items: start;
    padding-top: 40px; padding-bottom: 56px;
  }
  /* Nothing to put beside the flyer (the game is over, gone or still loading): one centred column. */
  main[data-phase]:not([data-phase="open"]):not([data-phase="started"]) {
    grid-template-columns: minmax(0, 620px); grid-template-rows: auto 1fr auto; justify-content: center;
  }
  .lead { position: sticky; top: 30px; }
  .stack > :first-child { margin-top: 16px; }
  .sitefoot { grid-column: 1 / -1; }

  .clock__time { font-size: clamp(128px, 12vw, 184px); }
  .no-narrow .clock__time { font-size: clamp(84px, 7.6vw, 116px); }
  .clock__day { font-size: 13px; }
  .title { font-size: clamp(36px, 3.5vw, 54px); }
  .lede { font-size: 18px; }
  .tape { width: auto; margin: 32px -18px 30px; transform: rotate(-2deg); border: 2px solid var(--ink); }
  .card { padding: 26px 24px 22px; }
  .app { margin-top: 34px; }

  /* The join button sits under the flyer instead of along the bottom of the screen. */
  .bar { position: static; padding: 0; background: none; animation: none; }
  .bar > * { width: 100%; }
  .bar .btn { min-height: 64px; font-size: 18px; }
  .bar__note { text-align: left; font-size: 13.5px; }
  .bar__signin { padding-left: 0; text-align: left; }
  .bar__links { justify-content: flex-start; margin-left: -12px; }
  .bar__state { min-height: 64px; }
  .toast { bottom: 36px; }

  /* The sign-in sheet becomes a dialog in the middle of the screen. */
  .sheet {
    margin: auto; max-width: 470px; padding: 34px 32px 28px;
    border: 4px solid var(--ink); border-radius: 14px; box-shadow: 10px 10px 0 var(--lime);
  }
  .sheet[open] { animation-name: dialog; }
}
@keyframes dialog { from { opacity: 0; transform: translateY(20px) scale(0.97); } }
