@font-face { font-family: 'Bagel Fat One'; src: url(/fonts/BagelFatOne-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Sour Gummy'; src: url(/fonts/SourGummy-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Sour Gummy'; src: url(/fonts/SourGummy-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Sour Gummy'; src: url(/fonts/SourGummy-Italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gochi Hand'; src: url(/fonts/GochiHand-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }

/* Two stages, picked by the clock in stage.js. Colors are the app's (DESIGN.md). Morning is the fallback. */
:root {
  --ground: #F6F4EF; --card: #FFFFFF; --ink: #1C1B22; --soft: #53505B;
  --accent: #5C40D8; --on-accent: #FFFFFF; --ledge: #DCD6F7;
  --r-button: 20px; --r-card: 24px;
  --gutter: clamp(16px, 4vw, 40px);
  --display: 'Bagel Fat One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Sour Gummy', 'Trebuchet MS', system-ui, sans-serif;
  --hand: 'Gochi Hand', 'Comic Sans MS', cursive;
  color-scheme: light;
}
:root[data-stage='night'] {
  --ground: #141318; --card: #211F27; --ink: #FFFFFF; --soft: #ADAAB4;
  --accent: #B09BFF; --on-accent: #141318; --ledge: #2C2360;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1.125rem/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); border-radius: 6px; }
h1, h2 { margin: 0; text-wrap: balance; }
h1 { font: 400 clamp(2.25rem, 4.6vw, 3.25rem)/1.08 var(--display); }
h2 { font: 600 clamp(1.375rem, 2.6vw, 1.75rem)/1.2 var(--body); }
p { margin: 0; }

/* Header */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 1160px; margin: 0 auto; padding: 20px var(--gutter);
}
.wordmark { font: 400 1.5rem/1 var(--display); color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--accent); }

.chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px;
  font: 600 1rem/1.2 var(--body);
}
.chip-next { background: var(--ledge); color: var(--ink); }

/* Footer */
.foot {
  max-width: 1160px; margin: 96px auto 0; padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; color: var(--soft); font-size: 1rem;
}
.foot-made { margin-right: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot a { color: var(--soft); }
.foot a:hover { color: var(--ink); }

/* Plain pages (privacy, support) */
.doc { max-width: 680px; margin: 0 auto; padding: 16px var(--gutter) 0; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.doc h2 { margin-top: 36px; font-size: 1.25rem; }
.doc p, .doc ul { margin-top: 12px; color: var(--soft); }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--ink); }
.doc .updated { margin-top: 10px; font-size: 1rem; }

/* 404: Obi did it. */
.lost { max-width: 960px; margin: 0 auto; padding: 16px var(--gutter) 0; display: grid; gap: 28px; align-items: center; }
.lost img { width: 100%; max-width: 360px; border-radius: var(--r-card); aspect-ratio: 1; }
.lost h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.lost p { margin-top: 14px; color: var(--soft); max-width: 36ch; }
.lost-next { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.lost-next a:not(.btn) { font-weight: 600; }
@media (min-width: 760px) { .lost { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; padding-top: 32px; } }
.btn {
  display: inline-flex; align-items: center; min-height: 56px; padding: 0 24px; border: 0; cursor: pointer;
  border-radius: var(--r-button); background: var(--accent); color: var(--on-accent);
  font: 400 1.25rem/1 var(--display); text-decoration: none;
  transition: transform var(--motion-duration-enter) var(--motion-easing-enter);
}
.btn:active { transform: scale(0.97); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
