#mobile-rotate{display:none}
#mobile-held{position:fixed;z-index:100;pointer-events:none;transform:translate(-50%,-100%);padding:8px 14px;background:#fff0d3;border:3px solid #493b2e;border-radius:50%;color:#352e25;font-size:16px}
html.mobile-game body{height:var(--mobile-viewport-height,100dvh)}
html.mobile-game .game-layout{width:var(--mobile-viewport-width,100vw);height:var(--mobile-viewport-height,100dvh);gap:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
html.mobile-game .game-shell{height:100%;aspect-ratio:auto}
html.mobile-preview .game-layout{width:min(var(--mobile-viewport-width,100vw),932px);height:min(var(--mobile-viewport-height,100dvh),430px)}
html.mobile-game .support-bar{display:none}
html.mobile-game #game{position:absolute;inset:0;opacity:0;pointer-events:none}
html.mobile-game .audio-controls{display:none!important}
html.mobile-game .start-menu:not([data-cleared="true"]){background-image:url('assets/title-backdrop-mobile-v1.svg')}
html.mobile-game .start-menu h1{top:12%;font-size:8.3cqw;gap:1.5cqw}
html.mobile-game .start-menu .tycoon-title{font-size:5.3cqw}
html.mobile-game .title-illustration{width:46%;height:78%;object-fit:contain;right:1%;bottom:0}
html.mobile-game .title-controls{top:48%;width:34%;left:7%}
html.mobile-game .title-controls button{min-height:44px;font-size:24px;padding:7px;border-width:3px}
html.mobile-game .title-controls #new-game,html.mobile-game .title-controls #continue-game{font-size:clamp(24px,3.3cqw,40px)}
html.mobile-game .menu-actions{gap:10px}
html.mobile-game .menu-message{font-size:14px}
html.mobile-game .decor-fruit{display:none}
#mobile-root{--stock-height:46px;position:absolute;inset:0;display:flex;flex-direction:column;gap:4px;padding:4px;background:#c7b799;color:#302b25;overflow:hidden;font-size:15px}
#mobile-root button{font-family:inherit;font-size:16px;min-width:44px;min-height:44px;line-height:1.1;padding:5px 8px;border:2px solid #473d32;border-radius:8px;background:#f7f5ed;color:#302b25;box-shadow:none;transform:none;touch-action:manipulation}
#mobile-root button:disabled{opacity:.55;cursor:default}
#mobile-root button[aria-pressed="true"],#mobile-root button.selected{background:#e5bb71;border-color:#825220}
.mobile-header{height:40px;flex:none;display:flex;align-items:center;gap:8px;background:#efe0be;border-bottom:2px solid #806044;padding-left:10px}
#mobile-status{flex:1;font-size:clamp(15px,2.4vw,21px);white-space:nowrap}
#mobile-money{display:flex;align-items:baseline;justify-content:flex-end;flex:none;gap:1px;margin-left:auto;margin-right:12px;white-space:nowrap;font-size:clamp(15px,2.4vw,21px);text-align:right}
#mobile-money-amount{text-align:right;font-variant-numeric:tabular-nums}
.mobile-header button{height:40px;min-height:40px!important}
.mobile-workspace{display:flex;flex:1;min-height:0;gap:6px;overflow:hidden}
#mobile-root[data-view="kitchen"] .mobile-workspace{background:#a29b95;border:2px solid #594c40;border-radius:12px;padding:5px;gap:8px}
#mobile-ingredients{width:46%;flex:none;min-height:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:3px 5px;overflow:hidden}
#mobile-root #mobile-ingredients button{position:relative;min-width:0;min-height:0;padding:2px 0;display:grid;grid-template-rows:minmax(0,1fr) 25px;justify-items:center;font-size:16px;border:0;border-radius:0;background:transparent;box-shadow:none;opacity:1;color:#503722}
#mobile-ingredients canvas{height:100%;width:100%;max-width:110px;max-height:52px;align-self:end;object-fit:contain;aspect-ratio:auto;pointer-events:none;min-height:0;border-radius:0}
#mobile-ingredients span{white-space:nowrap;min-width:48px;padding:2px 6px;border:2px solid #69563c;border-radius:4px;background:#e6d7b6;font-size:16px;line-height:1.05;flex:none}
#mobile-ingredients button.suggested canvas,#mobile-ingredients button.selected canvas{filter:drop-shadow(2px 0 #d98400) drop-shadow(-2px 0 #d98400) drop-shadow(0 2px #d98400) drop-shadow(0 -2px #d98400)}
#mobile-ingredients button.suggested span,#mobile-ingredients button.selected span{border-color:#bd7400;background:#f1cb7d;box-shadow:0 0 0 1px #d98400}
#mobile-ingredients button.selected canvas{filter:drop-shadow(2px 0 #315d3a) drop-shadow(-2px 0 #315d3a) drop-shadow(0 2px #315d3a) drop-shadow(0 -2px #315d3a)}
#mobile-ingredients button.selected span{border-color:#315d3a;background:#d7e4bb;color:#203e27;box-shadow:0 0 0 1px #315d3a}
#mobile-ingredients button.selected::after,#mobile-shelves button.selected::after{content:'';position:absolute;inset:1px;pointer-events:none;--corner:#315d3a;background:linear-gradient(var(--corner),var(--corner)) left top/16px 3px,linear-gradient(var(--corner),var(--corner)) left top/3px 16px,linear-gradient(var(--corner),var(--corner)) right top/16px 3px,linear-gradient(var(--corner),var(--corner)) right top/3px 16px,linear-gradient(var(--corner),var(--corner)) left bottom/16px 3px,linear-gradient(var(--corner),var(--corner)) left bottom/3px 16px,linear-gradient(var(--corner),var(--corner)) right bottom/16px 3px,linear-gradient(var(--corner),var(--corner)) right bottom/3px 16px;background-repeat:no-repeat}
#mobile-ingredients button.selected::before,#mobile-shelves button.selected::before{content:'선택 중';position:absolute;top:0;right:4px;z-index:1;padding:2px 4px;border-radius:3px;background:#315d3a;color:#fff9e8;font-size:12px;line-height:1;pointer-events:none}
.mobile-workboard{min-width:0;flex:1;display:flex;flex-direction:column;min-height:0;background:#b89b70;border:2px solid #59412d;border-radius:9px;overflow:hidden}
#mobile-step{height:28px;flex:none;text-align:center;padding:3px 4px;background:#fff0d3;font-size:16px;overflow:hidden;white-space:nowrap}
#mobile-stage{flex:1;min-height:0;width:100%;height:0;aspect-ratio:auto;touch-action:none;border-radius:0}
#mobile-root[data-view="kitchen"] .mobile-workboard{position:relative;background:transparent;border:0;border-radius:0}
#mobile-root[data-view="store"] .mobile-workboard{background:#b6bdbf;border-radius:0}
#mobile-root[data-view="cinematic"] .mobile-workboard{background:#202c3a;border:0;border-radius:0}
#mobile-root[data-view="cinematic"] .mobile-navigation{display:none}
#mobile-root[data-view="store"] #mobile-step{display:none}
#mobile-root[data-view="kitchen"] #mobile-stock{order:-1;margin-bottom:6px;border:2px solid #695b4b;border-radius:8px;background:#aaa49c}
#mobile-root[data-view="kitchen"] #mobile-step{position:absolute;z-index:1;top:calc(var(--stock-height) + 12px);right:10px;width:max-content;max-width:62%;height:auto;min-height:32px;padding:6px 10px;border:2px solid #796044;border-radius:9px;font-size:14px;line-height:1.15;white-space:normal;pointer-events:none;box-shadow:0 2px 3px #49332320}
#mobile-stock{height:var(--stock-height);flex:none;display:flex;overflow-x:auto;overflow-y:hidden;gap:5px;overscroll-behavior:contain;background:#a4a58e;padding:3px;scrollbar-width:thin;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
#mobile-stock.dragging{cursor:grabbing}
.mobile-stock-card{flex:none;min-width:150px;display:flex;gap:8px;align-items:center;justify-content:space-between;padding:4px 7px;border:2px solid #65563e;border-radius:6px;background:#fff0d3;white-space:nowrap;font-size:14px}
.mobile-stock-card canvas{width:24px;height:24px;aspect-ratio:auto;flex:none;pointer-events:none}
.mobile-stock-card.ordered{border-color:#326c7b}
.mobile-stock-order{position:relative;align-self:center;flex:none;margin-right:3px;padding:5px 7px;border:2px solid #243e45;border-radius:5px;background:#326c7b;color:#fff7e6;font-size:14px;line-height:1}
.mobile-stock-order::after{content:'';position:absolute;right:-8px;top:7px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:7px solid #326c7b;pointer-events:none}
.mobile-stock-card.shortage strong{color:#c52b25}
#mobile-shelves{display:flex;flex-direction:column;width:38%;max-width:400px;gap:5px;overflow-y:auto;overscroll-behavior:contain;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;scrollbar-width:thin}
#mobile-shelves.dragging,#mobile-shelves.dragging button{cursor:grabbing}
#mobile-shelves button{position:relative;display:flex;align-items:center;gap:6px;flex:none;width:100%;min-height:52px;text-align:left;touch-action:none}
#mobile-shelves button[aria-disabled="true"]{opacity:.55}
#mobile-shelves button.ordered{border-color:#326c7b}
#mobile-shelves button.selected{border-color:#315d3a;background:#d7e4bb}
#mobile-shelves canvas{width:44px;height:36px;flex:none;pointer-events:none}
.mobile-shelf-name{flex:1;font-size:15px}
#mobile-shelves strong{font-size:15px;white-space:nowrap}
.mobile-navigation{display:flex;gap:6px;height:44px;flex:none}
.mobile-navigation button{flex:1}
.mobile-management{display:flex;flex:1;min-width:0;min-height:0;gap:8px;background:#efe6cc;padding:5px;border:2px solid #59412d;border-radius:8px;overflow:hidden}
.mobile-management-controls{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;gap:6px;padding-left:6px;border-left:2px solid #a18c6a}
#mobile-tabs{display:flex;gap:6px;flex:none}
#mobile-tabs button{flex:1;min-width:0;white-space:nowrap;padding:5px 3px}
.mobile-cctv{display:grid;grid-template-rows:repeat(2,minmax(0,1fr));flex:none;width:22%;min-width:0;min-height:0;gap:5px;overflow:hidden}
.mobile-cctv canvas{display:block;width:100%;height:100%;min-height:0;aspect-ratio:auto;border-radius:0;pointer-events:none}
#mobile-upgrades{flex:1;overflow-y:auto;min-height:0;overscroll-behavior:contain;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
#mobile-root #mobile-upgrades button{touch-action:none}
#mobile-upgrades.dragging,#mobile-upgrades.dragging button{cursor:grabbing}
#mobile-upgrades button[aria-disabled="true"]{opacity:.55;cursor:default}
#mobile-upgrades article{display:flex;align-items:center;gap:8px;background:#fff8e6;padding:10px;margin-bottom:10px;border-radius:8px;min-height:100px}
#mobile-upgrades article>div{flex:1;min-width:0}
#mobile-upgrades article strong{font-size:19px}
#mobile-upgrades p{margin:5px 0 0;font-size:15px;line-height:1.2}
#mobile-upgrades article>button{width:104px;min-height:54px;flex:none}
#mobile-upgrades .mobile-upgrade-icon{width:38px;height:38px;flex:none;pointer-events:none}
#mobile-cashier-progress{width:100%;height:10px;flex:none;accent-color:#5b8794}
html.mobile-game #cancel-new{font-size:20px}
#mobile-stock,#mobile-shelves{-webkit-overflow-scrolling:touch}
@media(max-width:740px){#mobile-upgrades article>button{width:80px}#mobile-upgrades article{padding:8px;gap:6px}#mobile-upgrades article strong{font-size:17px}#mobile-upgrades p{font-size:14px}#mobile-upgrades .mobile-upgrade-icon{width:30px;height:30px}#mobile-ingredients span{font-size:14px;padding:2px 3px;min-width:40px}}
#mobile-root:not([data-view="kitchen"]) #mobile-ingredients,#mobile-root:not([data-view="kitchen"]) #mobile-stock,#mobile-root:not([data-view="store"]) #mobile-shelves,#mobile-root:not([data-view="management"]) .mobile-management,#mobile-root[data-view="management"] .mobile-workboard,#mobile-root[data-view="cinematic"] #mobile-step{display:none}
#mobile-more{position:absolute;inset:0;z-index:5;background:#f0e6ce;display:flex;align-items:center;justify-content:center;padding:20px 20px 64px;border:2px solid #294451}
.mobile-menu-actions{display:flex;flex-direction:column;width:42%;min-width:260px;max-width:390px;gap:clamp(10px,3dvh,22px)}
#mobile-more .mobile-menu-actions button{width:100%;min-height:48px;padding:8px 12px;border:2px solid #294451;border-radius:10px;background:#f8f6ed;color:#813c18;font-size:24px}
#mobile-more a{position:absolute;right:12px;bottom:10px;display:flex;align-items:center;color:#453a2b;font-size:18px;min-height:44px;padding:8px 12px;text-decoration:underline}
#mobile-more button.mobile-cheat{position:absolute;left:12px;bottom:12px;min-height:36px;font-size:14px;background:#e0d4b8;border-color:#9a8867}
#mobile-more button.mobile-cheat[data-cheat="time"]{left:116px}
/* The Safari tab bar can leave only ~300px in landscape. Preserve all four
   ingredient rows and spend less height on chrome, rather than scrolling pans. */
html.mobile-compact #mobile-root{--stock-height:36px;gap:3px}
html.mobile-compact .mobile-header{height:32px}
html.mobile-compact .mobile-header button{height:32px;min-height:32px!important}
html.mobile-compact #mobile-status,html.mobile-compact #mobile-money{font-size:17px}
html.mobile-compact .mobile-navigation{height:36px;gap:4px}
html.mobile-compact .mobile-navigation button{min-height:36px}
html.mobile-compact #mobile-root[data-view="kitchen"] .mobile-workspace{padding:3px;gap:6px}
html.mobile-compact #mobile-ingredients{gap:2px 4px}
html.mobile-compact #mobile-root #mobile-ingredients button{grid-template-rows:minmax(0,1fr) 21px;padding:1px 0}
html.mobile-compact #mobile-ingredients span{font-size:13px;min-width:40px;padding:1px 4px;line-height:1.05;align-self:center}
html.mobile-compact #mobile-ingredients button.selected::before{font-size:10px;padding:1px 3px}
html.mobile-compact #mobile-root[data-view="kitchen"] #mobile-stock{margin-bottom:3px}
html.mobile-compact .mobile-stock-card{min-width:128px;font-size:13px;padding:1px 5px;gap:5px}
html.mobile-compact .mobile-stock-card canvas{width:22px;height:22px}
html.mobile-compact .mobile-stock-order{font-size:12px;padding:3px 5px}
html.mobile-compact #mobile-root[data-view="kitchen"] #mobile-step{top:calc(var(--stock-height) + 6px);right:4px;min-height:24px;padding:3px 6px;font-size:12px;max-width:80%}
html.mobile-compact #mobile-tabs button{min-height:34px;font-size:14px}
html.mobile-compact #mobile-more{padding:8px 16px 44px}
html.mobile-compact .mobile-menu-actions{gap:6px}
html.mobile-compact #mobile-more .mobile-menu-actions button{min-height:36px;padding:5px 8px;font-size:20px}
html.mobile-compact #mobile-more a{bottom:2px;min-height:36px;font-size:15px;padding:4px 8px}
html.mobile-compact .title-controls button{min-height:36px;padding:5px}
html.mobile-compact .title-controls #new-game,html.mobile-compact .title-controls #continue-game{font-size:clamp(20px,3cqw,32px)}
html.mobile-compact .menu-actions{gap:6px}
@media(orientation:portrait){html.mobile-game #mobile-rotate{position:fixed;inset:0;z-index:200;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:#efe0be;color:#493b2e;padding:24px}#mobile-rotate span{font-size:80px}#mobile-rotate strong{font-size:24px}#mobile-rotate p{font-size:17px}}
