@font-face {
  font-family: "Soehne Mono";
  src: url("/fonts/soehne-mono-web-kraftig.woff2") format("woff2"), url("/fonts/soehne-mono-web-kraftig.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #111214;
  --hot: #4c8dff;
  --strip: 30px;          /* the tractor-feed strip down each edge */
  /* the faint bars across continuous paper */
  --bars: repeating-linear-gradient(0deg, transparent 0 48px, rgb(17 18 20 / 0.028) 48px 96px);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Soehne Mono", ui-monospace, Menlo, monospace;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  cursor: default;
}

/* The page is the paper: one long continuous sheet, far taller than the
   screen, fed upwards as it prints. Faint bars across it, and a strip of
   sprocket holes down each edge, torn off along a dotted line. */
.paper {
  position: fixed;
  left: 0;
  right: 0;
  top: -150vh;
  height: 400vh;
  background: var(--bars);
  will-change: transform;
}
.paper::before,
.paper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--strip);
  background: radial-gradient(circle at 50% 12px, rgb(17 18 20 / 0.13) 0 4.5px, transparent 5px) 0 0 / var(--strip) 24px repeat-y;
}
.paper::before { left: 0; border-right: 1px dashed rgb(17 18 20 / 0.16); }
.paper::after { right: 0; border-left: 1px dashed rgb(17 18 20 / 0.16); }

.ink {
  position: absolute;
  left: 0;
  top: 150vh;
  display: block;
}

/* The real heading, for anything that reads the page rather than looks at it. */
.word {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Each printed link has a real one lying over it, live once it has printed. */
.links a,
.links button {
  padding: 0;
  border: 0;
  background: none;
  position: absolute;
  color: transparent;
  font-size: 1px;
  border-radius: 3px;
  pointer-events: none;
  outline: none;
  transition: background-color 150ms ease;
}
.links .printed { pointer-events: auto; cursor: pointer; }
.links .printed:focus-visible { background: rgb(76 141 255 / 0.22); }
@media (hover: hover) { .links .printed:hover { background: rgb(76 141 255 / 0.22); } }

/* The print head rides one fine guide line across the paper. */
.rail {
  position: fixed;
  left: var(--strip);
  right: var(--strip);
  height: 1px;
  background: rgb(17 18 20 / 0.14);
  transition: opacity 600ms ease;
}
/* The carriage: a dark moulded block with cooling fins up top, the ribbon
   running through it and out either side, and in the middle the steel nose
   that holds the nine pins. */
.head {
  position: fixed;
  left: 0;
  width: 34px;
  margin-left: -17px;
  border-radius: 5px;
  background: linear-gradient(180deg, #45464c 0, #26272b 14%, #131416 55%, #1d1e21 86%, #34353a 100%);
  box-shadow: 0 5px 10px rgb(17 18 20 / 0.3), 0 1px 2px rgb(17 18 20 / 0.4), inset 0 1px 0 rgb(255 255 255 / 0.22), inset 0 -1px 0 rgb(0 0 0 / 0.6), inset 1px 0 0 rgb(255 255 255 / 0.06);
  will-change: transform;
  transition: opacity 600ms ease;
}
.head i { position: absolute; }
.head .ribbon {
  left: -9px;
  right: -9px;
  top: calc(50% - 4px);
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(180deg, #050506, #2c2c31 45%, #0a0a0c);
  box-shadow: 0 1px 2px rgb(17 18 20 / 0.3);
}
.head .fins {
  left: 5px;
  right: 5px;
  top: 3px;
  height: 6px;
  background: repeating-linear-gradient(180deg, rgb(255 255 255 / 0.26) 0 1px, rgb(0 0 0 / 0.35) 1px 2px, transparent 2px 3px);
}
.head .nose {
  left: 50%;
  top: 12px;
  width: 10px;
  height: var(--band, 28px);
  margin-left: -5px;
  border-radius: 2px;
  background:
    radial-gradient(circle, #111214 0 1px, transparent 1.3px) center / 100% calc(100% / 9) repeat-y,
    linear-gradient(90deg, #7f8186, #f1f2f3 42%, #b4b6ba 70%, #8a8c90);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.45), 0 1px 2px rgb(0 0 0 / 0.5);
}
.head .screw {
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d7d8da, #6f7175);
}
body.done .head { opacity: 0; }
body.done .rail { opacity: 0; }

.again,
.skip,
.in,
.sound {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: color 180ms ease, opacity 200ms ease;
}
/* Bottom left: "skip" while it prints, the printer (print again) once it has.
   All three controls are made of printer dots, like everything else. */
.again,
.skip,
.in,
.sound {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  opacity: 0.45;
}
.again,
.skip { left: calc(var(--strip) + 4px); }
.sound { right: calc(var(--strip) + 4px); }
/* LinkedIn, just to the left of the speaker and as quiet as it */
.in { right: calc(var(--strip) + 4px + 46px); }
.again[hidden],
.skip[hidden] { display: none; }
.dotty { display: block; fill: currentColor; }
.sound[aria-pressed="true"] .off,
.sound[aria-pressed="false"] .on { display: none; }
.again:focus-visible,
.skip:focus-visible,
.in:focus-visible,
.sound:focus-visible { color: var(--hot); opacity: 1; outline: none; }
@media (hover: hover) {
  .again:hover,
  .skip:hover,
  .in:hover,
  .sound:hover { color: var(--hot); opacity: 1; }
}

/* ---------------------------------------------------------------- the game */

/* A clean stretch of the same paper laid over the page, with the game drawn
   on it in printer dots. The holes down the edges still show. */
.game {
  position: fixed;
  z-index: 5;
  inset: 0 var(--strip);
  background: var(--paper);
}
.game canvas {
  position: absolute;
  left: calc(var(--strip) * -1);
  top: 0;
  width: 100vw;
  height: 100%;
  touch-action: none;
  cursor: pointer;
}
.game button {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.5;
  transition: color 180ms ease, opacity 200ms ease;
}
/* The way out is always plain to see: "back", big and dark on its own patch of
   paper in the top corner, with "esc" under it where there is a keyboard. */
.game .game-back {
  top: max(8px, env(safe-area-inset-top));
  right: 6px;
  z-index: 1;
  height: 48px;
  padding: 0 16px;
  border: 1px dashed rgb(17 18 20 / 0.32);
  border-radius: 24px;
  background: var(--paper);
  opacity: 0.9;
}
.game-esc { position: absolute; z-index: 1; top: calc(max(8px, env(safe-area-inset-top)) + 54px); right: 22px; opacity: 0.35; pointer-events: none; }
@media (pointer: coarse) { .game-esc { display: none; } }
/* When a go is over: "again" and "back", side by side. */
.game-over { position: absolute; left: 50%; top: 72%; translate: -50% 0; display: flex; gap: 12px; }
.game-over[hidden] { display: none; }
.game .game-over button { position: static; height: 56px; padding: 0 22px; border: 1px dashed rgb(17 18 20 / 0.32); border-radius: 28px; background: var(--paper); opacity: 0.9; }
.game .game-over .game-again { border-style: solid; border-color: rgb(17 18 20 / 0.7); }
.game-again .dotty { scale: 1.3; }
.game button:focus-visible { color: var(--hot); opacity: 1; outline: none; }
@media (hover: hover) { .game button:hover { color: var(--hot); opacity: 1 !important; } }
/* The games played on the sheet itself have no paper of their own: the page
   shows through, and only their pieces are drawn over it. */
.game.play { background: none; }
.game.play canvas { cursor: crosshair; }
/* "again" and "back" sit low, clear of what is printed */
.game.play .game-over { top: auto; bottom: max(96px, 14vh); }
/* While a game is on, the page's own skip and reprint step aside; sound stays. */
body.gaming .again,
body.gaming .in,
body.gaming .skip { display: none; }
body.gaming .sound { z-index: 6; }

/* The way back to the first version: bottom right, to the left of LinkedIn
   and the speaker, and as quiet as they are. */
.v1 {
  position: fixed;
  right: calc(var(--strip) + 4px + 92px);
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  color: inherit;
  opacity: 0.45;
  transition: color 180ms ease, opacity 200ms ease;
}
.v1:focus-visible { color: var(--hot); opacity: 1; outline: none; }
@media (hover: hover) { .v1:hover { color: var(--hot); opacity: 1; } }
body.gaming .v1 { display: none; }

/* ---------------------------------------------------------------- the drawing pad */

/* Another clean stretch of paper, with a sheet of faint dots to draw on.
   Everything on it sits where the screen says, so the sheet can be fed down
   past the controls and printed back up under the head. */
.draw {
  position: fixed;
  z-index: 5;
  inset: 0 var(--strip);
  background: var(--bars), var(--paper);      /* the same barred paper as the page */
}
.draw-sheet {
  position: fixed;
  will-change: transform;
}
.draw-sheet canvas { display: block; }
.draw[data-state="printing"] .draw-sheet,
.draw[data-state="printed"] .draw-sheet { outline-color: transparent; }
.draw[data-state="printing"] .draw-sheet canvas,
.draw[data-state="printed"] .draw-sheet canvas { cursor: default; }
/* its own head, out only while it prints */
.draw .head { opacity: 0; }
.draw[data-state="printing"] .head { opacity: 1; }

.draw button {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.55;
  transition: color 180ms ease, opacity 200ms ease;
}
.draw button[hidden],
.draw form[hidden] { display: none; }
.draw button:focus-visible,
.draw button[aria-pressed="true"] { color: var(--hot); opacity: 1; outline: none; }
@media (hover: hover) { .draw button:hover { color: var(--hot); opacity: 1; } }
.draw-back { position: fixed; z-index: 3; top: max(8px, env(safe-area-inset-top)); right: calc(var(--strip) + 4px); }

/* "log" sits top left, opposite "back". */
.draw-logs { position: fixed; z-index: 3; top: max(8px, env(safe-area-inset-top)); left: calc(var(--strip) + 4px); }

/* Under the sheet, a slip to fill in: what to draw, with the button that
   prints it, and under that a quieter line for a name. */
.draw-bar {
  position: fixed;
  left: var(--strip);
  right: var(--strip);
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);      /* so the slip is sized by the screen, not by what is in it */
  justify-items: center;
  transition: opacity 250ms ease;
}
.draw-ask { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; width: min(560px, calc(100% - 20px)); }
.draw-line { display: flex; align-items: center; gap: 10px; height: 46px; min-width: 0; }
.draw-line > label { flex: none; width: 46px; opacity: 0.5; }
.draw-line input {
  flex: 1;
  width: 0;
  min-width: 0;
  height: 40px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px dashed rgb(17 18 20 / 0.4);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: 16px/1 "Soehne Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.01em;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
  touch-action: manipulation;
}
.draw-line input::placeholder { color: rgb(17 18 20 / 0.3); }
.draw-line input:focus { border-bottom-color: var(--hot); }
/* the one real button on the slip: boxed, so it reads as the thing to press */
.draw .draw-go {
  flex: none;
  height: 40px;
  padding: 0 12px;
  border: 1px dashed rgb(17 18 20 / 0.55);
  border-radius: 3px;
  opacity: 0.9;
}
.draw .draw-go:focus-visible { border-color: var(--hot); }
@media (hover: hover) { .draw .draw-go:hover { border-color: var(--hot); } }
/* the name is the lesser line: shorter and lighter */
.draw-sign { height: 36px; }
.draw-sign > label { opacity: 0.35; }
.draw-sign input { flex: 0 1 240px; height: 32px; border-bottom-color: rgb(17 18 20 / 0.22); font-size: 16px; color: rgb(17 18 20 / 0.75); }
.draw-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 22px; }
@media (max-width: 520px) { .draw-tools { gap: 0 6px; } }
.draw[data-state="printing"] .draw-bar,
.draw[data-state="posing"] .draw-bar,
.draw[data-state="asking"] .draw-bar { opacity: 0; pointer-events: none; }
/* A portrait instead of words: a wee webcam in the top corner, across from
   the way home and well away from "print". Only on the empty sheet. */
/* Posing: the camera's view in the middle of the sheet, as in a mirror,
   with what happens to the photo said plainly under it. */
.draw-pose {
  position: fixed;
  z-index: 2;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(440px, calc(100vw - 2 * var(--strip) - 24px));
  padding: 12px 12px 6px;
  border: 1px dashed rgb(17 18 20 / 0.45);
  border-radius: 3px;
  background: var(--paper, #fff);
  box-shadow: 0 6px 24px rgb(17 18 20 / 0.12);
}
.draw-pose[hidden] { display: none; }
.draw-pose video {
  display: block;
  width: 100%;
  max-height: 46vh;
  object-fit: cover;
  transform: scaleX(-1);
  filter: grayscale(1) contrast(1.15);
  background: rgb(17 18 20 / 0.06);
}
.draw-pose p { margin: 0; font-size: 12px; line-height: 1.45; text-align: center; color: rgb(17 18 20 / 0.6); text-wrap: balance; }
.draw-pose-who { display: flex; align-items: center; gap: 10px; width: min(280px, 100%); }
.draw-pose-who span { flex: none; opacity: 0.5; }
.draw-pose-who input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px dashed rgb(17 18 20 / 0.4);
  border-radius: 0;
  background: none;
  font: inherit;
  font-size: 16px;
  color: inherit;
  outline: none;
}
.draw-pose-who input::placeholder { color: rgb(17 18 20 / 0.3); }
.draw-pose-who input:focus { border-bottom-color: var(--hot); }
.draw-pose div { display: flex; gap: 8px; }
.draw .draw-snap { border: 1px dashed rgb(17 18 20 / 0.55); border-radius: 3px; opacity: 0.9; padding: 0 14px; }

/* Something the printer has to say, in the middle of the empty sheet. */
.draw-say {
  position: fixed;
  left: var(--strip);
  right: var(--strip);
  top: calc(46% - 10px);
  display: grid;
  place-items: center;
  height: 20px;
  margin: 0;
  color: var(--hot);
  pointer-events: none;
}

/* The gallery: everyone's drawings, small, over the sheet. */
.draw-log {
  position: fixed;
  z-index: 2;
  inset: 0 var(--strip);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
  align-content: start;
  gap: 30px 22px;
  padding: 64px 18px 90px;
  overflow-y: auto;
  touch-action: pan-y;
  /* barred paper too, and the bars move with the drawings as it is scrolled */
  background: var(--bars) local, var(--paper);
}
.draw-log[hidden] { display: none; }
/* Over the gallery, at the foot: the way to ask for one of your own. */
.draw .draw-own {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  transform: translateX(-50%);
  height: 44px;
  padding: 0 14px;
  border: 1px dashed rgb(17 18 20 / 0.55);
  border-radius: 3px;
  background: var(--paper);
  opacity: 1;
  box-shadow: 0 6px 20px rgb(17 18 20 / 0.1);
}
.draw .draw-own:focus-visible { border-color: var(--hot); }
@media (hover: hover) { .draw .draw-own:hover { border-color: var(--hot); } }
@media (pointer: coarse) { .draw .draw-own { bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px)); } }
.draw-log p { grid-column: 1 / -1; display: grid; place-items: center; height: 120px; margin: 0; opacity: 0.6; }
.draw .draw-log button {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 8px;
  height: auto;
  min-width: 0;
  padding: 0;
  opacity: 1;
  text-align: left;
}
.draw-log canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;      /* every frame the same shape, whatever shape the drawing */
  object-fit: contain;
  border: 1px dashed rgb(17 18 20 / 0.2);
  background: #fff;
  transition: border-color 180ms ease;
}
.draw-log div,
.draw-log span { display: grid; gap: 3px; }
.draw-log .dotty { opacity: 0.8; max-width: 100%; }
.draw-log span { opacity: 0.55; }
.draw-log button:focus-visible canvas { border-color: var(--hot); }
@media (hover: hover) { .draw-log button:hover canvas { border-color: var(--hot); } }

/* ---------------------------------------------------------------- on real paper */

/* What goes to the printer (or a PDF) is the drawing alone. */
.print-out { display: none; }
@media print {
  @page { margin: 0; }                      /* no room for the browser's own date and address */
  html, body { height: auto; overflow: visible; background: #fff; }
  body > *:not(.print-out) { display: none !important; }
  .print-out { display: block; padding: 18mm; }
  .print-out svg { display: block; width: 100%; height: auto; max-height: 250mm; margin: 0 auto; }
}

/* The page's own head and guide line stay out of the way of a game or the pad. */
body.gaming > .head,
body.gaming > .rail { opacity: 0; }

/* On a phone, keep the bottom row clear of the bottom edge, where the browser
   takes taps for its own toolbar and the home bar. */
@media (pointer: coarse) {
  .again, .skip, .in, .v1, .sound { bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px)); }
  .draw-bar { bottom: calc(max(24px, calc(env(safe-area-inset-bottom) + 12px)) + 44px); }
}

/* ---------------------------------------------------------------- dotmatrix.you */

/* The site's name, small, in the middle of the top row between "gallery"
   and whatever is on the right. */
.name {
  position: fixed;
  z-index: 6;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  translate: -50% 0;
  display: grid;
  place-items: center;
  height: 44px;
  opacity: 0.4;
  pointer-events: none;
}

/* On the desk there is no word "gallery" in the corner: it is reached from
   the home page, or from under a printed drawing. The word is only the
   gallery's heading, there while it is open. */
.draw .draw-logs { display: none; }      /* no heading on the gallery, and no link to it from the desk */

/* While the desk is open the printed page behind it is put away, so none of
   it shows down the edges if the window is made narrower. */
body.gaming .ink,
body.gaming .links { visibility: hidden; }

/* the visitor count: at the foot of the page, centred, quieter than the corner buttons */
.visits {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  height: 44px;
  display: grid;
  place-items: center;
  opacity: 0.28;
  pointer-events: none;
}
.visits[hidden] { display: none; }
body.gaming .visits { visibility: hidden; }

/* ---------------------------------------------------------------- the home page's slip */

/* Under the printed name: what to draw and who for, the button that prints
   it, and a ticket each for a portrait and the gallery. Real fields, there
   once the name has printed. */
.home {
  position: absolute;
  display: grid;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}
body.done .home { opacity: 1; pointer-events: auto; }
body.gaming .home { visibility: hidden; }
.home .dotty,
.draw-bar .dotty { max-width: 100%; height: auto; }
.home-ask { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px) auto; align-items: end; gap: 12px; margin: 0; }
.home-f,
.draw-f { display: grid; gap: 8px; min-width: 0; }
.home-f > span,
.draw-f > span { opacity: 0.5; }
.home-f input,
.draw-f input,
.draw-f textarea {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1px solid rgb(17 18 20 / 0.55);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.35 "Soehne Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.01em;
  outline: none;
  resize: none;
  user-select: text;
  -webkit-user-select: text;
  touch-action: manipulation;
}
.draw-f textarea { height: 104px; padding: 14px 16px; }
.home-f input::placeholder,
.draw-f input::placeholder,
.draw-f textarea::placeholder { color: rgb(17 18 20 / 0.35); }
.home-f input:focus,
.draw-f input:focus,
.draw-f textarea:focus { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot); }
/* the one black button: the thing to press */
.home-go,
.draw .draw-go,
.draw .draw-new {
  display: grid;
  place-items: center;
  height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 3px;
  background: var(--ink);
  color: #fff;
  opacity: 1;
  cursor: pointer;
  transition: background-color 180ms ease;
}
.home-go:focus-visible,
.draw .draw-go:focus-visible,
.draw .draw-new:focus-visible { background: var(--hot); color: #fff; outline: none; }
@media (hover: hover) {
  .home-go:hover,
  .draw .draw-go:hover,
  .draw .draw-new:hover { background: var(--hot); color: #fff; }
}
.home-note { margin: 0; opacity: 0.45; }
.home-tix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.home-tix-one { grid-template-columns: minmax(0, 1fr); }
.home-tick,
.draw .draw-tools button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  min-height: 84px;
  padding: 14px 20px;
  border: 1px solid rgb(17 18 20 / 0.4);
  border-radius: 3px;
  background: var(--paper);
  color: inherit;
  opacity: 1;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}
.home-tick > .dotty { flex: none; }
.home-tick > span { flex: 1; display: grid; gap: 9px; min-width: 0; }
.home-tick b,
.home-tick i { display: block; font: inherit; }
.home-tick i { opacity: 0.55; }
.home-tick:focus-visible,
.draw .draw-tools button:focus-visible { border-color: var(--hot); color: var(--hot); outline: none; }
@media (hover: hover) {
  .home-tick:hover,
  .draw .draw-tools button:hover { border-color: var(--hot); color: var(--hot); }
}
@media (max-width: 640px) {
  .home { gap: 10px; }
  .home-ask { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .home-q { grid-column: 1 / -1; }
  .home-f > span { display: none; }
  .home-f input, .home-go { height: 48px; }
  .home-go { padding: 0 20px; }
  .home-tix { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; }
  .home-tick { min-height: 60px; padding: 8px 14px; gap: 14px; }
}

/* ---------------------------------------------------------------- the desk, beside the sheet */

/* The way home is the one thing in the top corner. */
.draw-back { left: calc(var(--strip) + 4px); right: auto; }

/* On a wide window the slip stands to the left of the sheet, level with its
   top; on a narrow one it lies under the sheet. */
.draw-bar {
  position: fixed;
  z-index: 1;
  left: calc(var(--strip) + 8px);
  right: calc(var(--strip) + 8px);
  top: auto;
  bottom: calc(max(24px, calc(env(safe-area-inset-bottom) + 12px)) + 44px);
  display: block;
  transition: opacity 250ms ease;
}
.draw[data-wide="1"] .draw-bar { left: calc(var(--strip) + 24px); right: auto; top: var(--sy, 60px); bottom: auto; width: var(--pw, 340px); }
.draw[data-state="printing"] .draw-bar,
.draw[data-state="posing"] .draw-bar,
.draw[data-state="asking"] .draw-bar { opacity: 0.3; pointer-events: none; }

.draw-ask { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: auto; margin: 0; }
.draw-ask[hidden],
.draw-done[hidden],
.draw-mode[hidden],
.draw .draw-tools button[hidden] { display: none; }
.draw-mode { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid rgb(17 18 20 / 0.55); border-radius: 3px; overflow: hidden; }
.draw .draw-mode button { display: flex; align-items: center; justify-content: center; gap: 10px; height: 42px; background: var(--paper); color: var(--ink); opacity: 1; }
.draw .draw-mode button + button { border-left: 1px solid rgb(17 18 20 / 0.55); }
.draw .draw-mode button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.draw .draw-mode button:focus-visible { box-shadow: inset 0 0 0 2px var(--hot); }
.draw-f-q { grid-column: 1 / -1; }
.draw-f > span { display: none; }
.draw-f input, .draw-f textarea { height: 46px; }
.draw-f textarea { padding: 11px 16px; white-space: nowrap; overflow: hidden; }
.draw .draw-go { height: 46px; padding: 0 22px; }
.draw-note { display: none; margin: 0; }
.draw-cap { display: none; }
.draw-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.draw .draw-tools button { min-height: 44px; height: 44px; padding: 0 12px; gap: 10px; }
.draw .draw-new { width: 100%; height: 46px; margin-top: 8px; }

.draw[data-wide="1"] .draw-ask { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.draw[data-wide="1"] .draw-f > span { display: block; }
.draw[data-wide="1"] .draw-f input { height: 56px; }
.draw[data-wide="1"] .draw-f textarea { height: 104px; padding: 14px 16px; white-space: normal; }
.draw[data-wide="1"] .draw-go { height: 60px; }
.draw[data-wide="1"] .draw-note { display: grid; gap: 7px; opacity: 0.45; }
.draw[data-wide="1"] .draw-cap { display: grid; gap: 14px; margin-bottom: 26px; }
.draw-cap div, .draw-cap span { display: grid; gap: 8px; }
.draw-cap span { opacity: 0.55; }
.draw[data-wide="1"] .draw-tools { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.draw[data-wide="1"] .draw-tools button { min-height: 60px; height: 60px; padding: 0 20px; gap: 16px; }
.draw[data-wide="1"] .draw-new { height: 60px; margin-top: 14px; }

/* What the printer has to say, and the note on the empty sheet, sit on the sheet. */
.draw-say { left: var(--cx, 50%); right: auto; top: calc(var(--cy, 46%) - 10px); width: max-content; max-width: calc(100vw - 2 * var(--strip) - 24px); transform: translateX(-50%); z-index: 1; }
.draw-hint {
  position: fixed;
  left: var(--cx, 50%);
  top: calc(var(--cy, 46%) - 9px);
  transform: translateX(-50%);
  display: none;
  margin: 0;
  opacity: 0.3;
  pointer-events: none;
}
.draw-hint .dotty { max-width: calc(100vw - 2 * var(--strip) - 40px); height: auto; }
.draw[data-state="ask"]:not([data-said]) .draw-hint { display: block; }
.draw-pose { left: var(--cx, 50%); }
