/* The $1 Internet Experiment
   Palette: banknote paper + banknote ink, old-web hyperlink blue, highlighter yellow for "yours".
   Type: Dollar Pixel (the site's own bitmap face, drawn on the same square grid as the Wall)
         over Lora for reading. The pixel is the unit: type, squares and the counter share it. */

@font-face {
  font-family: "Dollar Pixel";
  src: url("/fonts/dollar-pixel.woff") format("woff");
  font-weight: 100 900;
  font-display: block; /* tiny file, preloaded: avoids a flash of the fallback headline */
}
@font-face {
  font-family: "Lora";
  src: url("/fonts/Lora-Variable.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/fonts/Lora-Italic-Variable.ttf") format("truetype");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #E3EADD;
  --paper-2: #D5DFCD;
  --ink: #16301F;
  --muted: #4A6352;
  --line: #A9BBA9;
  --link-text: #1F1FD6;
  --visited: #6B1F99;
  --btn: #1F1FD6;
  --btn-hi: #7B7BFF;
  --btn-lo: #0B0B6E;
  --tile: #16301F;
  --tile-ink: #EEF3E8;
  --hi: #F2D23C;
  --px: .1em; /* one pixel of Dollar Pixel */

  --display: "Dollar Pixel", Impact, Haettenschweiler, "HelveticaNeue-CondensedBlack", "Helvetica Neue Condensed Black", "Arial Narrow", "Roboto Condensed", "sans-serif-condensed", "Arial Black", sans-serif;
  --text: Lora, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1A13;
    --paper-2: #16261C;
    --ink: #E3EADD;
    --muted: #A3B8A7;
    --line: #30483A;
    --link-text: #A3A3FF;
    --visited: #D1A3F5;
    --btn: #3A3AF0;
    --btn-hi: #8C8CFF;
    --btn-lo: #15156E;
    --tile: #030805;
    --tile-ink: #E3EADD;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.55 var(--text);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--link-text); text-underline-offset: .15em; }
a:visited { color: var(--visited); }
:focus-visible { outline: 3px dotted var(--ink); outline-offset: 4px; }
h1[tabindex="-1"]:focus { outline: none; } /* focused by script so screen readers announce the new state */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

main {
  flex: 1;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 6vw, 3.5rem) 1.25rem 2rem;
  text-align: center;
}

/* ---------- Display type ---------- */
.title {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: condensed;
  font-synthesis: none;
  text-transform: uppercase;
  /* Safe for wide fallback fonts; app.js grows it to fill the width once it can measure. */
  font-size: clamp(2.2rem, 11.5vw, 8rem);
  line-height: .9;
  letter-spacing: 0;
  /* a one-pixel block shadow, like type on an old screen */
  text-shadow: var(--px) var(--px) 0 var(--line);
}
.title span { display: block; }
.title.fit span { white-space: nowrap; }
.title-sm { font-size: clamp(2.4rem, 11vw, 4.75rem); }

.question {
  margin: 1.1rem auto 0;
  max-width: 23ch;
  font-size: clamp(1.15rem, 4.8vw, 1.45rem);
  font-style: italic;
  line-height: 1.35;
  text-wrap: balance;
}
.lede {
  margin: 1rem auto 0;
  max-width: 30ch;
  font-size: clamp(1.1rem, 4.4vw, 1.3rem);
  line-height: 1.45;
  text-wrap: balance;
}

/* ---------- The counter: an old-web hit counter, rebuilt as a rolling odometer ---------- */
.count { position: relative; margin-top: clamp(1.6rem, 7vw, 2.6rem); }
.odometer {
  --dh: clamp(4.2rem, 21vw, 7.25rem);
  display: inline-flex;
  align-items: flex-end;
  gap: clamp(.2rem, 1vw, .35rem);
}
.odometer[data-len="5"] { --dh: clamp(3.8rem, 19vw, 7rem); }
.odometer[data-len="6"] { --dh: clamp(3.4rem, 16.5vw, 6.5rem); }
.odometer[data-len="7"] { --dh: clamp(3rem, 14vw, 6rem); }
.odometer[data-len="8"], .odometer[data-len="9"] { --dh: clamp(2.5rem, 11.5vw, 5.25rem); }

.digit {
  position: relative;
  width: calc(var(--dh) * .64);
  height: var(--dh);
  overflow: hidden;
  background: var(--tile);
  color: var(--tile-ink);
}
.reel {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--pos, 10) * var(--dh) * -1));
  transition: transform .75s var(--ease), opacity .75s var(--ease);
  animation: roll 1.6s var(--ease) backwards;
}
.reel.snap { transition: none; }
.digit.lead .reel { opacity: .38; }
.reel span {
  display: block;
  height: var(--dh);
  font-family: var(--display);
  font-weight: 900;
  font-synthesis: none;
  font-size: calc(var(--dh) * .86);
  line-height: var(--dh);
  padding-top: calc(var(--dh) * .07); /* centre the pixel digits (they sit on the baseline) */
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.digit[data-d="0"] .reel { --pos: 10; }
.digit[data-d="1"] .reel { --pos: 11; }
.digit[data-d="2"] .reel { --pos: 12; }
.digit[data-d="3"] .reel { --pos: 13; }
.digit[data-d="4"] .reel { --pos: 14; }
.digit[data-d="5"] .reel { --pos: 15; }
.digit[data-d="6"] .reel { --pos: 16; }
.digit[data-d="7"] .reel { --pos: 17; }
.digit[data-d="8"] .reel { --pos: 18; }
.digit[data-d="9"] .reel { --pos: 19; }
.digit[data-i="1"] .reel { animation-delay: .07s; }
.digit[data-i="2"] .reel { animation-delay: .14s; }
.digit[data-i="3"] .reel { animation-delay: .21s; }
.digit[data-i="4"] .reel { animation-delay: .28s; }
.digit[data-i="5"] .reel { animation-delay: .35s; }
.digit[data-i="6"] .reel { animation-delay: .42s; }
.digit[data-i="7"] .reel { animation-delay: .49s; }
.digit[data-i="8"] .reel { animation-delay: .56s; }
@keyframes roll { from { transform: translateY(0); } }

.sep {
  font-family: var(--display);
  font-synthesis: none;
  font-size: calc(var(--dh) * .62);
  line-height: 1;
  padding-bottom: .02em;
}
.count-label { margin: .6rem 0 0; font-size: clamp(1.15rem, 4.6vw, 1.4rem); }
.plus {
  position: absolute;
  top: -1.9rem;
  left: 0;
  right: 0;
  font-family: var(--display);
  font-synthesis: none;
  font-size: 1.7rem;
  color: var(--link-text);
  opacity: 0;
  pointer-events: none;
}
.plus.go { animation: plus 1.5s var(--ease); }
@keyframes plus {
  0% { opacity: 0; transform: translateY(.8rem); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-.8rem); }
}

/* ---------- The button: a chunky bevelled old-web button ---------- */
.add {
  display: block;
  width: 100%;
  max-width: 21rem;
  margin: clamp(1.4rem, 6vw, 2rem) auto 0;
  padding: .42em .5em .36em;
  font-family: var(--display);
  font-weight: 900;
  font-synthesis: none;
  font-size: clamp(2.5rem, 12vw, 3.5rem);
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--btn);
  border: .3rem solid;
  border-color: var(--btn-hi) var(--btn-lo) var(--btn-lo) var(--btn-hi);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s, filter .15s;
}
a.add, a.add:visited { color: #fff; }
.add:hover { filter: brightness(1.12); }
.add:active { transform: translateY(2px); border-color: var(--btn-lo) var(--btn-hi) var(--btn-hi) var(--btn-lo); }
.add[disabled] { cursor: not-allowed; filter: grayscale(1) opacity(.55); }
.add[aria-busy="true"] { font-size: clamp(1.4rem, 6vw, 1.8rem); padding-block: 1.05em .95em; filter: none; cursor: progress; }

.give { margin: 0; }
.ts:empty { display: none; }
.ts { margin-top: 1rem; display: flex; justify-content: center; }
.form-error { margin: .9rem auto 0; max-width: 28ch; font-weight: 700; }
.soon, .mine { margin: .9rem auto 0; max-width: 30ch; font-style: italic; }
.money { margin: 1.1rem auto 0; max-width: 34ch; font-size: .95rem; color: var(--muted); text-wrap: balance; }

/* ---------- Below the fold ---------- */
.explain {
  max-width: 40rem;
  margin: clamp(3.5rem, 15vw, 6rem) auto 0;
  padding-top: clamp(2rem, 8vw, 3rem);
  border-top: 3px dashed var(--line);
}
.explain h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-synthesis: none;
  text-transform: uppercase;
  font-size: clamp(2.8rem, 13vw, 4.75rem);
  line-height: .9;
}
.get { margin: 1.4rem 0 .5rem; font-style: italic; font-size: 1.1rem; }
.nots {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--display);
  font-weight: 900;
  font-synthesis: none;
  text-transform: uppercase;
  font-size: clamp(2rem, 9vw, 2.9rem);
  line-height: 1.12;
}
.nots s { color: var(--muted); text-decoration-thickness: .12em; text-decoration-color: var(--ink); }
.nots .yes { color: var(--link-text); }
.nots .yes + .yes { margin-top: .1em; }
.steps { margin: 2.2rem auto 0; max-width: 27ch; font-size: clamp(1.15rem, 4.6vw, 1.4rem); line-height: 1.5; }
.aside { margin: 1.4rem auto 0; color: var(--muted); font-style: italic; }
.hype { margin: .7rem auto 0; font-family: var(--display); font-weight: 900; font-synthesis: none; text-transform: uppercase; letter-spacing: .02em; font-size: clamp(.95rem, 3.8vw, 1.1rem); text-wrap: balance; }
.hype a { text-decoration: none; margin-left: .1em; }
.wall-sub { margin: -.4rem 0 .9rem; color: var(--muted); font-style: italic; font-size: .95rem; }
@media (min-width: 60rem) { .hero-copy .hype { margin-left: 0; } }

/* ---------- Notices ---------- */
.notice, .testmode {
  position: relative;
  margin: 0;
  padding: .7rem 3rem;
  text-align: center;
  font-size: .95rem;
}
.notice { background: var(--ink); color: var(--paper); }
.notice p { margin: 0; }
.notice-x {
  position: absolute;
  top: 50%;
  right: .5rem;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: none;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}
.testmode { padding: .55rem 1rem; background: #F2D23C; color: #16301F; font-weight: 700; }

/* ---------- Shared buttons ---------- */
.btn {
  display: inline-block;
  padding: .8rem 1rem;
  font: 700 1rem/1.2 var(--text);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: 4px 4px 0 var(--ink);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
a.btn:visited { color: var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- Thanks page ---------- */
.you { display: block; font-size: clamp(1.6rem, 7vw, 2.4rem); line-height: 1; }
.pnum { display: block; color: var(--link-text); font-variant-numeric: tabular-nums; }
.thanks .pnum { font-size: clamp(4.5rem, 26vw, 10rem); line-height: .9; margin-top: .3rem; }
.waiting { margin-top: 1.5rem; font-family: var(--display); font-size: 2rem; letter-spacing: .3em; }
.waiting span { animation: blink 1.2s infinite both; }
.waiting span:nth-child(2) { animation-delay: .2s; }
.waiting span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

.share {
  margin: 2rem auto 0;
  max-width: 30rem;
  padding: 1.25rem;
  text-align: left;
  background: var(--paper-2);
  border: 2px solid var(--ink);
}
.share h2 { margin: 0 0 .75rem; font-size: 1.25rem; }
.tones { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tones legend { padding: 0; margin-bottom: .5rem; font-style: italic; }
.tones label { position: relative; }
.tones input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tones span {
  display: inline-block;
  padding: .4rem .8rem;
  border: 2px solid var(--ink);
  font-size: .95rem;
}
.tones input:checked + span { background: var(--ink); color: var(--paper); }
.tones input:focus-visible + span { outline: 3px dotted var(--ink); outline-offset: 3px; }
.share-text {
  margin: 1rem 0;
  padding: .9rem 1rem;
  background: var(--paper);
  border-left: 4px solid var(--link-text);
  font-size: 1.1rem;
  line-height: 1.45;
}
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.share-actions .btn { width: 100%; text-align: center; }
.share-actions .primary, .pick .primary {
  grid-column: 1 / -1;
  padding-block: 1rem;
  font: 900 1.6rem/1 var(--display);
  font-synthesis: none;
  text-transform: uppercase;
  color: #fff;
  background: var(--btn);
  border: .25rem solid;
  border-color: var(--btn-hi) var(--btn-lo) var(--btn-lo) var(--btn-hi);
  box-shadow: none;
}
.pick .primary { width: 100%; margin-top: .9rem; }
.pick .primary:disabled { filter: grayscale(1) opacity(.55); cursor: not-allowed; }
.share-actions .primary:active, .pick .primary:active:not(:disabled) { transform: translateY(2px); border-color: var(--btn-lo) var(--btn-hi) var(--btn-hi) var(--btn-lo); }
.status { min-height: 1.5em; margin: .75rem 0 0; font-style: italic; }

.card-preview { margin: 2.5rem auto 0; }
.card-preview img, .sharepage .card {
  display: block;
  width: min(100%, 20rem);
  height: auto;
  margin: 0 auto;
  border: 2px solid var(--ink);
}
.card-preview figcaption { margin-top: .6rem; font-style: italic; color: var(--muted); }
.back { margin-top: 2rem; }

/* ---------- Share page ---------- */
.sharepage .title .pnum { color: var(--link-text); }
.count-line { margin: 1rem auto 1.75rem; max-width: 30ch; color: var(--muted); }
.sharepage .card { margin-bottom: 1.5rem; }

/* ---------- Fine print / messages ---------- */
.prose { text-align: left; max-width: 36rem; }
.prose .title, .prose .lede { text-align: left; margin-left: 0; }
.prose h2 { margin: 2.2rem 0 .3rem; font-size: 1.3rem; }
.prose p { max-width: 62ch; }
.msg .btn { margin-top: 1.5rem; }

/* ---------- Admin ---------- */
.admin { max-width: 56rem; text-align: left; }
.admin table { width: 100%; border-collapse: collapse; font: .95rem/1.4 var(--mono); }
.admin th, .admin td { padding: .4rem .5rem; border-bottom: 1px solid var(--line); text-align: right; }
.admin th:first-child, .admin td:first-child { text-align: left; }
.admin .scroll { overflow-x: auto; }
.admin input { font: inherit; padding: .6rem; width: min(100%, 24rem); border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.admin dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
.admin dt { font-style: italic; color: var(--muted); }
.admin dd { margin: 0; font: 900 2rem/1 var(--display); font-synthesis: none; }
.admin .today { display: block; width: min(100%, 16rem); height: auto; border: 2px solid var(--ink); margin: 1rem 0; }
.admin select { font: inherit; padding: .55rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.admin .inline input { width: 7rem; }

/* ---------- The Wall, stats, milestones ---------- */
.stats-sec, .board-sec, .miles-sec {
  max-width: 40rem;
  margin: clamp(3.5rem, 15vw, 6rem) auto 0;
  padding-top: clamp(2rem, 8vw, 3rem);
  border-top: 3px dashed var(--line);
}
.stats-sec h2, .board-sec h2, .miles-sec h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-synthesis: none;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 10vw, 3.75rem);
  line-height: .95;
  text-shadow: var(--px) var(--px) 0 var(--line);
}

/* ---------- Hero: the counter on one side, the Wall on the other ---------- */
.home { max-width: 76rem; }
.hero-copy { max-width: 40rem; margin: 0 auto; }
.hero-wall { max-width: 40rem; margin: clamp(2.5rem, 10vw, 3.5rem) auto 0; }
.wall-h {
  margin: 0 0 .9rem;
  font: 900 clamp(2.2rem, 10vw, 3.25rem)/.95 var(--display);
  font-synthesis: none;
  text-transform: uppercase;
  text-shadow: var(--px) var(--px) 0 var(--line);
}
.wall {
  position: relative;
  max-height: min(70vh, 34rem);
  overflow: auto;
  display: flex;
  justify-content: center;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.wall canvas { display: block; flex: none; border: 3px solid var(--ink); image-rendering: pixelated; cursor: crosshair; touch-action: manipulation; }
.wall canvas:focus-visible { outline: 3px dotted var(--ink); outline-offset: 3px; }
.wall-info { min-height: 3.2em; margin: .9rem auto 0; max-width: 34ch; font-size: .98rem; text-wrap: balance; }

/* Picking a color before paying */
.paint { margin: clamp(1.6rem, 7vw, 2.2rem) auto 0; padding: 0; border: 0; max-width: 21rem; }
.paint legend { margin: 0 auto .8rem; padding: 0; font-style: italic; text-wrap: balance; }
.paint .swatch-grid { gap: .45rem; }
.paint + .add, .say + .add { margin-top: 1.1rem; }

/* Preset message picker */
.say { display: block; margin: 1.2rem auto 0; max-width: 21rem; font-style: italic; }
.say .opt { color: var(--muted); }
.say select {
  display: block;
  width: 100%;
  margin-top: .5rem;
  padding: .65rem .7rem;
  font: 1rem/1.2 var(--text);
  font-style: normal;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
}
.say select:focus-visible { outline: 3px solid var(--link-text); outline-offset: 2px; }
@media (min-width: 60rem) { .hero-copy .say { margin-left: 0; } }
.yours { margin: .9rem auto 0; max-width: 30ch; font-size: .98rem; min-height: 1.5em; text-wrap: balance; }
.yours [data-yours-name] { font-weight: 700; }

@media (min-width: 60rem) {
  .home { padding-top: 3.5rem; }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
  }
  .hero-copy, .hero-wall { margin: 0; max-width: none; }
  .hero-copy { text-align: left; }
  .hero-copy .question, .hero-copy .count-label, .hero-copy .money, .hero-copy .yours, .hero-copy .soon, .hero-copy .mine, .hero-copy .form-error { margin-left: 0; }
  .hero-copy .paint, .hero-copy .add { margin-left: 0; }
  .hero-copy .plus { text-align: left; }
  .hero-wall { position: sticky; top: 1.5rem; padding-top: .4rem; }
  .wall { max-height: calc(100vh - 12rem); }
  .explain { max-width: 40rem; margin-left: auto; margin-right: auto; }
}

.facts { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 1.6rem; text-align: center; }
@media (min-width: 40rem) { .facts { grid-template-columns: 1fr 1fr; text-align: left; } }
.facts .big {
  display: block;
  font: 900 clamp(2rem, 9vw, 2.6rem)/1 var(--display);
  font-synthesis: none;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.facts a.big { color: var(--link-text); text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .1em; }
.facts .small { display: block; margin-top: .35rem; color: var(--muted); font-style: italic; }

/* Leaderboard */
.tabs { display: flex; justify-content: center; gap: .5rem; margin: 1.4rem 0 0; }
.tabs button {
  padding: .55rem .9rem;
  font: 900 1.05rem/1 var(--display);
  font-synthesis: none;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabs button:focus-visible { outline: 3px solid var(--link-text); outline-offset: 2px; }
.board { margin: 1.2rem auto 0; padding: 0; max-width: 26rem; list-style: none; counter-reset: rank; }
.board li {
  counter-increment: rank;
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .55rem .2rem;
  border-bottom: 2px dashed var(--line);
}
.board li::before {
  content: counter(rank);
  min-width: 1.6rem;
  font: 900 1.3rem/1 var(--display);
  font-synthesis: none;
  color: var(--muted);
}
.board li:nth-child(1)::before { color: var(--ink); }
.board .score { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.board li.me { background: var(--paper-2); }
.board li.empty { font-style: italic; color: var(--muted); border-bottom-style: solid; }
.board li.empty::before { color: var(--ink); }
.board-note { margin: .9rem auto 0; max-width: 34ch; color: var(--muted); font-style: italic; font-size: .95rem; text-align: center; }
.square-msg { margin: .9rem auto 0; max-width: 32ch; font-size: 1.25rem; font-style: italic; }
.square-who { margin: .4rem auto 0; color: var(--muted); }
.you-are { margin: .9rem auto 0; max-width: 34ch; }
.wall-msg { font-style: italic; }

.next { margin: 1.2rem auto 0; max-width: 30ch; font-size: clamp(1.15rem, 4.6vw, 1.4rem); }
.miles { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.miles li { padding: .35rem .75rem; border: 2px solid var(--ink); font-size: .95rem; line-height: 1.3; }

.swatch { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; border: 2px solid var(--ink); }
.swatch-empty { background: repeating-linear-gradient(45deg, transparent 0 3px, var(--line) 3px 5px); }
.square-line { margin: .9rem auto 0; max-width: 32ch; }
.badge {
  display: inline-block;
  margin: 0 0 .8rem;
  padding: .3rem .7rem;
  background: #F2D23C;
  color: #16301F;
  border: 2px solid #16301F;
  font: 900 1rem/1 var(--display);
  font-synthesis: none;
  text-transform: uppercase;
  letter-spacing: .04em;
  transform: rotate(-2deg);
}

.pick, .picked {
  margin: 2rem auto 0;
  max-width: 30rem;
  text-align: left;
}
.pick { padding: 1.25rem; border: 2px dashed var(--ink); }
.pick h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.pick-sub { margin: 0 0 1rem; }
.swatches { margin: 0; padding: 0; border: 0; }
.swatch-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: .4rem; }
.swatch-grid label { position: relative; aspect-ratio: 1; }
.swatch-grid input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.swatch-grid .chip { display: block; width: 100%; height: 100%; border: 2px solid var(--ink); }
.swatch-grid input:checked + .chip { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: inset 0 0 0 3px var(--paper); }
.swatch-grid input:focus-visible + .chip { outline: 3px dotted var(--ink); outline-offset: 3px; }
.pick-name { margin: .8rem 0 0; font-style: italic; }
.picked { text-align: center; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.foot {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}
.foot p { margin: .3rem 0 0; }


@media (prefers-reduced-motion: reduce) {
  .reel { animation: none; transition: none; }
  .plus.go, .waiting span { animation: none; opacity: 1; }
  .add, .btn { transition: none; }
}
