/* fundamentals. One 16-bit level: a cream dialog plate for everything you read or press, a dark
   chamfered plate for everything that is a live figure, a wooden signpost for the way around.
   Every surface is a drawn picture (tools/draw-world.mjs), nine-sliced. No SVG, no CSS panels. */

@font-face {
  font-family: "Pixel Operator";
  src: url("/fonts/PixelOperator8-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face { font-family: "Chillax"; src: url("/fonts/Chillax-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Chillax"; src: url("/fonts/Chillax-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Chillax"; src: url("/fonts/Chillax-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Intel One Mono"; src: url("/fonts/IntelOneMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Intel One Mono"; src: url("/fonts/IntelOneMono-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #271e21;
  --ink-soft: #5a4446;
  --cream: #fff4e0;
  --cream-2: #f0dfc0;
  --cream-3: #d9c4a2;
  --coral: #f99289;
  --coral-d: #d4665c;
  --amber: #f2a93c;
  --amber-d: #c07a18;
  --green: #4e9d6e;
  --sky: #4795ea;
  --wood: #c58852;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --pixel: "Pixel Operator", "Courier New", monospace;
  --text: "Chillax", ui-sans-serif, system-ui, sans-serif;
  --mono: "Intel One Mono", ui-monospace, "Courier New", monospace;

  /* ONE scale, every step on the 8 px grid of the pixel face: 16 / 20 / 24 / 32 / 48 / 64.
     Nothing on the page is sized outside it. */
  --small: 16px;
  --body: 20px;
  --label: 24px;
  --sub: 32px;
  --head: 48px;
  --display: 64px;      /* the one shout on the page */
  --gutter: 48px;       /* the single container inset, the same on every screen */

  --plate-slice: 32px;  /* the cream plate: slice and border width are the same, so it never interpolates */
  --dark-slice: 24px;
  --btn-slice: 24px;
  --ground-h: 160px;
  --floor-air: 136px;   /* the room the coins and their signs stand in, above the strip */
  font-synthesis: none;
}

* { box-sizing: border-box; }
img { image-rendering: pixelated; }   /* every drawn piece stays sharp; photos opt out below */

html { background: var(--sky); overflow-x: clip; }   /* clip, never hidden: hidden makes it a scroll container */

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: transparent;
  font: 400 var(--body)/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;         /* hidden on body would make it a scroll container and freeze sticky */
}

img { max-width: 100%; height: auto; image-rendering: pixelated; }

/* ------------------------------------------------------------------ world --- */
.world { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.world-sky {
  position: absolute; inset: 0;
  background: url("/img/scene-b.png") center top / cover no-repeat, var(--sky);
  image-rendering: pixelated;
}
/* The level's floor: the last thing on the page, never a bar over it. The coins stand on it. */
.floor {
  position: relative; z-index: 2;
  margin-top: auto;
  /* the strip plus exactly the room the coins stand in: no empty band under the last plate */
  height: calc(var(--ground-h) + var(--floor-air));
  background: url("/img/ground.png") left bottom / auto var(--ground-h) repeat-x;
  image-rendering: pixelated;
}
.floor .path { position: absolute; inset: 0; }

.shell {
  position: relative; z-index: 2;
  width: min(1680px, 100% - calc(var(--gutter) * 2));
  margin: 0 auto;
  padding: var(--s7) 0 var(--s7);
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 340px;
  grid-template-areas:
    "lockup lockup readout"
    "nav    view   readout";
  column-gap: var(--s6);
  row-gap: var(--s7);
  align-items: start;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 9;
  background: var(--cream); color: var(--ink); padding: var(--s3) var(--s5);
  font: 700 var(--label)/1 var(--pixel);
}
.skip:focus { left: var(--s4); top: var(--s4); }

/* ----------------------------------------------------------------- lockup --- */
.lockup { grid-area: lockup; display: flex; gap: var(--s4); align-items: center; }
.lockup-mark { width: 72px; height: 72px; flex: none; }
.lockup { align-items: center; }
.lockup-words { min-width: 0; }
.lockup-name {
  margin: 0;
  font: 700 var(--head)/1 var(--pixel);
  color: var(--cream);
  text-shadow: 4px 4px 0 var(--ink);
  letter-spacing: 0;
}
.lockup-line {
  margin: var(--s2) 0 0;
  font: 500 var(--body)/1.5 var(--text);
  color: var(--cream);
  text-shadow: 2px 2px 0 rgba(39, 30, 33, .85);
  max-width: 52ch;
}

/* --------------------------------------------------------------- signpost --- */
.signpost { grid-area: nav; position: relative; padding-left: var(--s5); }
/* One column, as tall as the menu it carries: a cap, a shaft that tiles on its own 64 px step and a
   foot it stands in. Never a fixed height, and always under the planks. */
.signpost-post {
  position: absolute; left: -12px; top: -16px; bottom: -36px; width: 72px; z-index: 0;
  background:
    url("/img/post-cap.png") 12px top / 48px 16px no-repeat,
    url("/img/post-base.png") left bottom / 72px 40px no-repeat,
    url("/img/post-shaft.png") 12px top / 48px 64px repeat-y;
  image-rendering: pixelated;
  pointer-events: none;
}
.signpost-planks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); position: relative; z-index: 1; }
.signpost .drawer-key { display: none; }   /* a class that sets display beats a bare one: keep the specificity */
.drawer-key::-webkit-details-marker { display: none; }
.plank {
  display: flex; align-items: center; width: 100%; min-height: 64px;
  text-align: left; cursor: pointer;
  border: var(--btn-slice) solid transparent;
  border-image: url("/img/plank.png") 24 fill / var(--btn-slice) / 0 stretch;
  background: none;
  padding: 8px 24px 10px;
  font: 700 var(--label)/1.1 var(--pixel);
  color: var(--ink);
  text-decoration: none;
  image-rendering: pixelated;
  transition: filter .08s steps(2);
}
.plank:hover { filter: brightness(1.12); }
/* the chosen plank reads off its surface, not off its size: the box never moves */
.plank[aria-current="page"] {
  border-image-source: url("/img/plate-cream-sm.png");
  border-image-slice: 24 fill;
  color: var(--ink);
}
.plank[aria-current="page"]:hover { filter: none; }
.plank:focus-visible { outline: 4px solid var(--cream); outline-offset: 4px; }

/* ------------------------------------------------------------- the plates --- */
.plate {
  border: var(--plate-slice) solid transparent;
  border-image: url("/img/plate-cream.png") 32 fill / var(--plate-slice) / 0 stretch;
  padding: var(--s6);
  background: none;
  image-rendering: pixelated;
}
.plate-sm {
  border: var(--btn-slice) solid transparent;
  border-image: url("/img/plate-cream-sm.png") 24 fill / var(--btn-slice) / 0 stretch;
  padding: var(--s4) var(--s5);
}
.dark {
  border: var(--dark-slice) solid transparent;
  border-image: url("/img/plate-dark.png") 24 fill / var(--dark-slice) / 0 stretch;
  padding: var(--s4) var(--s5);
  color: var(--cream);
  image-rendering: pixelated;
}
.dark .label { color: var(--amber); }

/* ---------------------------------------------------------------- readout --- */
.readout { grid-area: readout; display: grid; gap: var(--s5); grid-auto-rows: 1fr; }
/* every figure plate is one grid: the label, the value and the note sit on the same three lines */
.readout .dark { min-height: 0; display: grid; grid-template-rows: auto auto 1fr; gap: var(--s2); align-content: start; }
.readout .dark .label { margin: 0; min-height: calc(2 * 1.25em); }
.readout .dark .note { margin: 0; align-self: start; }
.readout .dark .figure { font-size: var(--sub); }
.label {
  margin: 0 0 var(--s3);
  font: 700 var(--small)/1.25 var(--pixel);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.figure { margin: 0; font: 700 var(--sub)/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.figure-big { font-size: var(--head); }
.note { margin: var(--s2) 0 0; font: 400 var(--small)/1.5 var(--text); color: var(--cream-3); }
.dark .note { color: #bfa892; }

.bar {
  position: relative; height: 48px; margin: var(--s3) 0 0;
  border: 12px solid transparent;
  border-image: url("/img/bar.png") 12 fill / 12px / 0 stretch;
  image-rendering: pixelated;
}
.bar-fill {
  position: absolute; inset: 0; width: var(--fill, 0%);
  background: url("/img/bar-fill.png") left top / 32px 32px repeat;
  image-rendering: pixelated;
  transition: width .4s steps(8);
}
.bar-amber .bar-fill { background-image: url("/img/bar-fill-amber.png"); }

/* ----------------------------------------------------------------- view ----- */
.view {
  grid-area: view; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s7);
  container: view / inline-size;   /* the board answers to its own column, not to the window */
}
.view:focus { outline: none; }

.screen { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }


/* Two steps of the one scale, every line flush left, colour on the two words that carry the
   promise and nowhere else. */
.statement {
  margin: 0 0 var(--s5);
  font: 700 var(--display)/1.05 var(--pixel);
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: left;
}
.statement > span { display: block; text-align: left; }
.statement > span > span { display: inline; }
.statement .hit { color: var(--coral-d); }
.statement .small { font-size: var(--sub); margin-top: var(--s2); }
.statement .amber { color: var(--coral-d); }

.lede { margin: 0 0 var(--s5); font: 500 var(--body)/1.5 var(--text); max-width: 56ch; }
.prose { margin: 0 0 var(--s4); max-width: 62ch; }
.prose:last-child { margin-bottom: 0; }

h2.head {
  margin: 0 0 var(--s4);
  font: 700 var(--head)/1 var(--pixel);
  text-transform: uppercase;
}
h2.head.name { text-transform: none; }   /* a coin name keeps the case its launcher typed */
h3.sub { margin: 0 0 var(--s3); font: 700 var(--label)/1.15 var(--pixel); text-transform: uppercase; }
.prose + h3.sub, .board + h3.sub, p + h3.sub { margin-top: var(--s6); }

/* ---------------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s3);
  min-height: 56px; cursor: pointer;
  border: var(--btn-slice) solid transparent;
  border-image: url("/img/btn-coral.png") 24 fill / var(--btn-slice) / 0 stretch;
  background: none;
  padding: 2px calc(var(--s5) - 2px) 6px;
  font: 700 var(--label)/1.15 var(--pixel);
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  image-rendering: pixelated;
  transition: translate .06s steps(1);
}
.btn:hover { translate: 0 -3px; }
.btn:active { translate: 0 3px; }
.btn:focus-visible { outline: 4px solid var(--ink); outline-offset: 4px; }
.btn-cream { border-image-source: url("/img/btn-cream.png"); }
.btn-amber { border-image-source: url("/img/btn-amber.png"); }
.btn-dark { border-image-source: url("/img/btn-dark.png"); color: var(--cream); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; translate: none; }
.btn-big { min-height: 72px; font-size: var(--label); padding-inline: var(--s4); }
/* two keys side by side are one width, one height, one gap, at every screen */
.row-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); max-width: 860px; }
.row-pair .btn { width: 100%; }
.btn-mark { width: 28px; height: 28px; image-rendering: auto; }
.btn-key { padding-inline: var(--s2); gap: var(--s2); font-size: var(--small); text-transform: uppercase; letter-spacing: .04em; }
.btn-key .btn-mark { flex: none; width: 24px; height: 24px; }
.btn-key span { white-space: nowrap; }

.row { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }
.rule { height: 4px; background: var(--cream-3); margin: var(--s5) 0 var(--s4); border: 0; }
a { color: var(--ink); text-decoration-thickness: 3px; text-underline-offset: 4px; text-decoration-color: var(--coral-d); }
a:hover { color: var(--coral-d); }
a:focus-visible { outline: 4px solid var(--coral-d); outline-offset: 3px; }
.dark a { color: var(--cream); text-decoration-color: var(--amber); }

/* ------------------------------------------------------------ the ca block -- */
.ca-label { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.ca-block { display: grid; gap: var(--s4); }
.ca-head { display: flex; align-items: baseline; gap: var(--s4); flex-wrap: wrap; }
.ca-head .label { margin: 0; }
.ticker { font: 700 var(--sub)/1 var(--pixel); }
/* the address fills the row and the key sits against it: no hole on the right */
.ca-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: stretch; }
.ca-row .btn { min-height: 0; }
/* two by two, four across only in a column wide enough to hold four names, one under the other on a phone */
.links-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.links-row .btn { width: 100%; min-width: 0; }
.ca-line {
  margin: 0;
  display: flex; align-items: center;
  padding: var(--s4) var(--s5);
  background: rgba(39, 30, 33, .07);
  border: 0;
  font: 400 var(--label)/1.4 var(--mono);
  word-break: break-all;
  min-width: 0;
  user-select: all;
}
.ca-line.empty { color: var(--ink-soft); font-family: var(--text); user-select: none; word-break: normal; overflow-wrap: break-word; }

/* ------------------------------------------------------------------ forms --- */
.field { display: grid; gap: var(--s2); margin-bottom: var(--s5); }
.field > .lab { font: 700 var(--small)/1.2 var(--pixel); text-transform: uppercase; letter-spacing: .08em; }
.field input[type="text"], .field input[type="number"], .field textarea, .field select {
  font: 400 var(--body)/1.4 var(--text);
  color: var(--ink);
  padding: 14px var(--s4);
  min-height: 56px;
  background: var(--cream-2);
  border: 4px solid var(--ink);
  border-radius: 0;
  width: 100%;
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 4px solid var(--coral-d); outline-offset: 2px; }
.field .hint { font: 400 var(--small)/1.5 var(--text); color: var(--ink-soft); text-transform: none; letter-spacing: 0; max-width: 46ch; }
.field-file { display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; }
.field-file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.field-file input[type="file"]:focus-visible + .btn { outline: 4px solid var(--coral-d); outline-offset: 4px; }
.pic-preview { width: 96px; height: 96px; border: 4px solid var(--ink); background: var(--cream-2); object-fit: cover; image-rendering: auto; }
.pic-name { font: 400 var(--small)/1.5 var(--text); color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }
/* the key may shrink and wrap: a two word label in a pixel face is wider than the column it sits in */
.field-file .btn { width: auto; flex: 0 1 auto; min-width: 0; max-width: 100%; white-space: normal; text-align: center; }

/* ------------------------------------------------------------ candidates ---- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); align-items: stretch; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: grid; gap: var(--s3); align-content: start; cursor: pointer; text-align: left; }
.card .figure { font-size: var(--label); }
.card[aria-pressed="true"] { border-image-source: url("/img/plate-cream.png"); border-image-slice: 32 fill; }
.card-head { display: flex; align-items: center; gap: var(--s3); }
.card-icon { width: 40px; height: 40px; image-rendering: auto; }

/* --------------------------------------------------------------- the path --- */
.walker {
  position: absolute; bottom: calc(var(--ground-h) * .8); left: var(--at, 0%);
  width: 112px; margin-left: -56px;
  display: grid; justify-items: center; gap: 0;
  pointer-events: auto; text-decoration: none; color: var(--cream);
  transition: left .6s steps(12);
}
.walker-board {
  min-width: 96px; margin-bottom: 4px;
  border: 16px solid transparent;
  border-image: url("/img/board.png") 16 fill / 16px / 0 stretch;
  padding: 2px 10px 6px;
  font: 700 var(--small)/1 var(--pixel);
  color: var(--amber);
  text-align: center;
  image-rendering: pixelated;
}
.walker-pic { width: 48px; height: 48px; border: 4px solid var(--ink); background: var(--cream); object-fit: cover; image-rendering: auto; }
/* the sprite at half its pixels: a whole fraction, so it is still 1 drawn pixel to 1 screen pixel pair */
.walker-legs {
  width: 48px; height: 28px; margin-top: -4px;
  background: url("/img/legs.png") 0 0 / 192px 28px no-repeat;
  image-rendering: pixelated;
  animation: walk 1s steps(1) infinite;
}
@keyframes walk {
  0%   { background-position: 0 0; }
  25%  { background-position: -48px 0; }
  50%  { background-position: -96px 0; }
  75%  { background-position: -144px 0; }
}
.walker:hover .walker-pic { outline: 4px solid var(--amber); }
.walker:focus-visible .walker-pic { outline: 4px solid var(--cream); }
.walker-tag {
  font: 700 var(--small)/1 var(--pixel);
  color: var(--cream);
  text-shadow: 2px 2px 0 var(--ink);
  margin-bottom: 4px;
}

/* ----------------------------------------------------------------- tables --- */
.board-wrap { max-width: 100%; overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; }
.board th, .board td { padding: var(--s3) var(--s4); text-align: left; border-bottom: 3px solid var(--cream-3); }
.board th { font: 700 var(--small)/1.2 var(--pixel); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; vertical-align: bottom; }
.board td.num { white-space: nowrap; }
.board .coin-cell { text-decoration: none; }
.board .coin-cell span { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; text-decoration-color: var(--coral-d); }
.board td { font: 400 var(--body)/1.5 var(--text); }
.board td.num, .board th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.board tr:last-child td { border-bottom: 0; }
/* A squeezed column turns a coin name into one word per line: drop the two columns the row can live
   without as soon as the view itself is narrow, whatever the window says. */
/* two keys stand side by side while the column can hold both phrases on one line, and one under
   the other when it cannot: never a key that breaks its own sentence */
@container view (max-width: 720px) {
  .row-pair { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
}
@container view (min-width: 900px) {
  .links-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container view (max-width: 430px) {
  .links-row { grid-template-columns: minmax(0, 1fr); }
}
@container view (max-width: 900px) {
  .board .hide-phone { display: none; }
  /* a group of three goes straight to one a row: two and a half rows is a half empty row */
  .cards, .cards-3 { grid-template-columns: minmax(0, 1fr); }
  .cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container view (max-width: 560px) {
  .cards-2, .steps { grid-template-columns: minmax(0, 1fr); }
}
@container view (max-width: 520px) {
  .board th, .board td { padding: var(--s2) var(--s3); }
}
.board .coin-cell { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.board .coin-cell img { width: 40px; height: 40px; border: 3px solid var(--ink); object-fit: cover; image-rendering: auto; }

/* Four cards across turn every line into three words: two columns is the default, and four
   only when the column itself is wide enough to read. */
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s5); align-items: start; }
.step { display: grid; grid-template-rows: auto auto 1fr; gap: var(--s3); align-content: start; }
.step img { width: 100%; height: auto; border: 4px solid var(--ink); image-rendering: pixelated; }
.step h3 { margin: 0; font: 700 var(--label)/1.1 var(--pixel); text-transform: uppercase; }
.step p { margin: 0; font: 400 var(--body)/1.5 var(--text); }
@container view (min-width: 1180px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step p { font-size: var(--small); }
  /* four across is the only place a title can take two lines: reserve them so the bodies line up */
  .step h3 { min-height: calc(2 * 1.1em); }
}

.empty { color: var(--ink-soft); font: 500 var(--body)/1.5 var(--text); }
.risk { margin: var(--s5) 0 0; font: 400 var(--small)/1.5 var(--text); color: var(--ink-soft); }
.noscript { padding: var(--s6); background: var(--cream); font: 500 var(--body)/1.5 var(--text); }

.status { margin: var(--s4) 0 0; padding: var(--s3) var(--s4); font: 500 var(--body)/1.5 var(--text); background: rgba(39,30,33,.07); min-height: 56px; display: flex; align-items: center; }
.status.bad { background: rgba(212, 102, 92, .22); }
.status.good { background: rgba(78, 157, 110, .22); }

/* ---------------------------------------------------------- the screens ---- */
/* One container, one inset, the same three bands until there is no room for three.
   The row grammar inside a plate answers to its own column (the container queries above),
   never to the window. */
@media (max-width: 1500px) {
  :root { --display: 56px; --head: 40px; --gutter: 32px; --ground-h: 152px; --floor-air: 128px; }
  .shell { width: min(1280px, 100% - calc(var(--gutter) * 2)); grid-template-columns: 240px minmax(0, 1fr) 320px; column-gap: var(--s5); }
  .btn-big { font-size: var(--body); }
}
/* The figures move under the page and the signpost keeps its column: the post stands wherever the
   menu is a column, and the menu is a column down to 900. */
@media (max-width: 1300px) {
  :root { --display: 48px; --head: 32px; }
  .shell {
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-areas:
      "lockup  lockup"
      "nav     view"
      "readout readout";
    width: min(1100px, 100% - calc(var(--gutter) * 2));
  }
  .readout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* five planks in a column would leave the page nothing: one key opens the list instead */
@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "lockup" "nav" "view" "readout";
    width: min(900px, 100% - calc(var(--gutter) * 2));
  }
  .signpost { padding-left: 0; max-width: 420px; }
  .signpost-post { display: none; }
  .signpost-planks { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: var(--s2); margin-top: var(--s2); }
  .signpost .drawer-key { display: flex; cursor: pointer; list-style: none; }
  .drawer[open] .drawer-key { border-image-source: url("/img/plate-cream-sm.png"); border-image-slice: 24 fill; }
  .plank { text-align: left; justify-content: flex-start; padding-inline: var(--s5); }
  .readout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  :root { --display: 32px; --head: 32px; --sub: 24px; --label: 20px; --body: 18px; --gutter: 16px;
          --plate-slice: 20px; --dark-slice: 20px; --btn-slice: 20px; --ground-h: 128px; --floor-air: 0px; }
  .shell { width: calc(100% - calc(var(--gutter) * 2)); padding: var(--s5) 0; row-gap: var(--s5); }
  .plate { padding: var(--s5) var(--s4); }
  .plate-sm, .dark { padding: var(--s4); }
  .btn { width: 100%; padding: 2px var(--s3) 6px; }
  .btn-big { min-height: 64px; font-size: var(--body); }
  .row-pair { grid-template-columns: minmax(0, 1fr); max-width: none; }
  .ca-row { grid-template-columns: minmax(0, 1fr); }
  .row { gap: var(--s3); }
  .lockup-mark { width: 52px; height: 52px; }
  .lockup-name { font-size: var(--label); }
  .lockup-line { font-size: var(--small); }
  .plank { min-height: 56px; padding: 8px var(--s5) 10px; font-size: var(--label); }
  .walker { display: none; }
  .floor { height: var(--ground-h); }
  .board th, .board td { padding: var(--s2) var(--s3); font-size: var(--small); }
  .board th, .board td.num { white-space: normal; }
  .board .hide-phone { display: none; }
  .board .coin-cell { flex-wrap: wrap; }
  .board .coin-cell img { width: 32px; height: 32px; }
}

@media (max-width: 400px) {
  :root { --display: 32px; }
  .lockup { gap: var(--s3); }   /* a row even here: a stacked mark pushes the name into the sky art */
  .lockup-name { font-size: 18px; }
  .lockup-mark { width: 40px; height: 40px; }
}

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

[hidden] { display: none !important; }   /* a class that sets display otherwise beats it */

/* the coin's payouts, a running total by round: flat pixel bars on the cream plate */
.chart { margin: 0 0 var(--s5); }
.chart-bars {
  display: flex; align-items: flex-end; gap: var(--s1);
  height: 120px; padding: var(--s2); border: 4px solid var(--ink); background: var(--cream-2);
}
.chart-bar { flex: 1 1 0; min-width: 4px; background: var(--green); box-shadow: inset 0 4px 0 #7fb84b; }
.chart .note { margin-top: var(--s2); }
