#mapViewport{display:contents}#mapTools{display:none}
body.phone{font-size:14px;overscroll-behavior:none;-webkit-text-size-adjust:100%}body.phone #game{position:fixed;left:0;top:0;width:100vw;height:100dvh;transform:none!important;overflow:hidden;background:#e9e1c4;padding-top:env(safe-area-inset-top);font-size:14px}body.phone button{touch-action:manipulation}body.phone input,body.phone select{font-size:16px!important}
body.phone #hud{left:6px;right:6px;top:max(6px,env(safe-area-inset-top));height:150px;padding:5px 7px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 34px;grid-template-rows:56px 35px 36px;grid-template-areas:"identity money controls" "clock clock clock" "agenda agenda agenda";gap:3px 6px;border-width:2px;border-radius:13px}
body.phone #hud #identity{height:56px;padding:0;gap:4px}body.phone #hud #portrait{width:29px;height:44px;flex-basis:29px}body.phone #hud #identity strong{font-size:14px;line-height:17px}body.phone #hud #reputation{font-size:10px;line-height:12px}body.phone #hud .level-row{height:11px;margin-top:2px;gap:4px}body.phone #hud #level{font-size:9px;line-height:10px}body.phone #hud .level-row>i{height:4px;min-width:20px}body.phone #hud .money{height:56px;padding:0;grid-template-columns:0 minmax(0,1fr);grid-template-rows:24px 13px 13px;gap:0}body.phone #hud .money>span{display:none}body.phone #hud #cash{font-size:20px;line-height:24px;letter-spacing:-.5px}body.phone #hud #income,body.phone #hud #depotValue{font-size:10px;line-height:13px}
body.phone #hud .clock{height:35px;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:21px 12px;gap:0;padding:0}body.phone #hud #clock{font-size:19px;line-height:21px}body.phone #hud #week{gap:3px}body.phone #hud #week span{min-width:19px;width:19px;height:20px;line-height:20px;font-size:10px;border-radius:5px}body.phone #hud #day{font-size:9px;line-height:12px}body.phone #hud #hudControls{height:56px;justify-content:center;padding:0;flex-direction:column}body.phone #hud #hudControls #fullscreen{display:none}body.phone #hud #hudControls #pauseButton{width:34px;height:44px;min-width:34px;max-width:34px;min-height:44px;flex-basis:44px;font-size:24px;line-height:38px;border-radius:7px}body.phone #hud #firmAgenda{height:36px;padding:0;border:0;gap:5px}body.phone #hud #agendaTasks{height:36px;gap:4px}body.phone #hud .agenda-chip{height:34px;min-height:34px;font-size:10px;line-height:12px;padding:3px 5px;max-width:155px;border-radius:6px}body.phone #hud .agenda-chip .game-icon{display:none}body.phone #hud #firmAgenda #status{height:36px;max-width:65px;font-size:9px;gap:0}body.phone #hud .hud-energy{font-size:9px;gap:3px}body.phone #hud .hud-energy .energy-track{width:48px;height:5px}body.phone #hud .hud-day-result,body.phone #hud .hud-skip{display:none!important}
body.phone #mapViewport{display:block;position:absolute;top:199px;left:0;right:0;height:56.25vw;overflow:hidden;border-bottom:2px solid #ac9c71;background:#e8dfc1}body.phone #world{top:0;left:0;width:100%;height:56.25vw;touch-action:none;transform:none}body.phone.map-zoom #world{left:var(--map-pan-x,0px);top:var(--map-pan-y,0px);width:200%;height:112.5vw}body.phone #mapTools{display:block;position:absolute;top:207px;right:8px;z-index:5}body.phone #mapZoom{width:44px;height:44px;min-height:44px;border:2px solid #9a8960;background:#f6e8bb;color:#5f623f;border-radius:10px;font-size:27px;box-shadow:0 3px #8c7b56}
body.phone #floors{top:160px;left:6px;right:6px;max-width:none;height:34px;flex-direction:row;overflow-x:auto;gap:5px;padding:0 0 3px;border:0;background:transparent;box-shadow:none;border-radius:0;scrollbar-width:none}body.phone #floors .floor-caption{display:none}body.phone #floors button{min-width:64px;min-height:31px;height:31px;padding:4px 9px;font-size:11px;line-height:14px;white-space:nowrap;flex-shrink:0;border-radius:6px}body.phone #floors .game-icon{width:12px;height:12px}
body.phone #objective{top:auto;bottom:188px;left:8px;right:8px;width:auto;min-height:66px;max-height:102px;padding:9px 12px;border-width:2px;border-radius:11px;overflow:hidden}body.phone #objective>span{font-size:9px;line-height:12px}body.phone #objective>strong{font-size:15px;line-height:19px;margin-top:2px}body.phone #objective>small{font-size:12px;line-height:16px;margin-top:3px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}body.phone #manualProgress{bottom:153px;left:50%;width:calc(100% - 32px);font-size:10px;padding:5px 8px;border-radius:7px;min-height:25px}body.phone #manualProgress>i{height:3px;margin-top:4px}body.phone #mainAction,body.phone #mainAction.workday-end{bottom:85px;left:50%;min-width:240px;max-width:94%;width:auto;height:57px;padding:8px 22px;font-size:21px;line-height:27px;border-width:2px;box-shadow:0 5px #a57b36;border-radius:30px}body.phone #dock{left:6px;right:6px;bottom:max(7px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}body.phone #dock button{width:100%;height:60px;min-height:44px;display:flex;flex-direction:column;gap:4px;justify-content:center;align-items:center;font-size:9px;padding:5px 1px;border-width:2px;border-radius:11px;box-shadow:0 3px #9d8960}body.phone #dock i{display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:0}body.phone #dock i .game-icon{width:24px;height:24px}
body.phone #panel,body.phone #panel.centered,body.phone #panel.wide,body.phone #panel[data-kind="team"]{left:6px;right:6px;top:max(160px,calc(env(safe-area-inset-top) + 154px));bottom:80px;width:auto;max-height:none;transform:none;border-width:2px;border-radius:14px}body.phone #panel .panel-head{height:63px;padding:10px 12px}body.phone #panel .panel-head small{font-size:9px}body.phone #panelTitle{font-size:20px;line-height:25px;margin:3px 0}body.phone #closePanel{width:42px;height:42px;font-size:25px;flex-shrink:0}body.phone #panelBody{height:calc(100% - 63px);padding:12px;font-size:14px;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}body.phone #panelBody p,body.phone #panelBody .row p,body.phone #panelBody .card p{font-size:14px;line-height:1.45}body.phone #panelBody strong{font-size:16px}body.phone #panelBody h2{font-size:20px}body.phone #panelBody h3{font-size:17px;line-height:22px}body.phone #panelBody small,body.phone #panelBody .mini{font-size:12px;line-height:17px}body.phone #panelBody button,body.phone #panelBody .primary,body.phone #panelBody .secondary,body.phone #panelBody .buy{font-size:14px;min-height:44px;padding:9px 12px;line-height:19px;border-radius:9px}body.phone #panelBody .note{font-size:14px;padding:12px;line-height:20px}body.phone #panelBody .pill{font-size:11px;line-height:16px;white-space:normal}body.phone #panelBody .stats{gap:6px;grid-template-columns:repeat(3,minmax(0,1fr));margin:8px 0 14px}body.phone #panelBody .stats>div{padding:10px 7px;min-width:0}body.phone #panelBody .stats span{font-size:10px;line-height:14px}body.phone #panelBody .stats b{font-size:18px;line-height:23px;overflow-wrap:anywhere}body.phone #panelBody .card{padding:12px;margin-bottom:12px}body.phone #panelBody .row{align-items:stretch;gap:8px;flex-direction:column;padding:12px 0}body.phone #panelBody .row .buy{align-self:flex-end}body.phone #panelBody .ledger{font-size:13px;gap:5px}body.phone #panelBody .ledger>div{gap:10px;padding:6px 0}body.phone #panelBody .ledger b{font-size:13px}body.phone #panelBody .buttons{gap:7px;flex-wrap:wrap}body.phone #panelBody .report-costs{grid-template-columns:1fr;font-size:13px;gap:5px}body.phone #panelBody .closing-account{padding:13px;font-size:13px;gap:10px}body.phone #panelBody .closing-account strong{font-size:20px}
body.phone #panel[data-kind="team"] .team-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.phone #panel[data-kind="team"] .team-card{padding:9px}body.phone #panel[data-kind="team"] .employee{gap:4px;flex-wrap:wrap}body.phone #panel[data-kind="team"] .portrait{width:34px;height:46px}body.phone #panel[data-kind="team"] .employee strong{font-size:13px;line-height:17px}body.phone #panel[data-kind="team"] .team-card p{font-size:11px;line-height:16px}body.phone #panel[data-kind="team"] .team-card .ledger{font-size:11px}body.phone #panel[data-kind="team"] .team-card .ledger b{font-size:11px}body.phone #panel[data-kind="team"] .team-card .ledger>div{flex-wrap:wrap;gap:2px}body.phone #panel[data-kind="team"] .team-card button{font-size:12px;min-height:44px;padding:6px;line-height:17px;width:100%}body.phone #panel[data-kind="team"] .worker-condition{font-size:10px;gap:4px}body.phone #panelBody .more-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.phone #panelBody .more-grid button{font-size:14px;min-height:82px}body.phone #panelBody .more-grid small{font-size:11px}body.phone .desktop-apps{gap:12px;padding:18px 10px;grid-template-columns:repeat(2,minmax(0,1fr))}body.phone #panelBody .desktop-apps button{padding:6px;min-height:110px}body.phone #panelBody .desktop-apps strong{font-size:13px}body.phone .desktop-apps button i{width:48px;height:48px;border-radius:12px}body.phone .desktop-apps .game-icon{width:26px;height:26px}body.phone .desktop-top{font-size:9px;padding:10px;gap:8px}body.phone .desktop-taskbar{padding:10px;gap:8px;flex-wrap:wrap}body.phone .coin-chart{padding:9px;margin:0 0 12px}body.phone .coin-chart svg{height:120px}body.phone .coin-chart figcaption{font-size:9px;flex-wrap:wrap;gap:3px}body.phone .save-backup{padding:10px}body.phone .save-backup code{font-size:12px}body.phone #panelBody input,body.phone #panelBody select{min-height:44px;padding:9px;width:100%;max-width:100%}body.phone #panelBody label{font-size:14px}
body.phone #dialog,body.phone #dialog.tour,body.phone #meeting,body.phone #mini,body.phone #decision,body.phone #ending,body.phone #pauseMenu{position:fixed;inset:0;padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom));align-items:center;justify-items:center;overflow:auto}body.phone #dialogBody,body.phone #dialogBody:has(.story-scene),body.phone #dialog.tour #dialogBody:has(.story-scene){width:100%;max-width:500px;max-height:94dvh;margin:0;padding:0;overflow:auto}body.phone #dialogBody:not(:has(.story-scene)){padding:18px;background:#fff5d8;border:2px solid #9a845b;border-radius:14px}body.phone #dialogBody h1{font-size:25px;line-height:30px}body.phone #dialogBody h2{font-size:22px}body.phone #dialogBody p{font-size:14px;line-height:20px}body.phone #dialogBody label{font-size:14px;display:block;margin:9px 0}body.phone #dialogBody input{width:100%;min-height:46px;padding:10px;margin-top:5px}body.phone #dialogBody button{font-size:14px;min-height:44px;padding:10px 14px;line-height:19px}body.phone .welcome .mini{font-size:11px!important;line-height:16px}body.phone .story-scene,body.phone #dialog.tour .story-scene{padding-top:115px}body.phone .story-scene .speaker-actor,body.phone #dialog.tour .speaker-actor{height:116px;width:82px;top:0;left:20px}body.phone .chapter-tag,body.phone #dialog.tour .chapter-tag{top:83px;right:0;max-width:calc(100% - 95px);font-size:9px;line-height:13px;padding:6px 8px;border-width:2px;letter-spacing:0}body.phone .story-speech,body.phone #dialog.tour .story-speech{font-size:16px;line-height:1.55;min-height:145px;max-height:45dvh;padding:17px;border-width:3px;overflow:auto}body.phone .story-speech strong{font-size:14px;display:block;margin-bottom:8px}body.phone .story-scene .dialog-actions{margin-top:12px;gap:10px;display:flex;justify-content:space-between}body.phone .story-scene .dialog-actions button{font-size:12px!important;padding:9px 11px!important;min-height:44px!important}body.phone .story-scene .mini{font-size:10px!important;line-height:14px}body.phone .speech-arrow{font-size:13px}
body.phone .meeting-card,body.phone .decision-card,body.phone .mini-card,body.phone .ending-card,body.phone .pause-card{width:100%;max-width:500px;margin:0;max-height:92dvh;overflow:auto;padding:18px;border-width:2px;font-size:14px}body.phone .meeting-card .chapter-tag{position:static;max-width:100%;width:auto;margin:0;font-size:10px}body.phone .meeting-actor{width:65px;height:95px}body.phone .meeting-card .story-speech{font-size:15px;min-height:120px;padding:14px}body.phone .meeting-card .dialog-actions{flex-direction:column;gap:9px}body.phone .meeting-card button,body.phone .decision-card button,body.phone .mini-card button,body.phone .ending-card button,body.phone .pause-card button{font-size:14px;line-height:20px;min-height:44px;padding:10px 12px}body.phone .decision-card h2,body.phone .mini-card h2,body.phone .pause-card h1,body.phone .ending-card h1{font-size:23px;line-height:29px}body.phone .decision-card p,body.phone .mini-card p,body.phone .pause-card p,body.phone .ending-card p{font-size:14px;line-height:21px}body.phone .decision-card small,body.phone .pause-card .mini{font-size:11px}body.phone .pause-setting{gap:8px;padding:12px 0}body.phone .pause-setting strong{font-size:15px}body.phone .pause-setting p{font-size:12px}body.phone .ending-actors img{height:100px}body.phone .ending-card .stats{grid-template-columns:1fr;gap:7px}body.phone #event{left:8px;right:8px;top:165px;bottom:auto;max-height:calc(100dvh - 250px);width:auto;padding:16px;overflow:auto;font-size:14px}body.phone #event h2{font-size:22px}body.phone #event p{font-size:14px}body.phone #event button{min-height:44px;font-size:14px;padding:10px}body.phone #toast{max-width:calc(100% - 24px);font-size:12px;padding:10px 14px;top:160px;border-width:2px;white-space:normal}body.phone #version{display:none}
@media(max-height:680px){body.phone:not(.landscape) #objective>small{display:none}body.phone:not(.landscape) #objective{min-height:48px;bottom:185px;padding:7px 10px}body.phone:not(.landscape) #objective>strong{font-size:13px}}
body.phone.landscape #hud{height:78px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.2fr) 34px;grid-template-rows:60px;grid-template-areas:"identity money clock controls"}body.phone.landscape #hud #firmAgenda{display:none}body.phone.landscape #mapViewport{top:90px;right:44%;height:calc(100dvh - 100px)}body.phone.landscape #world{height:31.5vw}body.phone.landscape.map-zoom #world{height:63vw}body.phone.landscape #mapTools{top:95px;right:calc(44% + 8px)}body.phone.landscape #floors{top:auto;bottom:12px;right:45%;z-index:4}body.phone.landscape #objective{left:57%;right:8px;top:91px;bottom:auto;max-height:110px;min-height:50px}body.phone.landscape #mainAction{left:auto;right:10px;bottom:86px;transform:none;min-width:0;width:40%;height:53px}body.phone.landscape #manualProgress{left:auto;right:12px;bottom:147px;transform:none;width:39%}body.phone.landscape #dock{left:57%;gap:4px}body.phone.landscape #dock button{height:57px;font-size:8px}body.phone.landscape #panel,body.phone.landscape #panel.centered,body.phone.landscape #panel.wide,body.phone.landscape #panel[data-kind="team"]{top:87px;bottom:8px}body.phone.landscape .story-scene{padding-top:65px!important}body.phone.landscape .story-scene .speaker-actor{height:72px!important;top:0;width:50px}body.phone.landscape .chapter-tag{top:38px!important}body.phone.landscape .story-speech{min-height:100px!important;max-height:40dvh}body.phone.landscape .story-scene .mini{display:none}
body.phone #mainAction,body.phone #mainAction.workday-end{min-height:57px}body.phone #panel[data-kind="team"] .team-card .bar{height:5px;margin:7px 0}body.phone #panel[data-kind="team"] .worker-condition{padding:6px 0;gap:3px}body.phone #panel[data-kind="team"] .worker-condition>i{height:5px}body.phone #panel[data-kind="team"] .team-card .ledger{margin:8px 0}body.phone #panel[data-kind="team"] .team-card .pill{padding:3px 6px;font-size:10px}body.phone #panel[data-kind="team"] .team-card button{margin:5px 0 0}body.phone.landscape #mainAction{min-height:53px}
/* The world fills the entire viewport. All controls float over the scene. */
#mapViewport{display:block;position:absolute;inset:0;width:100%;height:100%;overflow:hidden;background:#d7d1af}#world{touch-action:none}#mapTools{display:flex;flex-direction:column;gap:8px;position:absolute;top:125px;right:26px;z-index:5}#mapTools button{width:44px;height:44px;border:2px solid #9a8960;background:linear-gradient(#faedc7,#d9c48c);color:#5f623f;border-radius:10px;font-size:25px;box-shadow:0 3px #8c7b56}
body.phone #mapViewport,body.phone.landscape #mapViewport{inset:0;width:100%;height:100%;border:0}body.phone #mapTools{display:flex;top:205px;right:9px;gap:8px}body.phone #mapTools button{min-height:44px;width:44px;height:44px;font-size:25px}body.phone #objective{background:linear-gradient(#fff4dbeF,#eee0b7ef);box-shadow:0 4px 12px #36433130}body.phone #manualProgress{background:#fff0cceF}body.phone.landscape #mapTools{top:95px;right:9px}body.phone.landscape #objective{top:90px;left:8px;right:auto;width:230px;max-height:85px;min-height:50px;padding:7px 10px}body.phone.landscape #objective>small{display:none}body.phone.landscape #mainAction{left:50%;right:auto;bottom:85px;transform:translateX(-50%);width:auto;min-width:260px}body.phone.landscape #manualProgress{left:50%;right:auto;bottom:145px;transform:translateX(-50%);width:300px}body.phone.landscape #dock{left:6px;right:6px;width:auto}body.phone.landscape #floors{left:8px;right:120px;bottom:auto;top:183px}
body.phone.tablet #hud{height:116px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.25fr) 38px;grid-template-rows:60px 36px;grid-template-areas:"identity money clock controls" "agenda agenda agenda agenda"}body.phone.tablet #hud #identity strong{font-size:17px;line-height:21px}body.phone.tablet #hud #cash{font-size:24px}body.phone.tablet #hud #portrait{width:36px;flex-basis:36px;height:52px}body.phone.tablet #hud #income,body.phone.tablet #hud #depotValue{font-size:11px}body.phone.tablet #hud #firmAgenda #status{max-width:250px}body.phone.tablet #hud .hud-energy{font-size:11px}body.phone.tablet #hud .agenda-chip{font-size:12px;max-width:240px}body.phone.tablet #floors{top:127px}body.phone.tablet #mapTools{top:170px}body.phone.tablet #panel,body.phone.tablet #panel.centered,body.phone.tablet #panel.wide,body.phone.tablet #panel[data-kind="team"]{top:126px;bottom:80px}body.phone.tablet #panel[data-kind="team"] .team-card .employee{flex-wrap:nowrap}body.phone.tablet #panel[data-kind="team"] .employee strong{font-size:16px}body.phone.tablet #panel[data-kind="team"] .team-card p{font-size:13px}body.phone.tablet #panel[data-kind="team"] .team-card .ledger,body.phone.tablet #panel[data-kind="team"] .team-card .ledger b{font-size:13px}body.phone.tablet #panelBody .more-grid{grid-template-columns:repeat(3,minmax(0,1fr))}body.phone.tablet .desktop-apps{grid-template-columns:repeat(3,minmax(0,1fr))}

/* Compact phone objective: one tappable row; details open through the existing target action. */
body.phone #objective{height:44px;min-height:44px;max-height:44px;padding:8px 34px 8px 12px;bottom:188px;display:flex;align-items:center;box-shadow:0 2px 5px #36433125}
body.phone #objective>span,body.phone #objective>small{display:none!important}
body.phone #objective>strong{display:block;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:18px;margin:0}
body.phone #objective::after{content:'›';position:absolute;right:12px;top:10px;font-size:22px;line-height:20px;pointer-events:none}
body.phone.landscape #objective{top:90px;bottom:auto;width:210px;max-width:calc(100% - 90px);height:44px;min-height:44px;max-height:44px}
@media(max-height:680px){body.phone:not(.landscape) #objective{height:44px;min-height:44px;max-height:44px;padding:8px 34px 8px 12px}body.phone:not(.landscape) #objective>strong{font-size:12px}}

/* Tablet uses its own layout in both orientations, including Safari desktop UA. */
body.phone.tablet #game{width:100vw;height:100dvh;max-width:none;border:0;border-radius:0;box-shadow:none}
body.phone.tablet #objective{max-width:400px;right:auto;width:calc(100% - 16px)}
body.phone.tablet #mapViewport{position:absolute;inset:0;width:100%;height:100%;border:0}
body.phone.tablet #hud #hudControls{height:auto;align-self:stretch}
body.phone.tablet #mapTools{top:170px;right:max(10px,env(safe-area-inset-right))}
body.phone.tablet #dock{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right))}

/* Center readable tablet menus instead of stretching across the scene. */
body.phone.tablet #panel,body.phone.tablet #panel.centered,body.phone.tablet #panel.wide,body.phone.tablet #panel[data-kind="team"]{left:50%;right:auto;width:min(760px,calc(100vw - 32px));max-width:calc(100vw - 32px);transform:translateX(-50%);top:max(126px,calc(env(safe-area-inset-top) + 120px));bottom:max(84px,calc(env(safe-area-inset-bottom) + 78px))}
body.phone.tablet #dock{left:50%;right:auto;width:min(650px,calc(100vw - 16px));transform:translateX(-50%)}
body.phone.tablet #event{left:50%;right:auto;width:min(460px,calc(100vw - 24px));transform:translateX(-50%)}

body.phone.tablet #game #panel{left:50%;right:auto;width:min(760px,calc(100vw - 32px));max-width:calc(100vw - 32px);transform:translateX(-50%)}
#game #mapViewport,#lithium-scene .mine-stage{touch-action:none;}
