/* Touch text belongs to the controls, not the browser's long-press copy menu. */
#game,#game button,#game button *,button,button *,[role=button]{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#game input,#game textarea,#game [contenteditable=true],#game [data-allow-selection]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
#game a,dialog img,#game dialog img{-webkit-touch-callout:default}
#order-recipe{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;padding-top:3px;font-size:11px;line-height:16px;color:#746b58;text-align:left;cursor:default}
#order-recipe small{font-size:10px;color:#7b8372;flex:none}
#order-recipe span{white-space:nowrap}
#order-recipe .done{color:#287158}
#order-recipe .pending{color:#9b702b}
#game[data-mode=business].has-recipe-guide,#game[data-mode=business].has-recipe-guide.two-material-rows{grid-template-rows:44px 128px minmax(0,1fr) 68px}
#game[data-mode=business].has-recipe-guide #order{padding:6px 10px 22px}
#game[data-mode=business].has-recipe-guide #order-details{font-size:12px;line-height:17px;margin-top:1px}
#game[data-mode=business][data-order-kind=double].has-recipe-guide,#game[data-mode=business][data-order-kind=double].has-recipe-guide.two-material-rows{grid-template-rows:44px 156px minmax(0,1fr) 68px}
#game[data-mode=business][data-order-kind=double] #order-recipe{margin-top:4px}
#seal-check{max-width:360px;padding:24px}
#seal-check h2{font-size:20px;margin:0 0 14px}
#seal-check-list{text-align:left;font-size:14px;line-height:1.6;margin-bottom:18px}
#seal-check-list p{margin:6px 0;color:#74644a}
#seal-check button{width:100%;min-height:48px;margin-top:8px;font-size:15px}
.store-cup-goals{border-top:1px solid #dce2d5;padding-top:14px;margin-top:12px}
.store-cup-goals>b{font-size:14px;display:block}
.store-cup-goals>small{display:block;font-size:11px;margin:5px 0 10px;color:#77826f}
.store-cup-goals>div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;font-size:13px}
.store-cup-goals>div strong{font-size:12px;white-space:nowrap}
.store-cup-goals .done{color:#337258}
#store-page .store-cup-goals{margin:12px 0 22px}#store-page .store-cup-goals>div strong{font-size:13px}.menu-growth-hint{color:#9b722d!important}.store-cup-goals button{min-height:44px;font-size:13px;width:100%;margin-top:6px}

#seal-check-note{display:block;text-align:left;font-size:11px;color:#7a846e;margin-bottom:12px}

/* Keep the primary action above the scene and give it a larger, stable hit area. */
#game[data-mode=business],#game[data-mode=business].two-material-rows{--order-panel:118px;grid-template-rows:44px var(--order-panel) minmax(0,1fr) 68px}
#game[data-mode=business][data-order-kind=double].has-cup-tools{--order-panel:130px;grid-template-rows:44px var(--order-panel) minmax(0,1fr) 68px}
#game[data-mode=business].has-recipe-guide{--order-panel:128px}
#game[data-mode=business][data-order-kind=double].has-recipe-guide{--order-panel:156px}
#game[data-mode=business].has-cup-tools .action-zone,#game[data-mode=business]>.action-zone{position:relative;z-index:20;isolation:isolate;display:grid;grid-template-columns:52px minmax(0,1fr) 64px;gap:6px;height:68px;padding:8px 10px 12px;overflow:visible}
#game[data-mode=business].has-cup-tools #cup-tools{display:contents}
#game[data-mode=business].has-cup-tools #cup-cost-open{grid-column:1;grid-row:1}
#game[data-mode=business].has-cup-tools #quick-remake{grid-column:3;grid-row:1}
#game[data-mode=business].has-cup-tools .action-zone #main-action{grid-column:2;grid-row:1;width:100%;height:48px;min-height:48px;max-height:none;min-width:0;padding:4px 6px;font-size:14px;line-height:18px;touch-action:manipulation}
#game[data-mode=business].has-cup-tools #cup-tools button{height:48px;min-height:48px;min-width:0;padding:4px;font-size:10px;line-height:14px}

/* A fixed, quiet category strip: three equal choices, or four when fruit is stocked. */
#game[data-mode=business] #craft-desktop[data-workbench=rack] .category-tabs:not([hidden]){display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));position:absolute;left:10px;right:10px;bottom:6px;top:auto;height:48px;min-height:48px;padding:4px;gap:4px;background:#fffaf0f5;border:1px solid #e5d9ba;border-radius:14px;box-shadow:0 2px 5px #60523312;z-index:12;pointer-events:auto}
#game[data-mode=business] #craft-desktop[data-workbench=rack] .category-tabs[data-columns="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}
#game[data-mode=business] #craft-desktop .category-tabs>button{height:40px;min-height:40px;min-width:0;padding:0 3px;margin:0;border:0;border-radius:10px;box-shadow:none;background:transparent;color:#6b705e;font-size:13px;line-height:18px;font-weight:600;white-space:nowrap;transition:background .15s ease,color .15s ease;touch-action:manipulation}
#game[data-mode=business] #craft-desktop .category-tabs>button.selected{background:#e0ead9;color:#245e49}
#game[data-mode=business] #craft-desktop .category-tabs>button:focus-visible{outline:2px solid #397e65;outline-offset:-2px}
#game[data-mode=business] .scene-wrap>.review{top:35%;right:4%;width:52%;max-width:204px;padding:12px 10px;border:2px solid #e8dba6;border-radius:20px;background:#fffdf0;box-shadow:0 4px 12px #66563318;gap:3px;text-align:center;animation:review-arrive .18s ease-out both}
#game[data-mode=business] .scene-wrap>.review:before{display:none}
#game[data-mode=business] .scene-wrap>.review #stars{font-size:22px;line-height:26px;letter-spacing:2px;color:#d6a03c}
#game[data-mode=business] .scene-wrap>.review #review-text{font-size:13px;line-height:19px;font-weight:600;margin:3px 0 5px}
#game[data-mode=business] .scene-wrap>.review #review-money{font-size:24px;line-height:30px;font-weight:750;margin:0;color:#2c785a}
#game[data-mode=business] .scene-wrap>.review #tip-pop{font-size:11px;line-height:17px;color:#a88645;animation:none}
#game[data-mode=business] .scene-wrap>.review #review-reasons{font-size:10px;line-height:14px;margin:0;color:#8a785b}
#game[data-mode=business] .combo,#game[data-mode=business] .combo.big{top:12px;left:50%;transform:translateX(-50%);max-width:90%;padding:6px 12px;border-radius:18px;font-size:13px;line-height:18px;white-space:nowrap;pointer-events:none;animation:none}
@keyframes review-arrive{from{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){#game[data-mode=business] .scene-wrap>.review{animation:none}#game[data-mode=business] #craft-desktop .category-tabs>button{transition:none}}

/* Names appear only for the touched physical ingredient; palette choices stay readable. */
#game[data-mode=business] #craft-desktop[data-workbench=rack] .ingredients button .ingredient-name,
#game[data-mode=business] #craft-desktop[data-workbench=rack] #sugar-pump>span,
#game[data-mode=business] #craft-desktop[data-workbench=tools] .tool-target>span,
#game[data-mode=business] #craft-desktop .direct-topping>.direct-name{display:block;visibility:hidden;opacity:0;transition:opacity .16s ease,visibility .16s ease;font-size:12px;line-height:17px;padding:2px 6px;border-radius:6px;background:#fff9e4c9;color:#365c48;white-space:nowrap;pointer-events:none;box-shadow:none}
#game[data-mode=business] #craft-desktop[data-workbench=rack] .ingredients button:is(.show-label,.guided,:focus-visible) .ingredient-name,
#game[data-mode=business] #craft-desktop[data-workbench=rack] #sugar-pump:is(.show-label,.guided,:focus-visible)>span,
#game[data-mode=business] #craft-desktop[data-workbench=tools] .tool-target:is(.show-label,.guided,:focus-visible)>span,
#game[data-mode=business] #craft-desktop .direct-topping:is(.show-label,.guided,:focus-visible)>.direct-name{visibility:visible;opacity:1}
#game[data-mode=business] #craft-desktop .direct-topping>.direct-name{position:absolute;left:50%;bottom:0;transform:translateX(-50%)}
#game[data-mode=business] #craft-desktop[data-workbench=rack] .ingredients button.show-label,
#game[data-mode=business] #craft-desktop .tool-target.show-label,
#game[data-mode=business] #craft-desktop .direct-topping.show-label{background:#fffaf025;border-radius:10px}
@media(prefers-reduced-motion:reduce){#craft-desktop .ingredient-name,#craft-desktop .direct-name,#craft-desktop .tool-target>span{transition:none!important}}

#game[data-mode=business] #craft-desktop[data-workbench=rack] .ingredients button.pending,
#game[data-mode=business] #craft-desktop .tool-target.pending,
#game[data-mode=business] #craft-desktop .direct-topping.pending{background:#fffaf025!important}

/* Separate floating category pills, with clear gaps and no shared panel. */
#game[data-mode=business] #craft-desktop[data-workbench=rack] .category-tabs:not([hidden]){left:18px;right:18px;bottom:10px;height:44px;min-height:44px;padding:0;gap:8px;background:none;border:0;border-radius:0;box-shadow:none}
#game[data-mode=business] #craft-desktop .category-tabs>button{height:44px;min-height:44px;border-radius:22px;background:#fff9eae8;color:#506d59;box-shadow:0 2px 0 #795c3930,0 3px 8px #5343280c;font-size:13px}
#game[data-mode=business] #craft-desktop .category-tabs>button.selected{background:#2f7359;color:#fffdf2;box-shadow:0 2px 0 #225840}
/* Keep the order readable, but leave air at the sides and reclaim empty height. */
#game[data-mode=business].has-recipe-guide,#game[data-mode=business].has-recipe-guide.two-material-rows{--order-panel:110px;grid-template-rows:44px 110px minmax(0,1fr) 68px}
#game[data-mode=business][data-order-kind=double].has-recipe-guide,#game[data-mode=business][data-order-kind=double].has-recipe-guide.two-material-rows{--order-panel:140px;grid-template-rows:44px 140px minmax(0,1fr) 68px}
#game[data-mode=business].has-recipe-guide .order-zone{padding:2px 18px 5px}
#game[data-mode=business].has-recipe-guide #order{padding:4px 8px 20px;max-width:352px;margin-inline:auto}
#game[data-mode=business] #double-orders{max-width:320px;margin:4px auto 0}
#game[data-mode=business] #double-cards{gap:8px}
#game[data-mode=business] #double-cards button{padding:4px 6px;min-height:52px;border-radius:11px}
#game[data-mode=business] #double-cards b{font-size:11px;line-height:15px}
#game[data-mode=business] #double-cards span{margin-top:2px;font-size:10px;line-height:14px}
#game[data-mode=business] #order-recipe{gap:1px 6px;padding-top:2px;line-height:15px}
#game[data-mode=business][data-order-kind=double] #order-recipe{margin-top:3px}

#game[data-mode=business] #craft-desktop[data-workbench=rack] #materials[data-category=base] button{width:52px}
