/* Readability policy: loaded after the art skin. Colors come from ui-accessibility.js. */
.stage{
 font-family:system-ui,"PingFang TC","Microsoft JhengHei","Noto Sans TC",sans-serif;
 font-size:16px;line-height:1.5;font-synthesis:none;
}
.stage button{font-family:inherit;letter-spacing:0;font-weight:700;}
.stage :is(p,small,.modal-subtitle,.inline-note,.section-label,.pause-instructions,.help-tips,.journal-footnote){color:var(--a11y-muted);text-shadow:none;}
.stage .modal{color:var(--a11y-ink);background:var(--a11y-paper);}
.stage :is(h1,h2,h3,.mobile-level-title,.brand,.level-tag b,.level-tag small,.currency,.ingredient b,.upgrade-card>b,.result-stats b,.journal-card-copy h3,.recipe-heading h3){color:var(--a11y-ink);text-shadow:none;}
.stage .primary{background:linear-gradient(var(--a11y-greenLight),var(--a11y-greenDark));color:var(--a11y-white);text-shadow:none;}
.stage .secondary,.stage .icon-button{background:linear-gradient(var(--a11y-blueLight),var(--a11y-blueDark));color:var(--a11y-white);text-shadow:none;}
.stage .modal-close{background:linear-gradient(var(--a11y-redLight),var(--a11y-redDark));}
.stage button:focus-visible{outline:3px solid var(--a11y-white);outline-offset:2px;box-shadow:0 0 0 6px var(--a11y-focus);}
.stage .primary:disabled,.stage .secondary:disabled{background:var(--a11y-disabled);color:var(--a11y-disabledInk);text-shadow:none;opacity:1;}
.stage .topbar,.stage .game-header{background:linear-gradient(var(--a11y-headerLight),var(--a11y-headerDark));}
.stage .currency,.stage .customer-count{background:var(--a11y-paper);color:var(--a11y-ink);}
.stage .goal-hud{background:var(--a11y-darkPanel);color:var(--a11y-white);}
.stage .goal-hud strong{color:var(--a11y-white);text-shadow:none;font-variant-numeric:tabular-nums;}
.stage .dialog-title{background:var(--a11y-blueDark);color:var(--a11y-white);text-shadow:none;}
.stage :is(.level-modal,.shop-modal,.upgrade-modal,.chest-modal)>.dialog-title{background:var(--a11y-headerLight);color:var(--a11y-ink);text-shadow:none;}
.stage .result-modal>.dialog-title{background:var(--a11y-redDark);color:var(--a11y-white);text-shadow:none;}
.stage :is(.stage-picker button,.level-facts,.booster,.upgrade-card,.result-stats,.journal-card,.recipe-card,.chapter-record){background:var(--a11y-paper);color:var(--a11y-ink);}
.stage :is(.stage-picker span,.stage-picker small,.booster b,.booster small,.level-facts small,.level-facts b,.upgrade-value,.upgrade-card>small,.upgrade-price,.setting-rows>button,.result-stats small,.result-stats span,.journal-summary small,.journal-summary b,.recipe-access,.recipe-price small,.recipe-price b,.journal-card-copy p,.chapter-record-heading>span,.record-values,.record-status,.record-title small){color:var(--a11y-ink);text-shadow:none;}
.stage .stage-picker button.selected,.stage .booster.chosen{background:#e7efd5;border-color:#416529;}
.stage .chapter-switch button,.stage .journal-tabs button{background:var(--a11y-paper);color:var(--a11y-ink);}
.stage .chapter-switch button.selected,.stage .journal-tabs button.selected{background:var(--a11y-darkPanel);color:var(--a11y-white);text-shadow:none;}
.stage .journal-claim.ready{background:var(--a11y-greenDark);color:var(--a11y-white);text-shadow:none;}
.stage .level-rules,.stage .unlock-notice,.stage .result-perfect{background:var(--a11y-paper);color:var(--a11y-ink);}
.stage .level-rules :is(b,span,small){color:var(--a11y-ink);}
.stage .plate-slot>small{color:var(--a11y-ink);text-shadow:none;}
.stage .cook-status{pointer-events:none;color:var(--a11y-white);background:var(--a11y-greenDark);border-color:#fff9d9;}
.stage .cooking .cook-status{background:var(--a11y-darkPanel);}
.stage .burnt .cook-status,.stage .danger .cook-status{background:var(--a11y-redDark);}
.stage .brand-seal{background:#8f3e1f;color:var(--a11y-white);text-shadow:none;}
.stage .tutorial-card{background:var(--a11y-paper);color:var(--a11y-ink);}
.stage .tutorial-card :is(b,p,small){color:var(--a11y-ink);text-shadow:none;}
.stage #opening-banner{background:var(--a11y-paper);}
.stage #opening-banner :is(small,b,span){color:var(--a11y-ink);text-shadow:none;}
.stage .selection-note{font-size:16px;text-align:left;margin:12px 0;padding:12px;background:#efe2c5;border-radius:12px;color:var(--a11y-ink);}

/* Real safe-area insets plus an extra comfortable touch margin. */
.stage.portrait-layout{
 --safe-top:calc(env(safe-area-inset-top,0px) + var(--edge-top));
 --safe-bottom:calc(env(safe-area-inset-bottom,0px) + var(--edge-bottom));
 --safe-left:calc(env(safe-area-inset-left,0px) + var(--edge-inline));
 --safe-right:calc(env(safe-area-inset-right,0px) + var(--edge-inline));
 padding:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}
.stage.portrait-layout button{min-width:48px;min-height:48px;font-size:16px;}
.stage.portrait-layout :is(p,small,.modal-subtitle,.inline-note,.section-label,.pause-instructions,.help-tips,.journal-footnote){font-size:16px;line-height:1.55;}
.stage.portrait-layout :is(.modal-eyebrow,.stage-picker small,.level-facts small,.level-facts b>span,.upgrade-art>span,.chapter-record-heading small,.recipe-access,.recipe-ingredients span,.recipe-price small,.journal-summary small,.journal-summary em,.record-values small,.record-title small,.record-status small,.journal-progress-label,.node-record small,.perfect-mark,.level-rules>small){font-size:14px;line-height:1.5;}
.stage.portrait-layout :is(h2,.mobile-level-title){font-size:24px;line-height:1.35;}
.stage.portrait-layout .dialog-title{min-height:64px;padding-right:64px;padding-left:16px;font-size:22px;line-height:1.4;}
.stage.portrait-layout .modal-close{width:48px;height:48px;min-width:48px;min-height:48px;top:6px;right:6px;}
.stage.portrait-layout .modal-close>svg{width:24px;height:24px;}
.stage.portrait-layout .primary,.stage.portrait-layout .secondary{min-height:56px;font-size:18px;line-height:1.4;padding:10px 16px;}
.stage.portrait-layout .modal-actions{flex-direction:column-reverse;gap:12px;}
.stage.portrait-layout .modal-actions>button{flex:none;width:100%;min-width:0;}
.stage.portrait-layout .overlay{padding:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);}
.stage.portrait-layout .modal{max-height:100%;overscroll-behavior:contain;}
.stage.portrait-layout :is(.modal-subtitle,.modal-eyebrow){display:none;}
.stage.portrait-layout :is(.settings-modal,.shop-modal,.help-modal,.journal-modal)>h2{display:none;}
.stage.portrait-layout .stage-picker{gap:8px;}
.stage.portrait-layout .stage-picker button{min-width:0;min-height:116px;padding:12px 4px;}
.stage.portrait-layout .stage-picker span{font-size:16px;line-height:1.4;}
.stage.portrait-layout .level-facts{padding:12px 0;}
.stage.portrait-layout .level-facts b{font-size:22px;gap:4px;}
.stage.portrait-layout .menu-mini svg{width:36px;height:36px;}
.stage.portrait-layout .section-label>span,.stage.portrait-layout .booster small{display:none;}
.stage.portrait-layout .boosters{gap:8px;}
.stage.portrait-layout .booster{min-width:0;min-height:124px;padding:10px 4px;gap:8px;}
.stage.portrait-layout .booster>b{font-size:16px;line-height:1.4;}
.stage.portrait-layout .booster>svg{width:36px;height:36px;}
.stage.portrait-layout .booster>span{font-size:16px;}
.stage.portrait-layout .shop-grid{gap:12px;padding:12px 6px;background:#bd8549;}
.stage.portrait-layout .upgrade-card{height:auto;min-height:244px;gap:8px;padding:12px 8px;}
.stage.portrait-layout .upgrade-card>b,.stage.portrait-layout .upgrade-value{font-size:16px;line-height:1.4;}
.stage.portrait-layout .upgrade-card>small{font-size:14px;line-height:1.5;}
.stage.portrait-layout .upgrade-price{min-height:40px;padding:8px;font-size:16px;}
.stage.portrait-layout .upgrade-card.recommended:before{display:none;}
.stage.portrait-layout .setting-rows>button{min-height:60px;font-size:16px;gap:12px;}
.stage.portrait-layout .pause-toggles{flex-wrap:wrap;gap:12px;}
.stage.portrait-layout .result-stats{padding:12px 4px;}
.stage.portrait-layout .result-stats small,.stage.portrait-layout .result-stats span{font-size:14px;line-height:1.5;}
.stage.portrait-layout .result-stats b{font-size:24px;}
.stage.portrait-layout .result-perfect,.stage.portrait-layout .result-perfect>span,.stage.portrait-layout .first-reward{font-size:16px;}
.stage.portrait-layout .journal-heading h2,.stage.portrait-layout .journal-mascot{display:none;}
.stage.portrait-layout .journal-tabs{gap:8px;}
.stage.portrait-layout .journal-tabs button{font-size:16px;gap:6px;padding:10px 4px;}
.stage.portrait-layout .journal-tabs button>svg{width:24px;height:24px;}
.stage.portrait-layout .journal-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.stage.portrait-layout .journal-card{padding:16px;}
.stage.portrait-layout .journal-card-copy h3,.stage.portrait-layout .recipe-heading h3,.stage.portrait-layout .chapter-record-heading h3{font-size:18px;}
.stage.portrait-layout .journal-card-copy p,.stage.portrait-layout .recipe-copy>p{font-size:16px;}
.stage.portrait-layout .recipe-card{grid-template-columns:1fr;padding:16px;}
.stage.portrait-layout .recipe-image,.stage.portrait-layout .recipe-image>svg{width:112px;height:112px;margin:auto;}
.stage.portrait-layout .recipe-copy>p:not(.recipe-method){display:none;}
.stage.portrait-layout .recipe-ingredients{gap:6px;margin:12px 0;}
.stage.portrait-layout .node-record-grid{grid-template-columns:1fr;}
.stage.portrait-layout .record-row{grid-template-columns:minmax(0,1fr);gap:12px;padding:16px;}
.stage.portrait-layout .record-status{grid-column:1;grid-row:auto;}
.stage.portrait-layout .record-values{flex-wrap:wrap;gap:12px;}
.stage.portrait-layout .chapter-record-heading{flex-wrap:wrap;gap:8px;}

/* Map: roomy fixed controls, with the route scrolling instead of shrinking. */
.stage.portrait-layout .topbar{height:112px;padding:0;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px;}
.stage.portrait-layout .brand{width:calc(100% - 56px);height:48px;font-size:18px;gap:8px;}
.stage.portrait-layout .brand small{display:none;}
.stage.portrait-layout .brand-seal{width:36px;height:40px;}
.stage.portrait-layout .topbar-right{position:static;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;width:100%;}
.stage.portrait-layout .topbar .icon-button{position:absolute;right:0;top:0;margin:0;width:48px;height:48px;}
.stage.portrait-layout .currency{min-width:0;height:40px;padding:0 4px;justify-content:center;gap:4px;font-size:18px;}
.stage.portrait-layout .currency>svg{width:24px;height:24px;}
.stage.portrait-layout .map-intro{top:calc(var(--safe-top) + 124px);left:var(--safe-left);right:var(--safe-right);width:auto;height:104px;padding:12px 16px;}
.stage.portrait-layout .map-intro .eyebrow{display:none;}
.stage.portrait-layout .map-intro h1{font-size:24px;margin:0;line-height:1.4;}
.stage.portrait-layout .journey-progress{width:100%;margin-top:8px;font-size:14px;gap:6px;color:var(--a11y-muted);}
.stage.portrait-layout .journey-progress>b{font-size:18px;color:var(--a11y-ink);}
.stage.portrait-layout .journey-progress>div{width:100%;height:8px;}
.stage.portrait-layout .map-stall{display:none;}
.stage.portrait-layout .journey{top:calc(var(--safe-top) + 240px);bottom:calc(var(--safe-bottom) + 92px);left:var(--safe-left);right:var(--safe-right);width:auto;height:auto;}
.stage.portrait-layout .chapter-switch{gap:8px;padding:0 0 8px;}
.stage.portrait-layout .chapter-switch button{height:auto;min-height:48px;min-width:0;font-size:16px;line-height:1.4;padding:8px 6px;white-space:normal;}
.stage.portrait-layout .route-heading{padding:0 0 8px;}
.stage.portrait-layout .route-heading>b{font-size:14px;letter-spacing:0;}
.stage.portrait-layout .map-route-content{min-height:560px;}
.stage.portrait-layout .node-circle{width:56px;height:56px;font-size:26px;}
.stage.portrait-layout .node-caption>b{font-size:16px;line-height:1.5;color:var(--a11y-ink);}
.stage.portrait-layout .node-caption{background:var(--a11y-paper);padding:4px 8px;}
.stage.portrait-layout .node-flag{display:none;}
.stage.portrait-layout .map-chest>span{font-size:14px;color:var(--a11y-ink);background:var(--a11y-paper);}
.stage.portrait-layout .map-footer{left:var(--safe-left);right:var(--safe-right);bottom:var(--safe-bottom);height:80px;padding:10px 0;grid-template-columns:56px 56px minmax(0,1fr);gap:12px;background:none;border:0;box-shadow:none;}
.stage.portrait-layout .mobile-shop-nav,.stage.portrait-layout .map-footer .journal-entry{min-width:48px;min-height:56px;padding:4px;font-size:16px;gap:4px;line-height:1.25;}
.stage.portrait-layout .map-footer .primary{min-width:0;font-size:18px;padding:10px;}
.stage.portrait-layout .claim-count{top:-4px;right:-4px;font-size:14px;}

/* Service: icons and large numbers; text explanations live in the manual. */
.stage.portrait-layout.game-screen{
 --game-header-height:104px;--game-awning-height:12px;--game-rail-height:8px;--game-rail-half:4px;
 --game-footer-height:40px;--kitchen-min-height:250px;
 grid-template-rows:var(--game-header-height) var(--game-awning-height) minmax(64px,1fr) var(--game-rail-height) max(var(--kitchen-min-height),calc(var(--play-height)/2 - var(--game-footer-height) - 4px)) var(--game-footer-height);
 overflow-y:auto;overscroll-behavior:contain;
}
.stage.portrait-layout.short-layout.game-screen{--game-header-height:96px;}
.stage.portrait-layout.tight-layout.game-screen{--game-header-height:94px;--kitchen-min-height:240px;}
.stage.portrait-layout.has-challenge.game-screen{--game-footer-height:72px;}
.stage.portrait-layout.is-teaching.game-screen{--game-footer-height:64px;}
.stage.portrait-layout .game-header{padding:4px 0;grid-template-columns:minmax(0,1fr) 80px;grid-template-rows:44px 36px;gap:4px 8px;align-content:center;}
.stage.portrait-layout .level-tag{grid-column:1;grid-row:1;gap:8px;}
.stage.portrait-layout .level-tag small,.stage.portrait-layout .level-tag b>span{display:none;}
.stage.portrait-layout .level-tag b{font-size:22px;line-height:1.3;}
.stage.portrait-layout .level-tag .brand-seal{width:32px;height:36px;}
.stage.portrait-layout .game-header-right{display:contents;}
.stage.portrait-layout .game-header-right>.icon-button{grid-column:2;grid-row:1;justify-self:end;width:48px;height:48px;}
.stage.portrait-layout .customer-count{grid-column:2;grid-row:2;width:auto;min-width:0;height:36px;flex-direction:row;gap:4px;padding:2px 4px;border-radius:10px;}
.stage.portrait-layout .customer-count>.guest-count-icon{display:block;}
.stage.portrait-layout .customer-count>b{font-size:22px;color:var(--a11y-ink);}
.stage.portrait-layout .goal-hud{grid-column:1;grid-row:2;padding:2px 6px;border:1px solid #d4b884;height:36px;align-self:stretch;}
.stage.portrait-layout .goal-hud>div:first-child{height:24px;line-height:24px;margin:0;}
.stage.portrait-layout #goal-text{font-size:22px;line-height:24px;white-space:nowrap;}
.stage.portrait-layout #goal-label>svg{width:24px;height:24px;}
.stage.portrait-layout .goal-track{height:6px;}
.stage.portrait-layout .combo-hud{display:none;}
.stage.portrait-layout .awning{height:auto;min-height:0;}
.stage.portrait-layout .awning :is(span,small){display:none;}
.stage.portrait-layout .order-bubble{background:var(--a11y-paper);border-color:#a45b24;}
.stage.portrait-layout .vip-label{top:-10px;left:auto;right:-4px;width:32px;height:32px;padding:3px;display:grid;place-items:center;border-radius:50%;background:#fff3ce;}
.stage.portrait-layout .vip-label span{display:none;}
.stage.portrait-layout .patience-meter{width:8px;}
/* Two working areas plus a full-width ingredient row, keeping 4-slot targets >=48. */
.stage.portrait-layout .kitchen{
 padding:4px 6px;gap:8px;
 grid-template-columns:repeat(6,minmax(0,1fr));
 grid-template-rows:minmax(112px,1fr) 56px 54px;
 background:#dda05f;border-top:3px solid #f1c687;
}
.stage.portrait-layout .kitchen:before{display:none;}
.stage.portrait-layout .griddle{grid-column:1/4;grid-row:1;}
.stage.portrait-layout .plates{grid-column:4/7;grid-row:1;}
.stage.portrait-layout .griddle,.stage.portrait-layout .plates{padding:2px;gap:6px;border-width:3px;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(48px,1fr));}
.stage.portrait-layout .griddle[data-slots="3"],.stage.portrait-layout .griddle[data-slots="4"],.stage.portrait-layout .plates[data-slots="3"],.stage.portrait-layout .plates[data-slots="4"]{grid-template-columns:repeat(2,minmax(48px,1fr));grid-template-rows:repeat(2,minmax(48px,1fr));}
.stage.portrait-layout .griddle-slot,.stage.portrait-layout .plate-slot{min-width:48px;min-height:48px;padding:2px;}
.stage.portrait-layout .griddle-slot>svg,.stage.portrait-layout .plate-dish>svg,.stage.portrait-layout .plate-slot.full .plate-dish>svg{width:100%;height:100%;max-width:none;max-height:148px;}
.stage.portrait-layout .griddle-slot>.cook-status{position:absolute;bottom:2px;right:2px;display:grid;place-items:center;width:26px;height:26px;padding:2px;border-radius:7px;}
.stage.portrait-layout .cook-status>svg{width:20px;height:20px;}
.stage.portrait-layout .cook-ring{width:7px;right:auto;left:2px;bottom:3px;height:60%;}
.stage.portrait-layout .plate-slot>small{display:none;}
.stage.portrait-layout .raw-ingredient{grid-column:1/3;grid-row:2;}
.stage.portrait-layout .toppings .ingredient[data-action="basil"]{grid-column:3/5;grid-row:2;}
.stage.portrait-layout .toppings .ingredient[data-action="cheese"]{grid-column:5/7;grid-row:2;}
.stage.portrait-layout .ingredient{height:100%;min-height:48px;min-width:48px;padding:2px;background:var(--a11y-paper);}
.stage.portrait-layout .ingredient>div{display:none;}
.stage.portrait-layout .ingredient>span{width:100%;height:100%;}
.stage.portrait-layout .ingredient>span>svg{width:100%;height:100%;max-height:64px;}
.stage.portrait-layout .toppings .ingredient>svg:last-child{top:2px;right:2px;width:24px;height:24px;padding:2px;border-radius:50%;background:#fff8e7;}
.stage.portrait-layout .ingredient:disabled{opacity:1;filter:none;background:var(--a11y-disabled);border:2px dashed #8c7b66;}
.stage.portrait-layout .ingredient:disabled>span{filter:grayscale(1);opacity:.55;}
.stage.portrait-layout .tea-station{grid-column:1/-1;grid-row:3;grid-template-columns:48px minmax(0,1fr);gap:8px;padding:0;}
.stage.portrait-layout .tea-dispenser{width:48px;height:48px;}
.stage.portrait-layout .tea-tray{min-height:48px;padding:2px;gap:8px;border-width:2px;}
.stage.portrait-layout .tea-cup{min-width:48px;min-height:48px;}
.stage.portrait-layout .tea-cup>svg{width:100%;height:100%;max-height:64px;}
.stage.portrait-layout .tea-refill{left:0;width:48px;bottom:0;}
.stage.portrait-layout .tea-refill>div{height:5px;}
.stage.portrait-layout .game-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:center;gap:4px 12px;padding:2px 0;background:var(--a11y-paper);border:0;box-shadow:none;}
.stage.portrait-layout .game-footer>span{font-size:16px;line-height:24px;color:var(--a11y-ink);text-shadow:none;gap:6px;}
.stage.portrait-layout .game-footer b{font-size:20px;color:var(--a11y-ink);text-shadow:none;}
.stage.portrait-layout .game-footer>span>svg{width:24px;height:24px;}
.stage.portrait-layout .game-footer .game-tip{display:none;}
.stage.portrait-layout .game-footer .game-tip.challenge-status{display:flex;grid-column:1/-1;justify-content:space-between;gap:8px;flex-wrap:nowrap;font-size:14px;line-height:24px;color:var(--a11y-ink);}
.stage.portrait-layout .rule-chip{display:inline-flex;gap:4px;align-items:center;white-space:nowrap;}
.stage.portrait-layout .rule-chip b{font-size:16px;}
.stage.portrait-layout .is-teaching .game-footer{visibility:hidden;}
.stage.portrait-layout.is-teaching .game-footer{visibility:hidden;}
.stage.portrait-layout .tutorial-card{
 left:var(--safe-left);right:var(--safe-right);width:auto;top:auto;bottom:var(--safe-bottom);height:64px;min-height:64px;max-height:64px;
 padding:6px 8px;display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:8px;align-items:center;border:2px solid #a87235;
}
.stage.portrait-layout .tutorial-card>svg,.stage.portrait-layout .tutorial-card>div>small,.stage.portrait-layout .tutorial-card>div>b{display:none;}
.stage.portrait-layout .tutorial-card>div{padding:0;}
.stage.portrait-layout .tutorial-card p{margin:0;font-size:16px;line-height:22px;color:var(--a11y-ink);}
.stage.portrait-layout .tutorial-card>button{position:static;width:48px;height:48px;min-width:48px;min-height:48px;padding:0;font-size:16px;color:var(--a11y-ink);background:#ead6b4;border-radius:8px;}
.stage.portrait-layout.tight-layout .kitchen{gap:6px;}
/* Toast also avoids the home indicator and uses a solid, readable substrate. */
#toast{bottom:calc(env(safe-area-inset-bottom,0px) + 24px);max-width:calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 32px);font:600 16px/1.5 system-ui,"PingFang TC","Microsoft JhengHei",sans-serif;color:#4a2d1c;background:#fff4df;text-shadow:none;}
@media(prefers-reduced-motion:reduce){.stage button{transition:none;}}


/* Critical failure explanations remain visible, even when flavor subtitles are hidden. */
.stage.portrait-layout .result-modal>.modal-subtitle{display:block;font-size:16px;line-height:1.6;color:var(--a11y-ink);}
.stage.portrait-layout :is(.journal-reward,.journal-reward b,.journal-card-footer,.record-title b,.record-values b,.node-record b){font-size:16px;color:var(--a11y-ink);}
.stage.portrait-layout .result-stats b>em{font-size:14px;}
.stage.portrait-layout .route-heading{padding:6px 8px;margin-bottom:4px;border-radius:8px;background:var(--a11y-paper);}
.stage.portrait-layout .map-node.locked{opacity:1;}
.stage.portrait-layout #opening-banner small{display:none;}
.stage.portrait-layout .kitchen{--kitchen-min-height:252px;grid-template-rows:minmax(112px,1fr) 56px 56px;}
.stage.portrait-layout.game-screen{--kitchen-min-height:252px;}
.stage.portrait-layout.tight-layout.game-screen{--kitchen-min-height:240px;}
.stage.portrait-layout.tight-layout .kitchen{grid-template-rows:minmax(112px,1fr) 48px 56px;}
/* Very narrow windows scroll full-sized stations instead of shrinking touch targets. */
.stage.portrait-layout.narrow-layout.game-screen{--kitchen-min-height:366px;}
.stage.portrait-layout.narrow-layout .kitchen{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(112px,1fr) minmax(112px,1fr) 56px 56px;gap:6px;}
.stage.portrait-layout.narrow-layout .griddle{grid-column:1/-1;grid-row:1;}
.stage.portrait-layout.narrow-layout .plates{grid-column:1/-1;grid-row:2;}
.stage.portrait-layout.narrow-layout .raw-ingredient{grid-column:1;grid-row:3;}
.stage.portrait-layout.narrow-layout .toppings .ingredient[data-action="basil"]{grid-column:2;grid-row:3;}
.stage.portrait-layout.narrow-layout .toppings .ingredient[data-action="cheese"]{grid-column:3;grid-row:3;}
.stage.portrait-layout.narrow-layout .tea-station{grid-column:1/-1;grid-row:4;}

.stage.portrait-layout .currency{padding-left:2px;padding-right:2px;}
.stage.portrait-layout.narrow-layout .tea-station{grid-template-columns:minmax(0,1fr);}
.stage.portrait-layout.narrow-layout .tea-dispenser,.stage.portrait-layout.narrow-layout .tea-refill{display:none;}
.stage.portrait-layout.narrow-layout .tea-tray{grid-column:1/-1;}

/* Keep every interactive state within the same measured foreground/background pairs. */
.stage button:hover:not(:disabled),.stage button:active:not(:disabled){filter:none;}
.boot-screen{background:#fff4df;color:#4a2d1c;}
.boot-screen h1{color:#4a2d1c;text-shadow:none;}
.boot-screen p{font-size:16px;line-height:1.5;color:#6b492d;}


/* Small badges and status captions use the same dark ink instead of faded decorative text. */
.stage.portrait-layout :is(.upgrade-art>span,.recipe-ingredients>span,.journal-progress-label,.recipe-access,.recipe-method strong,.record-level-id,.record-status>span,.perfect-mark,.node-record b,.node-record small,.chapter-record-heading small,.chapter-record-heading>span,.upgrade-compare small,.upgrade-compare strong,.first-reward,.result-perfect>span){color:var(--a11y-ink);text-shadow:none;}
.stage.portrait-layout .upgrade-art>span,.stage.portrait-layout .record-level-id{background:var(--a11y-paper);border-color:#ac7c40;}
.stage.portrait-layout .recipe-card.locked .recipe-access{color:var(--a11y-ink);}


/* Contextual meal tools keep the main cooking surface uncluttered. */
.stage .plate-preview{display:flex;align-items:center;justify-content:center;gap:16px;margin:18px 0;}
.stage .plate-preview>svg{width:112px;height:112px;}
.stage .plate-preview>div{min-width:0;text-align:left;}
.stage .plate-preview h2{font-size:24px;line-height:1.4;margin:4px 0;color:var(--a11y-ink);}
.stage .plate-preview>div>span{font-size:16px;color:var(--a11y-muted);}
.stage .plate-message,.stage .plate-editor-note,.stage .plate-match{font-size:16px;line-height:1.6;color:var(--a11y-ink);}
.stage .plate-editor-note{color:var(--a11y-muted);}
.stage .plate-match{display:flex;justify-content:center;align-items:center;gap:8px;}
.stage .plate-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.stage .plate-action{position:relative;min-width:48px;min-height:108px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px 8px;border:2px solid #b58953;border-radius:12px;color:var(--a11y-ink);background:var(--a11y-paper);}
.stage .plate-action>svg{width:48px;height:48px;}
.stage .plate-action>span{font-size:16px;line-height:1.4;}
.stage .plate-action:disabled{opacity:1;background:var(--a11y-disabled);color:var(--a11y-disabledInk);}
.stage .plate-action:disabled>svg{filter:grayscale(1);opacity:.6;}
.stage .plate-lock{position:absolute;right:4px;top:4px;padding:2px;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--a11y-paper);}
.stage .plate-lock>svg{width:22px;height:22px;}
.stage .plate-choice-list{display:grid;gap:12px;margin:16px 0;}
.stage .plate-choice{display:flex;align-items:center;gap:12px;text-align:left;min-width:48px;min-height:80px;width:100%;padding:10px 12px;border:2px solid #b58953;border-radius:12px;background:var(--a11y-paper);color:var(--a11y-ink);}
.stage .plate-choice>svg{width:64px;height:64px;}
.stage .plate-choice>span{min-width:0;display:flex;flex-direction:column;gap:4px;line-height:1.5;font-size:16px;}
.stage .plate-danger{display:flex;align-items:center;justify-content:center;gap:8px;min-height:56px;padding:10px 16px;border:2px solid #fff4d5;border-radius:13px;background:linear-gradient(var(--a11y-redLight),var(--a11y-redDark));color:var(--a11y-white);font-size:18px;box-shadow:0 4px 0 #633221;}
.stage .plate-editor .modal-actions,.stage .plate-list .modal-actions,.stage .plate-discard .modal-actions{margin-top:20px;}
.stage.portrait-layout .plate-preview{gap:12px;margin:12px 0;}
.stage.portrait-layout .plate-preview>svg{width:96px;height:96px;}
.stage.portrait-layout .plate-preview h2{font-size:22px;}
.stage.portrait-layout .plate-action{min-height:104px;}
.stage.portrait-layout .plate-editor-note{font-size:14px;}
.stage.portrait-layout .plate-message,.stage.portrait-layout .plate-match{font-size:16px;}

.stage.portrait-layout .plate-editor .modal-actions,.stage.portrait-layout .plate-list .modal-actions,.stage.portrait-layout .plate-discard .modal-actions{flex-direction:column;}
.stage.portrait-layout .plate-danger{min-height:56px;font-size:18px;}

/* v1.8.1 portrait polish. Runtime supplies the same bounded rectangles checked in layout tests. */
.stage.portrait-layout.game-screen{
 grid-template-rows:var(--service-header) 12px var(--service-guests) 8px var(--service-kitchen) var(--service-footer);
}
.stage.portrait-layout .customer-row{
 padding:0;gap:8px;overflow:visible;align-items:stretch;justify-content:center;
}
.stage.portrait-layout .customer-row .customer{
 flex:0 0 var(--guest-slot);width:var(--guest-slot);min-width:0;height:100%;
 background:none;border:0;box-shadow:none;animation:none;
}
.stage.portrait-layout .customer-row .customer .customer-person{
 left:var(--person-x);top:var(--person-y);right:auto;bottom:auto;transform:none;
 width:var(--person-width);height:var(--person-height);max-width:none;overflow:hidden;z-index:1;
}
.stage.portrait-layout .customer-row .customer .order-bubble{
 left:var(--ticket-x);top:var(--ticket-y);right:auto;bottom:auto;transform:none;
 width:var(--ticket-width-px);height:var(--ticket-height);min-width:0;min-height:0;max-height:none;
 padding:var(--ticket-pad-top) 6px 8px 10px;display:flex;border-width:2px;overflow:visible;
}
.stage.portrait-layout .customer-row .order-items{
 display:grid;grid-template-columns:repeat(var(--ticket-columns),minmax(0,1fr));grid-auto-rows:var(--order-icon-size);
 gap:4px;align-items:center;justify-items:center;width:100%;
}
.stage.portrait-layout .customer-row .customer .order-item{
 width:var(--order-icon-size);height:var(--order-icon-size);min-width:0;max-width:100%;
 flex:none;display:block;
}
.stage.portrait-layout .customer-row .customer .order-item>svg{width:100%;height:100%;}
.stage.portrait-layout .customer-row .customer .order-bubble:after{
 left:calc(50% - 5px);right:auto;top:auto;bottom:-6px;transform:rotate(-45deg);width:10px;height:10px;
}
.stage.portrait-layout .customer-row[data-count="1"] .customer .order-bubble:after{
 left:-6px;top:50%;bottom:auto;transform:rotate(45deg);
}
.stage.portrait-layout .customer-row .customer .patience-meter{
 left:calc(var(--ticket-x) + 3px);right:auto;top:calc(var(--ticket-y) + var(--ticket-pad-top));
 bottom:auto;width:6px;height:calc(var(--ticket-height) - var(--ticket-pad-top) - 10px);
}
.stage.portrait-layout .customer-row .vip-label{
 left:calc(50% - 12px);right:auto;top:1px;width:24px;height:24px;padding:0;
}
.stage.portrait-layout .customer-row .vip-label>svg{width:24px;height:24px;}
.stage.portrait-layout .kitchen{
 grid-template-rows:minmax(136px,1fr) 56px 56px;gap:8px;padding:4px 6px;
}
.stage.portrait-layout.tight-layout .kitchen{grid-template-rows:minmax(136px,1fr) 56px 56px;gap:8px;}
.stage.portrait-layout .griddle,.stage.portrait-layout .plates,
.stage.portrait-layout .griddle[data-slots],.stage.portrait-layout .plates[data-slots]{
 grid-template-rows:repeat(2,minmax(56px,1fr));
}
.stage.portrait-layout .griddle-slot,.stage.portrait-layout .plate-slot{min-height:56px;}
.stage.portrait-layout .griddle-slot>.cook-status{width:20px;height:20px;padding:1px;}
.stage.portrait-layout .cook-status>svg{width:18px;height:18px;}
.stage.portrait-layout.narrow-layout .kitchen{grid-template-rows:minmax(136px,1fr) minmax(136px,1fr) 56px 56px;gap:6px;}
.stage.portrait-layout .plate-slot.full:focus-visible,.stage.portrait-layout .tea-cup:focus-visible{outline-offset:-3px;}
.stage.portrait-layout.has-modal{overflow:hidden;}

/* Map: more route space, without reducing fixed controls or font size. */
.stage.portrait-layout .topbar{height:96px;}
.stage.portrait-layout .map-intro{top:calc(var(--safe-top) + 108px);height:88px;padding:8px 16px;}
.stage.portrait-layout .map-intro h1{line-height:30px;}
.stage.portrait-layout .journey-progress{
 display:grid;grid-template-columns:22px auto 1fr;gap:4px 6px;margin-top:4px;line-height:22px;
}
.stage.portrait-layout .journey-progress>b{line-height:22px;}
.stage.portrait-layout .journey-progress>div{grid-column:1/-1;height:6px;margin:0;}
.stage.portrait-layout .journey{top:calc(var(--safe-top) + 208px);}
.stage.portrait-layout .node-caption{max-width:100%;white-space:normal;text-align:center;}

/* Detail panels: one clear reading direction and reachable full-width actions. */
.stage.portrait-layout .level-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px 8px;}
.stage.portrait-layout .level-facts>div:last-child{grid-column:1/-1;border-left:0;border-top:1px solid #cdb18b;padding-top:10px;}
.stage.portrait-layout .level-facts b{flex-wrap:wrap;min-width:0;}
.stage.portrait-layout .level-facts b>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.stage.portrait-layout .menu-mini{height:48px;gap:4px;}
.stage.portrait-layout .menu-mini svg{width:48px;height:48px;}
.stage.portrait-layout .stage-picker{margin-top:16px;margin-bottom:16px;}
.stage.portrait-layout .stage-picker button{min-height:104px;}
.stage.portrait-layout .stage-picker button>svg{width:36px;height:36px;}
.stage.portrait-layout .modal-actions{
 flex-direction:column;position:sticky;bottom:-20px;z-index:4;margin-top:16px;padding:12px 0 8px;
 background:#fff5e2;border-top:1px solid #e4c99e;
}
.stage.portrait-layout .modal-actions>button>svg{width:24px;height:24px;}
.stage.portrait-layout .upgrade-card{min-width:0;min-height:270px;text-align:center;}
.stage.portrait-layout .upgrade-card>small{overflow-wrap:anywhere;}
.stage.portrait-layout .upgrade-compare{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);gap:8px;}
.stage.portrait-layout .upgrade-compare>div{width:auto;min-width:0;}
.stage.portrait-layout .upgrade-compare>svg{width:24px;}
.stage.portrait-layout .upgrade-compare strong{font-size:20px;overflow-wrap:anywhere;}
.stage.portrait-layout .result-details .result-stats{grid-template-columns:1fr;padding:12px;}
.stage.portrait-layout .result-details .result-stats>div{
 display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;text-align:left;padding:10px 0;border-bottom:1px solid #d5bc96;
}
.stage.portrait-layout .result-details .result-stats>div:last-child{border-bottom:0;}
.stage.portrait-layout .result-details .result-stats small{margin:0;align-self:center;}
.stage.portrait-layout .result-details .result-stats b{margin:0;}
.stage.portrait-layout .result-details .result-stats span{grid-column:1/-1;}
.stage.portrait-layout .result-rewards{gap:16px;flex-wrap:wrap;}
.stage.portrait-layout .result-journal{min-height:48px;font-size:16px;white-space:normal;}
.stage.portrait-layout .plate-action-grid{gap:12px;}

