/* Anchors sit on the painted surfaces. The room and workbench have different sightlines. */
.room-art { position: relative; isolation: isolate; container-type: inline-size; }
.room-base { display: block; width: 100%; height: auto; }
.room-item {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none;
}
.room-item img { display: block; width: 100%; height: 100%; }
.room-jar, .room-basket, .room-cake, .room-mixer, .room-flowers { z-index: 2; }
.room-jar::before, .room-basket::before, .room-cake::before, .room-mixer::before, .room-flowers::before {
  content: ""; position: absolute; z-index: -1; bottom: -2%; left: 8%; width: 86%; height: 11%;
  background: radial-gradient(ellipse, #6b452e81 0%, #80502d44 42%, transparent 72%);
  transform: skewX(12deg);
}
.room-clock, .room-mitts, .room-bunting {
  filter: drop-shadow(.13cqw .22cqw .12cqw #73432847);
}
.room-jar { left: 21.8%; top: 21.1%; width: 6.8%; }
.room-cake { left: 22.7%; top: 39.4%; width: 6.9%; }
.room-basket { left: 23.2%; top: 57%; width: 10.5%; }
.room-flowers { left: 39.5%; top: 63%; width: 11.3%; }
.room-clock { left: 84%; top: 19.9%; width: 7.8%; }
.room-mitts { left: 93.5%; top: 26%; width: 12%; }
.room-mixer { left: 93.35%; top: 82%; width: 11.7%; }
.room-bunting { left: 50%; top: 39.2%; width: 35%; }
.counter-art .room-jar { left: 12.4%; top: 12%; width: 5.1%; }
.counter-art .room-cake { left: 21.1%; top: 12%; width: 4.8%; }
.counter-art .room-basket { left: 17%; top: 22.8%; width: 8.2%; }
.counter-art .room-flowers { left: 35.8%; top: 47.9%; width: 7.1%; }
.counter-art .room-clock { left: 81%; top: 16%; width: 7.2%; }
.counter-art .room-mixer { left: 89.9%; top: 54.8%; width: 7.7%; }
.room-wrap { max-width: 1530px; }
.room-stage, .room-preview { overflow: hidden; border: 2px solid #966949; border-radius: 20px; }
.room-stage { margin: clamp(8px, 1.15vw, 17px) auto 0; }
.entrance-stage { max-width: min(100%, 154dvh); }
.room-view { position: relative; overflow: hidden; background: #ecd3ac; }
.delivery-picture { position: relative; container-type: inline-size; }
.pup-name {
  position: absolute; transform: translate(-50%, -100%); padding: .03em .55em;
  border-radius: 1em; background: #fff8e9; color: #44203c;
  font-size: clamp(14px, 1.65vw, 24px); font-weight: 850; line-height: 1.3;
}
.pup-pip { left: 26%; top: 62%; }
.pup-coco { left: 73%; top: 26%; }
.entrance-stage .room-view { container-type: inline-size; }
.coco-speech { right: 35.5%; bottom: 49%; }
.pip-speech { left: 46%; top: 49%; }
.pip-speech svg { transform: rotate(180deg); }
.pup-speech {
  position: absolute; margin: 0;
  padding: .38em .8em; isolation: isolate;
  color: #44203c; font-size: clamp(14px, 2.9cqw, 40px);
  font-weight: 850; line-height: 1.15; white-space: nowrap;
}
.pup-speech svg {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  z-index: -1; fill: #fff8e9; stroke: #684637; stroke-width: 2px; stroke-linejoin: round;
}
.room-view .baker-up, .room-view .baker-sound { top: 9px; }
.room-stage .baker-up, .room-stage .baker-sound, .creek-heading .square {
  border-radius: 50%; background: #fff7e9; color: #3d2148; border: 1.5px solid #59344e;
  width: 44px; height: 44px; box-shadow: 0 2px 0 #75472f55;
}
.room-view .baker-up { left: 9px; }
.room-view .baker-sound { right: 9px; }
.room-start {
  background-color: #dfaa77;
  background-image: repeating-linear-gradient(177deg, #aa6c3d0f 0 1px, transparent 2px 12px),
    linear-gradient(180deg, #e7b483, #f4cea1 65%, #e6b98a);
  border-top: 3px solid #ab754e;
}
.room-start {
  display: flex; justify-content: center; gap: clamp(12px, 2.5vw, 36px);
  padding: clamp(13px, 1.4vw, 23px);
}
.room-primary, .room-secondary {
  min-height: 48px; line-height: 1.1; font-size: clamp(19px, 2.3vw, 32px);
  padding: .34em 1.1em; border: 2px solid #583247; border-radius: 100px;
  box-shadow: 0 3px 0 #58324740;
}
.room-secondary { background: #fff7e9; }
.town-web .room-primary { background: #753454; color: #fff9e8; }
.room-start { position: relative; align-items: center; padding-inline: 56px; }
.room-start :is(.room-primary, .room-secondary) { width: min(44%, 245px); white-space: nowrap; }
.room-start .baker-up, .room-start .baker-sound {
  position: absolute; inset-block: calc(50% - 22px) auto;
}
.room-start .baker-up { left: 8px; }
.room-start .baker-sound { right: 8px; }
.baking-stage {
  position: relative; container-type: inline-size; max-width: min(100%, 160dvh);
  background: #edaf72; border-color: #ad7957;
}
.baking-stage .ticket {
  --ticket-number-size: clamp(36px, 5.45cqw, 90px);
  inset: 10.3% auto auto 49%; transform: translateX(-50%); width: 44%;
  min-height: 27.5%; align-content: center; gap: clamp(3px, .52cqw, 9px);
  padding: .8cqw 1.15cqw 1cqw;
}
.baking-stage .ticket, .creek-counter {
  color: #44203c;
  background: radial-gradient(ellipse at 45% 40%, #fff5d9, #ffebc2);
  border: 2px solid #d4ac76; border-radius: clamp(16px, 2.7cqw, 42px);
  box-shadow: inset 0 0 0 2px #fff8e5, 0 3px 0 #ad7b515e, 0 4px 10px #61371436;
}
.baking-stage .ticket > small { font-size: clamp(13px, 1.85cqw, 30px); font-weight: 850; }
.baking-stage .ticket > small .icon { width: 1.08em; height: 1.08em; }
.baking-stage .ticket h2 {
  font-size: clamp(24px, 3.4cqw, 58px); line-height: 1.03;
  overflow-wrap: break-word; text-wrap: balance;
}
.baking-stage .ticket:is([data-step="make"], [data-step="pack"], [data-step="counted"], [data-step="wrap"]) h2,
.baking-stage .ticket .answer {
  font-size: var(--ticket-number-size); font-weight: 900;
  font-variant-numeric: tabular-nums; letter-spacing: -.025em;
}
.baking-stage .ticket:is([data-step="counted"], [data-step="wrap"]) h2 { white-space: nowrap; }
.ticket-response { display: grid; justify-items: center; gap: 3px; }
.ticket-response b { font-size: clamp(15px, 1.88cqw, 31px); }
.ticket-response small { font-size: clamp(14px, 1.3cqw, 20px); line-height: 1.2; }
.ticket-response .ticket-actions { gap: clamp(6px, .8cqw, 13px); justify-content: center; }
.ticket-response .wood { min-height: 44px; font-size: clamp(16px, 1.6cqw, 24px); padding: 4px 14px; }
.ticket-response .answer {
  display: grid; place-items: center; padding: 0 2px;
  width: max(54px, 1.5em); min-height: max(54px, 1.25em);
  line-height: 1; color: #38243c;
}
.room-worktop {
  position: absolute; left: 2%; right: 2.9%; bottom: 3.8%;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: .75%;
  align-items: end;
}
.room-worktop .bake-surface {
  position: relative; inset: auto; transform: none; width: 100%; height: auto;
  margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
  background-color: transparent; background-repeat: no-repeat; background-size: 100% 100%;
}
.room-worktop .tray { aspect-ratio: 835 / 400; background-image: var(--tray-art, url(./images/bakery-room/tray.webp)); }
.room-worktop .box { aspect-ratio: 745 / 399; background-image: url(./images/bakery-room/box.webp); }
.room-worktop .box:not(.wrapped)::before { content: none; }
.room-worktop .bake-grid { position: absolute; width: auto; height: auto; outline: 0; background: transparent; }
.room-worktop .tray .bake-grid { inset: 20% 11% 12%; }
.room-worktop .box .bake-grid { inset: 26% 10% 23%; }
.room-worktop .bake-surface:not(.wrapped) .surf-label {
  width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; border: 0;
}
.room-worktop .pastry-slot, .dragging.pastry-slot { grid-template: minmax(0, 1fr) / minmax(0, 1fr); border-radius: 13%; }
.room-worktop .cookie { width: 88%; height: 87%; max-height: none; object-fit: contain; }
.room-worktop .open-themed-box { background-image: none; }
[data-box-style="box-puppy"] { --paper-color: #acbc75; }
[data-box-style="box-puppy"] .box-liner { filter: contrast(1.15) brightness(.89); }
[data-box-style="box-berry"] { --paper-color: #ffc0aa; }
[data-box-style="box-umbrella"] { --paper-color: #bedff4; }
[data-box-style="box-moon"] { --paper-color: #7682bc; }
[data-box-style="box-moonlit-bakery"] { --paper-color: #838bb2; }
[data-box-style="box-berry-picnic"] { --paper-color: #f1d59d; }
.box-liner {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--paper-color) url(./images/bakery-room/box.webp) center / 100% 100%;
  background-blend-mode: luminosity;
  mask: url(./images/bakery-room/box.webp) center / 100% 100% no-repeat;
}
/* Tint the neutral paper grain so the kraft base does not shift the lid hue. */
:is([data-box-style="box-umbrella"], [data-box-style="box-moon"]) .box-liner {
  background-image: linear-gradient(var(--paper-color), var(--paper-color)), url(./images/bakery-room/box.webp);
  background-color: gray;
  background-blend-mode: multiply, luminosity;
}
/* Use the printed front panel of the same carton while its lid is open. */
[data-box-style="box-berry"] .box-liner::after {
  content: ""; position: absolute; inset: 78% 0 0;
  background: url(./images/bakery-room/box-berry.webp) center bottom / 100% 455% no-repeat;
}
[data-box-style="box-moonlit-bakery"] .box-liner::after,
[data-box-style="box-berry-picnic"] .box-liner::after {
  content: ""; position: absolute; inset: 78% 0 0;
  background: var(--tin-art) center bottom / 100% 400% no-repeat;
}
[data-box-style="box-moonlit-bakery"] .box-liner::after {
  border-top: 2px solid #e6bf72;
}
.sealed-box .box-liner { visibility: hidden; }
.room-worktop .tray .cookie path[stroke-dasharray] { stroke: #3f6945; stroke-width: 2.5; fill: none; }
.room-worktop .tray .cookie text, .room-worktop .dot::after { display: none; }
.room-worktop .drag-origin .cookie { opacity: 0; }
.dragging.pastry-slot .cookie { width: 88%; height: 87%; max-height: none; object-fit: contain; }
.room-worktop .box .cookie { pointer-events: none; }
.parcel-lid, .parcel-seal { position: absolute; pointer-events: none; }
.parcel-lid { left: -.32%; top: -.42%; width: 100.64%; max-width: none; height: 99.37%; transform-origin: 50% 0; }
.parcel-lid { container-type: inline-size; }
.parcel-lid > img { display: block; width: 100%; height: 100%; }
/* Each lid carries the shop sign. Sticker pairs are unlocked separately. */
.parcel-brand {
  position: absolute; left: 50%; top: 36%; transform: translate(-50%, -50%) rotate(-2deg);
  width: 35%; padding: 1.3% 1%; text-align: center; color: #603146;
  font-size: 5.3cqw; font-weight: 950; line-height: .97; letter-spacing: -.035em;
  border: max(1px, .32cqw) solid #a56543; border-radius: 46% 46% 32% 32% / 48% 48% 36% 36%;
  background: linear-gradient(150deg, #fff5d7, #ffe1a5);
  box-shadow: inset 0 0 0 .45cqw #fff5d5, 0 .45cqw 0 #a6603e77;
}
.parcel-brand span { display: block; }
.parcel-seal { left: 45.43%; top: 76.47%; width: 9.15%; height: 16.39%; }
@media (prefers-reduced-motion: no-preference) {
  .room-worktop .tray .new-cookie { animation: cookie-pop 240ms ease-out; }
  .closing-box .parcel-lid { animation: fold-lid 740ms var(--seal-delay) both; }
  .closing-box .parcel-seal { animation: stamp-seal 740ms var(--seal-delay) both; }
}
@keyframes cookie-pop {
  from { transform: scale(.82); }
  50% { transform: translateY(-4px) scale(1.07); }
  to { transform: none; }
}
@keyframes fold-lid {
  0% { transform: perspective(650px) rotateX(86deg); }
  58% { transform: perspective(650px) rotateX(-3deg); }
  72% { transform: perspective(650px) rotateX(1deg); }
  82%, 100% { transform: none; }
}
@keyframes stamp-seal {
  0%, 58% { opacity: 0; transform: translateY(-30%) rotate(-9deg) scale(1.25); }
  77% { opacity: 1; transform: scale(1.08, .94); }
  92%, 100% { opacity: 1; transform: none; }
}
.room-decor-link { align-self: center; background: none; border: 0; text-decoration: underline; padding: 4px 10px; min-height: 44px; font-size: 18px; }
.decor-tabs { display: flex; gap: 5px; width: 100%; min-width: 0; padding: 4px;
  border-radius: 18px; border: 1px solid #c9a988; background: #f2e1c7; }
.decor-tab { flex: 1; min-width: 0; min-height: 44px; border: 1px solid transparent; background: transparent; border-radius: 14px;
  padding: 5px 4px; font-size: clamp(15px, 1.5vw, 22px); line-height: 1.05; }
.town-web .decor-tab[aria-pressed="true"] { background: #6a3652; color: #fff7e9; }
.room-decorator { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(312px, 1fr); gap: clamp(12px, 1.6vw, 24px); align-items: start; }
.room-preview { position: relative; background: #f1dec2; }
.room-preview-tag { position: absolute; top: 9px; left: 9px; background: #fff7e9; border: 1.5px solid #55354e; border-radius: 40px; padding: 3px 12px; font-size: clamp(14px, 1.3vw, 21px); font-weight: 900; }
@media (max-width: 520px) {
  .room-preview:has(.room-art) .room-preview-tag {
    position: static; display: block; width: fit-content; margin: 4px 8px;
  }
}
.workshop-table {
  display: grid; place-items: center; aspect-ratio: 740 / 368;
  background: #eeb981 url(./images/bakery-room/counter.webp) center bottom / 205% auto no-repeat;
}
.sample-box { display: block; position: relative; width: 74%; aspect-ratio: 745 / 399; }
.sample-box > img:first-child, .sample-tray { display: block; width: 100%; height: 100%; }
.sample-tray { width: 86%; max-height: 95%; object-fit: contain; height: auto; }
.sample-box .illustrated-parcel, .sealed-box .illustrated-parcel { inset: 0; width: 100%; height: 100%; }
.illustrated-parcel > img { object-fit: fill; }
[data-box-style="box-moonlit-bakery"] { --tin-art: url(./images/bakery-room/box-moonlit-bakery.webp); }
[data-box-style="box-berry-picnic"] { --tin-art: url(./images/bakery-room/box-berry-picnic.webp); }
/* Project the lid and front panel separately. The lid meets the front at
   75% in the tin artwork and at 82% on the other closed parcels. */
:is([data-box-style="box-moonlit-bakery"], [data-box-style="box-berry-picnic"]) .illustrated-parcel > img {
  height: 109.333%; clip-path: inset(0 0 25% 0);
}
:is([data-box-style="box-moonlit-bakery"], [data-box-style="box-berry-picnic"]) .illustrated-parcel::after {
  content: ""; position: absolute; inset: calc(82% - .5px) 0 0;
  background: var(--tin-art) center bottom / 100% 400% no-repeat;
}
.room-worktop .sealed-box:has(.illustrated-parcel) { background-image: none; }
.sealed-box:has(.illustrated-parcel) .bake-grid { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .closing-box .box-liner,
  .closing-box:has(.illustrated-parcel) .bake-grid { animation: cover-cookies 740ms var(--seal-delay) both; }
}
@keyframes cover-cookies {
  0%, 54% { visibility: visible; }
  55%, 100% { visibility: hidden; }
}
.room-supplies { border: 1.5px solid #ab8a74; border-radius: 18px; background: #fffaef; padding: clamp(12px, 1.4vw, 22px); display: grid; gap: 14px; }
.room-supplies > .decor-tabs { width: 100%; margin: 0; }
.room-supplies > .decor-tabs .decor-tab { flex: 1; padding-inline: 4px; }
.room-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.room-choices:has(> :last-child:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.room-choice { display: grid; justify-items: center; grid-template-rows: 1fr auto; align-items: center;
  text-align: center; padding: 7px 5px; border: 1.5px solid #c5ad99; border-radius: 14px; background: #fff7e9; }
.room-choice[aria-pressed="true"] { background: #f2e1f1; border-color: #684768; box-shadow: inset 0 0 0 1px #684768; }
.room-choice-art { display: flex; align-items: center; justify-content: center; width: 100%; height: clamp(42px, 4.2vw, 64px); }
.room-choice-art > img { object-fit: contain; width: 83%; height: 91%; }
.room-choice-art > img:not(:only-child) { width: auto; max-width: 37%; height: 72%; }
.room-choice-art .sample-box { width: auto; height: 90%; }
.room-choice-caption { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 3px; }
.room-choice-caption strong { font-size: clamp(15px, 1.15vw, 18px); line-height: 1.18; }
.room-choice small { font-size: 14px; font-weight: 700; }
.room-selection { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.room-selection p { flex-basis: 100%; }
.decor-price { display: inline-flex; align-items: center; gap: .28em; font-weight: 850; }
.decor-price img { width: 1.2em; height: 1.2em; object-fit: contain; mix-blend-mode: multiply; }
.room-selection > .decor-price { font-size: clamp(19px, 1.6vw, 24px); }
.room-choices { padding-top: 12px; border-top: 1px solid #c9ad98; }
@media (min-width: 880px) {
  .room-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.room-selection h2 { font-size: clamp(24px, 2.3vw, 34px); margin-bottom: 4px; }
.room-selection p { font-weight: 750; font-size: 16px; }
.room-selection p + p { margin-top: 4px; }
@container (max-width: 800px) {
  .baking-stage .ticket:is([data-step="remainder"], [data-step="total"]) { top: 4%; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .room-page:has(.baking-stage) .town-mast { display: none; }
  .room-wrap:has(.baking-stage) { padding-block: 0; }
  .baking-stage { max-width: min(100%, 177dvh); margin-block: 0; }
  .baking-stage .ticket { top: 5%; }
}
@media (max-width: 700px) {
  .room-wrap { padding-inline: 8px; }
  .room-stage { border-radius: 15px; }
  .entrance-stage { max-width: 100%; }
  .room-start { gap: 6px; padding: 9px 51px; }
  .room-start :is(.room-primary, .room-secondary) { flex: 1; max-width: 220px; min-width: 0; padding-inline: 4px; font-size: clamp(16px, 4.2vw, 22px); }
  .room-start .baker-up { left: 3px; }
  .room-start .baker-sound { right: 3px; }
  .room-view .baker-up, .room-view .baker-sound { top: 4px; }
  .room-view .baker-up { left: 4px; }
  .room-view .baker-sound { right: 4px; }
  .room-decorator { grid-template-columns: 1fr; }
  .room-decor-title { flex-wrap: wrap; }
  .room-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .room-choice-art { height: 40px; }

}
@media (max-width: 600px) and (orientation: landscape) {
  .baking-stage .room-view { min-height: 285px; background: #edaf72; }
  .baking-stage .ticket:is([data-step="remainder"], [data-step="total"]) {
    width: 66%; top: 1%; gap: 2px; padding: 3px 6px 5px;
  }
  .baking-stage .ticket:is([data-step="remainder"], [data-step="total"]) h2 { font-size: clamp(20px, 3.8cqw, 24px); }
}
@media (max-width: 620px) and (orientation: portrait) {
  .baking-stage .room-view {
    display: grid; justify-items: center; align-items: start; overflow: hidden;
    min-height: clamp(175px, 48cqw, 280px); padding: 15px 0 12px;
  }
  .baking-stage .counter-art { position: absolute; top: 0; left: -18%; width: 136%; }
  .baking-stage .baker-up, .baking-stage .baker-sound { top: auto; bottom: 4px; }
  .baking-stage .ticket {
    --ticket-number-size: clamp(36px, 6.85cqw, 40px);
    position: relative; inset: auto; transform: none; width: 55%; min-height: 0; padding: 6px 6px 9px;
  }
  .baking-stage .ticket:is([data-step="remainder"], [data-step="total"], [data-step="counted"], [data-step="wrap"]) { top: auto; width: max(60%, 200px); }
  .baking-stage .ticket h2 { font-size: clamp(22px, 5.1cqw, 31px); }
  .baking-stage .ticket-response b { font-size: 14px; }
  .room-worktop {
    position: relative; inset: auto; grid-template-columns: 1fr; justify-items: center;
    gap: 8px; padding: 0 4px 12px;
    background: repeating-linear-gradient(178deg, transparent 0 11px, #c2805017 12px 13px), #edaf72;
  }
  .room-worktop .bake-surface { max-width: 420px; }
  .room-worktop .box { width: 90%; }
}
