/* Polka Dot Firehouse: the Play hub (inside the apparatus bay) and the games Engine or Truck? and Gear Up, Pepper!
   Builds on site.css: spot wall, engine red, helmet yellow, concrete floor, reflective trim (dark or lit). */

:root {
  --floor: #e6dfd2;
  --floor-deep: #cfc5b3;
  --stripe: #f2c230;
  --bay-in: #f7f1e4;
  --steel: #5d5550;
  --steel-deep: #3b3532;
  --night: #3a3330;
}

.is-hopping { animation: play-hop 0.55s var(--ease-out); }
@keyframes play-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10%) rotate(-4deg); } }
.is-wiggle { animation: play-wiggle 0.6s var(--ease-out); }
@keyframes play-wiggle {
  0%, 100% { rotate: 0deg; }
  15% { rotate: -5deg; } 35% { rotate: 4deg; } 55% { rotate: -3deg; } 75% { rotate: 1.5deg; }
}

/* =====================================================================
   PLAY HUB: walk into the bay
   ===================================================================== */
.page-play main { background: var(--wall) url("/assets/img/spot-wall.svg") 0 0 / 360px 360px; }

/* a soft contact shadow under anything that stands on a floor or ledge */
.contact, .spot__art::after, .bay__pepper::after {
  content: ""; position: absolute; pointer-events: none;
  background: radial-gradient(closest-side, rgb(60 35 20 / 0.34), rgb(60 35 20 / 0.12) 60%, transparent);
}

.bay { padding-bottom: 0; }
.bay__wall { padding: clamp(20px, 4vw, 48px) 0 0; }
.bay__greet { display: flex; align-items: flex-end; gap: clamp(12px, 2.5vw, 36px); }
/* Pepper sits on top of the bay door header */
.bay__pepper {
  position: relative; z-index: 2;
  flex: none; width: clamp(132px, 15vw, 210px); margin: 0 0 -18px clamp(48px, 4vw, 60px); padding: 0;
  border: 0; background: none; cursor: pointer; border-radius: 40%; touch-action: manipulation;
}
.bay__pepper img { display: block; width: 100%; translate: 0 5.4%; filter: drop-shadow(0 2px 2px rgb(60 30 20 / 0.16)); }
.bay__pepper::after { left: 14%; right: 12%; bottom: 8px; height: 16px; z-index: -1; }
.bay__pepper:hover img { transform: rotate(-3deg); transform-origin: 50% 100%; transition: transform 0.3s var(--ease-out); }
.bay__hello { padding-bottom: clamp(20px, 2.4vw, 34px); min-width: 0; }
.bay__board {
  position: relative;
  background: #fff; border: 3px solid var(--spot); border-radius: 26px;
  padding: clamp(14px, 1.6vw, 22px) clamp(18px, 2.4vw, 32px); box-shadow: var(--shadow-2);
  display: inline-block; max-width: 100%;
}
.bay__board::before, .bay__board::after {
  /* bolted to the wall */
  content: ""; position: absolute; top: 12px; width: 9px; height: 9px; border-radius: 50%;
  background: #b9b2ab; box-shadow: inset 0 -2px 0 #8e8681;
}
.bay__board::before { left: 12px; }
.bay__board::after { right: 12px; }
.bay__board h1 { font-size: clamp(2.1rem, 3.2vw + 1rem, 4.1rem); margin: 0 0 0.12em; }
.bay__lede { margin: 0; font-size: 1.1em; font-weight: 700; color: var(--ink-soft); }
.bubble {
  position: relative; display: inline-block; margin: 0 0 14px;
  padding: 0.45em 0.95em; border-radius: 20px;
  background: #fff; border: 3px solid var(--spot);
  font-family: var(--font-display); font-weight: 600; font-size: 1.05em; color: var(--spot);
  box-shadow: var(--shadow-1);
}
.bubble::before {
  content: ""; position: absolute; left: -14px; bottom: 10px; width: 20px; height: 18px;
  background: #fff; border-left: 3px solid var(--spot); border-bottom: 3px solid var(--spot);
  transform: skewY(28deg) rotate(8deg); border-bottom-left-radius: 4px;
}

/* the open bay: a red door frame around the parked play stations */
.bay__floor-row {
  position: relative;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr;
  margin-top: 0;
  padding: 28px 0 0;
  background: var(--bay-in);
  border: 16px solid var(--red); border-bottom: 0;
  border-radius: 34px 34px 0 0;
  box-shadow: inset 0 10px 0 var(--red-deep), 0 -2px 0 var(--red-dark), var(--shadow-2);
}
.bay__floor-row::before {
  /* the rolled-up door, tucked under the header */
  content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 14px;
  background: repeating-linear-gradient(to bottom, var(--red) 0 5px, var(--red-deep) 5px 7px);
  opacity: 0.9;
}
.spot {
  position: relative;
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0;
  text-align: center;
}
.spot + .spot::before {
  /* the steel post between parking spots, standing on the floor */
  content: ""; position: absolute; left: -5px; top: 0; height: var(--post-h, 100%); width: 10px;
  background: linear-gradient(to right, #8e8681, #c8c2bd 40%, #8e8681);
  border-radius: 5px; opacity: 0.55;
}
.spot__sign {
  position: relative; justify-self: center; align-self: start;
  margin: 18px 10px 12px; padding: 0.38em 0.8em 0.45em;
  font-size: clamp(1.15rem, 0.6vw + 0.9rem, 1.45rem);
  background: #fff; border: 3px solid var(--spot); border-radius: 14px;
  box-shadow: var(--shadow-1);
}
.spot__sign::before, .spot__sign::after {
  /* hangs from the ceiling on two chains */
  content: ""; position: absolute; top: -49px; width: 3px; height: 46px;
  background: repeating-linear-gradient(to bottom, var(--steel) 0 4px, transparent 4px 6px);
}
.spot__sign::before { left: 22%; }
.spot__sign::after { right: 22%; }
.spot__art {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 4px 14px 0; min-height: 0;
}
/* everything stands on the floor line: the bottom of this row */
.spot__art img {
  max-height: clamp(150px, 15vw, 210px); width: auto; max-width: 100%;
  margin-bottom: -4px;
  filter: drop-shadow(0 3px 2px rgb(60 40 20 / 0.18));
  transition: transform 0.35s var(--ease-out);
  transform-origin: 50% 100%;
}
.spot__art::after { left: 16%; right: 16%; bottom: -9px; height: 20px; z-index: -1; }
.spot:hover .spot__art img { transform: scale(1.04); }
.spot--wide .spot__art::after { left: 10%; right: 10%; }
/* Find the Chirp: the alarm is mounted on the back wall, Pepper stands below it */
.spot__art--chirp { justify-content: flex-start; padding-left: 6%; min-height: clamp(190px, 16vw, 224px); }
.spot__art--chirp .spot__pup { max-height: clamp(118px, 11vw, 158px); translate: 0 4%; }
.spot__art--chirp .spot__alarm {
  position: absolute; top: -6px; right: 4%; width: 40%; max-width: 110px; max-height: none; margin: 0; filter: drop-shadow(0 1px 1px rgb(60 40 20 / 0.25));
}
.spot__art--chirp::after { left: 10%; right: 50%; }
.spot:hover .spot__art--chirp .spot__alarm { transform: rotate(-4deg); }
.spot__art--color img { max-height: clamp(110px, 9vw, 140px); }
.spot__crayons {
  position: absolute; right: 6%; bottom: -6px; z-index: 2; width: 34%; height: auto;
  filter: drop-shadow(0 3px 2px rgb(60 40 20 / 0.25));
}
.spot__art--color::after { left: 8%; right: 8%; }
.spot__floor {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 30px 16px 26px;
  background:
    linear-gradient(to right, var(--stripe) 0 6px, transparent 6px calc(100% - 6px), var(--stripe) calc(100% - 6px)),
    linear-gradient(to bottom, var(--floor-deep) 0 4px, #ddd4c4 4px, var(--floor) 30px);
  background-size: 100% 70%, 100% 100%;
  background-position: 0 100%, 0 0;
  background-repeat: no-repeat;
}
.spot__what { margin: 0; font-size: 0.95em; line-height: 1.38; color: var(--ink); max-width: 26ch; }
.spot__age {
  margin: 0; padding: 0.15em 0.7em; border-radius: 999px;
  background: var(--spot); color: #fff; font-weight: 800; font-size: 0.85em;
}
.spot__go { min-height: 64px; min-width: 150px; margin-top: auto; font-size: 1.25em; }
.bay__note {
  margin-top: 0; padding: 22px 0 46px; font-size: 0.98em; color: var(--ink);
  max-width: none;
}
.bay__note::before { content: none; }
.page-play .bay__note {
  background: var(--floor); width: auto; margin: 0; padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
  border-top: 6px solid var(--floor-deep);
}

@media (max-width: 1099px) {
  .bay__floor-row { grid-template-columns: repeat(6, 1fr); }
  .spot { grid-column: span 2; }
  .spot:nth-child(4), .spot:nth-child(5) {
    grid-column: span 3;
    /* the second row hangs its signs from a steel ceiling beam */
    background: linear-gradient(to bottom, #6f6762 0 6px, var(--steel) 6px 12px, transparent 12px) no-repeat;
    margin-top: 0; padding-top: 14px;
  }
  .spot:nth-child(4)::before { content: none; }
  .spot:nth-child(4) .spot__sign::before, .spot:nth-child(4) .spot__sign::after,
  .spot:nth-child(5) .spot__sign::before, .spot:nth-child(5) .spot__sign::after { top: -35px; height: 32px; }
  .spot__art img { max-height: 190px; }
  .spot__art--chirp .spot__pup { max-height: 150px; }
  .spot__art--color img { max-height: 130px; }
}

@media (max-width: 680px) {
  .bay__greet { align-items: flex-end; gap: 10px; }
  .bay__pepper { width: 112px; margin-left: 26px; margin-bottom: -12px; }
  .bay__pepper::after { bottom: 5px; height: 12px; }
  .bay__hello { padding-bottom: 18px; }
  .bubble { font-size: 0.95em; }
  .bay__floor-row { grid-template-columns: 1fr; border-width: 10px; border-radius: 26px 26px 0 0; padding-top: 18px; }
  /* each spot: sign and words on the back wall beside the art, the Play button on the floor in front */
  .spot, .spot:nth-child(4), .spot:nth-child(5) {
    grid-column: 1; grid-row: auto; display: grid; grid-template-rows: none;
    grid-template-columns: 44% 1fr;
    grid-template-areas: "art sign" "art what" "art age" "go go";
    text-align: left; align-items: center; column-gap: 4px;
    padding: 0; margin: 0; background: none;
  }
  .spot::after {
    /* the floor of this parking spot */
    content: ""; grid-column: 1 / -1; grid-row: 4; align-self: stretch;
    background: linear-gradient(to bottom, var(--floor-deep) 0 4px, #ddd4c4 4px, var(--floor) 24px);
  }
  .spot + .spot { border-top: 0; }
  .spot + .spot::before { content: none; }
  .spot__floor { display: contents; }
  .spot__sign { grid-area: sign; justify-self: start; align-self: end; margin: 16px 12px 6px 4px; font-size: 1.2rem; }
  .spot__sign::before, .spot__sign::after { content: none; }
  .spot__sign { box-shadow: var(--shadow-1); }
  .spot__art, .spot__art--chirp { grid-area: art; align-self: end; padding: 14px 6px 0 10px; min-height: 0; }
  .spot__art img { max-height: 132px; }
  .spot__art--chirp { min-height: 150px; padding-left: 8px; }
  .spot__art--chirp .spot__pup { max-height: 112px; }
  .spot__art--chirp .spot__alarm { width: 44%; right: 2%; top: 6px; }
  .spot__art--color img { max-height: 92px; }
  .spot__what { grid-area: what; font-size: 0.92em; margin: 0 12px 6px 4px; }
  .spot__age { grid-area: age; justify-self: start; margin: 0 0 12px 4px; }
  .spot__go { grid-area: go; position: relative; z-index: 2; min-width: 0; width: auto; margin: 18px 14px 16px; }

  /* the greeting board runs full width; a smaller Pepper stands on the door frame below it, saying hi */
  .bay__wall { padding-top: 14px; }
  .bay__greet {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "board board" "pup bub";
    align-items: end; gap: 0 6px;
  }
  .bay__hello { display: contents; }
  .bay__board { grid-area: board; display: block; padding: 22px 18px 14px; }
  .bay__board::before, .bay__board::after { top: 9px; }
  .bay__board h1 { font-size: 1.8rem; line-height: 1.08; }
  .bay__lede { font-size: 1em; }
  .bay__pepper { grid-area: pup; width: 92px; margin: 2px 0 -10px 22px; }
  .bay__pepper::after { bottom: 4px; height: 10px; }
  .bubble { grid-area: bub; justify-self: start; align-self: center; margin: 10px 0 16px 14px; font-size: 0.95em; }
}

/* tall tablets: same speaker arrangement as phones (board on top, Pepper and her bubble together below) */
@media (min-width: 681px) and (max-width: 1099px) and (min-height: 941px) {
  .bay__greet {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "board board" "pup bub";
    align-items: end; gap: 0 10px;
  }
  .bay__hello { display: contents; }
  .bay__board { grid-area: board; display: block; }
  .bay__pepper { grid-area: pup; width: 130px; margin: 6px 0 -12px 28px; }
  .bubble { grid-area: bub; justify-self: start; align-self: center; margin: 10px 0 18px 16px; }
}

/* short laptop and desktop screens: a slimmer greeting and lower stations, so the Play buttons show up front */
@media (min-width: 681px) and (max-height: 940px) {
  .bay__wall { padding-top: 8px; }
  .bay__pepper { width: clamp(112px, 9.5vw, 150px); margin-bottom: -14px; }
  .bay__hello { display: flex; align-items: flex-end; gap: 16px; padding-bottom: 14px; }
  .bubble { flex: none; margin: 0 0 18px; }
  .bay__board h1 { font-size: clamp(2rem, 2.2vw + 0.9rem, 3rem); }
  .spot__art img { max-height: clamp(96px, 8vw, 132px); }
  .spot__art--chirp { min-height: clamp(118px, 10vw, 156px); }
  .spot__art--chirp .spot__pup { max-height: clamp(90px, 8vw, 112px); }
  .spot__art--chirp .spot__alarm { max-width: 84px; }
  .spot__art--color img { max-height: clamp(84px, 7vw, 104px); }
  .spot__floor { gap: 8px; padding: 16px 14px 18px; }
  .spot__go { min-height: 64px; }
}

/* =====================================================================
   GAME PAGES: shared frame
   ===================================================================== */
.page-game main { background: var(--cream); padding-bottom: clamp(36px, 6vw, 72px); }
.game__head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 20px;
  padding: clamp(14px, 2.4vw, 26px) 0 clamp(10px, 1.6vw, 18px);
}
.game__head h1 { margin: 0; font-size: clamp(1.9rem, 2.2vw + 1rem, 3rem); flex: 1 1 auto; }
.game__head .backlink { min-height: 48px; }
.game__again { margin-left: auto; }
.game__again[hidden] { display: none; }
.game__again-short { display: none; }
@media (max-width: 560px) {
  .game__head h1 { order: 3; flex-basis: 100%; }
  /* phones: the ear keeps a short visible word; the button's full name stays "Hear it again" */
  .game__again-long { display: none; }
  .game__again-short { display: inline; font-size: 0.85rem; }
  .game__again { min-width: 80px; padding-inline: 0.8em; }
}

/* =====================================================================
   ENGINE OR TRUCK?
   ===================================================================== */
.eot-start {
  display: grid; grid-template-columns: minmax(150px, 0.6fr) 1.6fr; align-items: center; gap: clamp(16px, 3vw, 48px);
  padding: clamp(20px, 3vw, 44px) clamp(20px, 3vw, 44px) 0;
  border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden;
  background:
    linear-gradient(to bottom, transparent calc(100% - 64px), var(--floor-deep) calc(100% - 64px), var(--floor-deep) calc(100% - 60px), #ddd4c4 calc(100% - 60px), var(--floor) calc(100% - 36px)),
    var(--wall) url("/assets/img/spot-wall.svg") 0 0 / 300px 300px;
}
/* Pepper sits on the floor at the bottom of the wall */
.eot-start__stand { position: relative; align-self: end; justify-self: center; width: 100%; max-width: 280px; margin-bottom: 24px; }
.eot-start__stand::after {
  content: ""; position: absolute; z-index: 0; left: 16%; right: 12%; bottom: -8px; height: 20px; pointer-events: none;
  background: radial-gradient(closest-side, rgb(60 35 20 / 0.34), rgb(60 35 20 / 0.12) 60%, transparent);
}
.eot-start__pepper { position: relative; z-index: 1; display: block; width: 100%; translate: 0 5.4%; }
.eot-start__text { padding-bottom: 84px; }
.eot-start__say {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 1vw + 1rem, 1.8rem); line-height: 1.25;
  background: #fff; border: 3px solid var(--spot); border-radius: 22px; padding: 0.6em 0.9em; margin: 0 0 22px;
  max-width: 34ch; box-shadow: var(--shadow-1);
}
.eot-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.level {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 6px;
  min-height: 64px; padding: 18px 16px 26px; overflow: hidden;
  background: #fff; color: var(--spot); text-align: center; cursor: pointer;
  border: 3px solid var(--spot); border-radius: 22px; box-shadow: var(--shadow-1);
  font: inherit; transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.level::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: linear-gradient(to bottom, var(--trim-lime) 0 3px, var(--trim-silver) 3px 7px, var(--trim-lime) 7px 10px);
}
.level:hover, .level:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.level:hover::after, .level:focus-visible::after {
  background: linear-gradient(to bottom, var(--trim-lime) 0 3px, var(--trim-lit) 3px 7px, var(--trim-lime) 7px 10px);
}
/* two rigs parked side by side on a strip of apron: what you'll sort in this level */
.level__pair {
  position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 6%;
  width: 100%; height: 104px; padding: 0 6px 10px;
  background: linear-gradient(to bottom, transparent calc(100% - 12px), var(--apron) calc(100% - 12px));
  border-radius: 0 0 10px 10px;
}
.level__pair img { position: relative; width: auto; min-width: 0; max-width: 47%; max-height: 66px; object-fit: contain; filter: drop-shadow(0 3px 2px rgb(30 20 15 / 0.3)); }
.level__pair--big img:last-child { max-height: 92px; }
.level__name { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; line-height: 1.1; }
.level__more { font-size: 0.92em; color: var(--ink-soft); line-height: 1.35; text-wrap: balance; }
.level[data-level="big"] { background: var(--yellow); }
.level[data-level="big"] .level__more { color: var(--spot); }
/* the play action, so the card reads as "tap to start" before you can read */
.level__go {
  display: inline-flex; align-items: center; gap: 0.35em; margin-top: 6px;
  min-height: 48px; padding: 0.3em 1.1em 0.3em 0.8em; border-radius: 999px;
  background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  box-shadow: inset 0 -4px 0 var(--red-dark);
  transition: transform 0.25s var(--ease-out), background-color 0.2s;
}
.level__go .icon { width: 1.25em; height: 1.25em; fill: currentColor; }
.level:hover .level__go, .level:focus-visible .level__go { background: var(--red-deep); transform: scale(1.05); }
/* hear the two choices read aloud, with the same words written beside the button */
.eot-hear {
  display: flex; align-items: center; gap: 8px 14px; margin: -6px 0 18px; padding: 8px 14px 8px 8px;
  background: #fff; border: 3px solid var(--spot); border-radius: 20px; box-shadow: var(--shadow-1);
}
.eot-hear__btn { flex: none; min-height: 56px; }
.eot-hear__cap { flex: 1 1 auto; margin: 0; font-weight: 700; line-height: 1.35; color: var(--ink); text-wrap: pretty; }
.eot-start__say.is-new { animation: cap-pop 0.4s var(--ease-out); }

.eot {
  display: grid; grid-template-rows: auto auto auto auto;
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2);
  background: var(--cream);
}
.eot[hidden], .eot-start[hidden], .eot-end[hidden] { display: none; }
/* the roofline: a dark band with a slot for every rig you park */
.eot__parked {
  list-style: none; margin: 0; padding: 12px 16px;
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  background: var(--spot); border-bottom: 10px solid var(--red);
}
.slot {
  width: 64px; height: 40px; border-radius: 10px;
  border: 2px dashed rgb(255 255 255 / 0.4);
  display: grid; place-items: center;
}
.slot.is-full { border: 2px solid var(--trim-lime); background: rgb(255 255 255 / 0.12); }
.slot img { max-width: 56px; max-height: 34px; object-fit: contain; }

/* the firehouse front: spotted wall, a sign over each door, doors down to the apron */
.eot__house {
  position: relative;
  display: flex; justify-content: center; align-items: stretch; gap: clamp(14px, 3vw, 48px);
  padding: clamp(16px, 2vw, 26px) clamp(14px, 3vw, 44px) 0;
  background: var(--wall) url("/assets/img/spot-wall.svg") 0 0 / 260px 260px;
}
.bayd {
  flex: 1 1 0; max-width: 300px; min-width: 0;
  display: grid; grid-template-rows: 1fr auto; gap: 12px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--spot); border-radius: 22px 22px 0 0;
  transition: transform 0.25s var(--ease-out);
}
.bayd[hidden] { display: none; }
.bayd__frame {
  order: 2;
  position: relative; display: block; aspect-ratio: 4 / 3;
  border: clamp(8px, 1.1vw, 14px) solid var(--red); border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: var(--red); box-shadow: inset 0 -4px 0 var(--red-dark);
  overflow: hidden;
}
.bayd__in {
  position: absolute; inset: 0; display: grid; place-items: end center;
  /* inside the firehouse bay: gear shelves and lights, darkened a touch so the parked rig reads */
  background:
    linear-gradient(rgb(20 14 10 / 0.18), rgb(20 14 10 / 0.18)),
    url("/assets/img/bay-left.webp") 50% 60% / cover no-repeat,
    var(--night);
}
.bayd__parked { width: 86%; max-height: 74%; object-fit: contain; margin-bottom: 8%; filter: drop-shadow(0 3px 2px rgb(0 0 0 / 0.4)); }
.bayd__door {
  position: absolute; left: 0; right: 0; top: 0; height: 100%;
  background:
    linear-gradient(to bottom, transparent calc(100% - 10px), var(--red-dark) calc(100% - 10px)),
    repeating-linear-gradient(to bottom, var(--red) 0 18px, var(--red-deep) 18px 21px, #e04a3f 21px 23px);
  transform: scaleY(0.12); transform-origin: top;
  transition: transform 0.5s var(--ease-out);
}
.bayd.is-closed .bayd__door { transform: scaleY(1); }
/* the sign over the door, bolted to the wall */
.bayd__label {
  order: 1;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 64px; padding: 0.35em 0.6em 0.7em;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 0.8vw + 0.85rem, 1.5rem); line-height: 1.05;
  background: #fff; border: 3px solid var(--spot); border-radius: 16px; box-shadow: var(--shadow-1);
}
.bayd__label::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px;
  background: linear-gradient(to bottom, var(--trim-lime) 0 3px, var(--trim-silver) 3px 6px, var(--trim-lime) 6px 9px);
}
.bayd__icon { width: 1.5em; height: 1.5em; color: var(--red); }
.bayd--neither .bayd__icon { color: var(--sky-deep); }
.bayd:hover .bayd__label, .bayd:focus-visible .bayd__label { transform: translateY(-3px); }
.bayd__label { transition: transform 0.25s var(--ease-out), background-color 0.2s; }
.bayd:hover .bayd__label::after, .bayd:focus-visible .bayd__label::after, .bayd.is-over .bayd__label::after, .bayd.is-hint .bayd__label::after {
  background: linear-gradient(to bottom, var(--trim-lime) 0 3px, var(--trim-lit) 3px 6px, var(--trim-lime) 6px 9px);
}
.bayd:focus-visible { outline-offset: 4px; }
.bayd.is-over .bayd__frame, .bayd.is-hint .bayd__frame { border-color: var(--yellow); }
.bayd.is-over .bayd__label, .bayd.is-hint .bayd__label { background: var(--yellow); }
.bayd.is-hint .bayd__label { animation: bay-glow 1.6s var(--ease-out) 2; }
@keyframes bay-glow { 0%, 100% { transform: none; } 30% { transform: translateY(-6px) scale(1.04); } }

/* the concrete apron in front of the doors runs down to the road */
.eot__apron {
  position: relative; display: grid; justify-items: center; align-content: end;
  min-height: clamp(220px, 20vw, 270px); padding: 40px 16px 34px;
  background:
    linear-gradient(to bottom, #d9cdb4 0 5px, transparent 5px),
    repeating-linear-gradient(to right, transparent 0 calc(25% - 2px), rgb(150 130 100 / 0.35) calc(25% - 2px) 25%) 0 0 / 100% 46% no-repeat,
    linear-gradient(to bottom, var(--apron) 0 46%, #bfb3a0 46% calc(46% + 6px), #8d857e calc(46% + 6px)) ;
}
.eot__apron::after {
  /* the yellow dashes down the middle of the road */
  content: ""; position: absolute; left: 0; right: 0; bottom: 14px; height: 7px; pointer-events: none;
  background: repeating-linear-gradient(to right, transparent 0 40px, var(--stripe) 40px 90px);
}
.eot__car { position: relative; z-index: 5; display: flex; justify-content: center; width: 100%; }
.eot__car::after {
  /* the rig's shadow on the road */
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: -10px; translate: -50% 0;
  width: min(480px, 80%); height: 22px; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(30 20 15 / 0.5), rgb(30 20 15 / 0.2) 60%, transparent);
  transition: opacity 0.25s;
}
.eot__car:has(.is-dragging)::after, .eot__car:has(.is-gone)::after, .eot__car:has([style*="scale"])::after { opacity: 0; }
.eot__car:has([data-shape="tall"])::after { width: min(300px, 60%); }
.eot__rig {
  position: relative; z-index: 5;
  width: auto; height: auto; max-width: min(520px, 88%); max-height: clamp(140px, 14vw, 190px);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  filter: drop-shadow(0 3px 2px rgb(30 20 15 / 0.35));
}
.eot__rig[data-shape="tall"] { max-height: clamp(180px, 17vw, 220px); }
.eot__rig.is-dragging { cursor: grabbing; z-index: 30; filter: drop-shadow(0 22px 14px rgb(60 40 20 / 0.3)); }
.eot__car.is-rolling { animation: rig-in 1.1s var(--ease-out) both; }
.eot__rig.is-gone { visibility: hidden; }
@keyframes rig-in { from { transform: translateX(min(80vw, 900px)); } 70% { transform: translateX(-10px); } to { transform: none; } }

/* Pepper's caption: what she says, written down */
.eot-cap {
  display: flex; align-items: center; gap: 14px;
  padding: 14px clamp(14px, 2.4vw, 30px) 16px; background: var(--cream);
}
.eot-cap__who {
  width: 64px; height: 64px; flex: none; object-fit: cover;
  border-radius: 50%; background: #fff; border: 3px solid var(--spot);
}
.eot-cap__text { flex: 1; min-width: 0; display: grid; gap: 6px; }
.eot-cap__say {
  position: relative; margin: 0; min-height: 2.6em;
  padding: 0.5em 0.9em 0.55em; border-radius: 20px; background: #fff; border: 3px solid var(--spot);
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 0.4vw + 0.95rem, 1.3rem); line-height: 1.25;
}
.eot-cap__say::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 18px; height: 18px;
  background: #fff; border: solid var(--spot); border-width: 0 0 3px 3px;
  transform: translateY(-50%) rotate(45deg);
}
.eot-cap__say.is-new { animation: cap-pop 0.4s var(--ease-out); }
@keyframes cap-pop { from { transform: scale(0.97); } to { transform: none; } }
.eot-cap__ask { margin: 0 0 0 4px; font-weight: 800; color: var(--ink-soft); }

.eot-end {
  text-align: center; padding: clamp(24px, 4vw, 52px) clamp(16px, 3vw, 40px);
  background: var(--wall) url("/assets/img/spot-wall.svg") 0 0 / 300px 300px;
  border-radius: var(--r-lg); box-shadow: var(--shadow-2);
}
.eot-end:focus { outline: none; }
.eot-end h2 {
  display: inline-block; background: #fff; padding: 0.15em 0.5em; border-radius: 18px;
  color: var(--red); margin: 18px 0 10px;
}
.eot-end p { font-size: 1.2em; font-weight: 700; background: #fff; display: table; margin: 0 auto 24px; padding: 0.2em 0.7em; border-radius: 12px; }
.eot-end__row {
  list-style: none; margin: 0 auto; padding: 14px; max-width: 980px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  background: var(--apron); border-radius: 20px; box-shadow: inset 0 -8px 0 var(--apron-deep);
}
.eot-end__row li { width: clamp(76px, 9vw, 104px); height: 70px; display: grid; place-items: end center; }
.eot-end__row img { max-width: 100%; max-height: 66px; object-fit: contain; filter: drop-shadow(0 4px 3px rgb(60 40 20 / 0.22)); }
.eot-end__btns, .gear-end__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.eot-end__btns .btn, .gear-end__btns .btn { min-height: 64px; }

@media (max-width: 760px) {
  .eot-start { grid-template-columns: 1fr; text-align: center; }
  .eot-start__text { padding-bottom: 0; }
  .eot-start__stand { order: 2; max-width: 150px; margin-bottom: 20px; }
  .eot-start__say { margin-inline: auto; }
  .eot-levels { grid-template-columns: 1fr; }
  .level__pair { height: 84px; }
  .level__pair img { max-height: 52px; }
  .level__pair--big img:last-child { max-height: 74px; }
  .eot-hear { flex-direction: column; align-items: stretch; text-align: center; padding: 8px 8px 12px; }
  .slot { width: 34px; height: 28px; border-radius: 8px; }
  .slot img { max-width: 30px; max-height: 24px; }
  .eot__parked { gap: 5px; padding: 10px 6px; flex-wrap: nowrap; }
  .eot__apron { min-height: 184px; padding-top: 28px; padding-bottom: 30px; }
  .eot__rig { max-width: 94%; max-height: 140px; }
  .eot__house { gap: 10px; padding-inline: 12px; }
  .eot-cap { gap: 10px; padding-inline: 12px; }
  .eot-cap__who { width: 52px; height: 52px; }
  .eot__rig[data-shape="tall"] { max-height: 150px; }
  .bayd__frame { border-radius: 18px 18px 0 0; }
  .bayd__label { flex-direction: column; gap: 2px; font-size: 1.02rem; padding: 0.35em 0.3em 0.75em; text-align: center; }
  .bayd__icon { width: 1.35em; height: 1.35em; }
}

/* phones: the start screen is a two-option choice, so both level cards and their Play buttons show in the first screen
   (short intro line, a compact Hear button, side-by-side cards with smaller rig art; every target stays 48px or more) */
.eot-start__short { display: none; }
@media (max-width: 560px) {
  .eot-start { gap: 0; padding: 12px 10px 0; }
  .eot-start__long { display: none; }
  .eot-start__short { display: inline; }
  .eot-start__say { font-size: 1.15rem; padding: 0.45em 0.8em; margin-bottom: 10px; border-radius: 18px; }
  .eot-hear { align-items: center; justify-content: center; margin: 0 0 10px; padding: 0; background: none; border: 0; box-shadow: none; }
  .eot-hear__btn { min-height: 48px; }
  .eot-hear__cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .eot-levels { grid-template-columns: 1fr 1fr; gap: 10px; }
  .level { gap: 4px; padding: 10px 6px 20px; border-radius: 18px; }
  .level__pair { height: 58px; padding: 0 2px 8px; gap: 4%; }
  .level__pair img { max-height: 34px; max-width: 48%; }
  .level__pair--big img:last-child { max-height: 48px; }
  .level__name { font-size: 1.25rem; }
  .level__more { font-size: 0.82rem; line-height: 1.3; }
  .level__go { min-height: 48px; margin-top: 4px; font-size: 1.1rem; padding-inline: 0.7em 0.9em; }
  .eot-start__stand { max-width: 120px; margin: 14px 0 20px; }
}

/* Short laptop and desktop screens: the whole active round (slots, bay doors, rig, caption) fits in one view.
   The doors and apron are sized from the window height; the caption row is auto-sized and the box can still grow
   taller if a caption needs more room, so nothing is ever clipped. */
@media (min-width: 1100px) and (max-height: 900px) {
  [data-eot] .game__head { padding-block: 10px 8px; }
  .eot {
    grid-template-rows: auto auto minmax(150px, 1fr) auto;
    min-height: min(calc(100svh - 180px), 720px);
  }
  .eot__parked { padding-block: 7px; border-bottom-width: 8px; }
  .slot { height: 34px; }
  .slot img { max-height: 28px; }
  .eot__house { padding-top: 12px; }
  .bayd { gap: 8px; }
  .bayd__label { min-height: 56px; padding-block: 0.25em 0.6em; }
  .bayd__frame { aspect-ratio: auto; height: clamp(110px, calc(100svh - 630px), 210px); }
  .eot__apron { min-height: 150px; padding: 14px 16px 30px; }
  .eot__rig { max-height: clamp(110px, calc(100svh - 650px), 150px); }
  .eot__rig[data-shape="tall"] { max-height: clamp(120px, calc(100svh - 630px), 170px); }
  .eot-cap { padding-block: 10px 12px; }
  .eot-cap__who { width: 56px; height: 56px; }
}

/* =====================================================================
   GEAR UP, PEPPER!
   ===================================================================== */
.gear-wrap { display: grid; gap: 18px; }
.gear {
  --floor-band: 96px;
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: end; gap: clamp(12px, 2vw, 32px);
  padding: clamp(16px, 2.4vw, 32px) clamp(14px, 2.4vw, 36px) 0;
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2);
  background:
    linear-gradient(to bottom, transparent calc(100% - var(--floor-band)), var(--floor-deep) calc(100% - var(--floor-band)), var(--floor-deep) calc(100% - var(--floor-band) + 4px), #ddd4c4 calc(100% - var(--floor-band) + 4px), var(--floor) calc(100% - var(--floor-band) + 28px)),
    var(--wall) url("/assets/img/spot-wall.svg") 0 0 / 300px 300px;
}
.gear { grid-template-rows: 1fr auto; grid-template-areas: "stand cap" "stand rack"; row-gap: 0; }
.gear__stand { grid-area: stand; position: relative; display: grid; grid-template-columns: 1fr; align-items: end; min-height: 100%; }
/* soft shadows where feet and rack legs meet the floor */
.gear__freddy::after, .gear__pepper::after, .rack::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgb(60 35 20 / 0.34), rgb(60 35 20 / 0.12) 60%, transparent);
}
.gear__freddy {
  position: relative; z-index: 0; justify-self: start; margin-left: 4%;
  width: min(68%, clamp(220px, 25vw, 340px)); aspect-ratio: 2 / 3; margin-bottom: 26px;
  border-radius: 30px; transition: box-shadow 0.2s var(--ease-out), background-color 0.2s;
}
.gear__freddy::after { left: 14%; right: 14%; bottom: -8px; height: 22px; }
.gear__freddy img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%;
  opacity: 0; transition: opacity 0.6s var(--ease-out);
  translate: 0 2.4%;
  filter: drop-shadow(0 2px 2px rgb(60 40 20 / 0.16));
}
.gear__freddy img.is-on { opacity: 1; }
.gear__freddy.is-target { background-color: rgb(242 184 46 / 0.28); box-shadow: 0 0 0 4px var(--yellow); }
.gear__pepper {
  position: absolute; right: -6%; bottom: 14px; width: clamp(110px, 11vw, 160px);
  display: grid; justify-items: center;
}
.gear__pepper::after { left: 16%; right: 12%; bottom: -6px; height: 16px; }
.gear__pup { width: 100%; translate: 0 5.4%; filter: drop-shadow(0 2px 2px rgb(60 40 20 / 0.16)); }
.gear__pup--helmet { translate: 0 0.6%; }
.gear__pup[hidden] { display: none; }
.gear__pup.is-pop { animation: pup-pop 0.7s var(--ease-bounce); }
@keyframes pup-pop { from { transform: scale(0.6) translateY(20%); } to { transform: none; } }
/* the piece Pepper is holding out, in a bubble above her head */
.gear__hand {
  position: absolute; bottom: calc(100% + 14px); left: 50%; translate: -50% 0; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 112px; padding: 8px 10px 10px;
  background: #fff; border: 3px solid var(--spot); border-radius: 18px; box-shadow: var(--shadow-1);
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.1; text-align: center; white-space: nowrap;
}
.gear__hand::after {
  content: ""; position: absolute; bottom: -12px; left: 50%; width: 18px; height: 18px; translate: -50% 0; rotate: 45deg;
  background: #fff; border-right: 3px solid var(--spot); border-bottom: 3px solid var(--spot);
}
.gear__hand[hidden] { display: none; }
.gear__hand img { width: 64px; height: 64px; object-fit: contain; }

/* the gear rack: steel frame on two legs, cubbies with hooks, a reflective strip on every shelf lip */
.rack {
  position: relative;
  grid-area: rack; align-self: end; display: grid; grid-template-rows: auto 1fr; margin-bottom: 56px;
  background: var(--steel); border-radius: 18px 18px 6px 6px;
  padding: 0 10px 10px; box-shadow: var(--shadow-1);
}
.rack::after {
  /* the legs, down to the floor */
  content: ""; position: absolute; left: 16px; right: 16px; top: 100%; height: 34px; pointer-events: none;
  background: linear-gradient(to right, var(--steel-deep) 0 18px, transparent 18px calc(100% - 18px), var(--steel-deep) calc(100% - 18px));
}
.rack::before { left: -2%; right: -2%; top: calc(100% + 24px); height: 22px; }
.rack__top {
  height: 22px; margin: 0 -10px 10px; border-radius: 18px 18px 0 0;
  background: linear-gradient(to bottom, var(--red) 0 14px, var(--red-dark) 14px);
}
.rack__cubbies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cubby {
  position: relative; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: end;
  min-height: 150px; padding: 26px 8px 0; overflow: hidden;
  background: linear-gradient(to bottom, #2f2a28, #45403c);
  border: 0; border-radius: 12px; color: #fff; cursor: pointer; font: inherit;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.cubby__hook {
  position: absolute; top: 6px; left: 50%; width: 18px; height: 22px; translate: -50% 0;
  border: 4px solid #b9b2ab; border-top: 0; border-radius: 0 0 12px 12px;
}
.cubby__hook::before { content: ""; position: absolute; top: -6px; left: 50%; width: 4px; height: 8px; translate: -50% 0; background: #b9b2ab; }
.cubby img {
  width: auto; max-width: 92%; max-height: 118px; object-fit: contain; margin-bottom: 6px;
  filter: drop-shadow(0 6px 4px rgb(0 0 0 / 0.35));
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.cubby__name {
  position: relative; align-self: stretch; justify-self: stretch;
  margin: 0 -8px; padding: 6px 4px 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.05;
  background: #2a2523; color: #f4efe8;
}
.cubby__name::after {
  /* reflective trim: dark until it's this piece's turn */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px;
  background: linear-gradient(to bottom, #7d8331 0 3px, #7b8086 3px 6px, #7d8331 6px 9px);
}
.cubby.is-next { background: linear-gradient(to bottom, #3c3532, #5a524c); box-shadow: inset 0 0 0 4px var(--yellow); }
.cubby.is-next .cubby__name { background: var(--yellow); color: var(--spot); }
.cubby.is-next .cubby__name::after {
  background: linear-gradient(to bottom, var(--trim-lime) 0 3px, var(--trim-lit) 3px 6px, var(--trim-lime) 6px 9px);
}
.cubby.is-next img { animation: piece-bob 1.8s ease-in-out infinite; }
@keyframes piece-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.cubby:hover img, .cubby:focus-visible img { transform: translateY(-4px) scale(1.04); }
.cubby:focus-visible { outline-offset: -4px; outline-color: #fff; }
.cubby.is-used { cursor: default; }
.cubby.is-used img { opacity: 0; }
.cubby.is-used .cubby__name { color: #b8b0a8; }
.cubby.is-lifted img { opacity: 0.25; }
/* Pepper's own little helmet: smaller than Freddy's, with Pepper's face on the cubby so kids know whose it is */
.cubby--pepper img { max-height: 78px; max-width: 70%; }
.cubby__who {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  border: 3px solid #fff; box-shadow: 0 2px 4px rgb(0 0 0 / 0.35); background: #fff;
}
.cubby__who img, .cubby:hover .cubby__who img, .cubby.is-next .cubby__who img { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; object-fit: cover; filter: none; animation: none; transform: none; }
.cubby--pepper.is-used .cubby__who { display: none; }
.gear__pepper { border-radius: 24px; transition: box-shadow 0.2s var(--ease-out), background-color 0.2s; }
.gear__pepper.is-target { background-color: rgb(242 184 46 / 0.28); box-shadow: 0 0 0 4px var(--yellow); }
.gear-ghost {
  position: fixed; z-index: 70; pointer-events: none; object-fit: contain;
  filter: drop-shadow(0 16px 10px rgb(0 0 0 / 0.3)); scale: 1.08;
}

.gear__go {
  position: absolute; inset: 0; z-index: 10;
  display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px;
  background: rgb(252 245 227 / 0.42); text-align: center;
}
.gear__go > * { position: relative; }
.gear__go::before {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: min(92%, 460px); height: min(80%, 300px);
  background: #fff; border: 3px solid var(--spot); border-radius: 26px; box-shadow: var(--shadow-2);
}
.gear__go[hidden] { display: none; }
.gear__go p {
  margin: 0; max-width: 24ch;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 1.2vw + 1rem, 2rem); line-height: 1.2;
}
.gear__start { min-height: 72px; font-size: 1.4em; padding-inline: 1.6em; }

.gear-steps {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 22px;
  padding: 16px 22px; background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-1);
}
.gear-steps__title { margin: 0; font-size: 1.35rem; }
.gear-steps__list { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.gear-steps__list li {
  counter-increment: step;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px;
  border-radius: 999px; background: var(--cream); font-weight: 800;
}
.gear-steps__list .tick {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 3px solid var(--spot); color: transparent;
}
.gear-steps__list .tick::before {
  content: counter(step); position: absolute; font-family: var(--font-display); font-weight: 700; color: var(--spot); font-size: 1rem;
}
.gear-steps__list .tick .icon { width: 20px; height: 20px; stroke-width: 3.2; }
.gear-steps__list li.is-now { background: var(--yellow); }
.gear-steps__list li.is-done .tick { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.gear-steps__list li.is-done .tick::before { content: none; }
.gear-steps__note { grid-column: 1 / -1; margin: 0; font-size: 0.92em; color: var(--ink-soft); max-width: 72ch; }

.gear-end {
  text-align: center; padding: 22px 18px 26px; background: var(--yellow); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
}
.gear-end[hidden] { display: none; }
.gear-end:focus { outline: none; }
.gear-end h2 { margin: 0 0 6px; }
.gear-end p { font-weight: 700; font-size: 1.12em; margin: 0 0 16px; }

/* Pepper's caption: every spoken line, written down, on the wall right above the rack */
.gear-cap { grid-area: cap; align-self: end; display: flex; align-items: center; gap: 14px; margin: 0 0 16px; position: relative; z-index: 1; }
.gear-cap__who {
  width: 64px; height: 64px; flex: none; object-fit: cover;
  border-radius: 50%; background: #fff; border: 3px solid var(--spot);
}
.gear-cap__say {
  position: relative; flex: 1; min-width: 0; margin: 0; min-height: 2.6em;
  padding: 0.5em 0.9em 0.55em; border-radius: 20px; background: #fff; border: 3px solid var(--spot); box-shadow: var(--shadow-1);
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 0.4vw + 0.95rem, 1.3rem); line-height: 1.25;
}
.gear-cap__say::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 18px; height: 18px;
  background: #fff; border: solid var(--spot); border-width: 0 0 3px 3px;
  transform: translateY(-50%) rotate(45deg);
}
.gear-cap__say.is-new { animation: cap-pop 0.4s var(--ease-out); }

@media (max-width: 860px) {
  /* two rooms, one above the other: Freddy's floor is a slab, the rack stands on the floor below */
  .gear { --floor-band: 64px; grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "stand" "cap" "rack"; gap: 0; padding-top: 14px; }
  .gear-cap { margin: 16px 0 0; }
  .gear__stand {
    padding: 0; margin: 0 calc(-1 * clamp(14px, 2.4vw, 36px)) 0; min-height: 0;
    background: linear-gradient(to bottom, transparent calc(100% - 52px), var(--floor-deep) calc(100% - 52px), var(--floor-deep) calc(100% - 48px), #ddd4c4 calc(100% - 48px), var(--floor) calc(100% - 26px), var(--floor) calc(100% - 12px), var(--floor-deep) calc(100% - 12px));
  }
  .gear__freddy { width: min(40%, 200px); margin: 0 0 30px 12%; }
  .gear__pepper { right: 8%; bottom: 20px; width: clamp(96px, 22vw, 150px); }
  .rack { margin: 18px 0 46px; }
  .gear-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* one phone screen holds Freddy, Pepper's caption and the whole rack */
  .gear { padding-top: 10px; }
  .gear__freddy { width: min(34%, 132px); margin-left: 10%; }
  .gear__pepper { right: 7%; width: 86px; }
  .gear__hand { min-width: 96px; font-size: 0.9rem; padding: 6px 8px 8px; }
  .gear__hand img { width: 48px; height: 48px; }
  .rack__cubbies { gap: 8px; }
  .cubby { min-height: 100px; padding-top: 22px; }
  .cubby img { max-height: 58px; margin-bottom: 4px; }
  .cubby__name { font-size: 0.92rem; padding-bottom: 12px; }
  .cubby__who { top: 5px; right: 5px; width: 32px; height: 32px; border-width: 2px; }
  .cubby--pepper img { max-height: 44px; }
  .gear-steps__list li { padding-right: 12px; font-size: 0.95em; }
  .gear-cap { margin-top: 12px; }
  /* Pepper is right above, so the bubble points up at her instead of using the face badge */
  .gear-cap__who { display: none; }
  .gear-cap__say {
    font-size: 1rem; line-height: 1.22; padding: 0.45em 0.8em 0.5em;
    min-height: calc(var(--cap-lines, 3) * 1.22em + 0.95em + 6px); display: flex; align-items: center;
  }
  .gear-cap__say::before { left: auto; right: calc(7% + 30px); top: -12px; transform: rotate(135deg); }
  .rack { margin-top: 12px; }
}
@media (max-width: 370px) {
  /* the longest lines wrap to four rows here; keep the rack from jumping */
  .gear-cap__say { --cap-lines: 4; }
}

@media (prefers-reduced-motion: reduce) {
  .cubby.is-next img { animation: none; }
  .gear__freddy img, .bayd__door { transition: none; }
  .eot__car.is-rolling, .eot-cap__say.is-new, .gear-cap__say.is-new { animation: none; }
}

/* every game ends with a big way back to the game shelf */
.game-foot { display: flex; justify-content: center; padding-top: clamp(24px, 3vw, 40px); }
.game-foot__back { min-height: 60px; font-size: 1.15rem; padding-inline: 1.4em; }
.game-foot__back .icon { width: 1.1em; height: 1.1em; }
