/*
 * The dopamine menu maker (tools.ts), over tools.css. Two halves on the stage's glass: the kitchen, where the five
 * courses wait as chips (a segmented row of courses, each in one of the sky's star colours), and the table, where the
 * menu card builds itself: a dark card in a thin gold frame, the site's italic serif for its headings, each thing on
 * it marked with its course's star. Picks fly onto the card and land with a spring; Surprise me hops across the menu
 * and lights one thing with the amber glow (.tool-lit). On paper the card prints alone, dark ink on light paper, with
 * a blank line or two under each course to add more by hand. Under Reduce Motion nothing flies, hops or springs.
 */

/* Each course wears a star colour of the sky; on paper, a deeper ink of it. */
.course-starters {
  --c: var(--star-1);
  --c-ink: #b4520f;
}

.course-mains {
  --c: var(--star-4);
  --c-ink: #8c6510;
}

.course-sides {
  --c: var(--star-2);
  --c-ink: #17796e;
}

.course-desserts {
  --c: var(--star-5);
  --c-ink: #b03b5a;
}

.course-specials {
  --c: var(--star-3);
  --c-ink: #6c4cae;
}

.menu-maker {
  --gold: #f0c25a;
  --gold-line: rgb(240 194 90 / 0.42);
  --gold-faint: rgb(240 194 90 / 0.16);
}

.menu-layout {
  display: grid;
  gap: 30px;
}

/* The kitchen: the courses, one at a time. */

.menu-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 5px;
  background: rgb(20 13 15 / 0.5);
  border: 1px solid var(--line);
  border-radius: 22px;
}

/* The lit course's pill, which slides to the course you pick (dopamine-menu.js sets where, from script). */
.menu-thumb {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  background: rgb(255 236 220 / 0.1);
  background: color-mix(in srgb, var(--course, var(--accent)) 18%, rgb(255 236 220 / 0.07));
  border: 1px solid rgb(255 176 113 / 0.5);
  border: 1px solid color-mix(in srgb, var(--course, var(--accent)) 55%, transparent);
  border-radius: 17px;
  box-shadow: 0 10px 24px -14px var(--course, var(--accent));
  opacity: 0;
  pointer-events: none;
}

.menu-tabs.is-ready .menu-thumb {
  opacity: 1;
}

.menu-tabs.is-sliding .menu-thumb {
  transition:
    transform 480ms var(--spring),
    width 480ms var(--spring),
    background-color 300ms ease,
    border-color 300ms ease,
    box-shadow 300ms ease;
}

.menu-tab {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 64px;
  padding: 10px 2px 9px;
  color: var(--ink-3);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.1;
  background: none;
  border: 0;
  border-radius: 17px;
  cursor: pointer;
  transition: color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.menu-tab[aria-selected="true"] {
  color: var(--ink);
}

@media (hover: hover) {
  .menu-tab:hover {
    color: var(--ink);
  }
}

/* Before the script places the pill, the lit course holds its own. */
.menu-tabs:not(.is-ready) .menu-tab[aria-selected="true"] {
  background: rgb(255 236 220 / 0.08);
}

.menu-tab:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: -2px;
}

.menu-tab-star {
  width: 18px;
  height: 18px;
  fill: var(--c);
  opacity: 0.55;
  transition:
    opacity 200ms ease,
    transform 360ms var(--spring);
}

@media (hover: hover) {
  .menu-tab:hover .menu-tab-star {
    opacity: 0.85;
  }
}

.menu-tab[aria-selected="true"] .menu-tab-star {
  opacity: 1;
  filter: drop-shadow(0 0 6px var(--c));
  transform: scale(1.15);
}

.menu-tab-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-tab-count {
  position: absolute;
  top: 5px;
  left: calc(50% + 6px);
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  color: var(--on-accent);
  font-size: 0.6875rem;
  font-weight: 900;
  line-height: 19px;
  text-align: center;
  background: var(--c);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgb(31 21 22 / 0.9);
}

.menu-tab-count.pop {
  animation: menu-badge-pop 460ms var(--spring);
}

@keyframes menu-badge-pop {
  45% {
    transform: scale(1.4);
  }
}

.menu-panel {
  padding-top: 20px;
}

.menu-lead {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.menu-lead strong {
  color: var(--ink);
  font-weight: 800;
}

.menu-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-panel.is-shown .menu-chips li {
  animation: menu-chip-in 440ms var(--spring) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}

@keyframes menu-chip-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }
}

/* A chip says what tapping it does: a plus to add it, a tick once it is on the menu. */
.menu-chip {
  min-height: 42px;
  padding: 8px 15px 8px 12px;
  text-align: left;
}

.menu-chip::before {
  flex: none;
  width: 14px;
  height: 14px;
  background: currentColor;
  opacity: 0.75;
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10M3 8h10' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10M3 8h10' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.menu-chip[aria-pressed="true"]::before {
  opacity: 1;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.6l3.1 3.1 6.4-7.4' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.6l3.1 3.1 6.4-7.4' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.menu-chip.is-picked {
  animation: menu-chip-pop 460ms var(--spring);
}

.menu-chip.is-picked::before {
  animation: menu-tick 420ms var(--spring);
}

@keyframes menu-chip-pop {
  40% {
    transform: scale(1.08);
  }
}

@keyframes menu-tick {
  from {
    transform: scale(0.2) rotate(-40deg);
  }
}

/* What a person added themselves: a dashed edge until it is on the menu. */
.menu-chip.is-own[aria-pressed="false"] {
  border-style: dashed;
}

.menu-own {
  margin-top: 20px;
}

.menu-own label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 800;
}

.menu-own-row {
  display: flex;
  gap: 8px;
}

.menu-own .tool-field {
  flex: 1;
  min-width: 0;
}

.menu-own .tool-button {
  flex: none;
  min-height: 54px;
  padding-inline: 22px;
}

.menu-next {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin: 14px 0 0 -4px;
  padding: 8px 4px;
  color: var(--accent-text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 800;
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.menu-next::after {
  display: inline-block;
  content: "→";
  transition: transform 220ms var(--spring);
}

@media (hover: hover) {
  .menu-next:hover::after {
    transform: translateX(4px);
  }
}

/* On a phone the card is below the kitchen: a count rides along at the bottom of the screen until you reach it. */
.menu-tally {
  position: sticky;
  bottom: 14px;
  z-index: 5;
  display: flex;
  justify-content: center;
  margin: 18px 0 0;
  pointer-events: none;
}

.menu-tally-button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-height: 46px;
  padding: 8px 8px 8px 16px;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 800;
  background: rgb(36 24 24 / 0.92);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  box-shadow:
    0 14px 30px -12px rgb(0 0 0 / 0.85),
    0 0 24px -8px rgb(240 194 90 / 0.35);
  cursor: pointer;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.menu-tally-star {
  width: 15px;
  height: 15px;
  fill: var(--gold);
}

.menu-tally-go {
  padding: 5px 12px;
  color: var(--on-accent);
  font-size: 0.875rem;
  background: var(--accent);
  border-radius: 999px;
}

.menu-tally.is-arriving {
  animation: tool-arrive 520ms var(--spring) both;
}

/* The table: the card, and what you can do with it. */

.menu-table {
  min-width: 0;
}

.menu-card {
  position: relative;
  padding: 30px 22px 22px;
  color: var(--ink);
  text-align: center;
  background:
    radial-gradient(130% 70% at 50% -10%, rgb(255 154 77 / 0.14), transparent 62%),
    linear-gradient(180deg, #2b1c1c, #1f1416);
  border: 1px solid var(--gold-line);
  border-radius: 26px;
  box-shadow:
    0 40px 70px -40px rgb(0 0 0 / 0.9),
    0 0 0 6px rgb(240 194 90 / 0.035),
    inset 0 1px 0 rgb(255 240 228 / 0.07);
}

/* The menu's inner frame, a hairline inside the edge. */
.menu-card::before {
  position: absolute;
  inset: 7px;
  border: 1px solid var(--gold-faint);
  border-radius: 20px;
  content: "";
  pointer-events: none;
}

.menu-card.is-glowing {
  animation: menu-card-glow 1.6s ease-out;
}

@keyframes menu-card-glow {
  25% {
    box-shadow:
      0 40px 70px -40px rgb(0 0 0 / 0.9),
      0 0 0 6px rgb(240 194 90 / 0.12),
      0 0 60px -10px rgb(240 194 90 / 0.5);
  }
}

.menu-ornament {
  display: block;
  width: 112px;
  height: 15px;
  margin: 0 auto;
  overflow: visible;
}

.menu-ornament-line {
  fill: none;
  stroke: var(--gold-line);
  stroke-width: 1;
}

.menu-ornament-dot {
  fill: var(--gold-line);
}

.menu-ornament-star {
  fill: var(--gold);
  filter: drop-shadow(0 0 4px rgb(240 194 90 / 0.7));
}

.menu-title {
  margin: 10px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2rem, 1.75rem + 1vw, 2.5rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.menu-title:focus {
  outline: none;
}

.menu-title:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 6px;
  border-radius: 6px;
}

.menu-tagline {
  min-height: 1.5em;
  margin: 10px auto 0;
  color: var(--ink-3);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.45;
  text-wrap: balance;
}

.menu-tagline-full {
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.menu-tagline .tool-count {
  color: var(--gold);
  font-size: 0.9375rem;
  letter-spacing: 0;
}

.menu-board {
  margin-top: 6px;
}

.menu-block {
  margin-top: 20px;
}

/* A course's name, the site's italic serif between two hairlines of gold. */
.menu-course {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0;
  font-size: 1.625rem;
  line-height: 1.15;
}

.menu-course::before,
.menu-course::after {
  flex: 1;
  height: 1px;
  content: "";
}

.menu-course::before {
  background: linear-gradient(90deg, transparent, var(--gold-line));
}

.menu-course::after {
  background: linear-gradient(90deg, var(--gold-line), transparent);
}

.menu-course.is-new {
  animation: menu-course-glow 1.8s ease-out;
}

@keyframes menu-course-glow {
  25% {
    text-shadow: 0 0 18px rgb(255 176 113 / 0.85);
  }
}

.menu-note {
  margin: 5px 0 0;
  color: var(--ink-4);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.menu-items {
  display: grid;
  gap: 1px;
  justify-items: center;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.menu-block.is-empty .menu-items {
  display: none;
}

.menu-row {
  max-width: 100%;
}

.menu-row.is-leaving {
  overflow: hidden;
}

/* One run of words, its star at the start and a dessert's timer at the end, so a line that wraps stays centred. */
.menu-pill {
  display: inline-block;
  max-width: 100%;
  padding: 4px 14px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.3;
  text-wrap: balance;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    background-color 140ms ease,
    border-color 140ms ease;
}

.menu-thing {
  overflow-wrap: anywhere;
}

.menu-mark {
  display: inline-block;
  width: 0.78em;
  height: 0.78em;
  margin-right: 0.5em;
  vertical-align: -0.06em;
  fill: var(--c);
  filter: drop-shadow(0 0 4px var(--c));
}

/* A dessert keeps its timer beside it. */
.menu-timer {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-left: 0.5em;
  vertical-align: -0.14em;
  fill: none;
  stroke: var(--ink-4);
  stroke-width: 2;
  stroke-linecap: round;
}

/* Arriving: a spring, a glow, the star spinning in; one after another (--d, from script) when several come at once. */
.menu-row.is-new .menu-pill {
  animation: menu-row-in 620ms var(--spring) var(--d, 0ms) both;
}

.menu-row.is-new .menu-thing {
  animation: menu-row-glow 2.2s ease-out var(--d, 0ms) both;
}

.menu-row.is-new .menu-mark {
  animation: menu-mark-in 720ms var(--spring) var(--d, 0ms) both;
}

@keyframes menu-row-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
}

@keyframes menu-row-glow {
  20% {
    text-shadow: 0 0 16px rgb(255 176 113 / 0.95);
  }

  100% {
    text-shadow: 0 0 0 rgb(255 176 113 / 0);
  }
}

@keyframes menu-mark-in {
  from {
    transform: scale(0) rotate(-120deg);
  }
}

/* Waiting to be seen (the card is off the screen) or mid-flight: there, but not yet shown. */
.menu-row.is-waiting .menu-pill,
.menu-row.is-landing .menu-pill {
  opacity: 0;
}

/* Surprise me hopping across the menu, then landing on today's special. */
.menu-row.is-hop .menu-pill {
  background: rgb(255 176 113 / 0.16);
  border-color: rgb(255 176 113 / 0.45);
}

.menu-pill.tool-lit {
  background: rgb(255 138 51 / 0.14);
  animation: menu-lit 700ms var(--spring);
}

@keyframes menu-lit {
  40% {
    transform: scale(1.12);
  }
}

.menu-empty {
  margin: 10px 0 0;
  color: var(--ink-4);
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  opacity: 0.85;
}

.menu-block:not(.is-empty) .menu-empty {
  display: none;
}

/* The lines to write on: paper's alone (see print, below). */
.menu-lines {
  display: none;
}

.menu-foot {
  margin: 24px 0 0;
  color: var(--ink-4);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

/* The seal a full menu earns: every course with something on it. */
.menu-seal {
  position: absolute;
  top: -18px;
  right: -12px;
  z-index: 2;
  width: 76px;
  height: 76px;
  overflow: visible;
  transform: rotate(14deg);
  filter: drop-shadow(0 8px 14px rgb(0 0 0 / 0.5));
}

.menu-seal.is-stamped {
  animation: menu-stamp 760ms var(--spring) both;
}

@keyframes menu-stamp {
  from {
    opacity: 0;
    transform: rotate(-30deg) scale(2.2);
  }

  60% {
    opacity: 1;
  }
}

.menu-seal-edge {
  fill: var(--gold);
}

.menu-seal-ring {
  fill: none;
  stroke: rgb(43 30 26 / 0.55);
  stroke-dasharray: 2 3;
  stroke-width: 1.2;
}

.menu-seal-star {
  fill: var(--on-accent);
}

.menu-seal-words {
  fill: var(--on-accent);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

/* Play: Surprise me, under the card. Today's special is a reel that spins through the menu as the light hops down
   the card, then lands; its room is kept from the start, so nothing moves under your finger. */

.menu-play {
  margin-top: 20px;
  text-align: center;
}

.menu-reel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-height: 5.75rem;
  margin: 0 0 14px;
  padding: 0 8px;
}

.menu-reel-label {
  color: var(--gold);
  font-size: 0.6875rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}

.menu-reel-thing {
  max-width: 100%;
  font-size: 1.5rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
  opacity: 0.45;
  text-wrap: balance;
}

.menu-reel.is-spinning .menu-reel-thing {
  opacity: 0.8;
  animation: menu-reel-spin 140ms ease-out;
}

@keyframes menu-reel-spin {
  from {
    opacity: 0.2;
    transform: translateY(-45%);
  }
}

.menu-reel.is-landed .menu-reel-label {
  opacity: 1;
}

.menu-reel.is-landed .menu-reel-thing {
  opacity: 1;
  text-shadow: 0 0 22px rgb(255 154 77 / 0.55);
  animation: menu-reel-land 640ms var(--spring);
}

@keyframes menu-reel-land {
  from {
    transform: translateY(-30%) scale(0.92);
  }

  45% {
    transform: scale(1.1);
  }
}

.menu-surprise {
  min-width: min(100%, 15rem);
}

.menu-surprise-star {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.menu-surprise:not(:disabled) .menu-surprise-star {
  animation: menu-twinkle 2.8s ease-in-out infinite;
}

@keyframes menu-twinkle {
  50% {
    opacity: 0.7;
    transform: scale(0.72);
  }
}

.menu-surprise.is-awake {
  animation: menu-awake 700ms var(--spring);
}

@keyframes menu-awake {
  35% {
    box-shadow:
      0 10px 26px -10px rgb(255 138 51 / 0.85),
      0 0 0 8px rgb(255 138 51 / 0.18);
    transform: scale(1.08);
  }
}

.menu-hint {
  max-width: 22rem;
  margin: 10px auto 0;
  color: var(--ink-3);
  font-size: 0.875rem;
  line-height: 1.45;
}

/* Keep: print it, copy it, or start over. */

.menu-keep {
  margin-top: 20px;
}

.menu-keep .tool-button {
  flex: 1 1 auto;
  min-height: 46px;
  padding: 10px 14px;
  font-size: 0.9375rem;
}

.menu-keep .tool-button.is-done {
  color: var(--on-accent);
  background: var(--lit);
  box-shadow: none;
}

.menu-restart {
  margin: 10px 0 0;
  text-align: center;
}

.menu-reset,
.menu-undo {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--ink-3);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgb(201 176 160 / 0.4);
  text-underline-offset: 0.25em;
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

@media (hover: hover) {
  .menu-reset:hover,
  .menu-undo:hover {
    color: var(--ink);
  }
}

.menu-reset:disabled {
  cursor: default;
  opacity: 0.45;
}

.menu-undo {
  min-height: 0;
  padding: 2px 6px;
  color: var(--accent-text);
  text-decoration-color: rgb(255 176 113 / 0.5);
}

.menu-status {
  min-height: 1.5em;
  margin: 2px 0 0;
  color: var(--ink-3);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

/* Said to a screen reader, never shown. */
.menu-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

/* A pick on its way from the kitchen to the card. */
.menu-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  padding: 7px 15px;
  color: var(--on-accent);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 14px 30px -10px rgb(255 138 51 / 0.9);
  pointer-events: none;
  will-change: transform, opacity;
}

/* Without the script: a starter menu to copy out. */
.menu-noscript {
  margin: 0 0 22px;
  padding: 16px 18px;
  color: var(--ink-2);
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.menu-noscript p {
  margin: 0 0 8px;
}

.menu-noscript ul {
  margin: 0;
  padding-left: 1.2em;
}

/* A phone: the courses and the card get the whole width of the glass. */
@media (max-width: 519px) {
  .menu-tabs {
    margin-inline: -8px;
    padding: 4px;
  }

  .menu-thumb {
    top: 4px;
    bottom: 4px;
  }

  .menu-tab {
    min-height: 60px;
    font-size: 0.75rem;
    letter-spacing: -0.01em;
  }

  .menu-card {
    margin-inline: -8px;
    padding: 28px 16px 20px;
  }

  .menu-pill {
    padding-inline: 10px;
    font-size: 1rem;
  }

  .menu-own .tool-field {
    padding-inline: 15px;
    font-size: 1rem;
  }

  .menu-own .tool-button {
    padding-inline: 18px;
  }

  .menu-seal {
    top: -16px;
    right: -6px;
    width: 66px;
    height: 66px;
  }
}

/* A computer: the kitchen and the table side by side, the kitchen staying in view as the card grows (while it fits the
   window: is-pinned, from script, since a pinned kitchen taller than the window would hide its own field). */
@media (min-width: 960px) {
  .tool-dopamine-menu .tool-stage {
    max-width: 64rem;
  }

  .menu-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
    gap: 40px;
    align-items: start;
  }

  .menu-kitchen.is-pinned {
    position: sticky;
    top: 24px;
  }

  .menu-tally {
    display: none;
  }

  .menu-card {
    padding: 34px 28px 24px;
  }
}

/* Paper: the card alone, dark ink on light paper, no sky, no glow, and a line or more to write on under each course.
   Sized so a menu of a dozen or so things, and the blank one, fit one A4 or Letter page; a longer one (is-long, from
   script) goes to two columns. */
@media print {
  @page {
    margin: 14mm;
  }

  .tool-dopamine-menu .tool-head,
  .tool-dopamine-menu .tool-words,
  .menu-maker noscript,
  .menu-kitchen,
  .menu-play,
  .menu-restart,
  .menu-status,
  .menu-tagline-empty {
    display: none !important;
  }

  .menu-layout {
    display: block;
  }

  .menu-card {
    max-width: 150mm;
    margin: 0 auto;
    padding: 9mm 12mm 6mm;
    color: #1e1418;
    background: none;
    border: 1.2pt solid #4a3428;
    border-radius: 14pt;
    box-shadow: none;
    break-inside: avoid;
  }

  .menu-card.is-long {
    max-width: none;
  }

  .menu-card::before {
    inset: 2.2mm;
    border: 0.5pt solid #b99a85;
    border-radius: 10pt;
  }

  .menu-ornament {
    width: 30mm;
    height: 4mm;
  }

  .menu-ornament-line,
  .menu-ornament-dot {
    stroke: #b99a85;
    fill: #b99a85;
  }

  .menu-ornament-star,
  .menu-mark {
    filter: none;
  }

  .menu-ornament-star {
    fill: #a0611c;
  }

  .menu-title {
    margin-top: 2mm;
    color: #1e1418;
    font-size: 26pt;
  }

  .menu-tagline {
    min-height: 0;
    margin-top: 2mm;
  }

  .menu-tagline-full {
    color: #5a4338;
    font-size: 7.5pt;
  }

  .menu-tagline .tool-count {
    color: #8a3a0c;
    font-size: 9pt;
  }

  .menu-board {
    margin-top: 1mm;
  }

  .menu-card.is-long .menu-board {
    columns: 2;
    column-gap: 10mm;
  }

  .menu-block {
    margin-top: 4.5mm;
    break-inside: avoid;
  }

  .menu-card.is-long .menu-block:first-child {
    margin-top: 0;
  }

  .menu-course {
    color: #8a3a0c;
    font-size: 16pt;
  }

  .menu-course::before,
  .menu-course::after {
    height: 0;
    background: none;
    border-top: 0.5pt solid #c9ae9b;
  }

  .menu-note {
    margin-top: 0.8mm;
    color: #6e5546;
    font-size: 7pt;
  }

  .menu-items {
    margin-top: 1.5mm;
    gap: 0;
  }

  .menu-block.is-empty .menu-items,
  .menu-empty {
    display: none;
  }

  .menu-pill,
  .menu-pill.tool-lit {
    padding: 0.4mm 2mm;
    color: #1e1418;
    font-size: 11.5pt;
    line-height: 1.3;
    background: none;
    border: 0;
    box-shadow: none;
    animation: none;
    transform: none;
  }

  .menu-card.is-long .menu-pill {
    font-size: 10.5pt;
  }

  .menu-row .menu-pill,
  .menu-row.is-waiting .menu-pill,
  .menu-row.is-landing .menu-pill {
    opacity: 1;
  }

  .menu-mark {
    fill: var(--c-ink);
  }

  .menu-timer {
    stroke: #6e5546;
  }

  .menu-lines {
    display: grid;
    width: 70%;
    margin: 0 auto;
  }

  .menu-line {
    height: 7.5mm;
    border-bottom: 0.6pt dotted #9c8170;
  }

  .menu-seal {
    top: -5mm;
    right: -4mm;
    width: 19mm;
    height: 19mm;
    filter: none;
    animation: none;
  }

  .menu-seal-edge {
    fill: none;
    stroke: #8a3a0c;
    stroke-width: 1.4;
  }

  .menu-seal-ring {
    stroke: #8a3a0c;
  }

  .menu-seal-star,
  .menu-seal-words {
    fill: #8a3a0c;
  }

  .menu-foot {
    margin-top: 5mm;
    color: #6e5546;
    font-size: 7pt;
    opacity: 1;
  }
}
