/* The café is a place, not a panel: all controls are physical props in the room. */
:root {
  --cafe-ink: #3d291d;
  --cafe-cream: #fff4cf;
  --cafe-wood: #8b4c2d;
  --cafe-wood-dark: #4e281a;
  --cafe-teal: #196f69;
  --cafe-gold: #e3aa35;
  --cafe-chalk: #fff7d7;
}

html,
body {
  overflow-x: hidden;
  background: #9c5b36;
}

.cafe-game {
  min-height: 100svh;
}

.cafe-game [hidden] {
  display: none !important;
}

.cafe-game button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cafe-game button:focus-visible,
.cafe-game a:focus-visible {
  outline: 4px solid #fff4a8;
  outline-offset: 4px;
}

.cafe-scene {
  --counter-line: 68%;
  --customer-visual-h: clamp(150px, 30vmin, 280px);
  display: block;
  position: relative;
  min-height: calc(100svh - 76px);
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: #a85f37;
}

.cafe-scene::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: var(--counter-line) 0 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 52% 0, rgba(255, 223, 145, .32), transparent 52%),
    linear-gradient(180deg, #ad6841 0, #8c4c30 100%);
}

.cafe-scene::after {
  display: none !important;
}

.cafe-scene .scene-art {
  inset: -1.5%;
  background-position: center;
  background-size: cover;
  transform: scale(1.035);
  filter: saturate(1.03) contrast(1.01);
  transition: transform .65s cubic-bezier(.2, .8, .2, 1), filter .35s ease;
}

.cafe-scene .scene-shade {
  display: none !important;
}

.cafe-ambient {
  z-index: 1;
  opacity: .56;
}

.cafe-progress {
  position: absolute;
  z-index: 8;
  top: 16px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff7d5;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-shadow: 0 2px 5px rgba(55, 25, 10, .8);
}

#cafe-dots {
  display: flex;
  gap: 6px;
}

#cafe-dots i {
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 248, 219, .8);
  border-radius: 50%;
  background: rgba(75, 36, 18, .4);
  box-shadow: 0 2px 3px rgba(50, 22, 11, .35);
}

#cafe-dots i.current {
  background: #f4c75a;
  transform: scale(1.2);
}

#cafe-dots i.done {
  border-color: #d8ffbd;
  background: #65b875;
}

/* Text is written onto the blackboard already present in the artwork. */
.cafe-chalkboard {
  position: absolute;
  z-index: 4;
  top: 13.5%;
  left: 72.3%;
  width: 18.8%;
  min-width: 210px;
  height: 27%;
  min-height: 172px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  color: var(--cafe-chalk);
  text-align: center;
  text-shadow: 0 2px 2px rgba(11, 31, 29, .7);
  transform: rotate(-.35deg);
  pointer-events: none;
}

.cafe-chalkboard small {
  font-size: clamp(8px, .7vw, 11px);
  font-weight: 1000;
  letter-spacing: .09em;
  color: #f5d486;
}

.cafe-chalkboard h1 {
  max-width: 15ch;
  margin: 7px 0 5px;
  font: 1000 clamp(15px, 1.45vw, 24px)/1.03 "Trebuchet MS", system-ui, sans-serif;
  color: #fffce9;
}

.cafe-chalkboard p {
  max-width: 25ch;
  margin: 0;
  font-size: clamp(9px, .72vw, 12px);
  line-height: 1.25;
  color: #dce7d0;
}

.budget-coins {
  min-height: 22px;
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 8px;
}

.budget-coins > * {
  width: clamp(12px, 1.12vw, 18px);
  height: clamp(12px, 1.12vw, 18px);
  display: grid;
  place-items: center;
  border: 1px solid #ffdf78;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #fff3a7 0 8%, #e7ae36 32%, #a96a1f 100%);
  color: #593517;
  font-size: 8px;
  font-weight: 1000;
  box-shadow: 0 2px 3px rgba(17, 19, 13, .42);
  transition: opacity .2s, transform .2s, filter .2s;
}

.budget-coins > .spent {
  opacity: .26;
  filter: grayscale(.8);
  transform: translateY(3px) scale(.82);
}

.budget-coins > .remaining {
  box-shadow: 0 0 0 2px rgba(255, 246, 174, .72), 0 0 13px #ffd465;
}

.chalk-math {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 17px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 249, 219, .42);
  font-size: clamp(8px, .65vw, 10px);
  letter-spacing: .05em;
}

.chalk-math span {
  display: grid;
  gap: 1px;
}

.chalk-math strong {
  font-size: clamp(13px, 1.15vw, 19px);
  color: #fff;
}

/* Only the current guest inhabits the open floor. */
.cafe-customer {
  position: absolute;
  z-index: 3;
  right: 5.7%;
  bottom: 6%;
  width: min(24vw, 365px);
  height: 48%;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.cafe-customer img {
  --character-base-x: -50%;
  --character-base-y: var(--sprite-foot-gap, 11%);
  position: absolute;
  left: 50%;
  bottom: 0;
  width: auto;
  max-width: none;
  max-height: none;
  height: var(--customer-canvas-h, clamp(193px, 38.5vmin, 359px));
  object-fit: contain;
  object-position: center bottom;
  translate: calc(var(--character-base-x) + var(--character-drag-x, 0px)) calc(var(--character-base-y) + var(--character-drag-y, 0px));
  filter: drop-shadow(0 17px 8px rgba(49, 28, 16, .38));
  animation: cafeDirectIdle 3.6s ease-in-out infinite;
  transition: opacity .28s ease, transform .38s cubic-bezier(.2, .9, .2, 1.15), filter .25s;
}

.cafe-customer img[data-sprite="sunny"] { --customer-canvas-h: clamp(193px, 38.5vmin, 359px); --sprite-foot-gap: 11%; }
.cafe-customer img[data-sprite="maple"] { --customer-canvas-h: clamp(172px, 34.4vmin, 321px); --sprite-foot-gap: 6.7%; }
.cafe-customer img[data-sprite="flint"] { --customer-canvas-h: clamp(213px, 42.6vmin, 398px); --sprite-foot-gap: 12.4%; }
.cafe-customer img[data-sprite="dune"] { --customer-canvas-h: clamp(217px, 43.4vmin, 405px); --sprite-foot-gap: 14.2%; }
.cafe-customer img[data-sprite="cloud"] { --customer-canvas-h: clamp(208px, 41.5vmin, 388px); --sprite-foot-gap: 11.2%; }

.cafe-customer > strong {
  bottom: 0;
  padding: 2px 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff9dc;
  font-size: 13px;
  text-shadow: 0 2px 4px #4e2818, 0 0 7px #4e2818;
}

.cafe-customer.arriving img {
  animation: cafeDirectArrive .58s cubic-bezier(.18, .88, .25, 1.18), cafeDirectIdle 3.6s .58s ease-in-out infinite !important;
}

.cafe-customer.celebrating img {
  animation: cafeDirectCelebrate .72s cubic-bezier(.2, .8, .2, 1) !important;
  filter: drop-shadow(0 17px 8px rgba(49, 28, 16, .38)) drop-shadow(0 0 15px #fff2a9);
}

.cafe-customer.changing img {
  opacity: 0;
  transform: translateX(38px) scale(.9);
}

.cafe-play-counter {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}

.cafe-play-counter button,
.serving-tray,
.cafe-register,
.customer-payment-zone,
.change-saucer {
  pointer-events: auto;
}

.food-counter,
.food-props,
#menu-grid {
  display: contents;
}

.counter-label {
  position: absolute;
  z-index: 2;
  left: 6.5%;
  top: 61.5%;
  color: rgba(255, 246, 213, .84);
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .12em;
  text-shadow: 0 2px 4px #4a2416;
  pointer-events: none;
}

/* Large transparent hit areas sit over the food that is painted into the room. */
.food-prop,
#menu-grid > button {
  position: absolute;
  z-index: 5;
  min-width: 58px;
  min-height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #fff9e6;
  cursor: grab;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}

.food-prop > span,
#menu-grid > button > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(34px, 4vw, 58px);
  opacity: 0;
  transform: scale(.85);
  filter: drop-shadow(0 5px 4px rgba(55, 26, 12, .44));
  transition: opacity .15s, transform .15s;
}

.food-prop strong,
#menu-grid > button strong {
  position: absolute;
  left: 50%;
  bottom: -30px;
  width: max-content;
  max-width: 115px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(69, 35, 20, .88);
  color: #fff5d6;
  font-size: 10px;
  line-height: 1.1;
  opacity: 0;
  transform: translateX(-50%) translateY(5px);
  transition: opacity .15s, transform .15s;
}

.food-prop small,
#menu-grid > button small {
  position: absolute;
  right: -7px;
  bottom: -5px;
  min-width: 30px;
  padding: 4px 5px 3px;
  border: 2px solid #79512c;
  border-radius: 5px 5px 8px 5px;
  background: #fff1bd;
  box-shadow: 0 3px 3px rgba(64, 32, 16, .3);
  color: #5b341d;
  font-size: 10px;
  font-weight: 1000;
  transform: rotate(-4deg);
}

.food-prop:hover,
.food-prop:focus-visible,
#menu-grid > button:hover,
#menu-grid > button:focus-visible {
  transform: translateY(-4px) scale(1.04);
  filter: drop-shadow(0 0 10px rgba(255, 235, 133, .94));
}

.food-prop:hover strong,
.food-prop:focus-visible strong,
#menu-grid > button:hover strong,
#menu-grid > button:focus-visible strong {
  opacity: 1;
  transform: translateX(-50%);
}

.food-prop.chosen,
.food-prop.on-tray,
#menu-grid > button.chosen,
#menu-grid > button.on-tray {
  opacity: .34;
  filter: grayscale(.5);
  cursor: default;
}

.food-prop.dragging,
#menu-grid > button.dragging,
.food-prop.is-dragging,
#menu-grid > button.is-dragging,
.tray-piece.dragging,
.tray-food.dragging,
.tray-food.is-dragging,
.cash-option.dragging,
.change-coin.dragging,
.change-coin.is-dragging,
.change-piece.dragging {
  z-index: 30;
  opacity: .96;
  cursor: grabbing;
  transform: scale(1.12) rotate(3deg);
  filter: drop-shadow(0 12px 8px rgba(59, 29, 14, .45));
}

.drag-ghost .food-picture,
.food-prop.drag-ghost > span {
  opacity: 1 !important;
  transform: scale(1) !important;
}

#customer-payment.is-dragging {
  opacity: .34;
  transform: scale(.92);
}

.food-prop[data-item="soup"] { left: 4.1%; top: 46%; width: 9%; height: 12%; }
.food-prop[data-item="roll"] { left: 10.1%; top: 42%; width: 11%; height: 14%; }
.food-prop[data-item="muffin"] { left: 28.2%; top: 45.5%; width: 13%; height: 13%; }
.food-prop[data-item="tea"] { left: 39.4%; top: 38%; width: 9%; height: 13%; }

/* A ceramic serving platter, not a drop-zone card. */
.serving-tray {
  position: absolute;
  z-index: 8;
  left: 48%;
  bottom: 4.2%;
  width: min(24vw, 360px);
  min-width: 250px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 17px 26px 12px;
  border: 8px solid #e7d2a8;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 35%, #fffef2 0 34%, #eee1c5 65%, #c4a87b 100%);
  box-shadow:
    inset 0 0 0 3px rgba(121, 92, 53, .24),
    0 11px 0 #68422b,
    0 20px 20px rgba(61, 30, 15, .32);
  transform: rotate(-1deg);
  transition: filter .22s, transform .25s cubic-bezier(.2, .85, .2, 1.2);
}

.tray-label {
  position: absolute;
  top: -22px;
  left: 50%;
  width: max-content;
  color: #fff4d1;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .1em;
  text-shadow: 0 2px 4px #4d2818;
  transform: translateX(-50%);
}

#tray-items {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#tray-items em {
  color: #8c775f;
  font-size: 12px;
}

.tray-piece,
.tray-food {
  position: relative;
  min-width: 54px;
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 30px;
  cursor: pointer;
  filter: drop-shadow(0 5px 4px rgba(68, 42, 23, .34));
}

.tray-piece.is-arriving,
.tray-food.is-arriving {
  animation: cafeTrayLand .35s cubic-bezier(.2, .9, .22, 1.25);
}

.tray-food > span {
  grid-area: 1 / 1;
  font-size: 30px;
}

.tray-food > small {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: end;
  min-width: 22px;
  padding: 2px 3px;
  border-radius: 999px;
  background: #fff0b7;
  box-shadow: 0 2px 3px rgba(64, 39, 21, .25);
  color: #57351f;
  font-size: 8px;
  font-weight: 1000;
}

.serving-tray.tray-ready {
  filter: drop-shadow(0 0 15px rgba(255, 235, 126, .9));
  animation: cafeTrayReady 1.4s ease-in-out infinite;
}

.serving-tray.tray-serving {
  animation: cafeTrayServe .65s cubic-bezier(.2, .82, .2, 1);
}

/* The till reads as a piece of furniture and only opens when change is due. */
.cafe-register {
  position: absolute;
  z-index: 9;
  left: 39.5%;
  bottom: 6%;
  width: 150px;
  min-height: 114px;
  padding: 10px 13px 14px;
  border: 4px solid #55331f;
  border-radius: 18px 18px 9px 9px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.25), transparent 26%),
    linear-gradient(135deg, #b9773e, #704126);
  box-shadow: inset 0 0 0 3px rgba(246, 195, 98, .24), 0 9px 0 #452718, 0 15px 14px rgba(51, 25, 13, .33);
  transform: perspective(500px) rotateX(3deg);
  transition: transform .25s ease, filter .25s;
}

.till-display {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0 5px;
  padding: 7px 8px;
  border: 3px solid #26362f;
  border-radius: 7px;
  background: #b9d6ae;
  box-shadow: inset 0 3px 5px rgba(34, 64, 44, .27);
  color: #304a39;
  font-family: ui-monospace, monospace;
}

.till-display small {
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: .04em;
}

.till-display strong {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 23px;
  line-height: 1;
}

.till-display span {
  overflow: hidden;
  font-size: 7px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.till-slot {
  min-height: 44px;
  display: grid;
  place-items: center;
  margin-top: 8px;
  border: 0;
  border-top: 5px solid #382318;
  background: transparent;
  color: rgba(255, 238, 196, .76);
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: .08em;
}

.till-slot.awaiting-payment {
  border-top-color: #f0c758;
  color: #fff3bd;
  animation: cafeTillAwait 1.05s ease-in-out infinite;
}

.till-slot.payment-received {
  border-top-color: #8bd080;
  color: #dfffd5;
}

.cafe-scene[data-phase="payment"] .till-slot,
.cafe-scene[data-phase="change"] .cafe-register {
  filter: drop-shadow(0 0 11px rgba(255, 220, 111, .8));
}

.cash-drawer {
  position: absolute;
  top: auto;
  bottom: calc(100% + 7px);
  left: -70px;
  width: 290px;
  min-height: 98px;
  padding: 10px 12px;
  border: 5px solid #4b2a19;
  border-radius: 8px 8px 20px 20px;
  background: linear-gradient(180deg, #8c5534, #5b3421);
  box-shadow: inset 0 4px 0 rgba(255, 216, 140, .2), 0 12px 16px rgba(53, 25, 12, .4);
  transform-origin: bottom;
  animation: cafeDrawerOpen .34s cubic-bezier(.18, .9, .2, 1.15);
}

.cash-drawer > span {
  display: block;
  margin-bottom: 5px;
  color: #ffedc2;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: .11em;
  text-align: center;
}

#cash-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cash-option,
.change-coin,
.change-piece {
  min-width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 3px solid #9d681f;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 27%, #fff2a2 0 7%, #e6b44d 31%, #b87925 72%, #7f4c18);
  box-shadow: inset 0 0 0 2px rgba(255, 241, 151, .48), 0 4px 0 #65401e, 0 7px 8px rgba(38, 20, 10, .28);
  color: #5a3519;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
  transition: transform .14s, filter .14s;
}

.change-coin > span,
.change-piece > span {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
}

.change-coin > small,
.change-piece > small {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: center;
  margin-bottom: 3px;
  font-size: 7px;
}

.cash-option:hover,
.cash-option:focus-visible,
.change-coin:hover,
.change-coin:focus-visible,
.change-piece:hover,
.change-piece:focus-visible {
  transform: translateY(-3px) rotate(3deg);
  filter: brightness(1.08);
}

.cash-option[data-value="5"],
.cash-option[data-value="10"],
.cash-option[data-value="20"],
.change-coin[data-value="5"],
.change-coin[data-value="10"],
.change-coin[data-value="20"],
.change-coin.coin-5,
.change-piece[data-value="5"],
.change-piece[data-value="10"],
.change-piece[data-value="20"],
.change-piece.coin-5 {
  width: 67px;
  border-color: #51766d;
  border-radius: 7px;
  background:
    radial-gradient(circle at 22% 30%, rgba(255,255,255,.43) 0 5%, transparent 6%),
    repeating-linear-gradient(45deg, transparent 0 5px, rgba(255,255,255,.11) 5px 6px),
    #77a996;
  box-shadow: inset 0 0 0 3px rgba(233, 255, 226, .39), 0 4px 0 #385b53, 0 7px 8px rgba(38, 20, 10, .25);
  color: #173e37;
}

/* A brass service bell lives on the counter; its label appears only when useful. */
.counter-bell {
  position: absolute;
  z-index: 10;
  left: 59%;
  bottom: 21%;
  width: 66px;
  height: 62px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 7px 4px rgba(61, 31, 14, .4));
}

.counter-bell::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 9px;
  height: 39px;
  border-radius: 50% 50% 20% 20% / 75% 75% 25% 25%;
  background: radial-gradient(circle at 36% 22%, #fff4a7 0 6%, #e9b44b 23%, #a76b1e 66%, #714315 100%);
  box-shadow: inset -4px -4px 7px rgba(85, 45, 11, .34), 0 4px 0 #5c3514;
}

.counter-bell::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 4px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(#efc164, #8c551e);
  box-shadow: 0 4px 0 #543116;
}

.counter-bell > span {
  position: absolute;
  z-index: 2;
  top: 1px;
  left: 24px;
  width: 18px;
  height: 14px;
  overflow: hidden;
  color: transparent;
}

.counter-bell > span::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 10px;
  height: 9px;
  border-radius: 50% 50% 35% 35%;
  background: #f0c15e;
  box-shadow: 0 2px 0 #79501d;
}

.counter-bell small {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  width: max-content;
  color: #fff0bd;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-shadow: 0 2px 4px #4f2818;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity .15s;
}

.counter-bell[aria-disabled="false"] {
  animation: cafeBellInvite 1.45s ease-in-out infinite;
}

.counter-bell[aria-disabled="true"] {
  opacity: .22;
  filter: grayscale(.3) drop-shadow(0 5px 3px rgba(61, 31, 14, .25));
  cursor: pointer;
}

.counter-bell[aria-disabled="true"]:hover,
.counter-bell[aria-disabled="true"]:focus-visible {
  opacity: .42;
  filter: drop-shadow(0 0 10px rgba(255, 229, 130, .72));
}

.cafe-scene[data-phase="payment"] .food-prop,
.cafe-scene[data-phase="change"] .food-prop,
.cafe-scene[data-phase="handoff"] .food-prop {
  opacity: .16;
  filter: grayscale(.35);
}

.cafe-scene[data-phase="payment"] .counter-bell,
.cafe-scene[data-phase="change"] .counter-bell,
.cafe-scene[data-phase="handoff"] .counter-bell {
  opacity: 0;
  pointer-events: none;
  transform: scale(.7);
}

.counter-bell.ringing {
  animation: cafeBellRing .45s ease-in-out !important;
}

.customer-payment-zone {
  position: absolute;
  z-index: 11;
  left: 66%;
  bottom: 28%;
  display: grid;
  place-items: center;
  gap: 3px;
  color: #fff0bf;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-shadow: 0 2px 4px #512c1b;
  animation: cafePaymentArrive .35s cubic-bezier(.2, .9, .2, 1.2);
}

.customer-payment-zone small {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
}

#customer-payment {
  min-width: 86px;
  min-height: 50px;
  padding: 7px 14px;
  border: 3px solid #567e72;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 30%, rgba(255,255,255,.45) 0 4%, transparent 5%),
    repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,.1) 6px 7px),
    #81b5a1;
  box-shadow: inset 0 0 0 3px rgba(234,255,229,.42), 0 5px 0 #3d6258, 0 10px 10px rgba(49, 27, 15, .3);
  color: #173c35;
  font-size: 19px;
  font-weight: 1000;
  cursor: grab;
}

#customer-payment:hover,
#customer-payment:focus-visible {
  transform: translateY(-3px) rotate(-1deg);
  filter: brightness(1.08);
}

.customer-payment-zone.payment-moving,
#customer-payment.payment-moving {
  animation: cafePaymentMove .48s cubic-bezier(.2, .8, .2, 1);
}

.change-saucer {
  position: absolute;
  z-index: 9;
  right: 7%;
  bottom: 4.5%;
  width: 210px;
  min-height: 83px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 17px 14px 9px;
  border: 6px solid #e6d6bc;
  border-radius: 50%;
  background: radial-gradient(ellipse, #fffdf4 0 39%, #d9c7a6 72%, #a88c65 100%);
  box-shadow: inset 0 0 0 2px rgba(104, 79, 45, .2), 0 7px 0 #67452c, 0 13px 13px rgba(53, 26, 13, .28);
  animation: cafeSaucerArrive .35s cubic-bezier(.2, .9, .2, 1.2);
}

.change-saucer > span {
  position: absolute;
  top: -19px;
  left: 50%;
  width: max-content;
  color: #fff0c7;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: .09em;
  text-shadow: 0 2px 4px #4f2818;
  transform: translateX(-50%);
}

#change-items {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#change-items em {
  color: #88735d;
  font-size: 10px;
}

.change-saucer .change-piece {
  min-width: 44px;
  min-height: 44px;
}

.change-saucer .change-piece.is-arriving {
  animation: cafeChangeLand .28s cubic-bezier(.2, .9, .2, 1.25);
}

.change-saucer.done,
.change-saucer.change-correct {
  animation: cafeSaucerDone .6s ease-in-out;
}

.change-saucer.change-over {
  filter: drop-shadow(0 0 10px rgba(202, 68, 49, .72));
  animation: cafeChangeOver .34s ease-in-out;
}

.cafe-feedback {
  position: absolute;
  z-index: 20;
  right: 4.5%;
  top: 43%;
  width: min(250px, 23vw);
  min-height: 0;
  margin: 0;
  padding: 10px 14px;
  border: 3px solid rgba(111, 76, 40, .65);
  border-radius: 19px;
  background: rgba(255, 250, 224, .96);
  box-shadow: 0 7px 0 rgba(84, 51, 28, .34), 0 12px 20px rgba(50, 28, 15, .2);
  color: #5d3b27;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity .18s, transform .18s;
}

.cafe-feedback::after {
  content: "";
  position: absolute;
  right: 20%;
  bottom: -16px;
  border: 9px solid transparent;
  border-top-color: rgba(255, 250, 224, .96);
}

.cafe-feedback:empty {
  opacity: 0;
  transform: translateY(6px) scale(.96);
  pointer-events: none;
}

.cafe-feedback.good {
  background: rgba(231, 255, 222, .97);
  color: #356a42 !important;
}

.cafe-mobile-task {
  display: none;
}
.cafe-progress #cafe-level{padding:3px 6px;border:2px solid #d7b564;border-radius:999px;background:rgba(255,239,180,.94);color:#68502a;font-size:7px;font-weight:1000;letter-spacing:.05em}

.cafe-scene .cafe-feedback:not(:empty) {
  padding: 10px 14px;
  border-radius: 19px;
}

.cafe-scene .cafe-feedback.warning {
  background: rgba(255, 238, 222, .97);
  color: #813f2d;
}

.cafe-scene.over-budget #budget-left,
.cafe-scene.over-budget .chalk-math span:last-child strong {
  color: #ffb8a8;
  text-decoration: underline wavy rgba(255, 178, 155, .7);
}

.cafe-customer.served img,
.cafe-customer.celebrating img {
  animation: cafeDirectCelebrate .72s cubic-bezier(.2, .8, .2, 1) !important;
  filter: drop-shadow(0 17px 8px rgba(49, 28, 16, .38)) drop-shadow(0 0 15px #fff2a9);
}

.cafe-scene.customer-served .scene-art,
.cafe-scene[data-phase="handoff"] .scene-art,
.cafe-scene[data-phase="celebrate"] .scene-art,
.cafe-scene[data-phase="complete"] .scene-art {
  filter: saturate(1.12) brightness(1.06);
  transform: scale(1.045);
}

@keyframes cafeDirectIdle {
  50% { transform: translateY(-5px) rotate(.4deg); }
}

@keyframes cafeDirectArrive {
  0% { opacity: 0; transform: translateX(55px) scale(.88); }
  100% { opacity: 1; transform: none; }
}

@keyframes cafeDirectCelebrate {
  0%, 100% { transform: none; }
  35% { transform: translateY(-22px) rotate(-3deg) scale(1.035); }
  68% { transform: translateY(-7px) rotate(3deg); }
}

@keyframes cafeTrayLand {
  0% { opacity: 0; transform: translateY(-24px) scale(.72) rotate(-8deg); }
  100% { opacity: 1; transform: none; }
}

@keyframes cafeTrayReady {
  0%, 100% { transform: rotate(-1deg) scale(1); }
  50% { transform: rotate(-1deg) scale(1.025); }
}

@keyframes cafeTrayServe {
  0% { transform: rotate(-1deg); }
  48% { transform: translate(var(--serve-x,22vw), var(--serve-y,-11vh)) rotate(3deg) scale(.92); opacity: 1; }
  100% { transform: translate(var(--serve-x,22vw), var(--serve-y,-11vh)) rotate(3deg) scale(.92); opacity: 0; }
}

@keyframes cafeDrawerOpen {
  0% { opacity: 0; transform: perspective(400px) rotateX(-45deg) translateY(-24px) scaleY(.55); }
  100% { opacity: 1; transform: none; }
}

@keyframes cafeTillAwait {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 224, 107, 0)); }
  50% { filter: drop-shadow(0 0 7px rgba(255, 224, 107, .92)); }
}

@keyframes cafeBellInvite {
  0%, 84%, 100% { transform: rotate(0); }
  88% { transform: rotate(-5deg); }
  92% { transform: rotate(5deg); }
  96% { transform: rotate(-3deg); }
}

@keyframes cafeBellRing {
  0%, 100% { transform: rotate(0) scale(1); }
  22% { transform: rotate(-10deg) scale(1.08); }
  46% { transform: rotate(10deg) scale(1.08); }
  70% { transform: rotate(-7deg) scale(1.04); }
}

@keyframes cafePaymentArrive {
  0% { opacity: 0; transform: translate(38px, -20px) rotate(7deg) scale(.82); }
  100% { opacity: 1; transform: none; }
}

@keyframes cafePaymentMove {
  0% { opacity: 1; transform: none; }
  75% { opacity: 1; transform: translate(-14vw, 18vh) rotate(-7deg) scale(.86); }
  100% { opacity: 0; transform: translate(-14vw, 18vh) rotate(-7deg) scale(.78); }
}

@keyframes cafeSaucerArrive {
  0% { opacity: 0; transform: translateX(45px) scale(.78); }
  100% { opacity: 1; transform: none; }
}

@keyframes cafeChangeLand {
  0% { opacity: 0; transform: translateY(-16px) rotate(12deg) scale(.7); }
  100% { opacity: 1; transform: none; }
}

@keyframes cafeSaucerDone {
  0%, 100% { transform: none; }
  32% { transform: rotate(-3deg) scale(1.05); filter: drop-shadow(0 0 10px #fff2a1); }
  66% { transform: rotate(3deg) scale(1.05); filter: drop-shadow(0 0 14px #fff2a1); }
}

@keyframes cafeChangeOver {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-5px) rotate(-1deg); }
  70% { transform: translateX(5px) rotate(1deg); }
}

@media (max-width: 1050px) {
  .cafe-chalkboard {
    min-width: 185px;
    padding: 12px 14px;
  }

  .cafe-register {
    left: 37%;
  }

  .serving-tray {
    left: 51%;
    min-width: 225px;
  }

  .counter-bell {
    left: 61%;
  }
}

/* Portrait: keep the whole illustrated café visible, then arrange its physical props on the floor below. */
@media (max-width: 850px) {
  .job-header {
    position: relative;
    z-index: 50;
    height: 64px;
    padding: 8px 10px;
  }

  .job-header > a {
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
  }

  .job-title {
    gap: 6px;
  }

  .job-title > span {
    width: 38px;
    height: 38px;
  }

  .job-pay {
    min-height: 44px;
    padding: 6px 9px;
  }

  .cafe-scene {
    --art-height: min(56.25vw, 42svh, 380px);
    --counter-line: var(--art-height);
    min-height: max(574px, calc(100svh - 64px));
    overflow: hidden;
  }

  .cafe-scene::before {
    inset: var(--art-height) 0 0;
    background:
      radial-gradient(ellipse at 50% 0, rgba(255, 223, 145, .25), transparent 50%),
      repeating-linear-gradient(105deg, transparent 0 42px, rgba(87, 43, 25, .07) 43px 45px),
      linear-gradient(180deg, #b36b43, #80442b);
  }

  .cafe-scene .scene-art {
    inset: 0 0 auto;
    width: 100%;
    height: var(--art-height);
    background-position: center top;
    background-size: 100% auto;
    transform: none;
  }

  .cafe-ambient {
    height: var(--art-height);
    opacity: .42;
  }

  .cafe-progress {
    top: 8px;
    left: 9px;
    gap: 6px;
    font-size: 9px;
  }

  #cafe-dots i {
    width: 9px;
    height: 9px;
    border-width: 1px;
  }

  .cafe-chalkboard {
    top: calc(var(--art-height) * .135);
    left: 72.4%;
    width: 18.5%;
    min-width: 0;
    height: calc(var(--art-height) * .30);
    min-height: 0;
    padding: 3px 4px;
  }

  .cafe-chalkboard small {
    font-size: clamp(5px, 1.35vw, 7px);
    line-height: 1.05;
  }

  .cafe-chalkboard h1 {
    margin: 3px 0 2px;
    font-size: clamp(8px, 2.35vw, 12px);
    line-height: 1;
  }

  .cafe-chalkboard p {
    display: none;
  }

  .cafe-mobile-task {
    position: absolute;
    z-index: 18;
    top: calc(var(--art-height) + 9px);
    left: 6%;
    width: 88%;
    display: block;
    margin: 0;
    color: #fff1c6;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 2px 4px #4f2818;
    pointer-events: none;
  }

  .budget-coins {
    min-height: 7px;
    gap: 0;
    margin-top: 3px;
  }

  .budget-coins > * {
    width: 7px;
    height: 7px;
    font-size: 0;
  }

  .chalk-math {
    gap: 6px;
    margin-top: 3px;
    padding-top: 2px;
    font-size: 5px;
  }

  .chalk-math strong {
    font-size: 8px;
  }

  .cafe-customer {
    right: 3%;
    bottom: auto;
    top: calc(var(--art-height) * .48);
    width: 27%;
    height: calc(var(--art-height) * .55);
  }

  .cafe-customer > strong {
    font-size: 9px;
  }

  .counter-label {
    display: none;
  }

  .food-prop,
  #menu-grid > button {
    min-width: 48px;
    min-height: 48px;
  }

  .food-prop[data-item="soup"] { left: 0; top: calc(var(--art-height) * .46); width: 12%; height: calc(var(--art-height) * .24); }
  .food-prop[data-item="roll"] { left: 11%; top: calc(var(--art-height) * .42); width: 12%; height: calc(var(--art-height) * .25); }
  .food-prop[data-item="muffin"] { left: 27%; top: calc(var(--art-height) * .44); width: 15%; height: calc(var(--art-height) * .24); }
  .food-prop[data-item="tea"] { left: 39%; top: calc(var(--art-height) * .36); width: 12%; height: calc(var(--art-height) * .25); }

  .food-prop small,
  #menu-grid > button small {
    right: -2px;
    bottom: -1px;
    min-width: 25px;
    padding: 2px 3px;
    border-width: 1px;
    font-size: 8px;
  }

  .food-prop strong,
  #menu-grid > button strong {
    bottom: -24px;
    max-width: 88px;
    font-size: 8px;
  }

  .serving-tray {
    left: 4%;
    bottom: 3%;
    width: 45%;
    min-width: 0;
    height: 88px;
    padding: 12px 12px 8px;
    border-width: 6px;
    box-shadow: inset 0 0 0 2px rgba(121,92,53,.24), 0 7px 0 #68422b, 0 13px 13px rgba(61,30,15,.3);
  }

  .tray-label {
    top: -17px;
    font-size: 7px;
  }

  #tray-items {
    min-height: 48px;
    gap: 0;
  }

  #tray-items em {
    font-size: 9px;
  }

  .tray-piece,
  .tray-food {
    min-width: 44px;
    min-height: 44px;
    font-size: 25px;
  }

  .cafe-register {
    left: auto;
    right: 4%;
    bottom: 3.2%;
    width: 130px;
    min-height: 98px;
    padding: 8px 10px 10px;
  }

  .till-display {
    padding: 5px 6px;
  }

  .till-display strong {
    font-size: 20px;
  }

  .till-slot {
    min-height: 44px;
    margin-top: 5px;
  }

  .counter-bell {
    left: 49%;
    bottom: 22%;
    width: 57px;
    height: 56px;
  }

  .counter-bell::before {
    left: 7px;
    right: 7px;
    bottom: 9px;
    height: 34px;
  }

  .counter-bell > span {
    left: 20px;
  }

  .customer-payment-zone {
    left: auto;
    right: 8%;
    bottom: 29%;
  }

  .customer-payment-zone > span,
  .customer-payment-zone > small {
    display: none;
  }

  #customer-payment {
    min-width: 76px;
    min-height: 48px;
    font-size: 17px;
  }

  .change-saucer {
    right: auto;
    left: 4%;
    bottom: 3%;
    width: 45%;
    min-height: 84px;
  }

  .cash-drawer {
    top: auto;
    bottom: calc(100% + 7px);
    left: auto;
    right: -4px;
    width: min(88vw, 390px);
    min-height: 88px;
    transform-origin: bottom;
  }

  .cash-option,
  .change-coin,
  .change-piece {
    min-width: 44px;
    min-height: 44px;
  }

  .cafe-feedback {
    top: calc(var(--art-height) + 53px);
    right: 4%;
    width: 54%;
    padding: 8px 10px;
    border-width: 2px;
    border-radius: 15px;
    font-size: 12px;
  }

  .cafe-scene .cafe-feedback:not(:empty) {
    padding: 8px 10px;
    border-radius: 15px;
  }

  .cafe-feedback::after {
    right: 17%;
    bottom: auto;
    top: -13px;
    border-width: 7px;
    border-top-color: transparent;
    border-bottom-color: rgba(255,250,224,.96);
  }

  @keyframes cafeTrayServe {
    0% { transform: rotate(-1deg); }
    55% { transform: translate(var(--serve-x,42vw), var(--serve-y,-29vh)) rotate(3deg) scale(.84); opacity: 1; }
    100% { transform: translate(var(--serve-x,42vw), var(--serve-y,-29vh)) rotate(3deg) scale(.84); opacity: 0; }
  }

  @keyframes cafePaymentMove {
    0% { opacity: 1; transform: none; }
    75% { opacity: 1; transform: translate(-20vw, 32vh) rotate(-7deg) scale(.84); }
    100% { opacity: 0; transform: translate(-20vw, 32vh) rotate(-7deg) scale(.76); }
  }
}

@media (max-width: 390px) {
  .job-title > span {
    display: none;
  }

  .cafe-register {
    right: 3%;
    width: 120px;
  }

  .serving-tray,
  .change-saucer {
    left: 3%;
    width: 43%;
  }

  .tray-piece,
  .tray-food {
    min-width: 44px;
    min-height: 44px;
  }

  .counter-bell {
    left: 45%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cafe-scene .scene-art,
  .cafe-customer img,
  .food-prop,
  #menu-grid > button,
  .serving-tray,
  .cafe-register,
  .counter-bell,
  .customer-payment-zone,
  #customer-payment,
  .change-saucer,
  .tray-piece,
  .tray-food,
  .cash-drawer,
  .cash-option,
  .change-coin,
  .change-piece,
  .budget-coins > * {
    animation: none !important;
    transition-duration: .01ms !important;
  }

  .cafe-customer.arriving img,
  .cafe-customer.celebrating img,
  .cafe-customer.changing img {
    opacity: 1;
    transform: none;
  }

  .serving-tray.tray-serving,
  .customer-payment-zone.payment-moving,
  #customer-payment.payment-moving {
    opacity: .35;
  }
}
[data-motion="reduced"] .cafe-scene .scene-art,
[data-motion="reduced"] .cafe-customer img,
[data-motion="reduced"] .food-prop,
[data-motion="reduced"] #menu-grid > button,
[data-motion="reduced"] .serving-tray,
[data-motion="reduced"] .cafe-register,
[data-motion="reduced"] .counter-bell,
[data-motion="reduced"] .customer-payment-zone,
[data-motion="reduced"] #customer-payment,
[data-motion="reduced"] .change-saucer,
[data-motion="reduced"] .tray-piece,
[data-motion="reduced"] .tray-food,
[data-motion="reduced"] .cash-drawer,
[data-motion="reduced"] .cash-option,
[data-motion="reduced"] .change-coin,
[data-motion="reduced"] .change-piece,
[data-motion="reduced"] .budget-coins > *{animation:none!important;transition-duration:.01ms!important}
[data-motion="reduced"] .cafe-customer.arriving img,
[data-motion="reduced"] .cafe-customer.celebrating img,
[data-motion="reduced"] .cafe-customer.changing img{opacity:1;transform:none}
[data-motion="reduced"] .serving-tray.tray-serving,
[data-motion="reduced"] .customer-payment-zone.payment-moving,
[data-motion="reduced"] #customer-payment.payment-moving{opacity:.35}

/* Child-test pass: readable actions, visible food, and plate/till controls kept together. */
.cafe-chalkboard p{font-size:clamp(14px,1.12vw,18px);font-weight:1000;line-height:1.15}.food-prop>span,#menu-grid>button>span{opacity:.94;transform:scale(.78)}.food-prop strong,#menu-grid>button strong{bottom:-25px;opacity:1;transform:translateX(-50%);font-size:12px}.food-prop small,#menu-grid>button small{right:-4px;bottom:1px;min-width:35px;font-size:13px}.food-prop[data-item="soup"]{left:2%;top:45%;width:11%;height:14%}.food-prop[data-item="tea"]{left:15%;top:39%;width:13%;height:17%}.food-prop[data-item="roll"]{left:28%;top:43%;width:11%;height:15%}.food-prop[data-item="muffin"]{left:39%;top:44%;width:12%;height:14%}.cafe-feedback{font-size:clamp(15px,1.25vw,18px);font-weight:1000}.tray-food{align-self:end;translate:0 7px}.tray-food:nth-child(1){rotate:-7deg}.tray-food:nth-child(2){translate:-5px 5px;rotate:4deg}.tray-food:nth-child(3){translate:-10px 7px;rotate:-2deg}#tray-items{align-items:flex-end;overflow:visible}

@media(max-width:850px){
  .cafe-mobile-task{font-size:clamp(17px,3.8vw,20px);line-height:1.18}
  .food-prop[data-item="soup"]{left:1%;top:calc(var(--art-height)*.45);width:13%;height:calc(var(--art-height)*.25)}
  .food-prop[data-item="tea"]{left:14%;top:calc(var(--art-height)*.38);width:15%;height:calc(var(--art-height)*.29)}
  .food-prop[data-item="roll"]{left:28%;top:calc(var(--art-height)*.42);width:14%;height:calc(var(--art-height)*.27)}
  .food-prop[data-item="muffin"]{left:40%;top:calc(var(--art-height)*.43);width:14%;height:calc(var(--art-height)*.26)}
  .food-prop strong,#menu-grid>button strong{bottom:-21px;font-size:14px}
  .food-prop small,#menu-grid>button small{bottom:2px;font-size:14px}
  .counter-bell{top:calc(var(--art-height) + 96px);bottom:auto}
  .serving-tray{top:calc(var(--art-height) + 146px);bottom:auto}
  .cafe-register{top:calc(var(--art-height) + 146px);bottom:auto}
  .customer-payment-zone{top:calc(var(--art-height) + 92px);bottom:auto}
  .change-saucer{top:calc(var(--art-height) + 146px);bottom:auto}
  .cash-drawer{top:calc(100% + 8px);bottom:auto}
  .cafe-feedback{top:calc(var(--art-height) + 58px);font-size:16px}
}

@media(max-width:560px){
  .cafe-mobile-task{font-size:17px}
  .counter-bell{top:calc(var(--art-height) + 94px)}
  .serving-tray,.cafe-register,.change-saucer{top:calc(var(--art-height) + 145px)}
}

/* Food should read as food on the plate, not tiny controls on top of it. */
.serving-tray .tray-food{
  min-width:68px!important;
  min-height:68px!important;
}
.serving-tray .tray-food>span{font-size:48px}
.serving-tray .tray-food>small{min-width:28px;padding:3px 5px;font-size:10px}

@media(max-width:560px){
  .serving-tray .tray-food{min-width:54px!important;min-height:54px!important}
  .serving-tray .tray-food>span{font-size:40px}
}

/* The food is already painted into the room. These are touch targets and small shelf labels only. */
.food-prop > .food-picture,
#menu-grid > button > .food-picture {
  display: none !important;
}

.food-prop strong,
#menu-grid > button strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: none;
  padding: 4px 7px;
  border: 2px solid #79512c;
  border-radius: 8px;
  background: #fff1bd;
  box-shadow: 0 3px 3px rgba(64,32,16,.3);
  color: #5b341d;
  opacity: 1;
  transform: translateX(-50%);
}

.food-prop strong em,
#menu-grid > button strong em {
  padding-left: 5px;
  border-left: 1px solid rgba(91,52,29,.35);
  color: #8b4d28;
  font-style: normal;
  font-weight: 1000;
  white-space: nowrap;
}

/* Match each touch target to the illustrated counter. Soup belongs on the
   copper pot by the stove; the real cake sits below the bread rolls. */
.food-prop[data-item="roll"] { left: 0; top: 39%; width: 11%; height: 14%; }
.food-prop[data-item="cake"] { left: 5.5%; top: 52%; width: 10.5%; height: 13%; }
.food-prop[data-item="tea"] { left: 16.5%; top: 49%; width: 8%; height: 14%; }
.food-prop[data-item="muffin"] { left: 24.5%; top: 44%; width: 13%; height: 15%; }
.food-prop[data-item="soup"] { left: 42.3%; top: 39%; width: 8.8%; height: 15.5%; }
.food-prop[data-item="soup"] strong { bottom: -16px; }

/* In portrait the room art is fitted edge-to-edge, so the painted props use
   their original image coordinates. Lift the guest onto the counter line. */
@media(max-width:850px){
  .cafe-customer { top: calc(var(--art-height) * .39); }
  .food-prop[data-item="roll"] { left: 0; top: calc(var(--art-height) * .36); width: 14%; height: calc(var(--art-height) * .19); }
  .food-prop[data-item="cake"] { left: 5%; top: calc(var(--art-height) * .54); width: 11.5%; height: calc(var(--art-height) * .15); }
  .food-prop[data-item="tea"] { left: 16.5%; top: calc(var(--art-height) * .49); width: 9%; height: calc(var(--art-height) * .18); }
  .food-prop[data-item="muffin"] { left: 25%; top: calc(var(--art-height) * .43); width: 15%; height: calc(var(--art-height) * .20); }
  .food-prop[data-item="soup"] { left: 42.2%; top: calc(var(--art-height) * .39); width: 9%; height: calc(var(--art-height) * .16); }
  .food-prop[data-item="soup"] strong { bottom: -12px; }
}

@media(max-width:560px){
  .food-prop[data-item="cake"] { left: 4%; top: calc(var(--art-height) * .53); width: 13%; height: calc(var(--art-height) * .17); }
  .food-prop[data-item="soup"] { left: 40%; top: calc(var(--art-height) * .37); width: 13%; height: calc(var(--art-height) * .23); }
}

/* Painted-object play: these are transparent touch shapes over the round
   window, fairy lights, flower basket and oven. Nothing is drawn until a
   child touches the object. */
.cafe-window-wonder { left: 20%; top: 20%; width: 21%; height: 30%; border-radius: 50%; }
.cafe-lights-wonder { left: 8%; top: 0; width: 48%; height: 16%; border-radius: 45% 45% 24% 24%; }
.cafe-flowers-wonder { left: 57%; top: 4%; width: 14%; height: 24%; border-radius: 50% 50% 42% 42%; }
.cafe-fire-wonder { left: 49%; top: 33%; width: 15%; height: 28%; border-radius: 48% 48% 24% 24%; }

.cafe-window-wonder::after {
  content: "";
  inset: 4%;
  border-radius: 50%;
  background: linear-gradient(112deg, transparent 18%, rgba(255,251,190,.82) 44%, rgba(255,255,229,.38) 53%, transparent 72%);
  mix-blend-mode: screen;
  transform: translateX(-45%) rotate(-9deg);
}
.cafe-window-wonder::before {
  content: "◆";
  z-index: 2;
  left: 18%;
  top: 55%;
  color: #fff1a3;
  font-size: clamp(9px,1.2vw,17px);
  text-shadow: 0 0 8px #ffe26b;
}
.cafe-window-wonder.is-active::after { animation: cafeWindowSun 1.15s ease-out; }
.cafe-window-wonder.is-active::before { animation: cafeWindowButterfly 1.25s cubic-bezier(.2,.72,.25,1); }

.cafe-lights-wonder::after {
  content: "";
  inset: 16% 3% 20%;
  background:
    radial-gradient(circle at 8% 48%,#fff7b6 0 3px,transparent 6px),
    radial-gradient(circle at 24% 30%,#ffe278 0 3px,transparent 6px),
    radial-gradient(circle at 42% 57%,#fff8c8 0 3px,transparent 6px),
    radial-gradient(circle at 61% 31%,#ffd45d 0 3px,transparent 6px),
    radial-gradient(circle at 78% 60%,#fff8c8 0 3px,transparent 6px),
    radial-gradient(circle at 94% 34%,#ffe278 0 3px,transparent 6px);
  filter: drop-shadow(0 0 8px #ffd65e);
}
.cafe-lights-wonder.is-active::after { animation: cafeLightChase 1.25s steps(6,end); }

.cafe-flowers-wonder::after {
  content: "✿";
  left: 41%;
  top: 38%;
  color: #f08aa1;
  font-size: clamp(15px,2vw,29px);
  text-shadow: -26px 9px #f2be63,25px 13px #9b73c8,7px 28px #d85d78;
  transform-origin: 50% -35%;
}
.cafe-flowers-wonder.is-active::after { animation: cafeFlowersSway 1.2s ease-in-out; }
.cafe-flowers-wonder::before {
  content: "•";
  z-index: 2;
  left: 45%;
  top: 50%;
  color: #f6a2b2;
  font-size: 22px;
  text-shadow: -15px 3px #ffc86f,18px 8px #b28ad5;
}
.cafe-flowers-wonder.is-active::before { animation: cafePetalsFall 1.35s ease-out; }

.cafe-fire-wonder::after {
  content: "";
  inset: 8% 6% 3%;
  border-radius: 50% 50% 38% 38%;
  background: radial-gradient(ellipse at 50% 67%,rgba(255,239,133,.98),rgba(255,134,43,.72) 30%,rgba(225,65,21,.22) 58%,transparent 72%);
  mix-blend-mode: screen;
  transform-origin: 50% 90%;
}
.cafe-fire-wonder::before {
  content: "✦";
  z-index: 2;
  left: 48%;
  top: 52%;
  color: #fff0a2;
  font-size: 14px;
  text-shadow: -22px 17px #ffbd5d,19px 9px #fff3b4,7px -6px #ffb24f;
}
.cafe-fire-wonder.is-active::after { animation: cafeFireDance 1.2s ease-out; }
.cafe-fire-wonder.is-active::before { animation: cafeEmbersRise 1.25s ease-out; }
.cafe-scene[data-scene-wonder-active="cafe-fire"] .steam { opacity:.82;animation-duration:1.05s; }

@media (min-width:851px) {
  .cafe-scene .scene-art { transform:translate(calc(var(--look-x,0) * -8px),calc(var(--look-y,0) * -5px)) scale(1.035); }
  .cafe-scene:is(.customer-served,[data-phase="handoff"],[data-phase="celebrate"],[data-phase="complete"]) .scene-art { transform:translate(calc(var(--look-x,0) * -8px),calc(var(--look-y,0) * -5px)) scale(1.045); }
}

@media(max-width:850px){
  .cafe-window-wonder { left:20%;top:calc(var(--art-height) * .20);width:21%;height:calc(var(--art-height) * .30); }
  .cafe-lights-wonder { left:8%;top:0;width:48%;height:calc(var(--art-height) * .16); }
  .cafe-flowers-wonder { left:57%;top:calc(var(--art-height) * .04);width:14%;height:calc(var(--art-height) * .24); }
  .cafe-fire-wonder { left:49%;top:calc(var(--art-height) * .33);width:15%;height:calc(var(--art-height) * .28); }
}

@keyframes cafeWindowSun { 0%{opacity:0;transform:translateX(-48%) rotate(-9deg)}45%{opacity:.95}100%{opacity:0;transform:translateX(48%) rotate(-9deg)} }
@keyframes cafeWindowButterfly { 0%{opacity:0;transform:translate(-8px,16px) rotate(-16deg)}24%{opacity:1}100%{opacity:0;transform:translate(115px,-38px) rotate(28deg)} }
@keyframes cafeLightChase { 0%,100%{opacity:0;filter:drop-shadow(0 0 2px #ffd65e)}20%,72%{opacity:1;filter:drop-shadow(0 0 13px #ffd65e)} }
@keyframes cafeFlowersSway { 0%,100%{opacity:0;transform:rotate(0)}18%{opacity:1;transform:rotate(-8deg)}46%{opacity:1;transform:rotate(7deg)}72%{opacity:.8;transform:rotate(-3deg)} }
@keyframes cafePetalsFall { 0%{opacity:0;transform:translateY(-12px) rotate(0)}20%{opacity:1}100%{opacity:0;transform:translate(22px,78px) rotate(185deg)} }
@keyframes cafeFireDance { 0%,100%{opacity:0;transform:scale(.75,.55)}28%{opacity:.95;transform:scale(1.08,1.17)}58%{opacity:.72;transform:scale(.92,1.05)} }
@keyframes cafeEmbersRise { 0%{opacity:0;transform:translateY(20px) scale(.6)}22%{opacity:1}100%{opacity:0;transform:translate(11px,-72px) scale(1.15) rotate(70deg)} }

@media(prefers-reduced-motion:reduce){
  .cafe-scene .scene-art{transform:none!important}.cafe-scene[data-scene-wonder-active="cafe-fire"] .steam{animation-duration:4s}
}
[data-motion="reduced"] .cafe-scene .scene-art{transform:none!important}
[data-motion="reduced"] .cafe-scene[data-scene-wonder-active="cafe-fire"] .steam{animation-duration:4s}

/* The guest wrapper stays transparent to the room, but the visible guest is
   touchable so a tap can trigger the shared character bounce. */
.cafe-customer img {
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border-radius: 46%;
  outline: none;
}

#cafe-character:focus-visible {
  outline: none !important;
  filter: drop-shadow(0 17px 8px rgba(49,28,16,.38)) drop-shadow(0 0 15px rgba(255,239,151,.96)) !important;
}

/* Keep the three budget readings and the existing till screen legible without
   adding panels over the illustrated café. */
#challenge-kicker {
  font-size: clamp(12px, .95vw, 16px);
  line-height: 1.08;
}

.chalk-math {
  gap: clamp(16px, 1.6vw, 25px);
  font-size: clamp(11px, .85vw, 14px);
  font-weight: 1000;
}

.chalk-math strong {
  font-size: clamp(19px, 1.5vw, 26px);
  line-height: 1;
}

.till-display {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 7px;
}

.till-display small {
  font-size: clamp(9px, .72vw, 11px);
  line-height: 1.05;
}

.till-display strong {
  font-size: clamp(27px, 2.15vw, 32px);
}

.till-display span {
  overflow: visible;
  font-size: clamp(9px, .72vw, 11px);
  line-height: 1.05;
  white-space: normal;
  text-overflow: clip;
}

@media(min-width:851px){
  .cafe-register { width: clamp(170px, 13vw, 200px); }
}

@media(max-width:850px){
  .cafe-mobile-task { font-size: 19px; line-height: 1.18; }
  #challenge-kicker { font-size: clamp(12px, 1.9vw, 15px); }
  .chalk-math { gap: 8px; font-size: clamp(10px, 1.55vw, 12px); }
  .chalk-math strong { font-size: clamp(17px, 2.4vw, 20px); }
  .cafe-register { width: 160px; }
  .till-display small,.till-display span { font-size: 10px; }
  .till-display strong { font-size: 27px; }
}

@media(max-width:560px){
  .cafe-chalkboard h1,.cafe-chalkboard .budget-coins { display: none; }
  .cafe-mobile-task { font-size: 19px; }
  #challenge-kicker { font-size: clamp(12px, 3vw, 14px); }
  .chalk-math { gap: 3px; margin-top: 5px; padding-top: 4px; font-size: clamp(10px, 2.6vw, 12px); letter-spacing: 0; }
  .chalk-math strong { font-size: clamp(17px, 4.2vw, 20px); }
  .cafe-register { width: 142px; }
  .till-display small,.till-display span { font-size: 10px; }
  .till-display strong { font-size: 25px; }
}

/* Keep selected food readable against a warm, lower-glare serving plate. */
.serving-tray {
  border-color:#b88d5b;
  background:radial-gradient(ellipse at 50% 35%,#eacb8b 0 34%,#c7955c 65%,#825538 100%);
  box-shadow:inset 0 0 0 3px rgba(84,50,27,.32),0 11px 0 #593722,0 20px 20px rgba(61,30,15,.34);
}
.serving-tray.tray-ready{filter:drop-shadow(0 0 10px rgba(255,214,102,.62))}
.serving-tray .tray-food{filter:contrast(1.08) saturate(1.18) drop-shadow(0 6px 3px rgba(48,25,13,.62))}

/* The labels sit beside the painted cake and teapot instead of covering them. */
.food-prop[data-item="cake"] strong{left:15%}
.food-prop[data-item="tea"] strong{left:15%}
/* Illustrated counter props replace the old CSS-built till and bell. */
.cafe-register{
  width:clamp(190px,16vw,245px);min-height:0;aspect-ratio:1;padding:0;border:0;
  border-radius:0;background:none;box-shadow:none;transform:none;overflow:visible
}
.cafe-register-art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;filter:drop-shadow(0 10px 6px rgba(51,25,13,.35))}
.cafe-register .till-display{position:absolute;z-index:2;left:36%;top:4%;width:38%;height:20%;padding:3px 5px;border:0;background:transparent;box-shadow:none;overflow:hidden}
.cafe-register .till-display small,.cafe-register .till-display span{font-size:clamp(6px,.55vw,9px)}
.cafe-register .till-display strong{font-size:clamp(16px,1.45vw,24px)}
.cafe-register .till-slot{position:absolute;z-index:3;right:5%;top:29%;width:18%;height:31%;min-height:0;margin:0;border:0;background:transparent}
.cafe-register .cash-drawer{z-index:4}
.counter-bell{border:0;background:none;box-shadow:none;border-radius:18%;overflow:visible}
.counter-bell::before,.counter-bell::after{display:none}
.counter-bell>img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;filter:drop-shadow(0 7px 4px rgba(61,31,14,.4))}
.counter-bell>span{display:none}
@media(max-width:560px){.cafe-register{width:clamp(150px,42vw,185px)}}

/* School trial visibility pass: the illustrated till now reads as one large
   amount, and the real bell has an iPad-friendly touch silhouette. */
.cafe-register .till-display{display:grid;place-items:center;padding:0}
.cafe-register .till-display small,.cafe-register .till-display span{display:none!important}
.cafe-register .till-display strong{font-size:clamp(27px,2.35vw,38px);line-height:1;text-align:center}
.counter-bell{width:clamp(84px,7.4vw,108px);height:clamp(78px,7vw,102px)}
@media(max-width:850px){
  .counter-bell{width:88px;height:82px}
  .cafe-register .till-display strong{font-size:31px}
}
@media(max-width:560px){
  .counter-bell{width:78px;height:74px}
  .cafe-register .till-display strong{font-size:28px}
}
