/* The walk-in. The town is the page: everything here is only what somebody
   standing in Ashmere needs, in soscitea's pixel system (day theme): stone
   grounds, dark panels over the world, and Moondust's lamp for the one call
   to action and the current position. Corners are square, controls have a
   2px line and a hard shadow they press into, and nothing is blurred or
   graded. Silkscreen, at its one regular weight, sets names, titles, buttons
   and labels; Geist sets every sentence; Geist Mono sets the clock and the
   counts. */

:root {
  --ground: #e8e3d7; --ground-raised: #f5f2ea; --ground-sunken: #d8d1c1;
  --ink: #1b1713; --ink-muted: #574e45; --line: #1b1713; --line-soft: #c9c1b0;
  --panel: #1f1a16; --panel-ink: #f3eee4; --panel-muted: #c2b8a8; --panel-rule: #3d352e;
  --lamp: #f0b232; --lamp-hover: #f6c45a; --on-lamp: #1b1713; --moon: #f3f1ea;
  --brick: #9c412a; --moss: #3f6130;
  --brick-on-panel: #d36a4a; /* brick's night value: the panel is dark in both themes (4.9:1 on it) */
  --font-pixel: Silkscreen, "Geist Mono", ui-monospace, monospace;
  /* the town view's own names and 2D/3D pair (style.css) take the face's size and weight from these */
  --px-scale: .85; --px-weight: 400;
  --font-sans: Geist, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --shadow-press: 0 4px 0 0 #1b1713; --shadow-panel: 4px 4px 0 0 #1b1713;
  /* the dark panels step their corners in by two pixel-units instead of rounding */
  --notch: polygon(0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%,
    4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px));
  /* pixel glyphs on an 8 by 8 grid at 2px a pixel, painted in currentColor through a mask */
  --i-next: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 7h10v2H2zM8 3h2v2H8zM10 5h2v2h-2zM12 7h2v2h-2zM10 9h2v2h-2zM8 11h2v2H8z'/%3E%3C/svg%3E");
  --i-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3h2v2H3zM5 5h2v2H5zM7 7h2v2H7zM9 9h2v2H9zM11 11h2v2h-2zM11 3h2v2h-2zM9 5h2v2H9zM5 9h2v2H5zM3 11h2v2H3z'/%3E%3C/svg%3E");
  --i-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 2h2v12H4zM6 4h2v8H6zM8 6h2v4H8zM10 7h2v2h-2z'/%3E%3C/svg%3E");
  --i-pause: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 3h3v10H4zM9 3h3v10H9z'/%3E%3C/svg%3E");
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--ground); }
body { font: 400 1rem/1.5 var(--font-sans); color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
html { font-synthesis-weight: none; } /* Silkscreen ships one weight: never fake a bold */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

#world { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; cursor: grab; outline: none; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; image-rendering: pixelated; will-change: transform; } /* walk.js sizes it a pixel past the screen and slides it */
#world:active { cursor: grabbing; }

/* ---- buttons: square, a 2px line, a hard shadow they press 4px into in two steps; lamp for doing ---- */
.btn {
  box-sizing: border-box; font: 400 .85rem/1 var(--font-pixel); letter-spacing: 0; min-height: 46px; padding: 0 1.15em;
  border: 2px solid var(--line); border-radius: 0; cursor: pointer; color: var(--ink); background: var(--ground-raised); box-shadow: var(--shadow-press);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap;
  transition: transform .08s steps(2), box-shadow .08s steps(2);
}
.btn:hover { background: var(--ground); }
.btn:active { transform: translateY(4px); box-shadow: none; }
.btn-gold { background: var(--lamp); color: var(--on-lamp); }
.btn-gold:hover { background: var(--lamp-hover); }
/* quiet, on the guide's dark panel: an outline for declining */
.btn-quiet { background: transparent; color: var(--panel-ink); border-color: var(--panel-muted); box-shadow: none; }
.btn-quiet:hover { background: var(--panel-rule); }
.btn-quiet:active { transform: translateY(2px); }
.btn:focus-visible, .scrolllink:focus-visible, .wordmark:focus-visible, .sheet-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.talk-card :focus-visible { outline: 2px solid var(--panel-ink); outline-offset: 3px; }
.btn[disabled] { cursor: not-allowed; box-shadow: none; transform: translateY(4px); color: var(--ink-muted); }
.btn-small { min-height: 42px; font-size: .8rem; padding: 0 .95em; }
/* on the stone, for a second action that sits beside the lamp one */
.btn-paper { background: var(--ground-raised); color: var(--ink); }
.btn-paper:hover { background: var(--ground); }

/* ---- the bar across the top ---- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 5; pointer-events: none;
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + var(--safe-t)) calc(14px + var(--safe-r)) 0 calc(14px + var(--safe-l));
}
.topbar > * { pointer-events: auto; }
.wordmark, .clock { background: var(--ground-raised); border: 2px solid var(--line); border-radius: 0; box-shadow: var(--shadow-press); }
.wordmark { font: 400 1.0625rem/1 var(--font-pixel); color: var(--ink); text-decoration: none; padding: 10px 15px 7px; }
.clock { font: 500 .875rem/1 var(--font-mono); color: var(--ink-muted); margin: 0 auto 0 0; padding: 9px 12px 7px; font-variant-numeric: tabular-nums; }
#readme { margin-left: auto; }

/* ---- how to move, for the first few seconds: a dark panel over the world ---- */
.tips {
  position: fixed; left: calc(16px + var(--safe-l)); bottom: calc(18px + var(--safe-b)); z-index: 4; max-width: 23rem;
  background: var(--panel); color: var(--panel-ink); clip-path: var(--notch); padding: 16px 16px 14px;
  font: 400 .875rem/1.43 var(--font-sans);
  opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease;
}
.tips.in { opacity: 1; transform: none; }
.tips p { margin: 0; }
.tips p + p { margin-top: 8px; }
.tips .tips-what { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--panel-rule); font: 600 .9375rem/1.47 var(--font-sans); }
.keys { white-space: nowrap; }
kbd {
  font: 400 .6875rem/1 var(--font-pixel); display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; box-sizing: border-box;
  border-radius: 0; background: var(--panel-ink); color: var(--panel); box-shadow: 0 3px 0 0 var(--panel-muted); margin-right: 4px;
}

/* ---- names over heads, and what they are saying: the moon's white, with a pixel tail ---- */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.nametag {
  position: absolute; left: 0; top: 0; margin-top: -6px; white-space: nowrap;
  font: 400 .6875rem/1 var(--font-pixel); letter-spacing: .04em; color: var(--on-lamp); background: var(--moon);
  padding: 6px 8px 5px; border: 2px solid var(--line); border-radius: 0;
}
.nametag::after, .bubble::after {
  content: ""; position: absolute; left: calc(50% - 3px); bottom: -8px; width: 6px; height: 6px; background: var(--line);
  clip-path: polygon(0 0, 100% 0, 100% 2px, 4px 2px, 4px 4px, 2px 4px, 2px 6px, 0 6px);
}
.bubble {
  position: fixed; left: 0; top: 0; z-index: 3; width: max-content; max-width: min(21rem, 72vw); pointer-events: none;
  background: var(--ground-raised); color: var(--ink); border: 2px solid var(--line); border-radius: 0; padding: 8px 12px 9px; box-shadow: var(--shadow-panel);
}
.bubble b { display: block; font: 400 .6875rem/1 var(--font-pixel); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.bubble q { font: 400 .9375rem/1.4 var(--font-sans); quotes: "“" "”"; }

/* ---- the thumbstick, where a thumb lands ---- */
.stick {
  position: fixed; left: 0; top: 0; width: 96px; height: 96px; margin: -48px 0 0 -48px; z-index: 4; pointer-events: none;
  background: rgb(31 26 22 / .22); box-shadow: inset 0 0 0 2px var(--moon);
  display: grid; place-items: center; opacity: 0; transition: opacity .15s;
}
.stick.on { opacity: 1; }
.stick i, .stickhome i { box-sizing: border-box; width: 42px; height: 42px; background: var(--moon); border: 2px solid var(--line); box-shadow: var(--shadow-press); }
/* where the stick lives, shown while you are free to walk on a touch screen */
.stickhome {
  position: fixed; right: calc(26px + var(--safe-r)); bottom: calc(30px + var(--safe-b)); width: 96px; height: 96px; z-index: 4; pointer-events: none;
  background: rgb(31 26 22 / .2); box-shadow: inset 0 0 0 2px var(--moon);
  display: grid; place-items: center; opacity: 0; transition: opacity .25s;
}
.stickhome.on { opacity: 1; }

/* ---- the guide's card: a dark panel with stepped corners and a lamp name tab ---- */
.talk {
  position: fixed; left: 0; right: 0; bottom: calc(18px + var(--safe-b)); z-index: 6;
  width: min(44rem, calc(100vw - 24px)); margin: 0 auto;
  opacity: 0; transform: translateY(18px); transition: opacity .26s ease, transform .26s cubic-bezier(.2, .8, .2, 1);
}
.talk.in { opacity: 1; transform: none; }
/* the panel is drawn underneath, so the name tab can sit across its top edge without being cut by the notch */
.talk-card { position: relative; isolation: isolate; padding: 30px 24px 12px; color: var(--panel-ink); }
.talk-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--panel); clip-path: var(--notch); }
.talk-name {
  position: absolute; top: -16px; left: 20px; margin: 0; padding: 8px 12px 7px; border: 2px solid var(--line); border-radius: 0;
  font: 400 .6875rem/1 var(--font-pixel); letter-spacing: .04em; text-transform: uppercase; color: var(--on-lamp); background: var(--lamp);
}
.talk-name::before { content: ""; display: inline-block; flex: none; width: 8px; height: 8px; margin-right: 8px; background: var(--guide, #b8a894); outline: 2px solid var(--line); }
button.talk-name { cursor: pointer; display: inline-flex; align-items: center; white-space: nowrap; }
button.talk-name::after { /* it opens the guide picker */
  content: ""; flex: none; width: 10px; height: 6px; margin-left: 8px; background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 2px, 8px 2px, 8px 4px, 6px 4px, 6px 6px, 4px 6px, 4px 4px, 2px 4px, 2px 2px, 0 2px);
}
button.talk-name:hover { background: var(--lamp-hover); }
.talk-choose { margin-left: 14px; }
.talk-skip[hidden] + .talk-choose { margin-left: 0; }
.talk-line { margin: 0; min-height: 3em; text-wrap: pretty; font: 400 clamp(1.0625rem, .98rem + .3vw, 1.25rem)/1.4 var(--font-sans); }
.talk-extra:empty { display: none; }
.talk-extra { margin-top: 14px; }
.talk-foot { display: flex; align-items: center; min-height: 36px; margin-top: 4px; }
.talk-skip {
  background: none; border: 0; padding: 8px 2px; min-height: 44px; cursor: pointer; border-radius: 0;
  font: 500 .875rem/1 var(--font-sans); color: var(--panel-muted); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.talk-skip:hover { color: var(--panel-ink); }
.talk-next {
  margin-left: auto; width: 36px; height: 36px; padding: 0; box-sizing: border-box; cursor: pointer; display: grid; place-items: center;
  border: 2px solid var(--panel-ink); border-radius: 0; background: var(--lamp); color: var(--on-lamp);
}
.talk-next:hover { background: var(--lamp-hover); }
.talk-next span { width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i-next) center / 16px no-repeat; mask: var(--i-next) center / 16px no-repeat; }

.talk-ask { display: grid; gap: 11px; }
.talk-field input {
  width: 100%; box-sizing: border-box; min-height: 50px; border: 2px solid var(--line); border-radius: 0; padding: 0 14px;
  font: 400 1.125rem/1.25 var(--font-sans); color: var(--ink); background: var(--ground-sunken);
}
.talk-field input::placeholder { color: var(--ink-muted); }
.talk-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.talk-choices .btn { flex: 1 1 13rem; }
.talk-help { margin: 0; font: 400 .875rem/1.43 var(--font-sans); color: var(--panel-muted); }
.talk-err { margin: 0; font: 500 .875rem/1.43 var(--font-sans); color: var(--brick-on-panel); }
.talk-err:empty { display: none; }

/* The one question: the pixel face at full size, pressed in word by word, in steps. */
.talk-question {
  margin: 2px 0 6px; color: var(--panel-ink); letter-spacing: 0; text-wrap: balance;
  font: 400 clamp(1.7rem, .95rem + 2.9vw, 3.4rem)/1.05 var(--font-pixel);
}
.talk-question span { display: inline-block; animation: press .3s steps(3) both; animation-delay: calc(var(--i) * 110ms + 80ms); }
@keyframes press { from { opacity: 0; transform: translateY(8px); } }

.gift { margin: 0; display: flex; align-items: center; gap: 16px; }
.gift svg { width: 58px; height: auto; flex: none; filter: drop-shadow(0 3px 0 rgb(0 0 0 / .2)); }
.gift figcaption { font: 400 clamp(1.45rem, 1rem + 1.35vw, 2.125rem)/1.05 var(--font-pixel); color: var(--panel-ink); overflow-wrap: anywhere; }

/* ---- small ways out ---- */
.scrolllink {
  position: fixed; right: calc(14px + var(--safe-r)); bottom: calc(14px + var(--safe-b)); z-index: 4;
  font: 400 .75rem/1 var(--font-pixel); color: var(--ink); text-decoration: none;
  background: var(--ground-raised); padding: 10px 13px 8px; border: 2px solid var(--line); border-radius: 0; box-shadow: var(--shadow-press);
  transition: opacity .2s;
}
.scrolllink:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
body:has(.talk.in) .scrolllink { opacity: 0; pointer-events: none; }

/* ---- the replay, over everything ---- */
.replay { position: fixed; inset: 0; z-index: 8; background: var(--panel); opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.replay.in { opacity: 1; pointer-events: auto; }
.replay iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- the waitlist on a raised sheet ---- */
.sheet { position: fixed; inset: 0; z-index: 9; display: grid; justify-items: end; background: rgb(27 23 19 / 0); transition: background-color .26s; }
.sheet.in { background: rgb(27 23 19 / .4); }
.sheet-card {
  position: relative; width: min(27rem, 100vw); height: 100%; box-sizing: border-box; overflow: auto;
  background: var(--ground-raised); color: var(--ink); padding: calc(58px + var(--safe-t)) 28px calc(28px + var(--safe-b));
  border-left: 2px solid var(--line); transform: translateX(100%); transition: transform .32s cubic-bezier(.2, .9, .3, 1);
}
.sheet.in .sheet-card { transform: none; }
.sheet-close {
  position: absolute; top: calc(12px + var(--safe-t)); right: 12px; width: 40px; height: 40px; padding: 0; box-sizing: border-box; cursor: pointer;
  border: 2px solid var(--line); border-radius: 0; background: var(--ground); color: var(--ink); font-size: 0; display: grid; place-items: center;
}
.sheet-close::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i-close) center / 16px no-repeat; mask: var(--i-close) center / 16px no-repeat; }
.sheet-close:hover { background: var(--ground-sunken); }

/* ---- the loader: the town's name, and twelve lamp segments for how far along it is ---- */
.loader {
  position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 16px;
  background: var(--ground);
  transition: opacity .7s ease, visibility 0s linear .7s;
}
.loader.out { opacity: 0; visibility: hidden; }
.loader-town { margin: 0; font: 400 clamp(2.55rem, 1.9rem + 2.7vw, 3.4rem)/1 var(--font-pixel); color: var(--ink); }
/* walk.js scales the lamp fill; the well's own colour, laid over it in hard
   stops every 20px, cuts it into twelve 16px segments with 4px gaps */
.loader-bar { position: relative; box-sizing: border-box; width: 248px; height: 20px; padding: 4px; border: 2px solid var(--line); background: var(--ground-sunken); overflow: hidden; }
.loader-bar span { display: block; height: 100%; background: var(--lamp); transform-origin: left; transform: scaleX(0); transition: transform .35s ease; }
.loader-bar::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; right: 0; background: repeating-linear-gradient(90deg, transparent 0 16px, var(--ground-sunken) 16px 20px); }
.loader-pct { margin: 0; font: 500 .8125rem/1 var(--font-mono); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.loader-line { margin: 0 0 6px; max-width: min(32rem, calc(100vw - 32px)); text-align: center; text-wrap: balance; font: 400 1rem/1.5 var(--font-sans); color: var(--ink-muted); }

/* ---- notes when the 3D town is not the right thing: a raised sheet ---- */
.card {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 21; max-width: 30rem; margin: 0 auto;
  background: var(--ground-raised); color: var(--ink); border: 2px solid var(--line); border-radius: 0; padding: 20px 22px;
  box-shadow: var(--shadow-panel); font: 400 1rem/1.5 var(--font-sans);
}
#nogl { top: 0; bottom: 0; height: fit-content; margin: auto; }
.card p { margin: 0; }
.card-title { font: 400 1.1875rem/1.25 var(--font-pixel); margin-bottom: 8px !important; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px !important; }
.card .btn-quiet { color: var(--ink); border-color: transparent; padding-inline: 4px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card .btn-quiet:hover { background: transparent; color: var(--ink-muted); }
.card a:not(.btn) { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---- phones ---- */
@media (max-width: 40rem), (pointer: coarse) {
  .tips { left: 50%; right: auto; bottom: auto; top: calc(66px + var(--safe-t)); width: max-content; max-width: calc(100vw - 32px); transform: translate(-50%, -8px); text-align: center; }
  .tips.in { transform: translate(-50%, 0); }
  .clock { display: none; }
  .scrolllink { left: calc(12px + var(--safe-l)); right: auto; bottom: calc(12px + var(--safe-b)); font-size: .68rem; padding: 8px 11px 6px; }
}
@media (max-width: 40rem) {
  .talk { width: calc(100vw - 16px); bottom: calc(8px + var(--safe-b)); }
  .talk-card { padding: 21px 15px 4px; }
  .talk-name { top: -13px; left: 14px; font-size: .625rem; padding: 6px 10px 5px; }
  .talk-line { font-size: 1rem; line-height: 1.42; min-height: 0; }
  .talk-extra { margin-top: 9px; }
  .talk-ask { gap: 8px; }
  .talk-field input { min-height: 44px; font-size: 1.0625rem; }
  .talk-help { font-size: .8125rem; }
  .talk-question { font-size: clamp(1.3rem, .95rem + 2.55vw, 1.7rem); margin: 0 0 2px; }
  .talk-foot { min-height: 30px; margin-top: 0; }
  .talk-skip { min-height: 36px; padding: 6px 2px; font-size: .8125rem; }
  .talk-next { width: 30px; height: 30px; }
  .gift svg { width: 40px; }
  .gift figcaption { font-size: 1.3rem; }
  .btn { min-height: 44px; }
  .wordmark { font-size: .95rem; padding: 9px 12px 6px; }
  .topbar { gap: 7px; }
  .topbar .btn-small { font-size: .75rem; padding: 0 .8em; }
  .sheet { justify-items: stretch; align-items: end; }
  .sheet-card { width: 100%; height: auto; max-height: 90vh; border-left: 0; border-top: 2px solid var(--line); transform: translateY(100%); padding-top: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
/* the mask icons paint in currentColor; a forced palette would paint them over */
@media (forced-colors: active) {
  .sheet-close::before, .talk-next span { forced-color-adjust: none; background: ButtonText; }
}

/* the narrowest phones: the name in the corner steps aside for the two actions */
@media (max-width: 23.9rem) {
  .wordmark { font-size: .85rem; padding: 8px 10px 5px; }
  .topbar .btn-small { font-size: .7rem; padding: 0 .65em; }
}

/* ---- choosing a guide: four portraits on a raised sheet ---- */
.picker { position: fixed; inset: 0; z-index: 10; display: grid; place-items: end center; background: rgb(27 23 19 / 0); transition: background-color .24s; }
.picker.in { background: rgb(27 23 19 / .4); }
.picker-card {
  position: relative; box-sizing: border-box; width: min(46rem, calc(100vw - 20px)); margin-bottom: calc(14px + var(--safe-b));
  background: var(--ground-raised); color: var(--ink); border: 2px solid var(--line); border-radius: 0; padding: 20px 20px 18px;
  box-shadow: var(--shadow-panel);
  opacity: 0; transform: translateY(20px); transition: opacity .24s ease, transform .26s cubic-bezier(.2, .8, .2, 1);
}
.picker.in .picker-card { opacity: 1; transform: none; }
.picker-close { top: 10px; right: 10px; }
.picker-title { margin: 2px 48px 14px 4px; font: 400 1.1875rem/1.25 var(--font-pixel); }
.picker-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.guide-opt {
  display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; cursor: pointer;
  padding: 12px 10px 14px; border: 2px solid var(--line); border-radius: 0; font: inherit; color: inherit;
  background: var(--ground-raised); box-shadow: var(--shadow-press); transition: transform .08s steps(2), box-shadow .08s steps(2);
}
.guide-opt:hover { background: var(--ground); }
.guide-opt:active { transform: translateY(4px); box-shadow: none; }
.guide-opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
/* the guide with you is pressed in, and wears the lamp tag */
.guide-opt[aria-pressed="true"] { background: var(--ground-sunken); transform: translateY(4px); box-shadow: none; }
.guide-opt img {
  box-sizing: border-box; width: 96px; height: 96px; border: 2px solid var(--line); object-fit: cover; object-position: 50% 12%; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; image-rendering: pixelated;
  background: color-mix(in srgb, var(--tint) 32%, var(--ground-raised));
}
.guide-opt-name { font: 400 .85rem/1.25 var(--font-pixel); color: var(--ink); }
.guide-opt { position: relative; }
.guide-opt[aria-pressed="true"]::before {
  content: "With you"; position: absolute; top: 8px; right: 8px; padding: 4px 6px 3px; border: 2px solid var(--line);
  font: 400 .625rem/1 var(--font-pixel); letter-spacing: .04em; text-transform: uppercase; color: var(--on-lamp); background: var(--lamp);
}
.guide-opt-intro { font: 400 .875rem/1.43 var(--font-sans); color: var(--ink-muted); text-wrap: pretty; }
@media (max-width: 40rem) {
  .picker-card { padding: 16px 12px 12px; margin-bottom: calc(8px + var(--safe-b)); }
  .picker-title { margin: 2px 46px 10px 6px; }
  .picker-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .guide-opt { padding: 10px 8px 12px; }
  .guide-opt img { width: 70px; height: 70px; }
  .guide-opt-intro { font-size: .8rem; }
  .talk-choose { margin-left: 10px; }
}

/* ---- the top bar: the name and every button share one height ---- */
/* The chips look as small as the name; each button's tap area still reaches 44px. */
.topbar { --bar-h: 38px; }
.topbar .wordmark, .topbar .clock, .topbar .btn, .rp-title {
  box-sizing: border-box; height: var(--bar-h); min-height: 0; display: inline-flex; align-items: center; padding-top: 0; padding-bottom: 0;
}
.topbar .wordmark { padding-inline: 15px; }
.topbar .btn { position: relative; padding-inline: 15px; font-size: .78rem; }
.topbar .btn::after { content: ""; position: absolute; left: -2px; right: -2px; top: calc((var(--bar-h) - 44px) / 2); bottom: calc((var(--bar-h) - 44px) / 2); }
/* the mark: a square lamp dot outlined in line, then the name (as on the scroll version) */

/* ---- on a phone ---- */
@media (max-width: 40rem), (pointer: coarse) {
  .topbar { --bar-h: 34px; gap: 6px; }
  .topbar .clock { display: none; }
  .topbar .wordmark { font-size: .85rem; padding-inline: 10px; }
  .topbar .btn { font-size: .68rem; padding-inline: 9px; }
}
/* Below 500px the name and three buttons in the pixel face no longer fit one
   row, and the name never gives way, so the walk-in's bar takes two: the name
   and the town's clock above, the three buttons below sharing the width. A
   zero-height break after the clock starts the second row; the tips move down
   under it. (The replay's bar keeps its one row.) */
@media (max-width: 31.25rem) {
  .topbar:not(.rp-bar) { flex-wrap: wrap; }
  .topbar:not(.rp-bar)::after { content: ""; order: 1; flex-basis: 100%; }
  .topbar:not(.rp-bar) .btn { order: 2; flex: 1 1 auto; }
  .topbar:not(.rp-bar) .clock { display: inline-flex; font-size: .8125rem; }
  .topbar:not(.rp-bar) #readme { margin-left: 0; }
  .tips { top: calc(106px + var(--safe-t)); }
}
@media (max-width: 26rem) {
  .topbar { gap: 5px; padding-left: calc(10px + var(--safe-l)); padding-right: calc(10px + var(--safe-r)); }
  .topbar .btn { font-size: .64rem; padding-inline: 7px; }
}
@media (max-width: 23.9rem) {
  .topbar .btn { font-size: .61rem; padding-inline: 6px; }
}
@media (max-width: 21rem) {
  .topbar { gap: 4px; }
  .topbar .btn { padding-inline: 5px; }
}
