/* One continuous stage: street beyond the serving ledge, kitchen in front. */
.game-shell{display:flex;flex-direction:column;background:#e8b778;position:relative;gap:0}
.game-shell .topbar{flex:0 0 auto;grid-area:auto;height:calc(50px + env(safe-area-inset-top));padding:calc(3px + env(safe-area-inset-top)) 12px 3px;background:#fff1dce8;z-index:30}
.game-shell .day-progress{flex:0 0 26px;grid-area:auto;height:26px;padding:1px 14px 5px;background:#fff1dce8;z-index:30}
.game-shell .shopfront{grid-area:auto;flex:1 1 auto;height:auto;min-height:150px;margin:0;border:0;overflow:hidden;background:url('assets/stall-pov-v3.png') center top/100% 150% no-repeat;isolation:isolate}
.queue-sign{position:absolute;left:0;right:0;top:7px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:11px;z-index:28;pointer-events:none;text-shadow:0 1px #fff8e7}
.queue-sign b{background:#fff4dded;padding:4px 9px;border:1px solid #ab8359;border-radius:4px;box-shadow:0 2px #75492922;font-weight:400}
.queue-sign #open-sign{font-size:9px;background:#9e5540;color:#fff6df;padding:3px 6px;border-radius:3px;text-shadow:none;transform:rotate(-4deg)}
.queue-sign #queue-count{font-size:10px;background:#fff4dddc;border-radius:9px;padding:3px 6px}
.queue-marker{position:absolute;bottom:2px;left:5%;color:#fff7e7;background:#96664ebf;padding:2px 7px;border-radius:8px;font-size:9px;z-index:1}
.game-shell .customer-line{inset:35px 8px 18px;height:auto;min-height:0;max-height:none;display:block;z-index:2}
.game-shell .customer{position:absolute;left:calc(2% + var(--place,0)*23%);bottom:calc(1px + var(--place,0)*12%);width:24%;max-width:130px;min-width:65px;padding:0;background:none;border:0;border-radius:8px;animation:none;transform:translateX(calc(var(--exit,0)*-240px)) scale(calc(1 - var(--place,0)*.045));transform-origin:50% 100%;will-change:left,bottom,transform,opacity;overflow:visible}
.game-shell .customer .npc-step{display:block;position:relative;width:100%;height:clamp(64px,14svh,120px);transform-origin:50% 100%;animation:waiting 2.4s ease-in-out infinite;animation-delay:var(--step-delay)}
.game-shell .customer.walking .npc-step,.game-shell .customer.served .npc-step{animation:queue-step .22s ease-in-out infinite alternate}
.game-shell .customer.impatient .npc-step{animation:impatient .45s ease-in-out infinite alternate}
.npc-art{display:block;position:relative;overflow:hidden;aspect-ratio:3/4;height:100%;max-width:100%;margin:auto}
.npc-art>img{position:absolute;max-width:none;width:400%;height:300%;pointer-events:none}
.game-shell .order-bubble{min-height:27px;padding:3px 5px;gap:3px;flex-wrap:nowrap;white-space:nowrap;font-size:11px;border-width:1.5px;border-radius:9px;box-shadow:0 3px 0 #68503517}
.game-shell .mixed-order .order-bubble{font-size:10px;padding-left:3px;padding-right:3px}
.game-shell .mixed-order .order-bubble .flavor-dot{display:none}
.game-shell .order-bubble:after{left:45%;z-index:-1}
.game-shell .customer.selected .order-bubble{outline:2px solid #b66b3c;outline-offset:2px;background:#fff4cf}
.game-shell .customer.ready .order-bubble{background:#ecf5d7}
.customer-name{display:block;margin:-9px -5px 5px;position:relative;text-align:center;font-size:9px;line-height:1.2;white-space:nowrap;color:#523824;text-shadow:0 1px 3px #fff,1px 0 3px #fff,-1px 0 3px #fff}
.game-shell .patience{height:4px;bottom:-1px;left:22%;right:22%}
.customer.being-served .order-bubble{background:#fae3a5}
.customer.served .order-bubble,.customer.left-unserved .order-bubble{visibility:hidden}
.customer .delivery-bag{position:absolute;right:10%;bottom:19%;width:36px;height:36px}
.thanks{position:absolute;left:5%;right:5%;top:6px;font-size:13px;color:#704a32;background:#fff5d4;border-radius:10px;padding:3px}
.game-shell .kitchen{grid-area:auto;flex:0 0 auto;display:block;align-self:stretch;margin:0;border:0;background:linear-gradient(#c89157 0 7px,#f2c98b 7px 10px,#d19b61 10px 13px,#ecc28a 13px,#dfae72);position:relative;padding:0 12px;z-index:25}
.game-shell .crew-row{height:106px;min-height:0;width:100%;display:grid;grid-template-columns:1fr 1fr .8fr;align-items:end;background:none;border:0;padding:0;max-width:760px;margin:0 auto;gap:0;position:relative;z-index:4}
.game-shell .crew{display:block;position:relative;height:100%;min-width:0;width:100%;padding:0;pointer-events:none}
.game-shell .usagi-crew{z-index:6;will-change:transform}
.game-shell .chii-crew[data-action=cry]{z-index:7}
.game-shell .crew>.actor{width:105px;height:91px;max-width:100%;position:absolute;left:50%;bottom:-6px;margin:0 0 0 -52px;align-self:auto;will-change:transform;z-index:2}
.game-shell .usagi-crew>.actor{height:96px;width:96px;margin-left:-48px;bottom:-5px}
.actor .character{transform:scale(1.16);transform-origin:50% 100%}
.game-shell .crew-caption{position:absolute;left:0;right:0;top:7px;display:flex;align-items:center;justify-content:center;gap:4px;padding:0;line-height:1.25;background:none;border-radius:0;white-space:nowrap;z-index:4;pointer-events:none}
.game-shell .crew-caption b{display:none}
.game-shell .crew-caption span{font-size:10px;color:#594333;background:#fff7e4ed;border:1px solid #b79873;border-radius:8px;padding:3px 6px;box-shadow:0 2px #83644818}
.action-art{display:block;height:100%;width:100%;position:relative;overflow:hidden;aspect-ratio:1}
.action-art>img{width:300%;height:300%;max-width:none;position:absolute;pointer-events:none}
.usagi-action-art>img{height:200%}
.character-square{display:block;height:min(100cqw,100cqh);width:min(100cqw,100cqh)}
.reaction-art{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}
[data-action=cry] .crew-caption span{background:#eff8ffe8;border-color:#a4bbc6;color:#69658c;font-size:13px;animation:whimper .3s ease-in-out infinite alternate}
.work-puff{position:absolute;left:76%;bottom:17%;font-size:20px;color:#fff9c9;paint-order:stroke;-webkit-text-stroke:2px #ac713b;opacity:0;pointer-events:none}
[data-action=fold] .work-puff,[data-action=pack] .work-puff,[data-action=flip] .work-puff,[data-action=collect] .work-puff{animation:work-spark .55s ease-out infinite}
[data-action=rest] .action-art{animation:rest-breathe 2.5s ease-in-out infinite;transform-origin:50% 100%}
[data-action=eat] .action-art,[data-action=steal] .action-art{animation:munch .23s ease-in-out infinite alternate;transform-origin:50% 80%}
.game-shell .counter{width:100%;max-width:760px;margin:0 auto;padding:10px 10px 7px;border:2px solid #996c46;border-top:5px solid #f5d195;border-radius:9px 9px 3px 3px;background:linear-gradient(100deg,#e7b77eec,#f6d79cec 42%,#d9a870ed);box-shadow:0 5px 0 #90603d66,0 -2px 0 #aa784c;position:relative;z-index:5}
.game-shell .worktop-label{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:10px;font-size:11px;margin-bottom:5px;color:#6d4a2f}
.game-shell .stations{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:10px}
.game-shell .flavor-switch{margin-bottom:6px;gap:6px}
.game-shell .flavor-switch button{min-height:44px;font-size:14px;box-shadow:0 2px #92663b33}
.game-shell .grill-frame{padding:6px 6px 0;border-color:#4d473d;background:#777063}
.game-shell .molds{gap:6px}
.game-shell .mold{height:clamp(50px,7.3svh,72px);padding:1px 2px 7px;isolation:isolate;overflow:visible}
.game-shell .mold-art{height:36px;display:grid;place-items:center}
.game-shell .mold .fish{height:36px;width:72px;max-width:100%}
.game-shell .mold-label{font-size:11px;margin:0}
.game-shell .molds.six .mold-art{height:32px}
.game-shell .molds.six .mold .fish{width:60px;height:30px}
.game-shell .molds.six .mold-label{font-size:10px}
.game-shell .mold[data-cooking=true]:after{content:'〰';position:absolute;top:-11px;left:38%;font-size:24px;line-height:1;color:#fff4d4;pointer-events:none;z-index:2;animation:steam-rise 1.5s ease-out infinite}
.game-shell .grill-bottom{height:10px}
.game-shell .pack-station{padding:5px;background:#fff0c8e3;border-color:#a98257}
.game-shell .stock-title{font-size:10px}
.game-shell .stock-counts{font-size:11px;padding:4px 2px;margin-bottom:4px;gap:2px}
.game-shell .stock-counts b{font-size:15px}
.game-shell .pack-button{min-height:70px;padding:3px 2px 7px}
.game-shell .paper-bag{width:45px;height:45px}
.game-shell .pack-button b{font-size:13px}
.game-shell .pack-button small{font-size:9px;line-height:1.4;margin-top:2px}
.game-shell .counter-note{font-size:9px;margin-top:5px;line-height:1.3}
.game-shell .counter-note>span:first-child{font-size:9px}
.game-shell .usagi-zone{grid-area:auto;flex:0 0 auto;display:flex;flex-direction:row;min-height:68px;height:auto;width:100%;margin:0;padding:8px 15px 4px;background:#f6d59ce8;border:0;border-radius:0;gap:7px;z-index:25}
.sample-plate{width:48px;height:48px;flex:0 0 48px;display:block;background:url('assets/objects-v2.png') 100% 100%/300% 200% no-repeat}
.game-shell .usagi-info{flex:1;width:auto}
.game-shell .usagi-info b{font-size:12px}
.game-shell .usagi-info span{font-size:10px}
.game-shell .usagi-info small{font-size:9px;white-space:normal;line-height:1.3;margin-top:3px}
.game-shell .usagi-zone>button{min-height:52px;width:78px;margin:0;flex-direction:column;gap:0;background:#fff3cfe8}
.game-shell .usagi-zone>button b{font-size:11px}
.game-shell .usagi-zone>button small{font-size:9px}
.game-shell .usagi-zone>button .icon{font-size:15px;height:16px}
.game-shell .message-bar{grid-area:auto;flex:0 0 auto;min-height:28px;padding:4px 12px;font-size:11px;background:#fff3dce8;line-height:1.4;z-index:25}
.game-shell .bottom-nav{grid-area:auto;flex:0 0 44px;min-height:44px;height:44px;padding:0 12px;gap:24px;background:#f9e7c7f2;z-index:25}
.game-shell .bottom-nav button{font-size:12px;min-height:44px}
.game-shell .bottom-nav .icon{font-size:19px}
.game-shell .floating-layer{z-index:29}
.scene-fx{position:absolute;left:0;top:0;display:grid;place-items:center;pointer-events:none;will-change:transform;filter:drop-shadow(0 3px 2px #6d482233)}
.scene-fx .fish{width:54px;height:27px}
.scene-fx .delivery-bag{width:45px;height:45px}
.delivery-bag{display:block;width:44px;height:44px;background:url('assets/objects-v2.png') 50% 100%/300% 200% no-repeat}
.batter-drop{width:8px;height:23px;background:#ffe5a3;border:1px solid #aa7c45;border-radius:40% 40% 50% 50%;transform:rotate(-12deg)}
.coin-fx{font-size:22px;color:#a45526;paint-order:stroke;-webkit-text-stroke:4px #fff6d7}
.game-shell:not([data-mode=playing]) *,.game-shell:not([data-mode=playing]) *:after,.game-shell:not([data-mode=playing]) *:before{animation-play-state:paused!important}
@keyframes waiting{0%,70%,100%{transform:translateY(0) rotate(0)}80%{transform:translateY(-2px) rotate(-2deg)}90%{transform:translateY(0) rotate(2deg)}}
@keyframes queue-step{from{transform:translateY(0) rotate(-3deg)}to{transform:translateY(-4px) rotate(3deg)}}
@keyframes impatient{to{transform:rotate(3deg) translateY(-2px)}}
@keyframes work-spark{0%{opacity:0;transform:scale(.4)}35%{opacity:1}100%{opacity:0;transform:translate(5px,-16px) scale(1.2)}}
@keyframes rest-breathe{50%{transform:scale(1.025,.98)}}
@keyframes munch{to{transform:scale(1.025,.975) rotate(1deg)}}
@keyframes steam-rise{0%{transform:translateY(6px) scale(.6);opacity:0}30%{opacity:.85}100%{transform:translate(6px,-25px) scale(1.1);opacity:0}}
@keyframes whimper{to{transform:translateY(-1px) rotate(2deg)}}
@media(max-height:740px) and (orientation:portrait){
  .game-shell .topbar{height:calc(46px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);padding-bottom:0}
  .game-shell .day-progress{height:22px;flex-basis:22px;font-size:9px}
  .game-shell .shopfront{min-height:124px}
  .game-shell .crew-row{height:83px}
  .game-shell .crew>.actor{width:85px;height:75px;margin-left:-42px;bottom:-6px}
  .game-shell .usagi-crew>.actor{width:79px;height:79px;margin-left:-39px}
  .game-shell .crew-caption{top:1px}
  .game-shell .crew-caption span{font-size:9px;padding:2px 5px}
  .game-shell .counter{padding:6px 8px 5px}
  .game-shell .worktop-label{font-size:10px;margin-bottom:3px}
  .game-shell .mold{height:48px}
  .game-shell .mold-art{height:29px}
  .game-shell .mold .fish{height:28px;width:56px}
  .game-shell .mold-label{font-size:9px}
  .game-shell .molds.six .mold-art{height:27px}
  .game-shell .molds.six .mold .fish{height:25px;width:50px}
  .game-shell .molds.six .mold-label{font-size:8px}
  .game-shell .grill-bottom{height:7px}
  .game-shell .usagi-zone{min-height:59px;padding:7px 12px 3px;gap:5px}
  .sample-plate{height:36px;width:36px;flex-basis:36px}
  .game-shell .usagi-zone>button{min-height:47px;width:72px}
  .game-shell .usagi-info small{font-size:8px}
  .game-shell .message-bar{min-height:24px;font-size:10px;padding:3px 7px}
}
@media(max-height:620px) and (orientation:portrait){
  .game-shell .kitchen{padding:0 8px}
  .game-shell .shopfront{min-height:135px}
  .queue-sign{display:none}
  .queue-sign b{padding:3px 7px}
  .queue-sign #queue-count{font-size:8px}
  .game-shell .customer-line{inset:28px 6px 15px}
  .game-shell .customer{bottom:calc(var(--place,0)*4px);width:24%}
  .game-shell .customer .npc-step{height:65px}
  .game-shell .order-bubble{min-height:23px;font-size:9px;padding:2px 3px;gap:2px}
  .game-shell .mixed-order .order-bubble{font-size:8px;gap:1px}
  .customer-name{font-size:8px;margin-top:-5px}
  .game-shell .crew-row{height:58px}
  .game-shell .crew>.actor{height:54px;width:58px;margin-left:-29px}
  .game-shell .usagi-crew>.actor{height:56px;width:56px;margin-left:-28px}
  .game-shell .crew-caption span{font-size:8px;padding:2px 4px}
  .game-shell .worktop-label{display:none}
  .game-shell .stations{grid-template-columns:minmax(0,1fr) 94px;gap:7px}
  .game-shell .mold{height:45px}
  .game-shell .mold-art{height:27px}
  .game-shell .mold .fish{height:26px;width:52px}
  .game-shell .mold-label{font-size:9px}
  .game-shell .molds.six .mold-art{height:24px}
  .game-shell .molds.six .mold .fish{height:23px;width:46px}
  .game-shell .molds.six .mold-label{font-size:8px}
  .game-shell .flavor-switch{margin-bottom:4px}
  .game-shell .flavor-switch button{font-size:12px}
  .game-shell .counter-note,.game-shell .counter-note>span:first-child{font-size:8px;margin-top:3px}
  .game-shell .stock-title{font-size:9px}
  .game-shell .stock-counts{font-size:10px;padding:3px 1px}
  .game-shell .stock-counts b{font-size:13px}
  .game-shell .pack-button{min-height:60px}
  .game-shell .pack-button b{font-size:12px}
  .game-shell .pack-button small{font-size:8px}
  .game-shell .paper-bag{width:32px;height:32px}
  .game-shell .usagi-info b{font-size:10px}
  .game-shell .usagi-info span{font-size:9px}
  .game-shell .sample-plate{display:none}
  .game-shell .message-bar{position:absolute;bottom:0;min-height:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0}
}
@media(min-width:700px) and (min-height:500px){
  .game-shell{background-size:100% 140%;background-position:center 35%}
  .game-shell .topbar{height:56px;padding:5px 28px}
  .game-shell .day-progress{height:28px;flex-basis:28px;padding:0 28px 5px}
  .game-shell .shopfront{min-height:170px}
  .queue-sign{top:13px;font-size:14px}
  .queue-sign #open-sign,.queue-sign #queue-count{font-size:12px}
  .game-shell .customer-line{inset:43px max(8%,calc((100% - 900px)/2)) 18px}
  .game-shell .customer{max-width:180px;width:23%;bottom:calc(var(--place,0)*10%)}
  .game-shell .customer .npc-step{height:clamp(90px,17svh,160px)}
  .game-shell .order-bubble{font-size:15px;min-height:32px}
  .customer-name{font-size:12px}
  .game-shell .crew-row{height:108px;max-width:680px}
  .game-shell .crew>.actor{width:120px;height:105px;margin-left:-60px}
  .game-shell .usagi-crew>.actor{width:108px;height:108px;margin-left:-54px}
  .game-shell .crew-caption span{font-size:12px}
  .game-shell .counter{max-width:760px;padding:10px 17px 8px}
  .game-shell .stations,.game-shell .worktop-label{grid-template-columns:minmax(0,1fr) 170px;gap:20px}
  .game-shell .mold{height:clamp(52px,7svh,74px)}
  .game-shell .mold .fish{height:36px;width:72px}
  .game-shell .mold-label,.game-shell .molds.six .mold-label{font-size:12px}
  .game-shell .molds.six .mold-art{height:36px}
  .game-shell .molds.six .mold .fish{height:35px;width:70px}
  .game-shell .stock-counts{flex-direction:row;justify-content:center;gap:15px;font-size:12px}
  .game-shell .pack-button small{font-size:11px}
  .game-shell .counter-note{font-size:11px}
  .game-shell .usagi-zone{padding-left:max(20px,calc((100% - 730px)/2));padding-right:max(20px,calc((100% - 730px)/2));min-height:68px;gap:14px}
  .game-shell .usagi-info b{font-size:14px}
  .game-shell .usagi-info span{font-size:12px}
  .game-shell .usagi-info small{font-size:10px}
  .game-shell .usagi-zone>button{width:120px}
  .game-shell .message-bar{min-height:28px;font-size:12px}
}
@media(orientation:landscape) and (max-height:499px){
  .game-shell{display:grid;grid-template-columns:minmax(0,1fr) 142px;grid-template-rows:44px 22px minmax(70px,1fr) 153px 28px;background-size:100% 190%;background-position:center 37%}
  .game-shell .topbar{grid-column:1/-1;grid-row:1;height:44px;padding:0 12px}
  .game-shell .day-progress{grid-column:1/-1;grid-row:2;height:22px;padding-bottom:4px}
  .game-shell .shopfront{grid-column:1;grid-row:3;min-height:70px}
  .queue-sign{top:2px;left:3px;right:auto;flex-direction:column;gap:3px;font-size:8px;max-width:90px}
  .queue-sign b{padding:2px 4px}
  .queue-sign #open-sign{display:none}
  .game-shell .customer-line{inset:0 6px 10px 90px}
  .game-shell .customer{left:calc(1% + var(--place,0)*24%);bottom:0;width:23%;max-width:90px}
  .game-shell .customer .npc-step{height:49px}
  .game-shell .order-bubble{font-size:9px;min-height:21px;flex-wrap:nowrap;padding:2px}
  .customer-name{font-size:8px;margin-top:-5px}
  .queue-marker{font-size:8px;bottom:0}
  .game-shell .kitchen{grid-column:1;grid-row:4;padding:0 8px 0 170px;display:block;align-self:stretch}
  .game-shell .crew-row{position:absolute;left:5px;bottom:2px;top:5px;width:160px;height:auto;display:block}
  .game-shell .crew{position:absolute;width:75px;height:85px}
  .game-shell .chii-crew{left:0;top:0}
  .game-shell .hachi-crew{right:0;bottom:0}
  .game-shell .usagi-crew{left:0;bottom:0;height:62px}
  .game-shell .crew>.actor{width:73px;height:69px;margin-left:-36px;bottom:-2px}
  .game-shell .usagi-crew>.actor{width:60px;height:60px;margin-left:-30px}
  .game-shell .crew-caption{top:0}
  .game-shell .crew-caption span{font-size:8px;padding:1px 3px}
  .game-shell .usagi-crew .crew-caption{display:none}
  .game-shell .counter{height:100%;padding:5px 7px;border-top-width:3px}
  .game-shell .worktop-label,.game-shell .counter-note{display:none}
  .game-shell .stations{grid-template-columns:minmax(0,1fr) 95px;gap:8px;height:100%}
  .game-shell .flavor-switch{gap:4px;margin-bottom:4px}
  .game-shell .flavor-switch button{min-height:36px;font-size:11px}
  .game-shell .mold{height:44px}
  .game-shell .mold-art{height:27px}
  .game-shell .mold .fish{height:26px;width:52px}
  .game-shell .mold-label{font-size:9px}
  .game-shell .molds.six .mold-art{height:25px}
  .game-shell .molds.six .mold .fish{height:24px;width:48px}
  .game-shell .molds.six .mold-label{font-size:8px}
  .game-shell .grill-frame{padding:4px 4px 0}
  .game-shell .molds{gap:4px}
  .game-shell .grill-bottom{height:6px}
  .game-shell .pack-station{padding:3px}
  .game-shell .stock-title{font-size:8px}
  .game-shell .stock-counts{font-size:10px;padding:2px;margin-bottom:3px;gap:0}
  .game-shell .stock-counts b{font-size:12px}
  .game-shell .pack-button{min-height:58px}
  .game-shell .pack-button b{font-size:11px}
  .game-shell .pack-button small{font-size:8px}
  .game-shell .paper-bag{width:28px;height:28px}
  .game-shell .usagi-zone{grid-column:2;grid-row:3/5;flex-direction:column;justify-content:flex-end;padding:5px 8px;gap:5px;background:#f5d6a2d9}
  .game-shell .sample-plate{height:46px;width:46px;flex-basis:46px}
  .game-shell .usagi-info{flex:0;width:100%}
  .game-shell .usagi-info>div:first-child{display:block}
  .game-shell .usagi-info b{font-size:11px}
  .game-shell .usagi-info span{display:block;font-size:9px}
  .game-shell .usagi-info small{font-size:8px}
  .game-shell .usagi-zone>button{min-height:44px;width:100%;flex-direction:row;gap:4px}
  .game-shell .usagi-zone>button .icon{display:none}
  .game-shell .message-bar{grid-column:1;grid-row:5;font-size:10px;min-height:28px;padding:2px 5px}
  .game-shell .bottom-nav{grid-column:2;grid-row:5;height:28px;min-height:28px;gap:0;padding:0;background:#fff0d4;overflow:visible}
  .game-shell .bottom-nav button{min-height:28px;font-size:9px;padding:0 3px}
  .game-shell .bottom-nav .icon,.game-shell .nav-flower{display:none}
}
@media(prefers-reduced-motion:reduce){.game-shell .scene-fx,.work-puff{display:none}.game-shell .customer{will-change:auto}.game-shell .crew>.actor{will-change:auto}}
