:root {
  --bg: #eeebe4;
  --bubble: #f8f6f1;
  --ink: #1b1a17;
  --muted: #7a756b;
  --line: #dcd6cb;
  --accent: #d6461c;
  --accent-ink: #ffffff;
  --live: #e0121f;
  --shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 6px 16px rgba(40, 30, 20, .06);
  --shadow-up: 0 2px 4px rgba(40, 30, 20, .08), 0 14px 28px rgba(40, 30, 20, .12);
  /* The system UI font: San Francisco on Apple devices, Roboto on Android, Segoe on Windows. */
  --sans: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311; --bubble: #201e1b; --ink: #ece7dd; --muted: #8f897e; --line: #2e2c28;
    --accent: #ff6a3d; --accent-ink: #141311; --live: #ff2233;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-up: 0 12px 28px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
/* Everything lowercase, except "FAQ" and names people type. */
body { text-transform: lowercase; }
button { text-transform: inherit; }
.keep-case, input, .board li b { text-transform: none; }

header, main { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { header, main { padding: 0 32px; } }

header { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 20px; }
.mark {
  display: inline-block; font-size: 17px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); text-decoration: none;
  transform: rotate(-2deg); transform-origin: left bottom; margin-top: 3px;
}
.nav { display: flex; gap: 8px; }
.link { font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.link:hover { color: var(--ink); }

/* ---------- pills + bubbles: soft, raised, squish when pressed ---------- */
.chip, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  padding: 9px 16px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--bubble); color: var(--ink); box-shadow: var(--shadow);
  transition: transform .18s cubic-bezier(.3, .7, .4, 1.5), box-shadow .18s ease, background .18s ease, color .18s ease;
}
.chip:hover, .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.chip:active, .btn:active, .picks a:active { transform: scale(.94); transition-duration: .08s; }
.mark, .chip { white-space: nowrap; }
@media (max-width: 480px) {
  header { gap: 10px; }
  .mark { font-size: 15px; }
  .nav { gap: 6px; }
  .nav .chip { padding: 8px 11px; font-size: 13px; }
  .nav .chip.icon { width: 32px; height: 32px; padding: 0; }
}
.chip.icon { width: 36px; height: 36px; padding: 0; }
.chip.icon svg { width: 14px; height: 14px; fill: currentColor; }
.btn { padding: 11px 24px; font-size: 15px; font-weight: 700; background: var(--ink); color: var(--bg); }
.btn:hover { background: var(--accent); color: var(--accent-ink); }

main { flex: 1; display: flex; flex-direction: column; }
.view { display: none; padding: 11vh 0 64px; }
.view.on { display: block; animation: arrive .4s ease both; }
.view.center.on { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 0 0 12vh; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } }

h1 { margin: 0 0 16px; font-weight: 800; font-size: clamp(44px, 10vw, 92px); line-height: .95; letter-spacing: -0.045em; text-wrap: balance; }
/* Easter egg: "here" is a link that looks like nothing and leads to nothing. */
.egg { color: inherit; text-decoration: none; cursor: inherit; }
body.void header { visibility: hidden; }
.trapped { margin: 0; font-size: 18px; font-weight: 500; color: var(--muted); animation: arrive 1.6s ease 1.2s both; }

/* "nothing", drawn a little wrong on purpose */
.crooked { white-space: nowrap; }
.crooked .w span { display: inline-block; }
.crooked .w span:nth-child(3) { transform: translateY(0.03em) rotate(-13deg); }
.crooked .w span:nth-child(7) { transform: translateY(0.07em) rotate(15deg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.lede { margin: 0; font-size: 18px; font-weight: 500; color: var(--muted); letter-spacing: -0.01em; }

/* ---------- time bubbles ---------- */
.picks { display: flex; flex-wrap: wrap; gap: 14px; margin: 40px 0 0; }
.picks a {
  width: 92px; height: 92px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bubble); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
  transition: transform .2s cubic-bezier(.3, .7, .4, 1.5), box-shadow .2s ease, background .2s ease, color .2s ease;
}
.picks a:hover { transform: translateY(-4px) scale(1.04); box-shadow: var(--shadow-up); background: var(--ink); color: var(--bg); }
.picks b { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.picks span { margin-top: 3px; font-size: 12px; font-weight: 600; opacity: .6; }
.picks .forever { background: var(--ink); color: var(--bg); }
.picks .forever:hover { background: var(--ink); color: var(--bg); }
.picks .forever b { font-size: 34px; }
@media (max-width: 480px) {
  /* phones: the five minute bubbles in one row, forever as a wide pill underneath */
  .picks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 32px; }
  .picks a { width: auto; height: auto; aspect-ratio: 1; }
  .picks b { font-size: 22px; }
  .picks span { font-size: 10px; margin-top: 2px; }
  .picks .forever { grid-column: 1 / -1; aspect-ratio: auto; height: 52px; border-radius: 999px; flex-direction: row; gap: 10px; }
  .picks .forever b { font-size: 24px; }
  .picks .forever span { margin: 0; font-size: 14px; }
  .chip, .btn { padding: 8px 14px; font-size: 13px; }
  .btn { padding: 9px 18px; font-size: 14px; }
}

.humanity-row { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 64px 0 0; }
.humanity {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0; padding: 10px 18px; border-radius: 999px;
  background: var(--bubble); box-shadow: var(--shadow);
  font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.humanity b { display: inline-block; color: var(--ink); font-weight: 700; }
.humanity b.bump { animation: bump .45s cubic-bezier(.3, .7, .4, 1.5); }
@keyframes bump { 40% { transform: scale(1.18); color: var(--live); } }
.borrow { margin-left: 8px; padding: 5px 11px; font-size: 11.5px; font-weight: 600; background: var(--ink); color: var(--bg); }
.humanity i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 6px var(--live); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.8); } }

/* ---------- timer ---------- */
.clock { margin: 0 0 28px; font-weight: 800; font-size: clamp(88px, 24vw, 220px); line-height: 1; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }

/* ---------- done ---------- */
.rank { margin: 24px 0 0; min-height: 1.5em; font-weight: 600; }
.again { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 36px 0 0; }

.keep { margin: 32px 0 0; font-size: 13px; color: var(--muted); }
.keep .link { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.claim { max-width: 380px; margin: 32px 0 0; }
.claim .row {
  display: flex; align-items: center; padding: 5px 5px 5px 18px; border-radius: 999px;
  background: var(--bubble); box-shadow: var(--shadow); transition: box-shadow .18s ease;
}
.claim .row:focus-within { box-shadow: 0 0 0 2px var(--ink), var(--shadow-up); }
.claim input { flex: 1; min-width: 0; padding: 8px 0; font: inherit; font-size: 16px; color: var(--ink); background: none; border: 0; outline: none; }
.claim input::placeholder { color: var(--muted); }
.claim button {
  width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  font: inherit; font-size: 17px; font-weight: 700; background: var(--ink); color: var(--bg);
  transition: transform .18s cubic-bezier(.3, .7, .4, 1.5), background .18s ease;
}
.claim button:hover { background: var(--accent); color: var(--accent-ink); transform: scale(1.06); }
.claim button:active { transform: scale(.9); }
.claim .hint { margin: 8px 0 0 18px; min-height: 1.4em; font-size: 13px; color: var(--accent); }
.claim.busy { opacity: .5; pointer-events: none; }

/* ---------- faq: tap a bubble to reveal a bad answer ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; margin: 36px 0 0; }
.faq details {
  border-radius: 24px; background: var(--bubble); box-shadow: var(--shadow);
  transition: box-shadow .18s ease, transform .18s cubic-bezier(.3, .7, .4, 1.5);
}
.faq details:hover { box-shadow: var(--shadow-up); transform: translateY(-1px); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 22px; font-weight: 700; letter-spacing: -0.01em; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px; font-weight: 600;
  background: var(--ink); color: var(--bg); transition: transform .25s cubic-bezier(.3, .7, .4, 1.5);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:active::after { transform: scale(.85); }
.faq details p { margin: -4px 0 0; padding: 0 22px 18px; color: var(--muted); font-weight: 500; animation: arrive .3s ease both; }

/* ---------- leaderboard ---------- */
.board { list-style: none; margin: 36px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; }
.board li {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: 999px; background: var(--bubble); box-shadow: var(--shadow);
}
.board li span:first-child { color: var(--muted); font-weight: 700; }
.board li:nth-child(-n+3):not(.empty) span:first-child { color: var(--accent); }
.board li b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li span:last-child { font-weight: 700; }
.board li.me { background: var(--ink); color: var(--bg); }
.board li.me span:first-child { color: var(--bg); opacity: .6; }
.board li.me b { font-weight: 800; }
.board .empty { display: block; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
