/* One wide game surface: scene and interactive controls stay within the frame. */
#game{max-width:1560px;width:100%;margin:12px auto;padding:0 16px}
#game-window{border:4px solid #af8a43;background:#fff3be;box-shadow:0 5px 0 #dcc27a;overflow:hidden}
#game header,#game[data-state="title"] header,#game[data-state="results"] header{display:flex;justify-content:space-between;align-items:center;margin:0;padding:8px 16px;border-bottom:1px solid #c9af65}
#game .top-logo,#game[data-state="title"] .top-logo,#game[data-state="results"] .top-logo{width:80px;height:66px;max-height:66px;max-width:80px}
#game #hud{padding:9px 16px;margin:0;border-bottom:1px solid #c9af65}
#play-area{display:grid;grid-template-columns:minmax(0,1fr) 340px;min-height:510px;height:calc(100dvh - 180px);max-height:850px}
#game #scene-wrap,#game:fullscreen #scene-wrap,body.expanded-game #game #scene-wrap{width:100%!important;max-width:none!important;margin:0;border:0;box-shadow:none;position:relative;display:flex;align-items:center;background:#a8c97d;overflow:hidden}
#world-stage{width:100%;position:relative;flex:none}
#game #scene{width:100%;height:auto;max-height:none;object-fit:fill;background:transparent;touch-action:none}
#game #content,#game:fullscreen #content,body.expanded-game #game #content{width:100%;max-width:none!important;margin:0!important;padding:20px!important;overflow:auto;border-left:3px solid #c9af65;background:#fff4c8;align-content:center}
#content h1{font-size:clamp(30px,3vw,46px);letter-spacing:-1px;line-height:1.05}
#content h2{font-size:25px}#content>p{font-size:15px;line-height:1.5}#content .eyebrow{font-size:11px;letter-spacing:2px}
#game[data-state="map"] #content>h2,#game[data-state="map"] #content>p,#game[data-state="map"] #content>.eyebrow{display:block!important}
#game[data-state="map"] #world-stage{max-width:calc((100dvh - 190px)*1.5);margin:auto}
#game[data-state="build"] #scene-wrap{background:#513541}
#game[data-state="tasting"] #scene-wrap,#game[data-state="decision"] #scene-wrap,#game[data-state="sick"] #scene-wrap{background:#493940}
#scene-label{top:14px;left:14px;z-index:2}
#tray-layer{position:absolute;inset:0;pointer-events:none}
#tray-layer .tray{position:absolute;width:28%;height:28%;pointer-events:auto;margin:0;padding:4px 6px;background:#fff4cef2;border:2px solid #907144;box-shadow:0 3px 0 #302a24;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;transform:none;border-radius:2px}
#tray-layer .tray:hover,#tray-layer .tray:focus-visible{background:#fff9df;transform:translateY(-2px)}
#tray-layer .tray.selected{background:#dbeabcf2;border-color:#386d4a}
#tray-layer .tray strong{font:700 clamp(11px,1.25vw,19px)/1.12 monospace}
#tray-layer .tray .food,#tray-layer .tray p{display:none}
#tray-layer .tray .stats{font-size:clamp(9px,1vw,13px);gap:8px;justify-content:center;margin-top:5px;flex-wrap:wrap}
#dish-detail{padding:16px 0;border-top:1px dashed #b59c5c;border-bottom:1px dashed #b59c5c;margin-bottom:14px}#dish-detail h3{margin:10px 0;font-size:23px}#dish-detail p{font-size:15px;margin:8px 0 14px}
#game .plate-bar{display:block;padding:12px;margin-top:12px}#game .plate-bar button{width:100%;margin-top:14px;white-space:normal}
#game .door-bar{display:block;padding:12px}#game .door-bar button{width:100%;margin-top:12px;font-size:14px}
#game .walk-controls{display:flex!important;flex-direction:column;gap:10px;margin:16px 0 0}#game .dpad{display:grid!important}#game .walk-controls>span{text-align:center;font-size:12px}
#game .actions{gap:8px;margin-top:14px}#game .actions button{width:100%;font-size:14px}
#game .quote{font-size:21px}#game .receipt{padding:14px;box-shadow:none;transform:none}#game .receipt-row{font-size:11px}#game .score{font-size:42px}#game .stars{font-size:28px;letter-spacing:3px}
#game[data-state="build"] #content>h2{font-size:23px}#game[data-state="build"] #content>p{font-size:13px;margin-bottom:12px}
#game footer{padding:12px 4px}
#game:fullscreen,body.expanded-game #game{max-width:none!important;padding:0!important;margin:0!important;height:100dvh;overflow:hidden}
#game:fullscreen #game-window,body.expanded-game #game-window{height:100dvh;border:0;display:flex;flex-direction:column}
#game:fullscreen #play-area,body.expanded-game #play-area{flex:1;min-height:0;height:auto;max-height:none}
#game:fullscreen #content,body.expanded-game #content{align-content:center}
@media(max-width:900px){#play-area{grid-template-columns:minmax(0,1fr) 290px}#game #content{padding:14px!important}#tray-layer .tray .stats{font-size:9px;gap:3px}#tray-layer .tray strong{font-size:12px}}
@media(max-width:650px){#game{padding:0 6px;margin:6px auto}#game header,#game[data-state="title"] header,#game[data-state="results"] header{padding:6px 8px;gap:6px}#game .top-logo,#game[data-state="title"] .top-logo,#game[data-state="results"] .top-logo{width:49px;height:41px}#game header .quiet{padding:7px;font-size:11px}#play-area{display:flex;flex-direction:column;height:auto;max-height:none;min-height:0}#game #scene-wrap{flex:none;min-height:180px}#game #content{border-left:0;border-top:2px solid #c9af65;overflow:visible;padding:14px!important}#game #content h1{font-size:34px}#game .walk-controls{flex-direction:row;justify-content:center}#game #scene-label{top:6px;left:6px;font-size:9px}#tray-layer .tray strong{font-size:11px}#tray-layer .tray .stats{font-size:9px;margin-top:3px}#game:fullscreen,body.expanded-game #game{overflow:auto}#game:fullscreen #game-window,body.expanded-game #game-window{height:auto;min-height:100dvh}#game:fullscreen #play-area,body.expanded-game #play-area{flex:none}#game[data-state="map"] #world-stage{max-width:none}}
#tray-layer .tray{height:12%;padding:2px 4px;background:#fff4cee8;border-width:1px;box-shadow:0 2px 0 #302a24}
#tray-layer .tray strong{font-size:clamp(10px,1.15vw,17px)}
#tray-layer .tray .stats{margin-top:2px}
@media(pointer:fine){#game[data-state="build"] .dpad{display:none!important}#game[data-state="build"] .walk-controls{margin-top:8px;gap:0}#game[data-state="build"] #content>h2{font-size:21px}#game[data-state="build"] #dish-detail{padding:12px 0}#game[data-state="build"] #dish-detail h3{font-size:21px}}
@media(max-width:650px){#tray-layer .tray{height:15%}#tray-layer .tray strong{font-size:9px}#tray-layer .tray .stats{font-size:8px;gap:2px}}
@media(min-width:651px){#game[data-state="build"] #content>h2{display:none}#game[data-state="build"] #content>p{margin:8px 0 12px}#game[data-state="build"] #content{align-content:start}#game[data-state="build"] .plate-bar p{font-size:13px}#game[data-state="build"] .plate-bar .stats{font-size:12px}}
/* Home-screen branding anchors to the left edge of the game header. */
#game[data-state="title"] header{display:flex;justify-content:space-between}
#game[data-state="title"] .top-logo{margin:0 auto 0 0;align-self:flex-start}
#game[data-state="title"] header>div{margin-left:auto}

.game-bottom{flex:none;text-align:center;border-top:1px solid #c9af65;padding:6px;background:#fff3be}
.game-bottom .quiet{font-size:13px;padding:6px 16px;margin:0}
#play-area{height:calc(100dvh - 220px)}
@media(max-width:650px){#play-area{height:auto}}
/* Fill the home scene area instead of leaving empty strips around the street. */
#game[data-state="title"] #world-stage{height:100%;max-width:none}
#game[data-state="title"] #scene{width:100%;height:100%;max-height:none;object-fit:fill}
@media(max-width:650px){#game[data-state="title"] #scene-wrap{height:clamp(220px,40vh,360px)}#game[data-state="title"] #world-stage{height:100%}}
/* Fill the home scene without distorting its pixels or character proportions. */
#game[data-state="title"] #world-stage{overflow:hidden}
#game[data-state="title"] #scene{object-fit:cover;object-position:center}
.game-bottom{text-align:right}
/* The title renderer adapts its drawing area to the window; no artwork is cropped. */
#game[data-state="title"] #scene{object-fit:contain}

#tray-layer .tray[hidden]{display:none!important}

#game header #help{margin-left:auto;align-self:flex-start}
/* Give the supplied brand mark more prominence without changing its proportions. */
#game .top-logo,#game[data-state="title"] .top-logo,#game[data-state="results"] .top-logo{width:132px;height:110px;max-width:132px;max-height:110px}
#play-area{height:calc(100dvh - 264px)}
@media(max-width:650px){#game .top-logo,#game[data-state="title"] .top-logo,#game[data-state="results"] .top-logo{width:96px;height:80px;max-width:96px;max-height:80px}#play-area{height:auto}}

#game .door-bar button{margin-top:0}

@font-face{font-family:Silkscreen;src:url('assets/silkscreen-bold.ttf') format('truetype');font-style:normal;font-weight:700;font-display:swap}
#game[data-state="title"] #content h1{font-family:Silkscreen,monospace;font-weight:700;font-size:clamp(44px,4.9vw,70px);line-height:.98;letter-spacing:-.065em;text-shadow:none;margin:0 0 22px;overflow-wrap:normal}
@media(min-width:1000px){#game[data-state="title"] #play-area{grid-template-columns:minmax(0,1fr) 410px}}
@media(max-width:650px){#game[data-state="title"] #content h1{font-size:clamp(38px,10.5vw,62px);line-height:1;letter-spacing:-.065em}}

/* Clean outer edge without the gold frame. */
#game-window{border:0;box-shadow:none}

/* Wider lockup: preserve the supplied logo's original aspect ratio. */
#game .top-logo,#game[data-state="title"] .top-logo,#game[data-state="results"] .top-logo{width:278px;height:110px;max-width:278px;max-height:110px;object-fit:contain}
@media(max-width:650px){#game .top-logo,#game[data-state="title"] .top-logo,#game[data-state="results"] .top-logo{width:182px;height:72px;max-width:55vw;max-height:72px}}

/* Home is a full-width scene with a game-native title and Play overlay. */
#game[data-state="title"]{max-width:none}
#game[data-state="title"] #play-area{display:block;position:relative;height:calc(100dvh - 160px);min-height:480px;max-height:none}
#game[data-state="title"] #scene-wrap{height:100%;min-height:0}
#game[data-state="title"] #scene-label{display:none}
#game[data-state="title"] #content{position:absolute;inset:0 0 auto!important;width:100%;height:auto;padding:clamp(24px,4vh,48px) 22px 0!important;border:0;background:transparent;overflow:visible;pointer-events:none;align-content:normal}
#game[data-state="title"] #content h1{font-size:clamp(42px,6vw,88px);line-height:1;letter-spacing:-.065em;max-width:1200px;margin:0 auto 22px}
#game[data-state="title"] .actions{margin:0;pointer-events:none}
#game[data-state="title"] .actions button{width:220px;max-width:75%;font-size:20px;padding:14px 30px;pointer-events:auto}
@media(max-width:650px){#game[data-state="title"] #play-area{height:calc(100dvh - 112px);min-height:440px}#game[data-state="title"] #content h1{font-size:clamp(35px,10vw,58px);max-width:560px;margin-bottom:18px}#game[data-state="title"] #content{padding:28px 16px 0!important}}

/* Center the opening logo independently of the home-screen header. */
.intro-logo{align-self:center;justify-self:center;margin:0}

/* Home shows only the scene, title, and the two game actions. */
#game[data-state="title"] header{display:none}
#game[data-state="title"] #play-area{height:calc(100dvh - 24px)}
#game[data-state="title"] .actions{flex-direction:column;align-items:center;gap:10px}
#game[data-state="title"] .actions #help{font-size:14px;padding:9px 18px;width:auto;max-width:none;margin:0;border:0;background:#fff3bed9;color:#30291e}
@media(max-width:650px){#game[data-state="title"] #play-area{height:calc(100dvh - 12px)}}
.rangoon-rain{position:absolute;inset:0;width:100%;height:100%;image-rendering:auto;pointer-events:none;z-index:2}
.intro-screen[data-phase="rangoons"] .intro-title{opacity:1}
.intro-screen[data-phase="fall-reveal"]{background:transparent;transition:none}
.intro-screen[data-phase="fall-reveal"] .intro-logo,.intro-screen[data-phase="fall-reveal"] .intro-title,.intro-screen[data-phase="fall-reveal"] .intro-status{visibility:hidden;transition:none}
.intro-screen .intro-skip{z-index:3;background:#fff3bee8}

/* Match the opening title to the home-screen pixel typography. */
.intro-title{font-family:Silkscreen,monospace;font-weight:700;font-size:clamp(36px,6vw,88px);line-height:1;letter-spacing:-.065em;text-transform:uppercase;text-shadow:none}

/* Run progress lives in the scene, like a compact game scorecard. */
#game:not([data-state="results"]) header{display:none}
#game header #help{display:none}
#game:not([data-state="title"]):not([data-state="results"]) #play-area{height:calc(100dvh - 24px);max-height:none}
#game #hud{position:absolute;right:14px;top:14px;z-index:4;display:grid;gap:6px;padding:10px 14px;background:#fff4dceF;border:2px solid #493529;box-shadow:3px 3px 0 #49352940;pointer-events:none;font:12px monospace;color:#493529;max-width:calc(100% - 28px)}
#game #hud[hidden]{display:none}
#hud .hud-stars{font-size:23px;letter-spacing:3px;line-height:1;color:#997019}
.hud-counts{display:flex;gap:18px}.hud-counts strong{font-size:16px}
.hud-pending{border-top:1px dashed #ad9563;padding-top:6px}
.hud-goal{font:10px/1.2 ui-sans-serif,system-ui,sans-serif}
#game:not([data-state="title"]):not([data-state="results"]) #scene-label{top:auto;bottom:12px;left:12px;max-width:calc(100% - 24px)}
#game[data-state="map"] #world-stage{max-width:calc((100dvh - 24px)*1.5)}
@media(max-width:650px){
 #game:not([data-state="title"]):not([data-state="results"]) #play-area{height:auto;min-height:calc(100dvh - 12px)}
 #game:not([data-state="title"]):not([data-state="results"]) #scene-wrap{padding-top:90px}
 #game #hud{top:8px;right:8px;padding:6px 10px;gap:3px}
 #hud .hud-stars{font-size:18px}.hud-counts strong{font-size:14px}.hud-counts{gap:12px}
 #game:not([data-state="title"]):not([data-state="results"]) #scene-label{bottom:4px;font-size:8px}
}

/* Keep bottom instructions within a padded, wrapping area. */
#street-hint{display:none}
#game[data-state="map"] #scene-label{display:none}
#game[data-state="map"] #street-hint{display:block;position:absolute;bottom:16px;left:16px;right:16px;z-index:3;width:fit-content;max-width:calc(100% - 32px);margin:0 auto;padding:7px 12px;background:#fff3beeF;color:#40331d;font:700 12px/1.5 monospace;text-align:center;overflow-wrap:break-word;pointer-events:none}
#game #content{min-height:0;align-content:safe center;padding-bottom:28px!important;scroll-padding-bottom:28px}
@media(min-width:651px){
 #game:not([data-state="title"]) #scene-wrap{min-height:0;min-width:0}
 #game[data-state="map"] #world-stage{max-width:calc((100dvh - 100px)*1.5)}
}
@media(max-width:650px){#game[data-state="map"] #street-hint{bottom:10px;left:10px;right:10px;max-width:calc(100% - 20px);font-size:10px;padding:5px 8px}#game[data-state="map"] #scene-wrap{padding-bottom:48px}}

/* Street controls belong to the world, with no separate instruction panel. */
#game[data-state="map"] #play-area{display:block;position:relative;height:calc(100dvh - 24px);min-height:480px}
#game[data-state="map"] #scene-wrap{height:100%;padding:0;min-height:0}
#game[data-state="map"] #world-stage{width:100%;max-width:calc((100dvh - 24px)*1.5);margin:auto}
#game[data-state="map"] #content{position:absolute;bottom:22px;left:20px;right:180px;width:auto;max-width:360px!important;background:transparent;border:0;padding:0!important;overflow:visible;pointer-events:none}
#game[data-state="map"] #content button{pointer-events:auto}
#game[data-state="map"] .door-bar{background:transparent;border:0;padding:0}
#game[data-state="map"] .door-bar[hidden]{display:none}
#game[data-state="map"] #content .actions{margin-top:8px}
#game #street-hint,#game[data-state="map"] #street-hint{display:none}
#game #scene-wrap>.walk-controls{position:absolute;bottom:20px;right:20px;z-index:5;margin:0;display:block!important}
#game #scene-wrap .dpad{display:grid!important;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:4px}
#game #scene-wrap .dpad button{position:relative;width:44px;height:44px;padding:0;border:3px solid #473628;border-radius:0;box-shadow:3px 3px 0 #473628;background:#ffe6a1;color:transparent;font-size:0;transform:none;touch-action:none}
#game #scene-wrap .dpad button::before{content:'';position:absolute;inset:10px;background:#473628;clip-path:polygon(40% 0,60% 0,60% 20%,80% 20%,80% 40%,100% 40%,100% 60%,60% 60%,60% 100%,40% 100%,40% 60%,0 60%,0 40%,20% 40%,20% 20%,40% 20%)}
#game #scene-wrap .dpad button[data-direction="left"]::before{transform:rotate(-90deg)}
#game #scene-wrap .dpad button[data-direction="down"]::before{transform:rotate(180deg)}
#game #scene-wrap .dpad button[data-direction="right"]::before{transform:rotate(90deg)}
#game #scene-wrap .dpad button:active{background:#d5a83e;box-shadow:1px 1px 0 #473628;transform:translate(2px,2px)}
@media(max-width:650px){
 #game[data-state="map"] #play-area{height:calc(100dvh - 12px);min-height:460px}
 #game[data-state="map"] #content{bottom:16px;left:12px;right:166px}
 #game[data-state="map"] #content button{font-size:12px;padding:10px 8px}
 #game #scene-wrap>.walk-controls{bottom:14px;right:12px}
 #game[data-state="build"] #scene-wrap{padding-bottom:116px}
}
#game[data-state="map"]:not([data-state="title"]) #play-area{height:calc(100dvh - 24px)}
#game[data-state="map"] #scene-wrap{height:calc(100dvh - 24px)}
#game #scene-wrap .dpad button::before{inset:7px}
@media(max-width:650px){#game[data-state="map"]:not([data-state="title"]) #play-area,#game[data-state="map"] #scene-wrap{height:calc(100dvh - 12px)}}

/* Original brand artwork, sized proportionally inside the play area. */
#scene-logo{position:absolute;top:14px;left:14px;z-index:4;width:180px;max-width:calc(100% - 224px);height:auto;object-fit:contain;image-rendering:auto;padding:8px;background:#fff3beeF;pointer-events:none}
#scene-logo[hidden]{display:none}
@media(max-width:650px){#scene-logo{top:8px;left:8px;width:150px;max-width:calc(100% - 190px);padding:6px}}

/* Brand light yellow across gameplay actions and directional controls. */
#game:not([data-state="title"]) #play-area button{background:#fff3be;color:#30291e;border-color:#ad9563}
#game:not([data-state="title"]) #play-area button:hover:not(:disabled){background:#fff8da}
#game:not([data-state="title"]) #play-area button:active:not(:disabled){background:#f5e6ac}
#game:not([data-state="title"]) #play-area .tray.selected{background:#fff3be;border-color:#326257;box-shadow:inset 0 0 0 2px #326257}
#game:not([data-state="title"]) #scene-wrap .dpad button{color:transparent;border-color:#473628}

/* Rating and points are separate, explicitly labeled scorecards. */
#game #hud{display:flex;align-items:flex-start;gap:10px;padding:0;border:0;box-shadow:none;background:transparent;max-width:calc(100% - 220px)}
#game #hud[hidden]{display:none}
.hud-panel{display:flex;flex-direction:column;gap:5px;width:174px;padding:11px 12px;background:#fff3be;border:2px solid #493529;box-shadow:3px 3px 0 #49352940}
.hud-heading{font:700 10px/1.3 monospace;letter-spacing:1px;color:#493529}
#hud .hud-stars{font-size:24px;letter-spacing:2px;line-height:1.1}
#hud .hud-total{font:700 26px/1 monospace;color:#30291e}
.hud-safe,.hud-stops{font:11px/1.4 ui-sans-serif,system-ui,sans-serif}
#hud .hud-goal{font-size:10px;line-height:1.4;color:#665539}
#hud .hud-pending{display:grid;gap:4px;margin-top:3px;padding-top:8px;font-size:10px}
.hud-pending b{font-size:18px;color:#815c20}.hud-pending small{font:10px/1.4 ui-sans-serif,system-ui,sans-serif}
@media(max-width:900px){#game #hud{flex-direction:column;gap:8px;max-width:calc(100% - 170px)}.hud-panel{width:160px;padding:8px 10px}#hud .hud-stars{font-size:21px}#hud .hud-total{font-size:22px}}
@media(max-width:650px){#game:not([data-state="title"]):not([data-state="results"]):not([data-state="map"]) #scene-wrap{padding-top:310px}#scene-logo{max-width:calc(100% - 184px)}}
/* Buffet play fills the window; its controls float inside the scene. */
#game:has(#scene-wrap[data-mode="build"]),#game:has(#scene-wrap[data-mode="tasting"]),#game:has(#scene-wrap[data-mode="decision"]),#game:has(#scene-wrap[data-mode="sick"]){max-width:none;padding:0;margin:0}
#game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #play-area{display:block;position:relative;height:100dvh!important;min-height:540px!important;max-height:none}
#game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #scene-wrap{height:100%;padding:0!important;min-height:0;justify-content:center}
#game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #world-stage{width:min(100%,calc((100dvh - 280px)*2.4));margin:0 auto}
#game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #content{position:absolute;z-index:4;bottom:20px;left:20px;right:190px;width:auto;max-width:620px!important;max-height:35%;padding:0!important;margin:0!important;border:0;background:transparent;overflow:auto;align-content:start}
#game[data-state="build"] .plate-bar{display:flex;align-items:center;gap:18px;padding:12px 16px;margin:0;background:#fff3be;border:2px solid #493529;box-shadow:none}
#game[data-state="build"] .plate-bar>div{flex:1;min-width:0}
#game[data-state="build"] .plate-bar b{font:700 12px monospace}
#game[data-state="build"] .plate-bar p{margin:6px 0 0;font-size:12px;line-height:1.4}
#game[data-state="build"] .plate-bar button{width:auto;flex:none;margin:0;padding:12px 18px;border:2px solid #493529}
#game .buffet-exit{position:absolute;left:20px;bottom:132px;z-index:5;margin:0}
#game .buffet-exit button{width:auto;font-size:12px;padding:8px 14px}
#game[data-state="build"] #scene-label{top:94px;bottom:auto;left:14px;font-size:10px}
#game #tray-layer .tray{height:auto;min-height:54px;padding:7px 10px;transform:translateY(-60%);background:#fff3be;border:2px solid #493529}
#game #tray-layer .tray p{display:block;min-height:0;padding:0;margin:5px 0;font:12px/1.3 ui-sans-serif,system-ui,sans-serif;color:#493529}
#game #tray-layer .tray small{font:10px/1.3 monospace;color:#326257}
#game #tray-layer .tray:hover{transform:translateY(-60%)}
#game:is([data-state="tasting"],[data-state="decision"],[data-state="sick"]) #content{left:50%;right:auto;transform:translateX(-50%);width:min(620px,calc(100% - 32px));max-height:42%;padding:14px 18px!important;background:#fff3be;border:2px solid #493529}
#game:is([data-state="tasting"],[data-state="decision"],[data-state="sick"]) #content h2{font-size:21px}
#game:is([data-state="tasting"],[data-state="decision"],[data-state="sick"]) #content p{font-size:13px;margin:8px 0}
#game:is([data-state="tasting"],[data-state="decision"],[data-state="sick"]) #content .quote{font-size:15px}
#game:is([data-state="tasting"],[data-state="decision"],[data-state="sick"]) #content .actions{flex-wrap:nowrap}
@media(max-width:900px){
 #game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #hud{flex-direction:row;max-width:calc(100% - 124px);gap:6px}
 #game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) .hud-panel{width:122px;padding:7px}
 #game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #scene-logo{width:104px;max-width:25%;padding:4px}
 #game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) .hud-goal{display:none}
 #game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) .hud-heading{font-size:9px;letter-spacing:0}
}
@media(max-width:650px){
 #game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #world-stage{width:100%;max-width:none}
 #game[data-state="build"] #content{bottom:124px;left:10px;right:10px;max-height:150px}
 #game[data-state="build"] .plate-bar{padding:10px;gap:10px}
 #game[data-state="build"] .plate-bar button{font-size:12px;padding:10px}
 #game .buffet-exit{left:10px;bottom:40px}
 #game #tray-layer .tray{width:31%;padding:5px;min-height:54px}
 #game #tray-layer .tray strong{font-size:11px}
 #game #tray-layer .tray p{font-size:10px;margin:3px 0}
 #game #tray-layer .tray small{font-size:9px}
 #game[data-state="build"] #scene-label{top:70px;font-size:8px;max-width:110px}
 #game:is([data-state="tasting"],[data-state="decision"],[data-state="sick"]) #world-stage{transform:translateY(-65px)}
}
@media(max-height:600px) and (min-width:651px){
 #game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #world-stage{width:min(100%,calc((100dvh - 160px)*2.4))}
 #game[data-state="build"] #content{bottom:12px}
 #game .buffet-exit{bottom:110px}
}
#game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #scene-label{display:none}
#game #tray-layer .tray,#game #tray-layer .tray:hover{transform:translateY(-100%)}
#game[data-state="build"] .plate-bar{flex-direction:row;text-align:left}

/* A short food reaction follows the character, separate from tray clues. */
#character-line{position:absolute;z-index:6;transform:translateX(-50%);max-width:240px;width:max-content;padding:9px 12px;border:2px solid #493529;background:#fff3be;color:#30291e;box-shadow:3px 3px 0 #30291e55;font:700 14px/1.35 monospace;text-align:center;pointer-events:none}
#character-line::before{content:'';position:absolute;top:-8px;left:calc(50% - 6px);width:10px;height:10px;background:#fff3be;border-top:2px solid #493529;border-left:2px solid #493529;transform:rotate(45deg)}
#character-line[hidden]{display:none}
@media(max-width:650px){#character-line{max-width:185px;font-size:12px;padding:7px 9px}}
/* Taller interior proportions preserve the character and the vertical aisles. */
#game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #world-stage{width:min(100%,calc((100dvh - 230px)*1.5));max-width:none}
#game #tray-layer .tray{width:25%}
@media(max-width:650px){#game:is([data-state="build"],[data-state="tasting"],[data-state="decision"],[data-state="sick"]) #world-stage{width:100%}#game #tray-layer .tray{width:29%}}

/* The final receipt floats over the ambulance departure scene. */
#game[data-state="results"]{max-width:none;padding:0;margin:0}
#game[data-state="results"] header{display:none}
#game[data-state="results"] #play-area{display:block;position:relative;height:100dvh;min-height:720px;max-height:none;background:#fff3be}
#game[data-state="results"] #scene-wrap{position:absolute;inset:0;height:100%;background:#fff3be}
#game[data-state="results"] #world-stage{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,900px)}
#game[data-state="results"] #scene-label{display:none}
#game[data-state="results"] #content{position:relative;z-index:2;max-width:390px!important;width:calc(100% - 28px);margin:0 auto!important;padding:20px 0 0!important;border:0;background:transparent;overflow:visible}
#game[data-state="results"] .receipt{margin:0;padding:18px 22px 20px;max-width:none;background:#fffbee;box-shadow:4px 5px 0 #9b815a33;border-top:5px solid #493529;transform:none}
.receipt-logo{display:block;width:160px;height:auto;margin:0 auto 12px;object-fit:contain;image-rendering:auto}
#game[data-state="results"] .receipt h2{font:700 14px monospace;letter-spacing:2px;margin:0 0 8px}
#game[data-state="results"] .receipt .stars{font-size:23px;margin-bottom:12px}
.receipt-total{display:flex;justify-content:space-between;align-items:center;border-top:2px dashed #ad9563;margin-top:10px;padding-top:10px;font:700 12px monospace}
.receipt-total strong{font-size:34px}
#game[data-state="results"] .receipt p{font:12px/1.45 monospace;margin:10px 0}
#game[data-state="results"] .receipt .receipt-note{font:11px/1.4 ui-sans-serif,system-ui,sans-serif}
#game[data-state="results"] .receipt .receipt-punchline{border-top:1px dashed #ad9563;padding-top:10px;font-size:11px}
#game[data-state="results"] .actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:14px}
#game[data-state="results"] .actions button{font-size:12px;padding:9px 6px;width:100%;margin:0}
#game[data-state="results"] .actions .quiet{grid-column:1/-1;border:0;background:transparent;padding:3px}
@media(max-width:650px){#game[data-state="results"] #play-area{min-height:760px}#game[data-state="results"] #content{padding-top:16px!important}#game[data-state="results"] .receipt{padding:15px 18px}.receipt-logo{width:145px}}
#game[data-state="results"] #scene-wrap #scene{width:100%;height:auto;max-height:none!important;background:transparent;object-fit:contain}

.intro-screen:focus{outline:none}

/* Each filled segment represents one of the three dishes on the plate. */
.plate-meter{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:8px 0 6px;padding:3px;border:2px solid #493529;background:#fffbee;max-width:320px}
.plate-meter span{height:12px;background:#e9dfbd;box-shadow:inset 0 -2px #d0c59e}
.plate-meter span.filled{background:#d5a83e;box-shadow:inset 0 3px #efd383,inset 0 -2px #a77d24}
.plate-meter[aria-valuenow="3"]{border-color:#326257}
.plate-meter[aria-valuenow="3"] span.filled{background:#649879;box-shadow:inset 0 3px #9bc4a5,inset 0 -2px #326257}
@media(max-width:650px){.plate-meter span{height:10px}.plate-meter{gap:3px;margin-top:7px}}

/* A single title, short directions, and a compact notes section. */
#tutorial{width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:24px;border:2px solid #514329;border-radius:8px;overflow-y:auto}
#tutorial h2{font-family:'Silkscreen',monospace;font-size:26px;margin:0 0 18px;color:#30291e}
#tutorial .tutorial-directions{padding-left:24px;margin:0 0 18px}
#tutorial li{font-size:15px;line-height:1.45;padding:6px 0;color:#514329}
#tutorial .tutorial-notes{border-top:1px solid #d4bf83;padding-top:14px;margin-bottom:18px}
#tutorial h3{font:700 15px/1.4 ui-sans-serif,system-ui,sans-serif;margin:0 0 6px;color:#30291e}
#tutorial .tutorial-notes ul{padding-left:19px;margin:0}
#tutorial .tutorial-notes li{font-size:13px;padding:4px 0}
#tutorial #close-help{background:#ffe69a;color:#30291e}
@media(max-width:450px){#tutorial{padding:20px}#tutorial h2{font-size:23px}#tutorial li{font-size:14px}}

/* Nearby entrance prompt stays anchored above its storefront. */
#game[data-state="map"] #world-stage>.door-bar{position:absolute;z-index:8;transform:translate(-50%,-100%);width:max-content;max-width:30%;padding:0;pointer-events:auto}
#game[data-state="map"] .door-bar #enter-door{width:auto;max-width:100%;margin:0;padding:9px 18px;background:#ffe52f;color:#30291e;border:2px solid #493529;border-bottom-width:4px;font-weight:800;font-size:14px;box-shadow:2px 2px 0 #49352940}
#game[data-state="map"] .door-bar #enter-door:hover:not(:disabled){background:#fff16a}
#game[data-state="map"] .door-bar::after{content:"";position:absolute;top:100%;left:50%;transform:translateX(-50%);border:6px solid transparent;border-top-color:#493529}
#game[data-state="map"] .door-bar #enter-door:disabled{background:#e5d7a7;opacity:1;color:#706449}
@media(max-width:650px){#game[data-state="map"] .door-bar #enter-door{padding:7px 12px;font-size:12px}}
