/* Option A: one continuous bakery, with live controls on practical work surfaces. */
:root{--ink:#482b23;--muted:#69503d;--green:#27733b;--green-dark:#18512d;--blue:#245a79;--focus:#175d91;font-family:'Trebuchet MS','Segoe UI',sans-serif;background:#c99a62}
body{background:#c99a62;min-height:100svh}
.bakery-scene,body[data-view=home] .bakery-scene,body[data-stage=result] .bakery-scene{position:fixed;inset:0;height:100vh;height:100svh;border:0;box-shadow:none;background:#d6bd85}
.scene-art,body[data-view=home] .scene-art,body[data-stage=result] .scene-art{width:max(100vw,calc(100svh * 1672 / 941));top:50%;transform:translate(-50%,-50%)}
.app-shell{max-width:1160px;padding:16px 28px max(32px,env(safe-area-inset-bottom))}
h1,h2,h3,.card-copy h2{font-family:'Arial Rounded MT Bold','Comic Sans MS','Trebuchet MS',sans-serif;font-weight:800;letter-spacing:-.035em}
.instruction,.number-field,.equation,.equation-text,.stepper output,.order-grid button{font-family:'Trebuchet MS','Segoe UI',sans-serif;font-variant-numeric:lining-nums tabular-nums}
.topbar{background:none;border:0;box-shadow:none;border-radius:0;padding:0;margin-bottom:14px;min-height:52px}
.brand{background:#fff6df;padding:8px 13px 8px 9px;border-radius:15px 5px 15px 5px;box-shadow:0 3px 0 #b99260,0 5px 12px #442a2930;letter-spacing:.055em;color:#28543a;flex-shrink:0}
.brand img{width:36px;height:36px}.brand small{color:#49623c}
.toolbar{padding:5px;background:#f6dbab;border-radius:20px;box-shadow:0 3px 0 #b9874c,0 6px 12px #442a2926}
button{border:1px solid #b59569;border-bottom-width:3px;background:#fff1c6;box-shadow:inset 0 2px 0 #ffffffc0,0 3px 4px #60422526;border-radius:15px;min-width:48px;min-height:48px;transition:transform 120ms,box-shadow 120ms,background-color 120ms}
button:hover:not(:disabled):not(.cookie-btn):not(.pair-slot):not(.tray-cell):not(.piece){background-color:#fff9e7;border-color:#668853;box-shadow:inset 0 2px 0 #fff,0 5px 9px #60422533;transform:translateY(-1px)}
button:active:not(:disabled):not(.cookie-btn):not(.pair-slot):not(.tray-cell):not(.piece){transform:translateY(2px);box-shadow:inset 0 2px 3px #54382025;border-bottom-width:1px}
button[aria-pressed=true]{background-color:#d8edc9;border-color:#34734a;box-shadow:inset 0 0 0 2px #34734a}
button:disabled,.primary:disabled{background:#e8dfce;color:#766957;border-color:#b4a78f;box-shadow:inset 0 1px 2px #715b251a;transform:none}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #175d91;outline-offset:3px;box-shadow:0 0 0 6px #fff7df}
.primary{background:#27733b;border:1px solid #18512d;border-bottom:4px solid #174628;border-radius:18px;color:#fffdf3;box-shadow:inset 0 2px 0 #83b75d,0 4px 8px #334a242e;padding:12px 24px}
.primary:hover:not(:disabled){background-color:#205f33!important;color:#fffdf3;box-shadow:inset 0 2px 0 #83b75d,0 5px 9px #334a2440!important}
.toolbar button{border-width:1px 1px 3px;padding:8px 10px;font-size:13px;border-radius:14px;background:#fff0c2}.toolbar button[data-action=help]{background:#ffd6df;border-color:#b66d84}.toolbar button[data-action=replay]{background:#cce9f5;border-color:#6595ae}
.home-intro{grid-template-columns:230px minmax(0,1fr);max-width:810px;gap:0;background:none;border:0;box-shadow:none;border-radius:0;margin:20px auto 28px;padding:0;align-items:end}
.home-benny{width:230px;height:287.5px;filter:drop-shadow(0 10px 5px #5b40222b);z-index:1}
.home-copy{position:relative;background:#fff4d9;border-radius:8px 30px 28px 7px;padding:24px 30px 27px;margin-left:-12px;box-shadow:inset 0 2px 0 #fffefa,0 5px 0 #d4ad73,0 13px 22px #382a2c36}
.home-copy::before{content:'';position:absolute;left:32px;right:32px;top:8px;height:3px;background:repeating-linear-gradient(90deg,#d7b17c 0 6px,transparent 6px 12px);opacity:.65}
.home-copy h1{font-size:52px;line-height:1.13;margin-bottom:10px;color:#633526;text-shadow:0 2px #fffdf2}.home-copy .eyebrow{font-size:10px;letter-spacing:.14em;color:#387046;margin:0 0 8px}.home-intro p:not(.eyebrow){font-size:17px;line-height:1.4;color:#68432c;margin-bottom:17px}
.home-intro .primary{font-size:21px;padding:12px 34px}
.station-grid{gap:25px;margin:24px 0}.station-card{position:relative;background:#fff6df;border:0;border-radius:22px 22px 12px 12px;overflow:visible;box-shadow:0 5px 0 #b38a52,0 10px 20px #4e30263d;transform:rotate(-.7deg)}
.station-card:nth-child(2){transform:rotate(.7deg)}.station-card:nth-child(3){transform:rotate(-.4deg)}
.station-card .station-art{height:158px;border-radius:22px 22px 0 0;background:repeating-linear-gradient(90deg,#ffd5de 0 28px,#ffe0e5 28px 56px);box-shadow:inset 0 3px 0 #fff8}
.station-card:nth-child(2) .station-art{background:repeating-linear-gradient(90deg,#c8e7f2 0 28px,#ddf0f5 28px 56px)}.station-card:nth-child(3) .station-art{background:repeating-linear-gradient(90deg,#ffdf8f 0 28px,#ffeab8 28px 56px)}
.station-card .card-copy,.station-card:nth-child(2) .card-copy{background:#fff7e5;padding:15px 16px 19px;border:0;border-radius:0 0 12px 12px;box-shadow:inset 0 1px #fff;transform:none}
.card-copy h2{font-size:28px;margin-bottom:7px;color:#643b2a}.card-copy p{font-size:15px;color:#694d3b;margin-bottom:14px}.card-meta{width:max-content;max-width:100%;margin:auto;padding:9px 18px;background:#286e3b;border-radius:13px;color:#fffdf0;box-shadow:inset 0 2px 0 #79a76b,0 3px 0 #184929;font-size:15px;gap:17px;min-height:42px}
.station-number{background:#fff7dd;border:0;box-shadow:0 2px 0 #b9915f;font-size:12px}.menu-plate,.menu-tray,.menu-brownie{filter:drop-shadow(0 7px 3px #5a39312b)}
.home-footer{background:#fff5dfed;color:#624a36;padding:11px 16px;border-radius:8px;box-shadow:0 3px 6px #58391c24;font-size:12px;margin-top:25px}
.order-board{position:relative;max-width:880px;margin:25px auto 0;padding:26px 32px 30px;border:0;border-radius:22px;background:url('assets/art/wood-grain.svg') repeat,linear-gradient(110deg,#d09b60,#eabf80 45%,#d7a065);background-size:620px 180px,auto;box-shadow:inset 0 0 0 6px #f4d8a6,inset 0 0 0 8px #a875444d,0 8px 0 #8e5d37,0 17px 25px #442a2947}
.order-board>.eyebrow{background:#285b48;color:#fff6d9;padding:10px 18px;border-radius:5px;width:max-content;max-width:100%;margin:0 auto 14px;box-shadow:0 3px 0 #194535;font-size:11px;letter-spacing:.14em}
.order-board>h1{text-align:center;color:#573426;font-size:36px!important;text-shadow:0 2px #ffefca}.bank-note{background:#fff3d2;border-radius:5px;padding:10px 15px;width:max-content;max-width:100%;margin:0 auto 21px;text-align:center;color:#684831;line-height:1.45}
.order-grid{gap:18px;padding:4px 0 15px}.order-grid button{position:relative;background:#fff4d7;border:0;border-radius:5px 5px 12px 12px;box-shadow:0 4px 0 #bd935d,0 8px 8px #65472f30;min-height:93px;font-size:30px;color:#533524;transform:rotate(-1deg)}
.order-grid button:nth-child(3n+2){background:#dbedf3;transform:rotate(1deg)}.order-grid button:nth-child(3n){background:#ffdde2;transform:rotate(-.4deg)}
.order-grid button::before{width:24px;height:12px;border:3px solid #bd8876;background:#eac6a3;border-radius:6px 6px 8px 8px;top:-6px;left:calc(50% - 12px);box-shadow:inset 0 1px #fff4;transform:none}.order-grid .order-done{font-size:12px;color:#27623a}.order-board>.actions{justify-content:center}
.game-heading{background:none;border:0;box-shadow:none;padding:0;margin:10px 0 12px;gap:12px}
.game-heading h1{font-size:30px;padding:9px 17px 11px;background:#ffe0e4;border-radius:5px 17px 17px 5px;box-shadow:0 4px 0 #b77975,0 7px 10px #57312725;color:#643a35;line-height:1.12}
body[data-family=CC-B] .game-heading h1{background:#d5ebf4;box-shadow:0 4px 0 #699baf,0 7px 10px #57312725;color:#2c566b}body[data-family=CC-C] .game-heading h1{background:#ffe4a5;box-shadow:0 4px 0 #c08f4f,0 7px 10px #57312725;color:#6a441e}
.order-badge{border:0;border-radius:8px;background:#fff3cf;box-shadow:0 3px 0 #c09458,0 5px 8px #57312726;padding:8px 13px;font-size:13px;white-space:nowrap}
.steps{gap:7px;margin:0 0 20px}.step{background:#fff4dceb;padding:6px 10px;border:0;border-radius:6px;box-shadow:0 2px 0 #a182542e;font-size:12px;color:#63492d}.step:nth-child(2){border:0;background:#dbeff6}.step:nth-child(3){border:0;background:#ffdee5}.step.current{background:#dcedcb;border:0;box-shadow:inset 0 -3px #679155,0 2px 3px #513b1929;color:#24572c;padding-bottom:9px}
.work-layout{gap:17px}.ticket{margin:0 14px;padding:14px 20px;border:0;border-radius:3px 3px 10px 10px;background:#fff4d9;box-shadow:0 3px 0 #d6b07b,0 7px 10px #59402430;min-width:0;gap:15px}
.ticket .label-small{color:#87532c;border-color:#d1ae7c;font-size:11px;padding-right:12px}.ticket .instruction{font-size:16px;color:#563926;line-height:1.5}.ticket-clip{height:21px;top:-11px;width:25px;border:3px solid #587d68;background:linear-gradient(90deg,#97c09d,#cee2bd,#79a183)}
.request-shape span{background:#f0ddb3;color:#64472c}.workbench{position:relative;min-height:0;padding:21px 26px 25px;border:0;border-radius:26px;background:url('assets/art/wood-grain.svg') repeat,linear-gradient(105deg,#efc98e,#f5d8a7 48%,#e8c086);background-size:620px 180px,auto;box-shadow:inset 0 2px 0 #ffeccb,inset 0 0 0 5px #f7deb4,0 7px 0 #a87945,0 14px 24px #47302445}
.work-title{margin-bottom:15px;gap:12px}.work-title h2{font-size:20px;background:#fff3d8;border-radius:6px;padding:8px 12px;box-shadow:0 2px 2px #81552b18;color:#654126}.work-title button{background:#ffedc0}
.placement-instruction{font-size:14px;color:#66452e;margin:-4px 0 18px;line-height:1.45}.pair-builder{grid-template-columns:minmax(0,400px) minmax(0,290px);gap:24px;max-width:714px;margin-bottom:20px;align-items:center}
.pair-builder .source-surface{background:none;box-shadow:none;padding:0}.pair-builder .surface-label{color:#604b32;margin:0 0 9px;font-size:11px;letter-spacing:.07em;text-align:center}
.source-tray{position:relative;width:100%;aspect-ratio:732/335;isolation:isolate}
.source-tray-art{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 5px 3px #57391e33)}
.source-tray .source-cookie-scroll{position:absolute;inset:15% 12% 20%;height:auto;scrollbar-gutter:auto;z-index:1;scrollbar-width:thin}
.pair-builder .shelf{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 3px;padding:2px 3px 8px;justify-items:center;align-items:start}
.pair-builder .cookie-btn{max-width:56px;min-width:48px;min-height:48px;border:0;box-shadow:none;background:transparent}
.pair-builder .cookie-btn .cookie-art{filter:drop-shadow(0 2px 1px #76553255)}
.pair-builder .cookie-btn[aria-pressed=true]{outline:3px solid #34734a;background:#ffecb3;box-shadow:none}.pair-builder .cookie-btn[aria-pressed=true] .cookie-art{transform:translateY(-3px)}
.source-browse{gap:12px;margin-top:8px}.source-browse button{min-height:48px;background:#d7ecf4;border-color:#7199a8;font-size:21px}
.active-pair{padding:0 0 16px}.active-pair-heads{margin:12px 0 2px}.active-pair-heads,.active-pair-slots{gap:12px}
.pair-slot{position:relative;isolation:isolate;min-height:106px;min-width:48px;padding:0 6px 12px;border:2px solid transparent!important;border-radius:50%;background:transparent!important;box-shadow:none!important;display:grid;place-items:center}
.pair-slot::before{content:'';position:absolute;inset:0;z-index:-1;background:url('assets/art/cookie-kitchen-v1/plate_mint.webp') center bottom 4px/100% auto no-repeat;filter:drop-shadow(0 4px 2px #61442533);pointer-events:none}
.pair-slot .btn-content{align-self:end;height:82px;align-items:center;justify-content:center}.pair-slot img{width:76px;height:76px;max-width:86%;object-fit:contain;filter:drop-shadow(0 3px 1px #67513455);transform:translateY(6px)}
.spot-mark{font-size:25px;line-height:36px;width:36px;height:36px;border-radius:50%;background:#eef8df;color:#376044;box-shadow:0 1px 2px #40604033;align-self:end;margin-bottom:3px}
.pair-slot:hover::before{filter:drop-shadow(0 4px 2px #61442544) brightness(1.04)}.pair-slot.drop-ready{outline:2px solid #387449;outline-offset:3px}.pair-slot.drop-hover{outline:4px solid #387449;outline-offset:3px}.pair-slot.drop-hover::before{filter:drop-shadow(0 4px 2px #61442544) brightness(1.12)}
.placement-hint{font-size:13px;line-height:1.4;margin:10px 0 0;color:#68492e}.empty-shelf{font-size:13px;color:#674c30;margin:12px 3px}
.pair-work.arranged{padding:7px 0}.rack-strips span{border:1px solid #74a486;box-shadow:inset 0 0 0 4px #d8efd3,inset 0 0 0 6px #acd0ad,0 5px 0 #83a67f,0 9px 5px #59422326;background:linear-gradient(90deg,#b9dbc4,#f2f7de 22%,#f8fbe9 50%,#d0e8c7 83%,#a6ceb0);border-radius:27px}
.plate-row img,.leftover-column img{filter:drop-shadow(0 3px 1px #76633945)}.leftover-tray{border:1px solid #b19658;background:linear-gradient(100deg,#f6daa0,#fff1c5 45%,#eacf94);box-shadow:inset 0 0 0 3px #fff1c5,0 4px 0 #b39a5d,0 7px 4px #61442825}.plate-row .undo-pair{border-width:1px 1px 3px;background:#fff0c9}
.parity-question{padding-top:3px}.parity-question h2{font-size:19px}.parity-question p{color:#654c35}
.dimension-controls{gap:24px;margin-bottom:20px}.stepper{padding:9px 15px 11px;background:#f9edd1;border-radius:13px;box-shadow:inset 0 1px #fff5e7,0 2px 3px #90653220}.stepper label{color:#624932}.stepper-row{gap:11px}.stepper output{background:#fff7e1;border-radius:6px;padding:2px 7px;min-width:38px;color:#65402b}
.tray{border:9px solid #84bad0;outline:2px solid #477b92;border-radius:23px;background:linear-gradient(100deg,#f4dcac,#fff2d1 48%,#edcf98);box-shadow:inset 0 2px 0 #fffdf2,inset 0 0 0 2px #d5b98a,0 7px 0 #42778f,0 12px 0 #78a6ad,0 18px 13px #65523647;margin-bottom:24px}
.tray-cell{background:#fff2cc;border:2px dashed #809163;box-shadow:inset 0 1px 3px #b79a6330}.tray-cell.filled{border:2px solid transparent;background:transparent;box-shadow:none}.tray-cell img{filter:drop-shadow(0 2px 1px #68503455)}.tray.labelled{box-shadow:inset 0 2px 0 #fffdf2,0 7px 0 #42778f,0 12px 0 #78a6ad,0 18px 13px #65523647}
.tray.labelled .tray-cell{box-shadow:none;border-radius:0}.tray.labelled .group-even{background-color:#dfecdc}.tray.labelled .group-odd{background-color:#fff1cd}
.group-controls{margin-top:26px}.group-controls button{background:#d7ebf2}.group-warning{color:#684b30}
.brownie-board{position:relative;padding:25px;background:url('assets/art/wood-grain.svg') repeat,linear-gradient(90deg,#c68745,#e5b76f 15%,#efc985 48%,#e1ad65 85%,#c68b4b);background-size:620px 180px,auto;border:0;border-radius:21px;box-shadow:inset 0 0 0 3px #e8bd7f,inset 0 0 0 5px #b4773c88,0 7px 0 #9e6535,0 12px 9px #593c2f45}
.brownie-board::after{content:'';position:absolute;width:44px;height:8px;bottom:10px;right:18px;background:#a26d39;border-radius:50%;box-shadow:inset 0 2px 1px #83562e;opacity:.55;pointer-events:none}
.sample-row{margin-top:19px}.sample-caption{font-size:13px;line-height:1.4;color:#54331d}.slab{box-shadow:0 4px 0 #4b2c20,0 7px 5px #4b2c2045}.cut-controls{margin-top:23px}.cut-control-row button{background:#ffe6a5;border-width:1px 1px 3px}.cut-control-row button[aria-pressed=true]{background:#dce7b4;border-color:#59824a}
.equation-area{margin-top:25px;background:#fff8e6;border:0;border-radius:3px 3px 13px 13px;padding:23px 20px 19px;box-shadow:inset 0 1px 0 #fff,0 3px 0 #d8ba87,0 7px 8px #73533324}.paper-tab{background:#e6b76bbf;height:17px;top:-6px;box-shadow:inset 0 2px #f7d39e80}.equation-area>.label-small{color:#805033}.number-field{background:#fffdf0;border:2px dashed #a8874f;box-shadow:inset 0 2px 3px #cdb99033}.number-caption{color:#71523d}.guided-count{background:#f1f6dc;box-shadow:inset 0 1px 0 #fff,0 3px 0 #b9c594,0 7px 8px #73533324}.guided-count h2{font-family:'Trebuchet MS','Segoe UI',sans-serif;font-size:23px;color:#563a24}
.equation-actions button{background:#dbeaf0;border-color:#82a7b4}.check-action{margin-top:22px}.check-action .primary{font-size:18px;min-height:56px}.feedback{background:#edf2d6;color:#365831;border-color:#4e8043}.feedback.error{background:#fff0d0;color:#75421c;border-color:#a36932}
.result-panel{border:0;background:#fff4d9;box-shadow:inset 0 2px #fff,0 6px 0 #ca9e61,0 15px 24px #53392d40}.result-welcome h2{font-size:33px}.result-welcome .rule{color:#684c38}.box-preview{box-shadow:0 9px 0 #b18450,0 15px 8px #6a50362b}
dialog,#keypad{background:#fff4d9;border:1px solid #bd9963;border-radius:19px;box-shadow:0 6px 0 #aa7d42,0 18px 45px #2f241d5c}dialog::backdrop{background:#35292170;backdrop-filter:blur(3px)}
#keypad{margin-top:20px;background:#f4f2d8}.keypad-grid button{background:#fff3c9;border-width:1px 1px 3px}.keypad-grid .word-key{background:#dbeaf0}.keypad-grid .primary{background:#27733b}
.pair-builder.demo-builder .source-tray{aspect-ratio:auto;height:126px;background:#f8e4b8;border-radius:15px}.demo-builder .source-tray .source-cookie-scroll{inset:0;height:126px}.pair-builder.demo-builder .shelf{grid-template-columns:repeat(2,minmax(0,1fr))}.demo-builder .pair-slot{min-height:88px}
@media(min-width:1100px){
 body[data-view=game]:not([data-stage=result]) .work-layout{grid-template-columns:210px minmax(0,1fr);gap:20px}
 .ticket{align-items:start;flex-direction:column;margin:8px 0 0;padding:24px 18px 20px 26px;gap:10px}.ticket .label-small{border:0;border-bottom:1px solid #dab580;padding:0 0 8px;width:100%}.ticket .instruction{font-size:16px}.ticket .request-shape{gap:7px}.ticket .request-shape span{font-size:12px;padding:7px}
}
@media(max-width:760px){
 .app-shell{padding:14px 18px 30px}.home-intro{grid-template-columns:170px minmax(0,1fr);max-width:570px;margin:18px auto 25px}.home-benny{width:180px;height:225px}.home-copy{padding:23px 22px 24px;margin-left:-5px}.home-copy h1{font-size:40px}.home-intro p:not(.eyebrow){font-size:15px}
 .station-grid{max-width:550px;margin-inline:auto;gap:21px}.station-card{display:grid;grid-template-columns:40% 60%;transform:none}.station-card:nth-child(2),.station-card:nth-child(3){transform:none}.station-card .station-art{height:170px;border-radius:18px 0 0 12px}.station-card .card-copy{border:0;border-radius:0 15px 12px 0;padding:14px 15px}.card-copy h2{font-size:25px}.card-copy p{font-size:14px;margin-bottom:11px}.card-meta{font-size:14px;padding:8px 13px;min-height:40px}
 .game-heading h1{font-size:28px}.workbench{padding:20px}.ticket{flex-wrap:wrap}.ticket .instruction{font-size:16px}.work-title h2{font-size:18px;padding:7px 10px}.pair-builder{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:18px}.pair-builder .shelf{grid-template-columns:repeat(3,minmax(0,1fr))}.pair-builder .cookie-btn{max-width:52px}
 .order-board{padding:25px 24px;margin-top:19px}.order-grid{gap:15px}.order-board>h1{font-size:31px!important}.order-grid button{min-height:86px}
}
@media(max-width:600px){
 .pair-builder{grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:18px;max-width:470px;align-items:start}.pair-builder .surface-label{margin-bottom:11px;font-size:11px}
 .source-tray{aspect-ratio:335/732;max-width:150px;margin:auto}.source-tray-art{width:218.507463%;height:45.765027%;max-width:none;left:50%;top:50%;transform:translate(-50%,-50%) rotate(90deg)}
 .source-tray .source-cookie-scroll{inset:12% 17% 12% 18%}.pair-builder .shelf{grid-template-columns:1fr;gap:8px;padding:3px 2px 8px}.pair-builder .cookie-btn{max-width:64px}.active-pair{padding-top:0}.active-pair-heads{margin-top:18px}.active-pair-heads,.active-pair-slots{gap:8px}.pair-slot{min-height:96px}.pair-slot .btn-content{height:72px}.pair-slot img{height:64px;max-width:92%}.spot-mark{font-size:21px;width:30px;height:30px;line-height:30px;margin-bottom:2px}.placement-hint{font-size:12px}
 .pair-builder.demo-builder{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.pair-builder.demo-builder .source-tray{max-width:none}.demo-builder .source-tray .source-cookie-scroll{inset:0}.demo-builder .pair-slot{min-height:86px}.demo-builder .pair-slot .btn-content{height:65px}
}
@media(max-width:440px){
 .app-shell{padding:12px 13px max(28px,env(safe-area-inset-bottom))}.topbar{gap:9px;flex-wrap:wrap;margin-bottom:12px}.brand{padding:6px 9px 6px 6px;font-size:10px;gap:7px}.brand img{width:32px;height:32px}.brand small{font-size:8px}.toolbar{padding:4px;gap:5px;border-radius:16px}.toolbar button{font-size:12px;min-height:48px;padding:8px 7px}.toolbar .btn-content{gap:4px}.toolbar .icon{width:17px;height:17px}
 body[data-view=game] .topbar{justify-content:center}.topbar .toolbar:has(#pause){width:100%;justify-content:space-between}.topbar .toolbar:has(#pause) button{flex:1;max-width:92px}
 .home-intro{grid-template-columns:113px minmax(0,1fr);gap:0;margin:22px -2px 24px;align-items:end}.home-benny{width:136px;height:170px;justify-self:center;transform:translateX(6px)}.home-copy{padding:20px 14px 20px 16px;border-radius:6px 22px 19px 4px;margin:0}.home-copy::before{left:18px;right:18px}.home-copy h1{font-size:32px;line-height:1.12;margin-bottom:10px}.home-copy .eyebrow{display:none}.home-intro p:not(.eyebrow){font-size:14px;line-height:1.4;margin-bottom:12px}.home-intro .primary{font-size:18px;padding:11px 21px}
 .station-grid{gap:19px}.station-card{grid-template-columns:39% 61%}.station-card .station-art{height:165px}.station-card .card-copy{padding:12px 10px}.card-copy h2{font-size:23px}.card-copy p{font-size:13px;line-height:1.4}.card-meta{font-size:13px;min-height:38px;padding:8px 12px;gap:13px}.station-number{width:27px;height:27px;font-size:10px}.home-footer{font-size:11px;gap:8px;margin-top:23px;padding:10px 13px}
 .game-heading{gap:8px;margin:12px 0}.game-heading h1{font-size:24px;padding:8px 11px 10px}.order-badge{font-size:11px;padding:8px 9px;min-height:48px}.steps{gap:5px;margin-bottom:18px}.step{font-size:11px;padding:6px 8px}.step.current{padding-bottom:9px}
 .ticket{margin:0 4px;padding:14px 14px 15px 24px;gap:7px;background:#fff4d9}.ticket .label-small{font-size:10px;padding:0;border:0}.ticket .instruction{font-size:15px;line-height:1.45}.request-shape span{font-size:12px;padding:6px}.request-shape .icon{width:19px;height:19px}
 .work-layout{gap:17px}.workbench{padding:17px 12px 23px;border-radius:20px;box-shadow:inset 0 2px 0 #ffeccb,inset 0 0 0 3px #f7deb4,0 6px 0 #a87945,0 12px 16px #47302440}.work-title{margin-bottom:14px;gap:8px}.work-title h2{font-size:17px;padding:7px 9px}.work-title button{min-height:48px;padding:8px 10px}.placement-instruction{font-size:13px;line-height:1.45;margin-bottom:16px}.pair-builder{gap:12px}.pair-builder .surface-label{font-size:10px;letter-spacing:.025em}.pair-builder .shelf{padding-inline:1px}.pair-builder .cookie-btn{max-width:60px}.active-pair-heads{font-size:12px}.pair-slot{min-height:86px;padding-inline:0;padding-bottom:8px}.pair-slot .btn-content{height:68px}.pair-slot img{height:60px;width:60px;max-width:96%}.pair-slot::before{background-position:center bottom 3px}.placement-hint{font-size:12px}.source-browse{gap:8px}.source-browse button{width:48px;min-height:48px}
 .dimension-controls{gap:10px;margin-bottom:19px;flex-wrap:nowrap}.stepper{padding:9px 6px;min-width:0;flex:1}.stepper label{font-size:12px;white-space:nowrap}.stepper label .icon{width:18px;height:18px}.stepper-row{gap:4px;justify-content:center}.stepper-row button{min-width:48px;padding:6px}.stepper output{font-size:22px;min-width:25px;padding:0 2px}
 .tray{padding:8px;gap:4px;border-width:7px;margin-bottom:25px}.tray-cell{width:48px;height:48px;min-width:48px;min-height:48px}.tray.labelled{padding:8px}.tray.labelled .tray-cell{width:52px;height:52px;min-height:52px}
 .brownie-board{padding:18px;border-radius:17px}.brownie-board::after{width:30px;height:6px;bottom:7px;right:15px}.sample-row{margin-top:17px}.sample-caption{font-size:12px}.cut-control-row button{min-width:48px;min-height:48px}.cut-control-row{gap:7px}.cut-controls{margin-top:23px}
 .equation-area{padding:22px 11px 18px;margin-top:24px}.guided-count h2{font-size:22px}.number-field{min-width:56px;min-height:56px}.equation-actions button{min-height:48px;padding:8px 10px}.group-controls button{font-size:13px;padding:8px 10px}.group-warning{font-size:12px}.check-action{margin-top:23px}.check-action .primary{min-height:56px}.result-panel{padding:20px 14px}.result-welcome h2{font-size:25px}
 .order-board{padding:24px 18px 25px;margin-top:22px;border-radius:18px}.order-board>.eyebrow{font-size:9px;padding:9px 11px;margin-bottom:13px;letter-spacing:.12em}.order-board>h1{font-size:28px!important}.bank-note{font-size:13px;padding:10px 12px;line-height:1.4}.order-grid{gap:14px 12px}.order-grid button{min-height:83px;font-size:28px}.order-board>.actions{gap:10px}.order-board>.actions button{font-size:14px;padding:10px 13px}
}
@media(max-width:370px){.stepper-row button{min-width:48px}.stepper-row{gap:2px}.stepper output{min-width:24px}.dimension-controls{gap:6px}.stepper{padding-inline:4px}.card-copy h2{font-size:21px}.home-copy h1{font-size:30px}.toolbar button{padding-inline:5px}}
@media(prefers-reduced-motion:reduce){body[data-motion=system] *,body[data-motion=system] *::before,body[data-motion=system] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
body[data-motion=reduced] *,body[data-motion=reduced] *::before,body[data-motion=reduced] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}

/* On phones, a shallow tray above the two plates keeps the full gesture in view. */
@media(max-width:760px){.pair-builder .cookie-btn{max-width:48px}.pair-builder .shelf{gap:2px;padding:1px 0 2px}}
@media(max-width:600px){
 .pair-builder:not(.demo-builder){grid-template-columns:minmax(0,1fr);gap:14px;max-width:400px}
 .pair-builder:not(.demo-builder) .source-tray{aspect-ratio:732/335;max-width:none}
 .source-tray-art{inset:0;width:100%;height:100%;transform:none}
 .pair-builder:not(.demo-builder) .source-cookie-scroll{inset:14% 12% 16%}
 .pair-builder:not(.demo-builder) .shelf{grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;padding:0}
 .pair-builder:not(.demo-builder) .cookie-btn{width:48px;height:48px;max-width:48px}
 .pair-builder:not(.demo-builder) .active-pair{padding:0;max-width:270px;width:100%;margin:auto}
 .pair-builder:not(.demo-builder) .active-pair>.surface-label{margin:0}
 .pair-builder:not(.demo-builder) .active-pair-heads{margin-top:9px}
 .pair-builder:not(.demo-builder) .pair-slot{min-height:92px}
 .pair-builder:not(.demo-builder) .pair-slot img{width:68px;height:68px;max-width:86%}
 .source-browse:not(.can-browse){display:none}
 .placement-hint{margin-top:6px}
}
@media(max-width:440px){
 body[data-view=home] .topbar{flex-direction:row;flex-wrap:nowrap;align-items:center;gap:9px}
 body[data-view=home] .toolbar{width:auto;flex-wrap:nowrap}
 body[data-view=home] .toolbar button{font-size:11px;padding-inline:7px}
 body[data-view=home] .toolbar .icon{width:16px;height:16px}
}

/* A warm base also remains readable when decorative grain is unavailable. */
.workbench{background-color:#e8c086}

/* Counting targets keep their geometry while pressed; feedback never moves a cut or group. */
.cookie-btn:active,.pair-slot:active,.tray-cell:active,.piece:active{transform:none}
.workbench button:disabled,.toolbar button:disabled,.order-board button:disabled{background:#e8dfce;color:#766957;border-color:#b4a78f;box-shadow:inset 0 1px 2px #715b251a;transform:none}
