/* ===== Cozy cooking station: paper ticket, big piadina, bowls, stove, plate (loaded last) ===== */
:root { --paper: #fffdf5; --paperline: rgba(120,160,200,.18); --ink2: #3b2a20; --ceram1: #fffaf1; --ceram2: #ecdcc3; --ceramshade: #d3bc98;
  --counter1: #ecd2a8; --counter2: #e4c697; --board1: #d9a96b; --board2: #b9844a; }
body[data-theme="night"] { --counter1: #4a4166; --counter2: #433a5e; --board1: #a77d55; --board2: #7d5a3a; }

/* during a run the side panels slim down so the kitchen gets the room */
@media (min-width: 1101px) { body[data-screen="game"] #shell { grid-template-columns: 255px minmax(0, 1fr) 265px; gap: 18px; padding-left: 24px; padding-right: 24px; } }
/* shorter laptop screens (15.6" with the browser bars): less frame around everything */
@media (min-width: 1101px) and (max-height: 820px) {
  #shell { padding-top: 18px; padding-bottom: 52px; } /* stay above the wooden counter strip at the bottom */
  #kitchen { padding: 6px 10px; }
  .steps { margin: 0 0 2px !important; } .step small { font-size: .58rem; } .step span { width: 26px; height: 26px; font-size: .85rem; }
  #stageBody .hint { margin-bottom: 6px; padding: 4px 12px; font-size: .76rem; border-width: 4px; }
  .covbars { padding: 3px 10px; font-size: .74rem; } .covbars > small { display: none; }
}

/* the counter top everything happens on */
#kitchen { background: repeating-linear-gradient(90deg, var(--counter1) 0 140px, var(--counter2) 140px 141px, var(--counter1) 141px 280px),
  linear-gradient(180deg, rgba(255,255,255,.18), transparent 30%); }

/* ---------- order ticket (every stage between taking the order and serving) ---------- */
.want .wn, .tpat { display: none; }
#station:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) {
  display: grid; grid-template-columns: 172px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 4px 14px; align-items: start; }
#station:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) > #counterWrap { grid-row: 1 / 3; position: sticky; top: 0; }
#station:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) > #stepsWrap,
#station:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) > #stageBody { grid-column: 2; min-width: 0; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .counter { flex-direction: column; align-items: center; gap: 0; border: 0; margin: 4px 0 0; padding: 0; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .custwrap { padding: 0; z-index: 2; animation: none; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .say { display: none; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .counter .cust { width: 78px; height: 78px; font-size: 48px; border-radius: 50%; overflow: hidden; align-items: center;
  background: radial-gradient(circle at 50% 30%, #fff, #f6e3c4); box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--wood1), 0 6px 12px rgba(60,30,10,.25); }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .counter .cust .sprite { animation: none; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .counter .cust img { object-fit: cover; object-position: 50% 8%; filter: none; transform: scale(1.5); transform-origin: 50% 0; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .bubble {
  width: 100%; box-sizing: border-box; margin: -26px 0 0; padding: 34px 12px 22px; border: 0; border-radius: 3px; color: var(--ink2);
  background: repeating-linear-gradient(180deg, transparent 0 25px, var(--paperline) 25px 26px), var(--paper);
  box-shadow: 0 8px 16px rgba(60,30,10,.22); transform: rotate(-1.2deg);
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 8px repeat-x;
          mask: linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 8px repeat-x; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .bubble::before,
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .bubble::after { display: none; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .ribbon { display: block; background: none; color: var(--ink2); padding: 0 0 6px; margin: 0 0 8px; border-radius: 0; border-bottom: 2px dashed rgba(59,42,32,.35); font-size: .98rem; text-align: center; line-height: 1.15; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .mode { top: 6px; right: 8px; font-size: 1rem; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .cutreq { margin: 0 4px 6px 0; transform: rotate(-3deg); background: transparent; border-style: dashed; color: #b0382c; border-color: #d0574a; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .wants { flex-direction: column; flex-wrap: nowrap; gap: 4px; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .want { width: auto; height: auto; display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; align-items: center; justify-items: start;
  background: none; border: 0; border-radius: 0; padding: 1px 0; font-size: 22px; text-align: left; animation: none; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .want .sprite { grid-row: 1 / 3; width: 34px; height: 34px; font-size: 24px; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .want .wn { display: block; font-size: .76rem; font-weight: 600; line-height: 1.1; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .want b { position: static; background: none; color: inherit; padding: 0; font-size: .72rem; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .want.done .wn { text-decoration: line-through; text-decoration-color: rgba(27,122,74,.7); text-decoration-thickness: 2px; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .want.done::after { content: "✓"; position: absolute; right: 0; top: 50%; transform: translateY(-50%) rotate(-8deg); color: #1b7a4a; font-weight: 800; font-size: 1.15rem; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .want.over .wn { color: #c0262c; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .notes { font-size: .72rem; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .tpat { display: block; height: 7px; margin-top: 10px; border-radius: 99px; background: rgba(59,42,32,.12); overflow: hidden; }
.tpat i { display: block; height: 100%; width: 100%; background: #46b07a; border-radius: 99px; transition: width .3s linear, background .3s; }
.tpat i.warn { background: #e8b730; } .tpat i.bad { background: #e5484d; }

/* amount dots: ●●○ (red = too many) */
.dots { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: middle; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #b89466; box-sizing: border-box; transition: background .15s, transform .15s; }
.dots i.f { background: #e8a33a; border-color: #d68a1c; }
.done .dots i.f, .dots:has(i.f):not(:has(i.e)):not(:has(i.x)) i.f { background: #46b07a; border-color: #1b7a4a; }
.dots i.x { background: #e5484d; border-color: #c0262c; transform: scale(1.15); }

/* the step tracker: slim wooden tags */
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .steps { margin: 0 0 4px; transform: none; }
.step span { width: 30px; height: 30px; font-size: .95rem; }

/* ---------- shared sizes for the work area ---------- */
#stageBody { container-type: inline-size; --bs: max(260px, min(calc(100cqw - 340px), calc(100vh - 300px), 600px) - var(--shrink, 0px)); --bw: max(240px, min(calc(100cqw - 20px), calc(100vh - 320px), 520px) - var(--shrink, 0px)); }
#station:not([data-stage="pan"]) #stageBody > * { animation: stagein .35s ease-out; }
@keyframes stagein { from { opacity: 0; transform: scale(.98); } } /* no translate: it would add scroll height while the station is being fitted */
#stageBody .hint { display: block; width: fit-content; max-width: 100%; margin: 0 auto 10px; padding: 6px 14px; border-radius: 10px; font-size: .8rem; line-height: 1.35; text-align: center;
  background: #34403a; color: #f4f0e2; border: 5px solid var(--wood1); box-shadow: 0 4px 0 var(--wood3), 0 6px 12px rgba(60,30,10,.2); }
#stageBody .hint b { color: #ffe08a; }
#stageBody .hint .peek { color: var(--ink2); }

/* ---------- build: big piadina on a cutting board + bowls ---------- */
.buildwrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; justify-content: center; flex-wrap: nowrap; }
.boardcol { flex: none; width: var(--bs); padding: 14px; box-sizing: content-box; }
.board2 { border: 0; box-shadow: 0 0 0 10px var(--board1), 0 0 0 14px var(--board2), 0 12px 22px rgba(60,30,10,.35), inset 0 0 24px rgba(120,70,20,.22); }
.covbars { margin-top: 22px; padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.55); }
.bowlside { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.buildwrap .tray { display: grid; grid-template-columns: repeat(3, 94px); gap: 2px 4px; align-items: start; }
.boardside { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; width: calc(var(--bs) + 28px); }
.boardside > .boardcol { grid-column: 1 / -1; }
.covbars.nobars { background: none; padding: 0; }
.covbars > button { margin-top: 4px; font-size: .74rem; padding: 4px 10px; }
.covrow > span { min-width: 0 !important; white-space: nowrap; }
.boardside .actions { display: grid; grid-template-columns: auto auto; justify-content: end; align-items: center; gap: 6px; }
.boardside .actions .woodbtn { grid-column: 1 / -1; }
.boardside .actions button.round { width: 40px; height: 40px; font-size: 1.05rem; justify-self: center; }
.boardside .actions button:not(.round):not(.woodbtn) { font-size: .76rem; padding: 6px 10px; max-width: 132px; line-height: 1.15; white-space: normal; }
.covbars { margin-top: 4px !important; }
button.round { width: 46px; height: 46px; padding: 0; border-radius: 50%; font-size: 1.2rem; display: inline-flex; align-items: center; justify-content: center; }
button.woodbtn { flex: 1 1 auto; max-width: 240px; min-width: 120px; white-space: nowrap; padding: 12px 16px; font-size: 1.05rem; }

.ing.bowl, .ing.jar { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px 4px; border: 0; background: none !important; box-shadow: none !important; border-radius: 16px; transition: transform .15s; }
.ing.bowl:hover, .ing.jar:hover { transform: translateY(-3px); }
.ing.bowl.off, .ing.jar.off { opacity: .5; filter: saturate(.55); }
.ing.bowl.off:hover, .ing.jar.off:hover { opacity: .85; }
.ing.tapped .bowlbody, .ing.tapped .jarbody { animation: wobble .3s; }
@keyframes wobble { 30% { transform: rotate(-6deg) scale(.95); } 65% { transform: rotate(5deg) scale(1.05); } }

/* a ceramic bowl: inside ellipse, the heap, then the front of the bowl over it */
.bowlbody { position: relative; display: block; width: 70px; height: 56px; }
.bowlbody::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 20px; border-radius: 50%; z-index: 0;
  background: radial-gradient(ellipse at 50% 40%, #e2cfb2, #c9b08c 70%); box-shadow: 0 0 0 3px var(--ceram1), 0 0 0 4.5px color-mix(in srgb, var(--accent) 70%, #fff); }
.bowlbody::after { content: ""; position: absolute; left: 0; right: 0; top: 28px; bottom: 0; z-index: 2; border-radius: 0 0 38px 38px / 0 0 24px 24px;
  background: linear-gradient(180deg, var(--ceram1), var(--ceram2)); box-shadow: 0 4px 0 var(--ceramshade), 0 7px 10px rgba(60,30,10,.22);
  -webkit-mask: radial-gradient(ellipse 50% 10px at 50% 0, #0000 98%, #000); mask: radial-gradient(ellipse 50% 10px at 50% 0, #0000 98%, #000); }
.pile { position: absolute; left: 3px; right: 3px; top: -2px; height: 40px; z-index: 1; }
.pile .sprite { position: absolute; width: 36px; height: 36px; font-size: 27px; }
.pile .sprite img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.pile .p0 { left: 2px; top: 9px; transform: rotate(-16deg); }
.pile .p1 { right: 2px; top: 10px; transform: rotate(21deg); }
.pile .p2 { left: 50%; top: 1px; margin-left: -18px; transform: rotate(4deg); }
.pile.one .sprite { left: 50%; top: 2px; width: 44px; height: 44px; margin-left: -22px; }
.ing:hover .pile .p2 { transform: rotate(4deg) translateY(-3px); }
.ing .tag { box-sizing: border-box; width: var(--tagw, 92px); height: calc(2 * 1.15em + 4px); padding: 1px 5px; border-radius: 6px; font-size: .68rem; font-weight: 700; line-height: 1.15; color: var(--ink2);
  display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; overflow-wrap: anywhere; hyphens: auto; overflow: hidden;
  background: #fffaf0; border: 1.5px solid #d8c3a3; transform: rotate(-2deg); }   /* same size for every ingredient; long names wrap onto two rows */
.ing.bowl small.cnt { position: absolute; left: 0; right: 0; top: 43px; z-index: 3; display: flex; justify-content: center; pointer-events: none; }
.ing.bowl small.cnt .dots { max-width: 60px; justify-content: center; gap: 2px; } .ing.bowl small.cnt .dots i { width: 7px; height: 7px; }
.ing .minus { top: 0; right: 4px; width: 20px; height: 20px; font-size: .85rem; opacity: 0; transition: opacity .15s; z-index: 3; color: var(--ink2); }
.ing:hover .minus, .ing:has(.dots i.f) .minus, .ing:has(.dots i.x) .minus { opacity: .8; }
.ing:not(:has(.dots i)) .minus { display: none; }
.ing .chopb { position: absolute; left: 0; top: 2px; z-index: 3; padding: 0 6px; border-radius: 99px; font-size: .66rem; font-weight: 700; color: #fff; background: #8a5a35; box-shadow: 0 2px 0 #5d3a1e; opacity: 1; }
.ing.over .tag { border-color: var(--bad); background: #ffecec; }

/* a jar for the spreads */
.jarbody { position: relative; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-top: 8px; border-radius: 12px 12px 16px 16px;
  background: linear-gradient(90deg, rgba(255,255,255,.55) 0 14%, transparent 22% 100%), var(--jar); box-shadow: inset 0 0 0 3px rgba(255,255,255,.45), 0 4px 0 rgba(0,0,0,.15), 0 7px 10px rgba(60,30,10,.2); }
.jarbody .lid { position: absolute; left: -3px; right: -3px; top: -8px; height: 12px; border-radius: 6px; background: linear-gradient(180deg, var(--wood1), var(--wood2)); box-shadow: 0 2px 0 var(--wood3); }
.jarbody .sprite { width: 34px; height: 34px; font-size: 26px; border-radius: 50%; background: rgba(255,255,255,.75); padding: 3px; }
.jarbody .spoon { position: absolute; right: -10px; top: -14px; font-size: 1.15rem; transform: rotate(18deg); }
.ing.jar.sel .jarbody { box-shadow: inset 0 0 0 3px rgba(255,255,255,.45), 0 0 0 4px var(--accent), 0 0 18px var(--accent); animation: bob 1.4s ease-in-out infinite; }
.ing.jar small.cov { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); padding: 0 5px; border-radius: 99px; background: rgba(255,255,255,.85); color: var(--ink2); font-size: .62rem; font-weight: 700; opacity: .85; }
.ing.jar.full small.cov { color: #1b7a4a; }

/* a piece flying from its bowl onto the piadina */
.flypiece { position: fixed; z-index: 60; pointer-events: none; display: flex; align-items: center; justify-content: center; animation: flyin .33s cubic-bezier(.3,.7,.35,1) both; }
.flypiece .sprite { width: 100%; height: 100%; }
@keyframes flyin { from { transform: translate(var(--dx), var(--dy)) rotate(0deg) scale(.55); } 75% { transform: translate(0, -6px) rotate(var(--r)) scale(1.06); } to { transform: translate(0, 0) rotate(var(--r)) scale(1); } }
/* the real piece is revealed exactly where the flying copy lands: no second pop */
.piece.pop.landed { animation: none; }

/* ---------- fold: on the same cutting board, big ---------- */
.foldbox { margin: 18px 0 10px; }
.fold3d { width: var(--bw); padding: 0; border-radius: 50%; box-shadow: 0 0 0 10px var(--board1), 0 0 0 14px var(--board2), 0 12px 22px rgba(60,30,10,.3); background: radial-gradient(circle, #f3dcb0, #e2c08a); }
.fgrip { background: var(--paper); color: var(--ink2); transform: translateX(-50%) rotate(-2deg); }

/* ---------- pan: cast iron on a gas burner ---------- */
.panwrap { width: min(var(--bw), 450px); margin: 26px auto 12px; }
.panwrap::before { content: ""; position: absolute; inset: -7%; border-radius: 50%;
  background: radial-gradient(circle, #2a2a30 0 62%, #3d3d46 63% 66%, #1e1e24 67%);
  box-shadow: 0 0 calc(10px + var(--heat) * 70px) calc(var(--heat) * 18px) rgba(255,130,40,.55), 0 10px 18px rgba(0,0,0,.35); }
.burner { position: absolute; inset: 0; pointer-events: none; container-type: size; }
.burner i { position: absolute; left: 50%; top: 50%; width: 16px; height: 26px; margin: -13px 0 0 -8px; border-radius: 50% 50% 45% 45%;
  background: radial-gradient(ellipse at 50% 70%, #e6f3ff 0 18%, #4f9bff 45%, rgba(40,90,255,0) 72%);
  transform: rotate(calc(var(--k) * 45deg + 22deg)) translateY(-53cqh) scale(calc(.7 + var(--heat) * .9)); transform-origin: 50% 50%; opacity: calc(.45 + var(--heat)); animation: gasflame .18s infinite alternate; }
.burner i:nth-child(1) { --k: 0; } .burner i:nth-child(2) { --k: 1; } .burner i:nth-child(3) { --k: 2; } .burner i:nth-child(4) { --k: 3; }
.burner i:nth-child(5) { --k: 4; } .burner i:nth-child(6) { --k: 5; } .burner i:nth-child(7) { --k: 6; } .burner i:nth-child(8) { --k: 7; }
@keyframes gasflame { to { filter: brightness(1.25); } }
.pan { box-shadow: 0 8px 0 #15151a, 0 14px 20px rgba(0,0,0,.35), inset 0 0 30px rgba(0,0,0,.65); }
.pan::after { right: -30%; top: 45%; width: 32%; height: 9%; border-radius: 0 14px 14px 0; z-index: 1;
  background: linear-gradient(180deg, #a3693c, #6b4226); box-shadow: 0 3px 0 #4a2c17; }
.panhud { margin: 14px 0 10px; gap: 12px; }
.dstrip { position: relative; width: min(360px, 80%); height: 16px; border-radius: 99px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.15), 0 2px 0 rgba(0,0,0,.1);
  background: linear-gradient(90deg, #f7e7bf 0%, #f1cf7c 40%, #d99a45 65%, #9a5a24 82%, #3a2312 95%, #1a120c); }
.dstrip .dz { position: absolute; top: -5px; bottom: -5px; border: 3px solid #1b7a4a; border-radius: 8px; background: rgba(255,255,255,.18); box-sizing: border-box; }
.dstrip b { position: absolute; top: -9px; left: 0; width: 6px; height: 34px; margin-left: -3px; border-radius: 3px; background: var(--ink2); box-shadow: 0 0 0 2px #fff; transition: left .12s linear; }
.panbox [data-act="pan"] { font-size: 1.15rem; }

/* ---------- cut: a big wooden board and a knife ---------- */
.cutstage.sstage { width: min(var(--bw), 500px); margin: 14px auto 6px; border: 0; border-radius: 26px;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.18), transparent 60%), repeating-linear-gradient(90deg, var(--board1) 0 22px, color-mix(in srgb, var(--board1) 88%, #000) 22px 24px, var(--board1) 24px 46px);
  box-shadow: 0 6px 0 var(--board2), 0 14px 22px rgba(60,30,10,.3);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Ctext x='0' y='30' font-size='30'%3E%F0%9F%94%AA%3C/text%3E%3C/svg%3E") 4 30, crosshair; }

/* ---------- serve: plate on a checkered placemat + a service bell ---------- */
.plateWrap.placemat { width: fit-content; margin: 14px auto 16px; padding: 26px 34px; border-radius: 22px;
  background: repeating-conic-gradient(#e46a5f 0 25%, #fff5ea 0 50%) 0 0 / 44px 44px; box-shadow: 0 10px 20px rgba(60,30,10,.25), inset 0 0 0 6px rgba(255,255,255,.35); }
.readybox { display: flex; align-items: center; justify-content: center; gap: 34px; flex-wrap: wrap; }
.placemat .plate { width: max(180px, min(calc(100cqw - 20px), calc(100vh - 440px), 360px) - var(--shrink, 0px)); }
.bellbtn { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none !important; box-shadow: none !important; cursor: pointer; color: inherit; }
.bellbtn .bell { display: flex; align-items: center; justify-content: center; width: 86px; height: 70px; font-size: 3.1rem; border-radius: 50% 50% 14px 14px;
  background: radial-gradient(circle at 40% 30%, #fff3c4, #e9b949 55%, #b9851d); box-shadow: 0 6px 0 #8a5f12, 0 10px 16px rgba(60,30,10,.3); transition: transform .1s; }
.bellbtn:hover .bell { animation: ring .5s; }
.bellbtn:active .bell { transform: translateY(5px); box-shadow: 0 1px 0 #8a5f12; }
.bellbtn b { padding: 4px 14px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 1rem; box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 70%, #000); }
@keyframes ring { 20% { transform: rotate(-10deg); } 45% { transform: rotate(9deg); } 70% { transform: rotate(-5deg); } }

/* smaller laptops: keep the bowls readable */
@media (max-width: 1450px) and (min-width: 1101px) {
  #station:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) { grid-template-columns: 160px minmax(0, 1fr); gap: 6px 12px; }
  #stageBody { --bs: max(260px, min(calc(100cqw - 324px), calc(100vh - 300px), 600px) - var(--shrink, 0px)); }
  .buildwrap .tray { grid-template-columns: repeat(3, 86px); --tagw: 84px; }
}
/* narrow windows: ticket on top, bowls under the piadina */
@media (max-width: 1100px) {
  #station:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) { display: block; }
  :is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .counter { max-width: 320px; margin: 0 auto 10px; }
  .buildwrap { grid-template-columns: 1fr; justify-items: center; }
  #stageBody { --bs: min(calc(100cqw - 40px), 520px); --bw: min(calc(100cqw - 30px), 460px); }
}
@media (prefers-reduced-motion: reduce) { .flypiece, #stageBody > *, .burner i { animation: none !important; } }

/* ---------- waiting: the customer steps up to the counter, big and centered ---------- */
#kitchen { display: flex; flex-direction: column; }
#station { flex: 1; }
#station[data-stage="waiting"] { display: flex; flex-direction: column; justify-content: center; }
#station[data-stage="waiting"] .counter { justify-content: center; width: min(820px, 100%); margin: 0 auto 16px; padding-top: 10px; border-bottom: 12px solid var(--wood1); box-shadow: 0 6px 0 var(--wood3); }
#station[data-stage="waiting"] .custwrap { padding-top: 72px; }
#station[data-stage="waiting"] .counter .cust { width: 230px; height: max(150px, min(300px, calc(100vh - 470px)) - var(--shrink, 0px)); font-size: 130px; }
#station[data-stage="waiting"] .say { font-size: .95rem; max-width: 260px; }
#station[data-stage="waiting"] .bubble { flex: 0 1 460px; }
#station[data-stage="waiting"] .want { width: 64px; height: 64px; } #station[data-stage="waiting"] .want .sprite { width: 46px; height: 46px; }
#station[data-stage="waiting"] .steps { margin: 4px 0 18px; }
/* big screens: bigger bowls next to the 600 px piadina */
@media (min-width: 1600px) and (min-height: 980px) { .bowlside { zoom: 1.25; } #station[data-stage="build"] .bubble { font-size: 1.05rem; } }
/* buttons inside the chalkboard hint (Dante, peek) keep dark text on their light background */
#stageBody .hint button, #stageBody .hint button b { color: var(--ink2); }
.bellbtn.rung .bell { animation: ring .5s; transform: translateY(4px); box-shadow: 0 2px 0 #8a5f12; }
/* no text/image selection (blue highlight) when double-clicking while slicing, cutting or building */
.slicer, .slicer *, #station, #station *, .flypiece { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.slicer img, #station img { -webkit-user-drag: none; }
#station input, #station textarea { -webkit-user-select: text; user-select: text; }
/* the slicing board: the mouse is the knife */
.slicer .sstage { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Ctext x='0' y='30' font-size='30'%3E%F0%9F%94%AA%3C/text%3E%3C/svg%3E") 4 30, crosshair; }
/* very short screens: slightly smaller bowls so the column (with two-row name tags) fits */
@media (min-width: 1101px) and (max-height: 700px) { .bowlside { zoom: .84; } }
/* customer names: a little wooden plate under the customer, a label under each face in the queue */
.custname { display: block; width: fit-content; max-width: 100%; margin: 4px auto 0; padding: 2px 12px; border-radius: 8px; font-size: .85rem; color: #fff7ea; white-space: nowrap;
  background: linear-gradient(180deg, var(--wood1), var(--wood2)); box-shadow: 0 2px 0 var(--wood3); text-shadow: 0 1px 0 var(--wood3); position: relative; z-index: 3; }
#station[data-stage="waiting"] .custname { font-size: 1rem; padding: 3px 16px; }
:is([data-stage="build"], [data-stage="fold"], [data-stage="pan"], [data-stage="cut"]) .custname { margin-top: -10px; font-size: .74rem; padding: 1px 10px; }
.tk .tkname { display: block; margin-top: 2px; font-size: .66rem; font-weight: 700; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body[data-theme="night"] .tk .tkname { color: #f4f0e2; }
