:root{font-family:'Segoe UI','Malgun Gothic',sans-serif;color:#634c36;background:#dce4ce;font-synthesis:none;--green:#56846b;--dark:#456952;--cream:#fff7dc;--wood:#ab7750}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 45% 10%,#f5eed1 0,#dce5cf 45%,#aec5b1 100%);min-height:100svh}button{font:inherit;cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{opacity:.4;cursor:default}button:focus-visible{outline:3px solid #48b8a6;outline-offset:2px;z-index:5}button[hidden]{display:none}.game-shell{max-width:490px;margin:0 auto;min-height:100svh;padding:env(safe-area-inset-top) 7px env(safe-area-inset-bottom);background:linear-gradient(150deg,#e5edcf99,#fff2d280 50%,#c4d7b599);position:relative;overflow:hidden;box-shadow:0 0 80px #47664e24}.hud{height:69px;display:flex;align-items:center;gap:9px;position:relative;z-index:2;padding:8px 7px 3px}.level-badge{width:58px;height:58px;flex-shrink:0;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff6d8;border:3px solid #89b09c;outline:2px solid #bc9661;box-shadow:0 3px 0 #84643e70,inset 0 0 0 3px #eed5a0;border-radius:45% 45% 46% 46%;transform:rotate(-4deg);color:#3f6452}.level-badge>span{font-size:7px;letter-spacing:1.2px;font-weight:800}.level-badge strong{font-size:25px;line-height:1.1;text-shadow:1px 1px #fff}.level-progress{width:28px;height:4px;margin-top:2px;background:#ddd1ad;border-radius:5px;overflow:hidden}.level-progress i{display:block;height:100%;background:#79a981;min-width:2px}.resource{height:31px;min-width:0;flex:1;background:#6e6556;border:2px solid #d2bf91;border-radius:17px;box-shadow:0 2px 0 #96805b3b;position:relative;display:flex;align-items:center;padding:0 10px 0 25px;color:#fff9df;gap:5px}.resource strong{font-size:16px;font-variant-numeric:tabular-nums;text-overflow:ellipsis;overflow:hidden}.resource-label{font-size:8px;position:absolute;bottom:-15px;color:#7e7759;left:30px;letter-spacing:1px}.coin-icon,.star-icon{position:absolute;left:-5px;top:-4px;font-size:25px;color:#ffd15e;text-shadow:1px 2px #a5752d;line-height:31px;width:32px;text-align:center}.coin-icon{color:#e8aa42;background:#f2d36b;border:2px solid #b78837;border-radius:50%;font-size:20px;height:31px;line-height:25px;box-shadow:inset 0 0 0 2px #ffe699}.star-icon{font-size:34px;top:-5px}.round-button{width:30px;height:30px;flex-shrink:0;border:2px solid #8eaa83;border-radius:50%;background:linear-gradient(#fffbe7,#e1e6c3);box-shadow:0 2px 0 #5a745a40;display:grid;place-items:center;font-weight:bold;font-size:17px;padding:0;color:#587459}.round-button[aria-pressed=true]{background:#a7ceac}.settings-button{margin-left:0}.cafe-stage{height:150px;position:relative;margin:0 -7px;background-image:url('./cafe.svg');background-size:100% 100%;background-position:center bottom}.cafe-sign{position:absolute;left:50%;top:2px;transform:translateX(-50%) rotate(-2deg);text-align:center;border:2px solid #a57b49;box-shadow:0 3px 0 #7d573736;background:#f9e8b7;padding:3px 17px 5px;border-radius:4px;z-index:1;white-space:nowrap}.cafe-sign:before,.cafe-sign:after{content:'';position:absolute;top:-14px;width:2px;height:14px;background:#977b50}.cafe-sign:before{left:10px}.cafe-sign:after{right:10px}.cafe-sign h1{font-size:15px;margin:0;color:#55775a;letter-spacing:2px;text-shadow:1px 1px #fff8dd}.cafe-sign span{font-size:7px;letter-spacing:1px;color:#9c7e58;display:block;margin-top:1px}.stage-tools{position:absolute;right:9px;top:5px;display:flex;flex-direction:column;gap:7px;z-index:3}.stage-tools .round-button{width:25px;height:25px;font-size:14px}.orders{display:flex;justify-content:space-evenly;position:absolute;bottom:12px;left:18px;right:28px;gap:9px;z-index:2}.order{position:relative;flex:1;min-width:0;height:101px;display:flex;align-items:center;flex-direction:column;justify-content:end}.guest-portrait{position:absolute;bottom:28px;width:62px;height:78px;filter:drop-shadow(1px 2px 0 #77533526);pointer-events:none}.guest-portrait svg{width:100%;height:100%}.order-reward{position:absolute;top:0;right:-2px;border:1px solid #c7a67b;background:#fff4d6;padding:2px 5px;border-radius:7px;font-size:10px;color:#9a732f;font-weight:750;white-space:nowrap;z-index:1;box-shadow:0 1px 0 #b78b5e33}.order-reward:after{content:'';position:absolute;bottom:-4px;left:9px;border-top:4px solid #c7a67b;border-right:4px solid transparent}.serve{position:relative;width:100%;height:48px;max-width:115px;border:2px solid #b98a5a;border-bottom-width:4px;background:linear-gradient(#fff8df,#f3dfbd);border-radius:5px;box-shadow:0 3px 0 #845b3f44;display:flex;align-items:center;justify-content:center;gap:3px;transform:rotate(-2deg);padding:2px 5px;font-size:9px}.order:nth-child(2) .serve{transform:rotate(1deg)}.order:nth-child(3) .serve{transform:rotate(3deg)}.serve svg{width:39px;height:39px;filter:drop-shadow(0 2px 0 #88674822)}.serve>span{position:absolute;bottom:2px;right:3px;font-size:7px;padding:2px 4px;background:#e7d5ad;border-radius:3px;color:#917d60}.serve.ready{border-color:#87a477;background:linear-gradient(#fffde9,#e6eccb)}.serve.ready>span{background:#5b9472;color:#fff9dd}.order-status{position:absolute;left:3px;top:3px;font-size:12px;color:#d0b278}.ready .order-status{color:#5b9472}.counter{height:18px;position:absolute;bottom:0;left:0;right:0;background:linear-gradient(#e5bb85 0 3px,#ae7952 3px 7px,#cd996d 7px 11px,#9b6746 11px 14px,#795038 14px);box-shadow:0 3px 3px #61473124}.play-area{position:relative;z-index:3}.board-frame{padding:5px;border:2px solid #a27c55;background:linear-gradient(90deg,#d4ab7b,#ebca9b 50%,#b88e60);box-shadow:inset 0 0 0 1px #f9e2b7,0 4px 0 #84633d30;border-radius:2px;position:relative}.board-heading{position:absolute;right:8px;left:8px;top:-14px;display:flex;justify-content:space-between;align-items:center;color:#fff0d3;font-size:7px;letter-spacing:.5px;pointer-events:none;z-index:4}.board{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0;border:1px solid #a98459;touch-action:none;user-select:none;position:relative}.cell{position:relative;min-width:0;aspect-ratio:1;padding:3px;display:flex;align-items:center;justify-content:center;border:0;border-right:1px solid #b7936a40;border-bottom:1px solid #b7936a40;border-radius:0;background:#ecd2ae;box-shadow:inset 1px 1px 0 #fff4d222;touch-action:none;cursor:grab}.cell:nth-child(even){background:#e2c4a0}.cell:nth-child(7n){border-right:0}.cell:nth-last-child(-n+7){border-bottom:0}.cell svg{width:100%;height:100%;pointer-events:none;filter:drop-shadow(1px 3px 1px #69452d35)}.cell .tier{position:absolute;bottom:1px;right:3px;font-size:7px;color:#987854;pointer-events:none;opacity:.7}.cell.empty{cursor:default}.cell.selected{box-shadow:inset 0 0 0 3px #62a28b;background:#f7e4af;z-index:1}.cell.selected:before,.cell.selected:after{content:'';position:absolute;width:6px;height:6px;background:#d3fff0;z-index:2}.cell.selected:before{top:0;left:0}.cell.selected:after{bottom:0;right:0}.cell.match{box-shadow:inset 0 0 0 2px #8eb884;background:#e4d9a9}.cell.drop{box-shadow:inset 0 0 0 3px #58a894;background:#d7dcad}.cell.pop svg{animation:pop .35s ease-out}.bottom-dock{display:flex;gap:7px;align-items:center;padding:14px 3px 3px;min-height:116px}.dock-button{padding:0;width:50px;flex-shrink:0;border:0;background:none;position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;color:#6c7b53}.dock-button small{font-size:8px;background:#fff7dcad;border:1px solid #b9b588;border-radius:8px;padding:1px 5px}.book-icon{width:40px;height:47px;background:#c39355;color:#f8e4a8;line-height:37px;font-size:36px;border:3px solid #84694b;border-radius:3px 7px 7px 3px;box-shadow:inset 3px 0 #8e6548,3px 3px 0 #75533933;transform:rotate(-6deg)}.book-icon:after{content:'';position:absolute;top:6px;left:8px;width:4px;height:33px;background:#b17442}.item-panel{min-width:0;flex:1;border:2px solid #a88b60;border-radius:3px;background:#fff9e6;box-shadow:0 3px 0 #92714d22;position:relative;padding:14px 7px 4px}.item-heading{position:absolute;top:-11px;left:5px;right:4px;display:flex;align-items:center;gap:4px;min-width:0}.item-heading strong{background:#ad7159;color:#fff7df;border:1px solid #906249;border-radius:9px 9px 2px 2px;padding:3px 7px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:85%}.item-heading>span{font-size:7px;white-space:nowrap;color:#816f4b}.item-details{display:flex;align-items:center;gap:5px;min-height:32px}.item-details>span{width:30px;height:32px;flex-shrink:0}.item-details svg{width:100%;height:100%;filter:drop-shadow(0 2px 0 #7a56371a)}.item-details p{margin:0;font-size:9px;line-height:1.65;color:#78674e;word-break:keep-all;overflow-wrap:anywhere}.item-actions{display:flex;justify-content:space-between;gap:4px;margin-top:4px;padding-top:3px;border-top:1px dashed #d6cbb0}.item-actions button{border:0;background:#e9e4ce;color:#748263;border-radius:4px;font-size:8px;padding:3px 6px}.item-actions button:last-child{background:#f2dfb7;color:#a17939}.oven-art{width:49px;height:48px;background:#8dae86;border:3px solid #526f59;border-radius:9px 9px 6px 6px;position:relative;display:block;box-shadow:0 3px 0 #55745338}.oven-roof{position:absolute;top:-8px;left:-5px;width:53px;height:10px;background:#5e856e;border:2px solid #486b57;border-radius:7px 7px 3px 3px;box-shadow:0 2px 0 #c2dcb488}.oven-window{position:absolute;top:11px;left:5px;width:32px;height:24px;border:2px solid #685b40;background:#f0cb82;border-radius:4px;line-height:18px;font-size:25px;color:#aa7843}.oven-knob{position:absolute;top:3px;right:4px;width:4px;height:4px;background:#fff2b2;border-radius:50%}.bake-plus{position:absolute;right:-4px;top:25px;font-size:22px;font-weight:bold;line-height:23px;background:#fff4c8;color:#72a687;border:1px solid #8ea777;border-radius:50%;width:23px;height:23px}.oven-button:active .oven-art{transform:translateY(2px)}footer{display:flex;justify-content:space-between;gap:5px;padding:1px 8px 7px;color:#8a9272;font-size:7px}footer b{font-weight:600}#toast{position:fixed;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%,12px);background:#456c55;color:#fff6dc;padding:12px 18px;border:2px solid #b5c29b;border-radius:12px;font-size:12px;box-shadow:0 4px 20px #0002;opacity:0;pointer-events:none;transition:.2s;z-index:30;max-width:92vw;width:max-content;text-align:center}#toast.show{opacity:1;transform:translate(-50%,0)}dialog{border:3px solid #a68b5e;border-radius:12px;background:#fff9e7;color:#634c36;max-width:470px;width:calc(100% - 28px);padding:20px;max-height:85dvh;overflow:auto;box-shadow:0 20px 80px #162e3133}dialog::backdrop{background:#33463970;backdrop-filter:blur(3px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.dialog-header h2{font-size:18px;margin:0}.dialog-copy{font-size:12px;line-height:1.9;color:#71664d}.muted{font-size:11px;color:#8a856b;line-height:1.7}.catalog{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.catalog-item{background:#ecdec2;text-align:center;padding:10px 4px;border:1px solid #d7c3a0;border-radius:7px;font-size:11px}.catalog-item svg{width:66px;height:66px;max-width:100%}.catalog-item strong{display:block;font-size:10px;margin-top:5px}.catalog-item small{font-size:8px;color:#98906f}.settings-actions{display:grid;gap:10px}.settings-actions button,.file-button{border:1px solid #c9bb92;background:#eee3c6;border-radius:8px;text-align:center;padding:12px;font-size:12px;cursor:pointer}.danger{color:#b6685e!important}#import{display:none}.drag-ghost{position:fixed;pointer-events:none;z-index:40;filter:drop-shadow(0 3px 2px #0002);transform:translate(-50%,-50%) scale(1.1);transform-origin:center}.drag-ghost>svg{display:block;width:100%;height:100%;pointer-events:none}@keyframes pop{0%{transform:scale(.6)}55%{transform:scale(1.2)}100%{transform:scale(1)}}@media(min-width:600px){body{padding:20px 0}.game-shell{border:1px solid #b0bb8f;border-radius:17px;min-height:0}.hud{height:77px}.cafe-stage{height:176px}.cafe-sign h1{font-size:18px}.cafe-sign span{font-size:9px}.orders{left:24px;right:34px;gap:16px}.order{height:119px}.guest-portrait{width:73px;height:91px;bottom:32px}.serve{height:56px;max-width:138px}.serve svg{width:45px;height:45px}.serve>span{font-size:8px}.order-reward{font-size:12px}.bottom-dock{min-height:128px;gap:10px}.dock-button{width:59px}.item-heading strong{font-size:12px}.item-heading>span{font-size:8px}.item-details p{font-size:11px}.item-details>span{width:36px;height:37px}.item-actions button{font-size:10px}.cell .tier{font-size:9px}footer{font-size:8px}}@media(max-height:740px) and (max-width:599px){.hud{height:58px}.level-badge{width:48px;height:48px}.level-badge strong{font-size:21px}.cafe-stage{height:126px}.orders{bottom:11px}.order{height:84px}.guest-portrait{height:62px;width:50px;bottom:25px}.serve{height:42px}.serve svg{width:33px;height:33px}.order-reward{top:-2px;font-size:9px}.cafe-sign h1{font-size:13px}.cafe-sign{padding:2px 13px 3px}.bottom-dock{min-height:108px;padding-top:13px}}@media(max-width:350px){.hud{gap:7px;padding-left:3px;padding-right:3px}.resource{padding-left:23px;padding-right:5px}.resource strong{font-size:14px}.bottom-dock{gap:4px;padding-left:0;padding-right:0}.dock-button{width:43px}.item-details p{font-size:8px}.item-heading strong{font-size:9px}.item-heading>span{font-size:6px}.item-actions button{font-size:7px}.oven-art{transform:scale(.86)}.book-icon{transform:scale(.9) rotate(-6deg)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
/* Sprite shapes and readable level badges remain distinct at phone tile sizes. */
.cell .tier{opacity:1;min-width:13px;padding:1px 3px;background:#fff4d8;color:#684f38;border:1px solid #b99b6c;border-radius:3px;font-size:9px;font-weight:800;line-height:11px;text-align:center;text-shadow:none;font-variant-numeric:tabular-nums}
.cell.food-cell .tier,.cell.generator-cell .tier{top:2px;left:2px;right:auto;bottom:auto;opacity:1;z-index:2;box-shadow:0 1px 1px #63452a35}
.cell.food-cell .tier{color:#fff8e1;border-color:#fff4d0;background:#8e623e;min-width:15px;line-height:11px}.cell.food-cell.drinks .tier{background:#417d78}.cell.food-cell.desserts .tier{background:#9b587b}.cell.food-cell.legacy .tier{background:#847052}
.cell.generator-cell .tier{top:auto;bottom:2px;font-size:8px;color:#456048;background:#fff5d8;border-color:#b69d68;line-height:11px;padding:1px 3px}
.order-tier{position:absolute;right:3px;top:3px;width:14px;height:13px;display:grid;place-items:center;font:800 9px/1 'Segoe UI',sans-serif;color:#fff9df;background:#8e623e;border:1px solid #fff4d0;border-radius:3px}.order-tier.drinks{background:#417d78}.order-tier.desserts{background:#9b587b}.order-tier.legacy{background:#847052}

/* Three families, generators and upgrade parts live on the board. */
.construction-cell{background-image:repeating-linear-gradient(135deg,#fff8dc33 0 5px,transparent 5px 10px);cursor:pointer}.construction-locked svg{opacity:.42;filter:grayscale(.5)}.construction-locked .tier{background:#ece5ce;color:#897b61}.core-cell svg{width:86%;height:86%}.core-cell .tier{color:#8b7195;font-weight:bold}.item-actions #craft{background:#c8d9b7;color:#50744e}.recipe-card{border:1px solid #d0bc96;background:#f7edd5;border-radius:9px;padding:13px;margin:15px 0}.recipe-title{display:flex;gap:10px;align-items:center}.recipe-title svg{width:48px;height:48px;flex-shrink:0}.recipe-title h3{font-size:15px;margin:0 0 5px}.recipe-title small{font-size:11px;color:#6f8565}.recipe-unlock{font-size:11px;line-height:1.8;color:#86714f}.recipe-steps{padding-left:23px;margin:14px 0;font-size:12px}.recipe-steps li{padding:8px 0 8px 3px;border-top:1px dashed #d6c8a9}.recipe-steps strong,.recipe-steps span,.recipe-steps small{display:block}.recipe-steps span{font-size:11px;line-height:1.7;color:#967846;margin:4px 0}.recipe-steps small{font-size:10px;line-height:1.7;color:#8c8067}.recipe-steps .done strong{color:#5f8b6c}.recipe-steps .done strong:after{content:' ✓'}.recipe-steps .next strong{color:#a17741}.recipe-action,.recipe-rebuild{width:100%;border:1px solid #9cac84;border-radius:6px;background:#d3dfb9;color:#52714f;padding:10px;font-size:11px;line-height:1.6}.recipe-rebuild{background:#efe4ca;color:#927448;border-color:#d0bd96}
.generator-cell{background:#c4c99d;box-shadow:inset 0 0 0 2px #a7ad79}.generator-cell.drinks{background:#b8d4c7;box-shadow:inset 0 0 0 2px #83ae9b}.generator-cell.desserts{background:#e3bec6;box-shadow:inset 0 0 0 2px #c49bab}.generator-cell.legacy{background:#d5c6a3}.generator-cell.selected{box-shadow:inset 0 0 0 3px #4d987d;background:#e5e6b7}.generator-bolt{position:absolute;right:1px;top:1px;font-size:18px;line-height:20px;font-weight:900;color:#ffe28c;text-shadow:1px 1px #a57834;pointer-events:none}.part-cell svg{width:87%;height:87%}.generator-cell .tier{opacity:1;color:#63794c;background:#e5ecc491;border-radius:3px;padding:0 2px;font-weight:bold;font-size:7px}.cell.match{box-shadow:inset 0 0 0 2px #8eb884}.item-heading strong{font-size:11px}.item-heading>span{font-size:8px}.item-details{min-height:38px}.item-details p{font-size:10px}.item-actions button{font-size:9px}.item-actions #upgrade{background:#c8d9b7;color:#50744e}.order-reward>span{color:#8c9c82;font-size:10px}.gift-art{width:44px;height:39px;margin-top:7px;position:relative;display:block;background:#b790c1;border:3px solid #8c689b;border-radius:4px;box-shadow:3px 3px 0 #70583c28}.gift-art:before{content:'';position:absolute;left:-5px;top:-6px;width:48px;height:10px;background:#d4b5da;border:2px solid #8c689b;border-radius:3px}.gift-art:after{content:'';position:absolute;left:14px;top:-6px;width:8px;height:39px;background:#ffe3a0;border-left:1px solid #c6a369;border-right:1px solid #c6a369}.gift-art i:before,.gift-art i:after{content:'';position:absolute;top:-14px;width:14px;height:10px;border:3px solid #dfba77;border-radius:6px 6px 1px 6px;background:#ffe5af}.gift-art i:before{left:5px;transform:rotate(12deg)}.gift-art i:after{right:3px;transform:rotate(-12deg)}.has-reward .gift-art{box-shadow:0 0 0 3px #f8eab6,3px 3px 0 #70583c28}.has-reward small{background:#ffe9b1;font-weight:bold}.catalog-heading{font-size:14px;padding-left:8px;border-left:4px solid var(--chain-color,#baa06f);margin:20px 0 10px}.catalog-heading small{font-size:10px;font-weight:400;margin-left:8px}.pending-rewards{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.pending-rewards>div{background:#eee2c8;border-radius:7px;padding:6px;text-align:center}.pending-rewards svg{width:100%;height:58px}.pending-rewards small{font-size:9px;display:block}@media(min-width:600px){.item-details p{font-size:11px}.item-heading strong{font-size:12px}.generator-cell .tier{font-size:9px}}@media(max-width:350px){.item-details p{font-size:9px}.item-heading strong{font-size:10px}.item-actions button{font-size:8px}}

/* Keep all 63 cells and the selected-item controls inside the visible viewport. */
:root{--app-height:100vh;--app-height:100dvh}
body{min-height:0}
.game-shell{height:var(--app-height);min-height:0;display:flex;flex-direction:column}
.hud,.cafe-stage,.bottom-dock,footer{flex-shrink:0}
.hud{gap:7px}
.fullscreen-button{width:30px;height:30px;flex-shrink:0;padding:4px}
.fullscreen-button svg{width:20px;height:20px;display:block}
.fullscreen-button[aria-pressed="true"]{background:#d7e9c9;box-shadow:inset 0 0 0 2px #81a589}
.play-area{flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.board-frame{width:100%;flex-shrink:0}
#modal{max-height:calc(var(--app-height) - 30px)}
#toast{max-width:calc(100% - 24px);text-align:center}
.install-guide{font-size:12px;line-height:1.8;color:#78674e}
.install-guide p{padding:10px 12px;margin:10px 0;background:#f0ead5;border-radius:8px}
.install-guide b{color:#51745a}
.display-note{padding:10px 12px;background:#e1eacb;border-radius:8px;font-size:12px;line-height:1.7}
@media(min-width:600px){.game-shell{height:calc(var(--app-height) - 40px)}}
.display-app body{padding:0}
.display-app .game-shell{height:var(--app-height);border-radius:0}
.short-view .hud{height:52px;padding-top:4px;padding-bottom:2px}
.short-view .level-badge{width:43px;height:43px}
.short-view .level-badge strong{font-size:19px}
.short-view .cafe-stage{height:106px}
.short-view .orders{bottom:11px;left:14px;right:34px;gap:8px}
.short-view .order{height:74px}
.short-view .guest-portrait{height:52px;width:44px;bottom:23px}
.short-view .serve{height:39px}
.short-view .serve svg{width:30px;height:30px}
.short-view .order-reward{top:0;font-size:9px}
.short-view .cafe-sign{padding:2px 13px 3px}
.short-view .cafe-sign h1{font-size:13px}
.short-view .bottom-dock{min-height:100px;padding-top:12px;gap:5px}
.short-view .dock-button{width:44px}
.short-view .item-details p{font-size:9px;line-height:1.6}
.short-view .item-heading strong{font-size:10px}
.short-view .item-actions button{font-size:8px}
.short-view footer{padding-bottom:4px}
.tiny-view .hud{height:46px;gap:5px}
.tiny-view .level-badge{width:37px;height:37px;border-width:2px}
.tiny-view .level-badge strong{font-size:17px}
.tiny-view .cafe-stage{height:88px}
.tiny-view .cafe-sign{display:none}
.tiny-view .stage-tools{top:3px;gap:3px}
.tiny-view .stage-tools .round-button{width:23px;height:23px;font-size:13px}
.tiny-view .order{height:68px}
.tiny-view .guest-portrait{height:42px;width:36px;bottom:22px}
.tiny-view .serve{height:35px}
.tiny-view .serve svg{width:27px;height:27px}
.tiny-view .bottom-dock{min-height:89px;padding-top:11px;padding-bottom:2px}
.tiny-view .item-details{min-height:30px}
.tiny-view .item-details>span{width:25px;height:27px}
.tiny-view .item-panel{padding-top:11px}
@media(orientation:landscape) and (max-height:600px) and (min-width:520px){
 body{padding:0}
 .game-shell,.display-app .game-shell{max-width:900px;height:var(--app-height);border-radius:0;display:grid;grid-template-columns:122px minmax(0,1fr) 156px;grid-template-rows:52px minmax(0,1fr) 17px;grid-template-areas:"hud hud hud" "cafe game dock" "foot foot foot";column-gap:8px}
 .hud{grid-area:hud;height:52px}
 .cafe-stage{grid-area:cafe;height:100%;margin:0;min-height:0}
 .play-area{grid-area:game;height:100%}
 .bottom-dock{grid-area:dock;min-height:0;padding:12px 0 4px;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:15px 24px}
 .bottom-dock .item-panel{order:-1;flex-basis:100%;flex-grow:0}
 footer{grid-area:foot;padding:2px 8px 4px}
 .cafe-sign,.tiny-view .cafe-sign{display:block;padding:3px 4px}
 .cafe-sign h1{font-size:13px}.cafe-sign span{font-size:7px}
 .stage-tools{top:35px;left:7px;right:7px;flex-direction:row;justify-content:space-around;gap:4px}
 .stage-tools .round-button{width:23px;height:23px;font-size:13px}
 .orders,.short-view .orders{top:65px;bottom:18px;left:4px;right:4px;flex-direction:column;justify-content:space-evenly;gap:3px}
 .order,.short-view .order,.tiny-view .order{height:56px;flex:0 1 56px;min-height:0}
 .guest-portrait,.short-view .guest-portrait,.tiny-view .guest-portrait{width:37px;height:46px;left:0;bottom:0;transform:none}
 .serve,.short-view .serve,.tiny-view .serve{margin-left:37px;width:calc(100% - 37px);height:35px}
 .serve svg{width:27px;height:27px}.serve>span{font-size:6px;padding:1px 3px}
 .order-reward{top:0;right:5px;font-size:8px}
 .item-details p{font-size:9px}.item-details>span{width:24px;height:27px}
 .item-heading strong{font-size:10px}.item-actions button{font-size:8px;padding:3px 4px}
}

.catalog-mystery{display:inline-flex;width:66px;height:66px;max-width:100%;align-items:center;justify-content:center;vertical-align:middle;border:2px dashed #ccbd9c;border-radius:15px;background:#f4ecd8;color:#b8a782;font-size:32px;font-weight:700;line-height:1;margin-bottom:0}.catalog-item.locked{background:#efe4cc}.catalog-item small{display:block;margin-top:3px}
/* Illustrated cafe skin. Original sizing rules still keep the whole tray in view. */
:root{color:#694b35;--cream:#fff7e9;--green:#6d8552;--dark:#536b42;--wood:#ab7951}
body{background:#e9e0c9 url('./cafe-illustration-v1.png') center/cover fixed}
.game-shell{background:linear-gradient(120deg,#8b9c6fe8,#738b5fe8);box-shadow:0 12px 45px #4c3a2b55,inset 0 0 0 3px #d3b085}
.hud{background:linear-gradient(180deg,#5b754744,#8c9c6400)}
.level-badge{border-color:#e0c995;outline-color:#7c8c58;background:radial-gradient(circle at 35% 25%,#93a06b,#597445);color:#fff9dc;transform:none;border-radius:50%;box-shadow:0 3px 3px #39492e55,inset 0 0 0 3px #b6c291}
.level-badge strong{text-shadow:0 2px #465b34}.level-progress{background:#455b35}.level-progress i{background:#e3c985}
.resource{color:#725438;background:linear-gradient(#fff8e8,#f3e2c1);border-color:#af8059;box-shadow:0 2px 0 #644b3344,inset 0 0 0 1px #fff9e8}
.resource-label{color:#f6ebd3;font-weight:600;text-shadow:0 1px #596743}
.round-button{background:linear-gradient(#a0b182,#6f8755);color:#fff8e3;border-color:#d4d7ac;box-shadow:0 2px 3px #3d553d55,inset 0 0 0 1px #526e43}
.cafe-stage{background-image:url('./cafe-illustration-v1.png');background-size:cover;background-position:center 54%}
.cafe-sign{background:linear-gradient(#bb8c5b,#95683f);border-color:#6e4b2d;border-radius:13px;box-shadow:0 3px 0 #62422a55,inset 0 0 0 1px #e2b986;transform:translateX(-50%);padding:5px 20px 6px}
.cafe-sign h1{color:#fff3d6;text-shadow:0 2px #795333;letter-spacing:1px}.cafe-sign span{color:#f0d9b2}.cafe-sign:before,.cafe-sign:after{background:#795638}
.guest-portrait{width:78px;height:78px;filter:drop-shadow(0 2px 1px #67472c20)}
.guest-illustration{display:block;width:100%;height:100%;background-image:url('./guests-v1.png');background-size:300% 100%;background-position:var(--guest-x) 0;background-repeat:no-repeat}
.serve{background:linear-gradient(#fff9ee,#f7ead4);border-color:#b48c65;border-radius:10px;box-shadow:0 3px 0 #74513555;transform:none}
.order:nth-child(2) .serve,.order:nth-child(3) .serve{transform:none}
.serve>span{background:#e9dcc2;color:#8a775d;border-radius:5px}.serve.ready{background:linear-gradient(#fff9e9,#edf1d5);border-color:#79935e}
.order-reward{background:#fff5dd;border-radius:14px;border-color:#c3a16d;color:#9a7131}
.counter{background:linear-gradient(#e6b780 0 3px,#b17c4b 3px 7px,#cf9c68 7px 11px,#8d5e39 11px 14px,#704a2f 14px)}
.board-frame{border-color:#805735;border-radius:10px;background:linear-gradient(110deg,#c99b67,#e4bc8c 45%,#b18453);box-shadow:inset 0 0 0 1px #f0d6ad,0 4px 0 #553c2970}
.board-heading{color:#fff8e3;text-shadow:0 1px #775936}
.board{border-color:#bb9368;border-radius:5px;overflow:hidden}
.cell{border-color:#d0b18b55;background:linear-gradient(135deg,#f4e3c6,#efdbbd);box-shadow:inset 1px 1px 0 #fffcf08c,inset -1px -1px 0 #caa87c33;border-radius:4px}
.cell:nth-child(even){background:linear-gradient(135deg,#eedbc0,#e7d0af)}
.cell svg{filter:drop-shadow(0 2px 1px #75533525);image-rendering:auto}
.cell.food-cell .tier{left:auto;right:2px;top:auto;bottom:2px;background:#6c8550;border-radius:50%;border-color:#fff4d4;box-shadow:0 1px 2px #64492c33;font-size:8px;line-height:11px;min-width:15px;min-height:15px;padding:1px 2px}
.cell.food-cell.drinks .tier{background:#4c8c83}.cell.food-cell.desserts .tier{background:#aa6b85}.cell.food-cell.breads .tier{background:#ad7a4c}.cell.food-cell.icecreams .tier{background:#6d9ca9}.cell.food-cell.coffees .tier{background:#936951}
.order-tier{border-radius:50%}.order-tier.breads{background:#ad7a4c}.order-tier.icecreams{background:#6d9ca9}.order-tier.coffees{background:#936951}
.cell.selected:before,.cell.selected:after{display:none}.cell.selected{background:#fff0cc;box-shadow:inset 0 0 0 2px #68874b}.cell.match{background:#e4e8c8;box-shadow:inset 0 0 0 2px #90a76e}
.machine-art,.assembly-art{position:relative;display:block;width:100%;height:100%;pointer-events:none}.machine-art svg,.assembly-art svg{display:block;width:100%;height:100%}
.generator-cell,.generator-cell.cookies{background:linear-gradient(135deg,#dae4bd,#b7c896);box-shadow:inset 0 0 0 2px #92a773}
.generator-cell.drinks{background:linear-gradient(135deg,#deede3,#bbd7c9);box-shadow:inset 0 0 0 2px #92b6a3}
.generator-cell.desserts{background:linear-gradient(135deg,#f4dce2,#dfb9c6);box-shadow:inset 0 0 0 2px #c69aaa}
.generator-cell.breads{background:linear-gradient(135deg,#f0dfbf,#d6b88d);box-shadow:inset 0 0 0 2px #b39061}
.generator-cell.icecreams{background:linear-gradient(135deg,#ddecf0,#b5d2dc);box-shadow:inset 0 0 0 2px #8db2bf}
.generator-cell.coffees{background:linear-gradient(135deg,#e6d8c9,#c9ac94);box-shadow:inset 0 0 0 2px #a6876f}
.machine-grade{position:absolute;top:0;left:0;background:#fff5d5d9;color:#b3832f;border:1px solid #d4b376;border-radius:5px;font-style:normal;font-size:7px;line-height:9px;letter-spacing:-1px;padding:1px 3px}
.machine-level-5 svg{filter:drop-shadow(0 0 2px #ffd070)}
.assembly-art svg{opacity:.2;filter:grayscale(.65)}.assembly-art.stage-1 svg{opacity:.48;filter:grayscale(.2)}.assembly-art.stage-2 svg{opacity:.75;filter:none}
.assembly-mark{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);width:40%;height:40%;display:grid;place-items:center;font-style:normal;font-size:14px;color:#726349;background:#fff5d7db;border:1px solid #b8a278;border-radius:50%;box-shadow:0 2px 1px #71563625}
.construction-locked .assembly-mark{font-size:0}.construction-locked .assembly-mark:after{content:'🔒';font-size:11px}.construction-locked .tier{color:#938063;background:#f8ecd3}.construction-cell{cursor:pointer}
.bottom-dock{background:linear-gradient(#90673c00,#71563844);padding-bottom:6px}
.item-panel{border-color:#ba946e;border-radius:9px;background:linear-gradient(#fff9eb,#f9eed8);box-shadow:0 3px 0 #604a3333}
.item-heading strong{background:#92623f;border-color:#70472c;border-radius:8px;padding:3px 8px}
.item-heading>span{background:#f8ead0;border-radius:4px;padding:1px 3px;color:#876444}
.item-actions button{background:#e4ead4;color:#65774d;border-radius:6px}.item-actions #craft,.item-actions #upgrade{background:#c8d9ae;color:#526b3f}
.dock-button{color:#fff5da}.dock-button small{border-color:#c4ab7e;background:#fff1d8;color:#806547}
.book-icon{border-color:#576f42;background:linear-gradient(120deg,#a4b27c,#6c8654);color:#fff0d1;border-radius:9px;box-shadow:inset 3px 0 #526b3b,2px 3px 0 #523b2d33;transform:none}.book-icon:after{display:none}
.gift-art{background:linear-gradient(#e9b5a0,#c87e6e);border-color:#9f6452;border-radius:6px}.gift-art:before{background:#efc4b0;border-color:#9f6452;border-radius:5px}
footer{color:#f1e4c9}
dialog{border-color:#9c825d;border-radius:20px;background:linear-gradient(#fffaf0,#f8eddb);box-shadow:0 20px 70px #2e392555,inset 0 0 0 2px #f6e3bf}
.dialog-header{border-bottom:1px solid #ddc5a2;padding-bottom:12px}.dialog-header h2{color:#755139;letter-spacing:1px}
.catalog-item{background:linear-gradient(#fff8e9,#f9ecd8);border-color:#dfc9a8;border-radius:13px;padding-top:12px;padding-bottom:12px}
.catalog-item.locked{background:linear-gradient(#fbf3e4,#f4e9d7)}
.catalog-mystery{border:0;border-radius:50%;background:#e9ddc8;color:#8e7e65;font-size:36px}.catalog-item strong{color:#79573c}.catalog-item small{color:#8d8068}
.recipe-card{border-color:#ddc6a3;background:linear-gradient(#fff8e9,#f5e7d1);border-radius:14px}.recipe-title{position:relative}.recipe-title>.machine-art,.recipe-title>.assembly-art{width:54px;height:54px;flex-shrink:0}.recipe-title h3{font-size:14px}.recipe-title>div{flex:1}.recipe-title .recipe-level{background:#e3eacb;color:#6b8151;border-radius:10px;padding:4px 7px;font-size:10px;font-weight:700;white-space:nowrap}
.recipe-locked .machine-art{opacity:.45;filter:grayscale(.3)}.recipe-locked .recipe-level{background:#e8ddc7;color:#998566}.recipe-locked .recipe-unlock{margin-bottom:0}
.unlock-roadmap{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:16px 0}.unlock-roadmap span{display:flex;flex-direction:column;align-items:center;gap:3px;padding:9px 3px;background:#efe5d1;border:1px solid #dcc7a4;border-radius:10px;font-size:10px;color:#9b8b70}.unlock-roadmap b{font-size:11px}.unlock-roadmap .unlocked{color:#617b4b;background:#e5edd5;border-color:#b7c699}
.pending-rewards .machine-art,.pending-rewards .assembly-art{height:58px}
.drag-ghost .machine-art,.drag-ghost .assembly-art{height:100%}
.cell.pop .machine-art,.cell.pop .assembly-art{animation:pop .35s ease-out}.cell.pop .machine-art svg,.cell.pop .assembly-art svg{animation:none}
@media(min-width:600px){.guest-portrait{width:91px;height:91px}.cafe-sign{top:3px}.game-shell{border:3px solid #946638}}
@media(max-height:740px) and (max-width:599px){.guest-portrait{width:62px;height:62px}}
.short-view .guest-portrait{width:52px;height:52px}.tiny-view .guest-portrait{width:42px;height:42px}
@media(orientation:landscape) and (max-height:600px) and (min-width:520px){.guest-portrait,.short-view .guest-portrait,.tiny-view .guest-portrait{width:38px;height:38px}.game-shell{border:0}.cafe-sign{padding:3px 4px}.cafe-sign h1{font-size:12px}.recipe-title h3{font-size:14px}}

.recipe-details summary{font-size:11px;color:#927547;cursor:pointer;padding:5px 0}.recipe-details .recipe-steps{margin-bottom:0}
