:root {
  color-scheme: dark;
  --ink: #0d0b14;
  --panel: #17131f;
  --raised: #221c2e;
  --line: #3a3248;
  /* Edges of things you press or type in: 3:1 against the panel. */
  --edge: #6f6785;
  --text: #f1ebdf;
  --muted: #a79fb5;
  --yellow: #f9db3d;
  --plum: #ac4399;
  /* Secondary, after Material's tonal roles: a dark ground with light words on it. */
  --plum-tonal: #43204a;
  --on-plum-tonal: #f4d0ee;
  --rose: #ff6b8e;
  --display: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--text);
  font: 16px/1.45 var(--body);
}

[hidden] {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button,
.button {
  display: inline-block;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--raised);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

button.primary,
.button.primary,
button.on {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #1b1206;
  font-weight: 600;
}

/* What's second to the yellow action on a sheet. */
button.tonal {
  border-color: var(--plum-tonal);
  background: var(--plum-tonal);
  color: var(--on-plum-tonal);
  font-weight: 600;
}

button.quiet {
  background: none;
  color: var(--muted);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

button.link {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--muted);
  text-decoration: underline;
}

input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--ink);
}

input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  accent-color: var(--yellow);
  flex: none;
}

a {
  color: var(--yellow);
}

label {
  display: block;
  margin: 12px 0;
  color: var(--muted);
}

label.inline {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}

/* The map page. */
body.app {
  overflow: hidden;
}

#map {
  position: fixed;
  inset: 0;
  background: #16131d;
}

/* maps.connor.zip's tiles are OpenStreetMap's light ones. The filter is on each
   tile: Safari doesn't apply a parent's filter to composited tiles. */
.leaflet-tile {
  filter: invert(1) hue-rotate(195deg) saturate(0.45) brightness(0.8) contrast(1.05);
}

.leaflet-container {
  font: inherit;
  background: #16131d;
}

.leaflet-control-attribution {
  background: rgb(13 11 20 / 70%) !important;
  color: var(--muted);
  font-size: 11px;
}

.leaflet-control-attribution a {
  color: var(--muted);
}

.topbar {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 18px;
  background: linear-gradient(var(--ink) 55%, transparent);
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.topbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar h1 {
  margin: 0;
}

.topbar h1 img {
  display: block;
  width: auto;
  height: 46px;
}

.topbar p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.topbar .round {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: var(--panel);
}

.pill {
  border-radius: 999px;
  white-space: nowrap;
  background: var(--panel);
}

.tools {
  position: fixed;
  z-index: 1000;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 28px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.tools .locate {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
}

.tools button:not(.primary) {
  background: var(--panel);
}

#tour {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tools button#tour.ready {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}

/* Just the piece, until there's something to say. */
.tools button#tour:not(.ready) {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}

.piece-count {
  flex: none;
  display: block;
  width: 82px;
  height: 82px;
  overflow: visible;
  filter: drop-shadow(0 2px 6px rgb(0 0 0 / 60%));
}

/* Taller than the words, without making the button so. */
.ready .piece-count {
  width: 46px;
  height: 46px;
  margin: -10px -4px -10px -6px;
  filter: none;
}

.piece-base {
  fill: var(--panel);
}

.ready .piece-base {
  fill: none;
}

.piece-edge {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 1.5;
}

.piece-lit {
  fill: var(--yellow);
}

.piece-stroke {
  fill: none;
  stroke: var(--yellow);
}

.piece-count text {
  fill: var(--text);
  stroke: var(--ink);
  stroke-width: 3px;
  paint-order: stroke;
  font: 700 13px/1 var(--body);
  text-anchor: middle;
}

.ready .piece-edge {
  stroke: var(--ink);
}

.ready .piece-lit {
  fill: var(--ink);
}

.tools button[aria-pressed="true"] {
  border-color: var(--plum);
  background: var(--plum-tonal);
  color: var(--on-plum-tonal);
}

.banner {
  position: fixed;
  z-index: 1000;
  top: calc(env(safe-area-inset-top) + 76px);
  left: 16px;
  right: 16px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--plum);
  border-radius: 10px;
  background: var(--panel);
}

.sheet {
  position: fixed;
  z-index: 1100;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 78dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: var(--panel);
  box-shadow: 0 -12px 40px rgb(0 0 0 / 60%);
}

.sheet[hidden] {
  display: none;
}

/* What stays put: the grip, the title and the ×. */
.sheet-head {
  position: relative;
  flex: none;
  touch-action: none;
  cursor: grab;
  padding: 18px 56px 8px 16px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.sheet.scrolled .sheet-head {
  border-bottom-color: var(--line);
}

.sheet-back {
  position: absolute;
  top: 12px;
  left: 6px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--yellow);
  font-size: 30px;
  line-height: 1;
}

.sheet-head.with-back {
  padding-left: 50px;
}

/* What scrolls under it. */
.sheet-body {
  flex: 1;
  min-height: 0;
  padding: 0 16px calc(env(safe-area-inset-bottom) + 18px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* More below: the last lines fade out, as a list that goes on does. */
.sheet::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--panel));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.sheet.more::after {
  opacity: 1;
}

.sheet.peeking::after {
  opacity: 0;
}

.sheet.short {
  max-height: 48dvh;
}

.sheet.dragging {
  transition: none;
}

.sheet.resizing {
  transition:
    transform 0.22s ease-out,
    height 0.22s ease-out;
}

/* Lowered to peek at the map: its title stays, and it's still open. */
@media (max-width: 719px) {
  .sheet {
    transition: transform 0.22s ease-out;
  }

  .sheet.tall {
    height: calc(100dvh - 64px);
    max-height: none;
  }

  .sheet.peeking {
    overflow: hidden;
    transform: translateY(calc(100% - 96px));
  }

  body:has(.sheet.peeking) .tools {
    transform: translateY(-96px);
  }
}

.grip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 18px;
  pointer-events: none;
}

.grip::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 40px;
  height: 4px;
  margin-left: -20px;
  border-radius: 2px;
  background: var(--edge);
}

/* Edge to edge, so the next picture shows it's there. */
.picture-row {
  display: flex;
  gap: 8px;
  height: 150px;
  margin: 10px -16px;
  padding-inline: 16px;
  overflow-x: auto;
  scroll-padding-inline: 16px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.picture-row img {
  flex: none;
  height: 100%;
  min-width: 150px;
  border-radius: 10px;
  background: var(--raised);
  object-fit: cover;
  scroll-snap-align: start;
}

.picture-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}

.picture-list img {
  display: block;
  height: 96px;
  max-width: 160px;
  border-radius: 8px;
  object-fit: cover;
}

@media (min-width: 720px) {
  .picture-row {
    margin-inline: -16px;
  }
}

/* The way on stays in reach, however long the sheet runs. */
.actions.stuck {
  position: sticky;
  z-index: 1;
  bottom: calc(-1 * (env(safe-area-inset-bottom) + 18px));
  padding-block: 10px;
  background: var(--panel);
}

.rows button.going {
  color: var(--yellow);
  font-weight: 600;
}

.leaflet-walk-pane {
  transition: opacity 0.2s;
}

.leaflet-walk-pane.zooming {
  opacity: 0;
  transition: none;
}

.sheet-links {
  display: flex;
  gap: 16px;
  margin: -6px 0 6px;
}

@media (min-width: 720px) {
  .grip {
    display: none;
  }
}

@media (min-width: 720px) {
  .sheet {
    left: 16px;
    right: auto;
    bottom: 16px;
    top: 96px;
    width: 400px;
    max-height: none !important;
    border: 1px solid var(--line);
    border-radius: 18px;
  }
}

.sheet h2 {
  margin: 0 44px 2px 0;
  font: 700 26px/1.1 var(--display);
}

/* A logo in place of a title, on any background a sheet has. */
.sheet h2.logo-title img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 64px;
  object-fit: contain;
  object-position: left center;
}

.sheet h2.logo-title span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font: 600 14px/1.2 var(--body);
}

.intro-logo {
  display: block;
  width: 170px;
  height: auto;
  margin-bottom: 12px;
}

.sheet h2.intro-title {
  line-height: 1.15;
}

.fine-print {
  margin: 8px 0;
  font-style: italic;
  color: var(--muted);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}

.tile-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
}

.tile-art.photo {
  padding: 0;
}

.tile-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tile-art.photo img {
  object-fit: cover;
}

.tile.going .tile-name {
  color: var(--yellow);
}

/* Stays above the tiles as they scroll. */
.directory-search {
  position: sticky;
  z-index: 1;
  top: 0;
  padding-block: 3px 10px;
  background: var(--panel);
}

.directory-search input {
  width: 100%;
  font-size: 16px;
}

.directory-status:empty {
  display: none;
}

.directory-status {
  margin: 6px 0 0;
}

.tile-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.tile-walk {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.logo-preview {
  width: fit-content;
  max-width: 100%;
  padding: 14px;
  border-radius: 10px;
  background: #17131f;
}

.logo-preview img {
  display: block;
  max-width: 100%;
  max-height: 96px;
}

.sheet h3 {
  margin: 18px 0 6px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet p {
  margin: 6px 0;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 22px;
}

.tag {
  display: inline-block;
  margin: 2px 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--raised);
  color: var(--muted);
}

/* A state, not something to press. */
.tag.in,
.tag.done {
  background: var(--plum-tonal);
  color: var(--on-plum-tonal);
}

.tag.warn {
  background: none;
  border: 1px solid var(--rose);
  color: var(--rose);
}

.special {
  padding: 10px 12px;
  border-left: 3px solid var(--plum);
  background: var(--raised);
}

.muted {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

button.danger {
  border-color: var(--rose);
  color: var(--rose);
}

.checklist {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.checklist li {
  min-height: 32px;
}

.scanner {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px);
  background: var(--ink);
}

.scanner video {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #000;
}

.scanner-words {
  margin: 0;
  font-size: 18px;
  text-align: center;
}

.error {
  color: var(--rose);
}

.rows {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.rows li + li {
  border-top: 1px solid var(--line);
}

.rows button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: left;
  padding-inline: 0;
}

/* Pins. */
.pin {
  border-radius: 50%;
  border: 2px solid var(--ink);
}

/* A finger's worth of target, around a dot a finger would hide. */
.pin-hit {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
}

.pin.in {
  background: var(--yellow);
  box-shadow:
    0 0 0 4px rgb(249 219 61 / 25%),
    0 0 16px rgb(249 219 61 / 70%);
}

/* Lit means go here. A visited stop is out, with a check, so shape says it too. */
.pin.done {
  display: grid;
  place-items: center;
  background: #2a2016;
  border-color: var(--yellow);
}

.pin.done::before {
  content: "✓";
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.pin.unconfirmed {
  background: #7a7192;
}

.pin.out {
  background: #2a2433;
  border-color: #5d5570;
}

.pin.closed {
  background: var(--ink);
  border-color: var(--rose);
}

.me {
  position: relative;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #4aa3ff;
  box-shadow: 0 0 0 6px rgb(74 163 255 / 25%);
}

/* The way you're facing: a soft beam, centered on the dot so it turns around it. */
.me i {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border-radius: 50%;
  background: conic-gradient(
    from -38deg,
    rgb(74 163 255 / 0%),
    rgb(74 163 255 / 70%) 38deg,
    rgb(74 163 255 / 0%) 76deg,
    rgb(74 163 255 / 0%)
  );
  mask: radial-gradient(circle, #000 18%, transparent 70%);
  pointer-events: none;
}

/* Server pages. */
body.plain {
  height: auto;
  min-height: 100%;
}

.plainbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.brand img {
  display: block;
  width: auto;
  height: 44px;
}

.plainmain {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}

.plainmain h1 {
  font: 700 34px/1.1 var(--display);
}

.plainmain table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.plainmain th,
.plainmain td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.card {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.row label {
  flex: 1;
}

.status {
  color: var(--yellow);
}

.notice {
  padding: 10px 12px;
  border-left: 3px solid var(--plum);
  background: var(--raised);
}

.fine {
  color: var(--muted);
  font-size: 14px;
}

.code {
  font:
    700 44px/1 ui-monospace,
    Menlo,
    monospace;
  letter-spacing: 0.12em;
  color: var(--yellow);
  margin: 8px 0;
}

video {
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  background: #000;
}

.tablecard {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}

.card-how {
  font-size: 1.2rem;
  font-weight: 600;
}

.card-offer {
  font-size: 1.15rem;
}

.drawing-steps {
  margin: 0 0 16px;
  padding-left: 22px;
}

.drawing-steps li {
  margin-bottom: 6px;
}

.tablecard svg {
  width: 280px;
  height: auto;
  background: #fff;
  border-radius: 12px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

@media print {
  body.plain,
  .tablecard,
  .tablecard * {
    background: #fff;
    color: #000;
  }
  .plainbar {
    display: none;
  }
}

/* A code, six boxes. The real input lies over them, unseen. */
.code-boxes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 10px 0;
  max-width: 340px;
}

.code-box {
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 6;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--ink);
  font:
    700 24px/1 ui-monospace,
    Menlo,
    monospace;
  color: var(--yellow);
}

.code-box.next {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px var(--yellow);
}

input.code-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  opacity: 0.01;
}

/* Names on the map, when zoomed in far enough for them. */
.pin-label {
  padding: 1px 6px;
  border: 0;
  border-radius: 6px;
  background: rgb(13 11 20 / 82%);
  box-shadow: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  /* Leaflet sets a tooltip's opacity inline. */
  opacity: 0 !important;
  transition: opacity 0.15s;
}

.pin-label::before {
  display: none;
}

.labels-in .pin-label.in,
.labels-in .pin-label.done,
.labels-all .pin-label {
  opacity: 1 !important;
}

/* Names that would land on another name wait for a closer zoom. */
.labels-in .pin-label.crowded,
.labels-all .pin-label.crowded {
  opacity: 0 !important;
}

.pin-label.unconfirmed,
.pin-label.out {
  color: var(--muted);
  font-weight: 400;
}

/* The pin the sheet is about: its name, whatever else is near, over everything. */
.pin-label.selected {
  z-index: 1;
  color: var(--text);
  font-weight: 600;
  opacity: 1 !important;
}

/* How far through the night. */
.tally {
  font: 700 20px/1.2 var(--display);
  color: var(--yellow);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--raised);
  overflow: hidden;
}

.progress::after {
  content: "";
  display: block;
  width: var(--done);
  height: 100%;
  background: var(--yellow);
}

/* Where a page is. */
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

.crumbs li + li::before {
  content: "›";
  margin-right: 6px;
}

.crumbs a {
  display: inline-block;
  padding: 12px 6px 12px 0;
}

.crumbs [aria-current] {
  color: var(--text);
}

.topbar .crumbs ol {
  margin: 0;
}

/* Check-ins through the night. */
.chart {
  margin: 14px 0;
}

.chart figcaption {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--muted);
}

.chart svg {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  overflow: visible;
}

.chart-bar {
  fill: #c78220;
}

.chart-hit {
  fill: transparent;
}

g:hover > .chart-hit {
  fill: rgb(255 255 255 / 5%);
}

.chart-base {
  stroke: var(--line);
}

.chart-tick {
  fill: var(--muted);
  font-size: 11px;
}

.chart-value {
  fill: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.chart summary {
  min-height: 44px;
  padding: 10px 0;
  color: var(--muted);
  cursor: pointer;
}

/* The admin's month. */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.month-nav h2 {
  margin: 0;
}

.month-nav .button {
  min-width: 44px;
  text-align: center;
}

.plainmain table.month {
  display: table;
  table-layout: fixed;
  width: 100%;
  margin: 10px 0 0;
  border-collapse: separate;
  border-spacing: 3px;
}

.month caption {
  caption-side: bottom;
  padding-top: 8px;
  text-align: left;
}

.plainmain .month th {
  padding: 4px 0;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.plainmain .month td {
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  text-align: center;
  vertical-align: middle;
}

.month a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 58px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.month td:not(.on) a:hover {
  background: var(--raised);
}

.month small {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.month td.on.scheduled a {
  background: var(--yellow);
  color: #1b1206;
  font-weight: 600;
}

.month td.on.skipped a {
  border: 1px solid var(--line);
  color: var(--muted);
}

.month td.on.skipped span {
  text-decoration: line-through;
}

.month td.on.canceled a {
  border: 1px solid var(--rose);
  color: var(--rose);
}

.month td.suggested a {
  border: 1px dashed var(--yellow);
}

.month td.past a {
  color: var(--muted);
}

.month td.today a {
  box-shadow: inset 0 0 0 1px var(--muted);
}

.month td.selected a {
  outline: 2px solid var(--text);
  outline-offset: -1px;
}

.month .dot {
  width: 5px;
  height: 5px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--yellow);
}

.month td.on.scheduled .dot {
  background: #1b1206;
}

#day {
  scroll-margin-top: 12px;
}

.day-events {
  margin: 0;
  padding: 0;
  list-style: none;
}

.day-events li {
  padding: 8px 0;
}

.day-events li + li {
  border-top: 1px solid var(--line);
}

/* The businesses on a date. */
.business-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.business-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 12px;
}

.business-list li > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.business-list small {
  display: block;
  color: var(--muted);
}

.toggle {
  display: flex;
  flex: none;
  gap: 6px;
}

.toggle button {
  min-width: 52px;
  padding-inline: 10px;
}

/* The selected pin: a slow glow behind it. Only transform and opacity move, so
   it costs the phone little. A logo pin shows it's chosen by its logo instead. */
.pin.selected:not(.plated) {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

.pin.selected:not(.plated)::after {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow, var(--yellow)) 20%, transparent 70%);
  animation: pin-glow 2.4s ease-in-out infinite;
}

/* Only a stop you can still go to glows yellow. */
.pin.done,
.pin.unconfirmed,
.pin.out {
  --glow: var(--muted);
}

.pin.closed {
  --glow: var(--rose);
}

@keyframes pin-glow {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.35;
  }

  50% {
    transform: scale(1.35);
    opacity: 0.95;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin.selected:not(.plated)::after {
    animation: none;
    opacity: 0.8;
  }
}

/* Puzzle art. */
.art-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.art-list a {
  display: block;
  color: var(--text);
  text-decoration: none;
}

.art-list img,
.art-preview {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--panel);
}

.art-preview {
  max-width: 320px;
  margin: 14px 0;
}

.art-list strong,
.art-list small {
  display: block;
  margin-top: 4px;
}

.art-list small {
  margin-top: 0;
  color: var(--muted);
}

#art-canvas {
  display: block;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  background: var(--ink);
  cursor: grab;
  touch-action: none;
}

select {
  width: 100%;
  min-height: 44px;
  padding: 10px 32px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a79fb5' stroke-width='2'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

/* People, and invite links to send them. */
.people,
.invites {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.people li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  overflow-wrap: anywhere;
}

.invite {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.invite input {
  margin-bottom: 8px;
  color: var(--muted);
}

.invite .row {
  flex-wrap: wrap;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Text whose line breaks mean something. */
.lines {
  white-space: pre-line;
}

/* The puzzle. Nothing from .pz-scene down may set overflow or filter: either
   flattens preserve-3d in Safari. */
.pz-board {
  margin: 12px 0;
}

.pz-wrap {
  position: relative;
  width: min(100%, 40dvh);
  margin: 0 auto;
}

/* After a check-in the next stops matter more than the picture's size. */
.pz-board.compact .pz-wrap {
  width: min(62%, 25dvh);
}

.pz-wrap > canvas:first-child {
  display: block;
  width: 100%;
  aspect-ratio: 783 / 1200;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pz-slot {
  position: absolute;
  pointer-events: none;
}

.pz-board .tally {
  margin: 10px 0 0;
  text-align: center;
}

.pz-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

#pz-stage,
#pz-reveal {
  position: fixed;
  z-index: 3000;
  inset: 0;
}

#pz-stage {
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pz-veil {
  position: absolute;
  inset: 0;
  background: rgb(13 11 20 / 96%);
}

.pz-light,
.pz-scene {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 0;
  height: 0;
}

.pz-scene {
  perspective: 760px;
}

.pz-halo,
.pz-rays {
  position: absolute;
  left: -210px;
  top: -210px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  will-change: transform, opacity;
}

.pz-halo {
  background: radial-gradient(closest-side, rgb(249 219 61 / 60%), rgb(249 219 61 / 22%) 45%, transparent 100%);
}

.pz-rays {
  background: repeating-conic-gradient(rgb(249 219 61 / 34%) 0 6deg, transparent 6deg 20deg);
  mask-image: radial-gradient(closest-side, #000 18%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side, #000 18%, transparent 100%);
}

.pz-flyer,
.pz-float,
.pz-piece {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.pz-flyer {
  will-change: transform;
}

.pz-piece canvas {
  position: absolute;
  display: block;
}

.pz-cap {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(40% + 150px);
  margin: 0;
  text-align: center;
  opacity: 0;
}

.pz-cap small {
  display: block;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.pz-cap strong {
  display: block;
  font: 700 28px/1.15 var(--display);
  color: var(--yellow);
}

.pz-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  opacity: 0;
}

#pz-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px);
  background: var(--ink);
  overflow-y: auto;
}

.pz-frame {
  position: relative;
  flex: none;
  width: min(100%, 44dvh, 420px);
  aspect-ratio: 783 / 1200;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pz-frame canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.pz-glow {
  mix-blend-mode: screen;
  opacity: 0;
}

.pz-words {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.pz-words h2 {
  margin: 2px 0;
  font: 700 30px/1.1 var(--display);
  color: var(--yellow);
}

.pz-credit {
  margin: 4px 0;
  font-size: 12px;
  color: var(--muted);
}

.pz-words button {
  min-width: 160px;
  margin-top: 8px;
}

.demo-ribbon {
  position: fixed;
  z-index: 1000;
  left: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 28px);
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--plum);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.sheet h2:focus {
  outline: none;
}

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

/* A place to go with a logo: the logo, lit, is the pin. It swings about the pin on a
   stem to where it covers least (src/client/plates.ts). */
.pin.plated {
  overflow: visible;
  background: none;
  border: 0;
  box-shadow: none;
}

.pin.plated > div {
  display: contents;
}

.pin.plated::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 50%;
  background: var(--yellow);
}

.stem {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--yellow);
  pointer-events: none;
  transform-origin: 0 50%;
}

.plate {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 7px 9px;
  border: 2px solid var(--yellow);
  border-radius: 9px;
  background: #000;
}

.plate,
.stem {
  transition: opacity 0.3s;
}

.plate.waiting,
.stem.waiting {
  opacity: 0;
}

.plate img {
  display: block;
  object-fit: contain;
}

.pin.plated.selected .plate {
  border-color: var(--text);
}

.pin-label.plated {
  display: none;
}

/* A place already visited: its logo grayed and dimmed, outlined in plum, with a
   check, so a yellow logo still always means go here. */
.pin.done.plated::before {
  content: none;
}

.pin.done.plated::after,
.pin.done.plated .stem {
  background: var(--plum);
}

.pin.done.plated .plate {
  border-color: var(--plum);
}

.pin.done.plated .plate img {
  filter: grayscale(1);
  opacity: 0.55;
}

.pin.done.plated .plate::after {
  content: "✓";
  position: absolute;
  top: -9px;
  right: -9px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid var(--plum);
  border-radius: 50%;
  background: #2a2016;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
