/* Company controls: one unified row; on narrow phones exactly two compact rows. */
body:not(.phone) #game #hud,body.phone.tablet #game #hud,body.phone.landscape:not(.tablet) #game #hud{height:76px;grid-template-rows:62px;grid-template-columns:minmax(0,.95fr) minmax(0,1.2fr) minmax(0,1.25fr) 44px;grid-template-areas:"identity money clock controls";gap:8px;padding:5px 10px;align-items:center}
#game #hud #firmAgenda{display:none!important}
#game #hud .money{height:58px;grid-template-columns:20px minmax(0,1fr);grid-template-rows:30px 12px 12px;padding:0 8px;gap:0 4px}
#game #hud .balance-line{grid-column:2;grid-row:1;display:flex;gap:9px;align-items:center;min-width:0}
#game #hud #cash{min-width:0;flex:1;font-size:27px;line-height:30px;overflow:hidden;text-overflow:ellipsis}
#game #hud #activeOrders{display:flex;gap:5px;align-items:center;justify-content:center;flex:none;min-height:34px;padding:4px 7px;margin:0;border:1px solid #a28b55;border-radius:7px;background:#f3e4b8;color:#594a30;font-size:12px;line-height:16px;box-shadow:inset 0 2px #fff7dc}
#game #hud #activeOrders .game-icon{width:15px;height:15px}
#game #hud #income{grid-column:2;grid-row:2;font-size:10px;line-height:12px;margin:0;white-space:nowrap}
#game #hud #depotValue{grid-column:2;grid-row:3;font-size:10px;line-height:12px;margin:0;white-space:nowrap}
#game #hud .clock{height:52px;display:grid;grid-template-columns:minmax(0,1fr) 57px auto;grid-template-rows:29px 14px;gap:2px 8px;padding:0 5px;align-content:center;align-items:center}
#game #hud #week{grid-column:1;grid-row:1;width:100%;max-width:210px;min-width:0}
#game #hud #energyMeter{grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:4px;justify-content:center;align-items:center;width:57px;font-size:10px;line-height:12px;color:#5c6244}
#game #hud #energyMeter>i{display:block;width:50px;height:7px;border:1px solid #8c9467;border-radius:4px;background:#d5cfac;overflow:hidden}
#game #hud #energyMeter>i>b{display:block;height:100%;background:#8eac64}
#game #hud #energyMeter.low>i>b{background:#c97e58}
#game #hud #clock{grid-column:3;grid-row:1;font-size:24px;line-height:29px;white-space:nowrap}
#game #hud #day{grid-column:1/-1;grid-row:2;font-size:10px;line-height:13px}
#game #hud #hudControls{height:54px;padding:0;align-items:center;justify-content:center}
#game #hud #pauseButton{width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;flex:0 0 44px;font-size:25px;line-height:40px}
body.phone.tablet #game #hud #identity strong{font-size:16px;line-height:20px}
body.phone.tablet #game #hud #portrait{width:32px;height:48px;flex-basis:32px}
body.phone.tablet #game #hud #cash{font-size:20px}
body.phone.tablet #game #hud #activeOrders{min-height:40px;padding:3px 5px;font-size:11px}
body.phone.tablet #game #hud #activeOrders .order-word{display:none}
body.phone.tablet #game #hud .clock{grid-template-columns:minmax(0,1fr) 43px auto;gap:2px 5px}
body.phone.tablet #game #hud #week span{font-size:10px}
body.phone.tablet #game #hud #energyMeter{width:43px}
body.phone.tablet #game #hud #energyMeter>i{width:38px}
body.phone.tablet #game #hud #clock{font-size:20px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud{height:108px;grid-template-columns:minmax(0,.85fr) minmax(0,1.35fr) 44px;grid-template-rows:49px 37px;grid-template-areas:"identity money controls" "clock clock clock";gap:3px 6px;padding:6px 8px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .money{height:49px;display:grid;grid-template-columns:minmax(0,1fr) 40px;grid-template-rows:23px 12px 12px;gap:0 4px;padding:0}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .balance-line{display:contents}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #cash{grid-column:1;grid-row:1;font-size:17px;line-height:23px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #activeOrders{grid-column:2;grid-row:1/4;height:44px;min-height:44px;width:40px;min-width:40px;padding:3px;gap:2px;flex-direction:column;font-size:11px;line-height:12px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #activeOrders .order-word{display:none}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #income,body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #depotValue{grid-column:1;font-size:9px;line-height:12px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #firm{font-size:13px;line-height:16px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #portrait{width:25px;flex-basis:25px;height:43px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .clock{height:37px;grid-template-columns:minmax(0,1fr) 49px auto;grid-template-rows:25px 11px;gap:1px 7px;padding:0}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #week{width:100%;max-width:196px;height:25px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #energyMeter{width:49px;font-size:9px;line-height:10px;gap:3px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #energyMeter>i{width:42px;height:6px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #clock{font-size:20px;line-height:25px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #day{font-size:9px;line-height:11px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #hudControls{height:49px;padding:0;justify-content:center}
.premium-contact summary{cursor:pointer;font-weight:700;line-height:1.5}.premium-contact>p{margin:10px 0}.premium-card{border-color:#b49b5c;background:#fff4d6}.seminar-state{border-left:4px solid #8caa66}.certificate{display:block;color:#617c42;margin:7px 0}.unread{border-left:4px solid #86a665}.lara-support{background:#f4ebce}.report-insight h3{margin:0 0 7px}.report-insight p{line-height:1.5}
#milestoneBanner{position:absolute;left:50%;top:calc(var(--hud-bottom) + 12px);transform:translateX(-50%);z-index:22;width:max-content;max-width:calc(100% - 40px);padding:12px 22px;border:3px solid #bd9d4f;border-radius:12px;background:#fff0bc;color:#63502e;box-shadow:0 4px #8c7845;text-align:center;pointer-events:none;font-weight:bold;font-size:18px}
#milestoneBanner.flash{animation:milestone-pop 2.5s ease both}@keyframes milestone-pop{0%{opacity:0;translate:0 8px}12%,85%{opacity:1;translate:0 0}100%{opacity:0;translate:0 -6px}}
@media(prefers-reduced-motion:reduce){#milestoneBanner.flash{animation:none}}
body.phone #milestoneBanner{font-size:13px;line-height:19px;padding:8px 12px}
@media(max-width:350px){body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #cash{font-size:15px}body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #firm{font-size:11px}body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #week span{font-size:9px}}

.employee-open{cursor:pointer;border-radius:8px;padding:4px}.employee-open:hover{background:#eadbb65c}.employee-open:focus-visible{outline:3px solid #8caa66;outline-offset:3px}

/* Keep focus and touch scrolling inside menus, never scroll the scene frame. */
@supports(overflow:clip){body.phone #game{overflow:clip}}

body.phone.tablet #game #hud #activeOrders{min-width:44px;min-height:44px}

.office-upgrade-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.office-upgrade-card{min-width:0;display:flex;flex-direction:column;gap:5px}.office-upgrade-card img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px;background:#1f2921}.office-upgrade-card h3,.office-upgrade-card p{margin:0}.office-upgrade-card button{margin-top:auto;white-space:normal}.office-upgrade-card small{display:block}.office-upgrade-card .active-state{opacity:1}

body:has(#world[data-scene="office"]):not(:has(.lithium-open)){background:linear-gradient(#22382b8c,#22382bc9),url('./assets/modular-exterior-v1.png') center/cover fixed}

.firm-overview h3{margin:12px 10px 4px}.firm-overview .desktop-apps{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:4px 8px}.firm-overview .desktop-apps button{min-height:44px;height:auto;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:7px;padding:6px 8px;text-align:left}.firm-overview .desktop-apps button strong{overflow-wrap:anywhere}.firm-overview-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:8px}.firm-overview-stats div{padding:6px;background:#274739;border-radius:6px}.firm-overview-stats small,.firm-overview-stats strong{display:block;overflow-wrap:anywhere}.firm-overview-stats small{font-size:.75em;color:#e3eacb}.firm-overview-stats strong{font-size:.95em;color:#fff3ce}

.server-farm-art{display:block;aspect-ratio:16/9;width:100%;object-fit:cover;border-radius:7px;image-rendering:auto}
#mapViewport:has(#world[data-scene="world"]){background:#284946}
#mapViewport:has(#world[data-scene="server"]){background:#172e36}

#game #hud #jewelBalance{display:inline-flex;align-items:center;justify-content:center;gap:4px;flex-shrink:0;margin:0;padding:0 6px;min-height:28px;border:1px solid #b19bc4;border-radius:6px;background:#342343;color:#f0dcff;box-shadow:none;font:inherit;font-size:12px;line-height:14px;white-space:nowrap}
.jewel-icon{display:inline-block;flex:none;width:13px;height:13px;background:url('./assets/jewel-deco-v1.png') center/contain no-repeat}
body.phone #game #hud .balance-line{gap:4px}
body.phone #game #hud #jewelBalance{font-size:10px;padding:0 4px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .money{grid-template-columns:minmax(0,1fr) auto 40px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud :is(#cash,#income){grid-column:1/3}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #depotValue{overflow:hidden;text-overflow:ellipsis}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #activeOrders{grid-column:3}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #jewelBalance{grid-column:2;grid-row:3;min-height:13px;font-size:9px;line-height:11px;gap:2px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .jewel-icon{width:8px;height:9px}
.pet-skin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:6px 0 12px}
.pet-skin-grid .pet-skin{min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;margin:0}
.pet-skin-image{width:min(100%,124px);aspect-ratio:1;background-image:url('./assets/premium-pets-bank-v1.png');background-size:300% 200%;background-position:var(--pet-x) var(--pet-y);background-repeat:no-repeat;image-rendering:pixelated}
.pet-skin strong{font-size:.95em}
.pet-skin button{width:100%;margin-top:auto}

#game #hud #hudControls{display:flex;flex-direction:row;gap:6px}
#game #hud #hudFullscreen{width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:0;border:1px solid #a6b48c;border-radius:8px;background:#486553;color:#faf3dc;font-size:23px;line-height:1}
body:not(.phone) #game #hud,body.phone.tablet #game #hud,body.phone.landscape:not(.tablet) #game #hud{grid-template-columns:minmax(0,.72fr) minmax(0,.94fr) minmax(0,1.38fr) 94px}
#game #hud .clock,body.phone.tablet #game #hud .clock{grid-template-columns:auto minmax(44px,1fr) 52px auto;gap:2px 7px}
#game #hud #week{grid-column:1;min-width:0;width:clamp(96px,17vw,210px)}
#game #hud #activeOrders{grid-column:2;grid-row:1;justify-self:start;max-width:100%;white-space:nowrap}
#game #hud #energyMeter{grid-column:3}
#game #hud #clock{grid-column:4}
#game #hud .money{grid-template-columns:minmax(0,1fr);padding-inline:4px}
#game #hud :is(.balance-line,#income,#depotValue){grid-column:1}
#game #hud .cash-counter{display:flex;align-items:center;flex:1;min-width:0;gap:4px;padding:0 6px 0 3px;height:30px;border-radius:7px;border:1px solid #b79d60;background:linear-gradient(180deg,#3e4630,#283626);box-shadow:inset 0 1px #f8d37d29}
#game #hud .cash-coin{flex:none;width:24px;height:24px;background:url('./assets/hud-coin-v2.png') center/contain no-repeat;image-rendering:pixelated}
#game #hud .cash-counter #cash{font-variant-numeric:tabular-nums;font-weight:800;font-size:24px;line-height:28px;color:#fff0bf}
#game #hud .cash-counter #cash.loss{color:#ffc1ab}
body.phone #game #hud .cash-counter #cash{font-size:19px}
#game #hud #jewelBalance{background:#382044;border-color:#b995d1;color:#f7e5ff;font-size:13px}
#game #hud .jewel-icon{width:20px;height:20px;image-rendering:auto}
.pet-skin .pet-yield{color:inherit;font-size:.77em}
@media(orientation:portrait){
 body.phone.tablet #game #hud{height:auto;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 94px;grid-template-rows:52px 39px;grid-template-areas:"identity money controls" "clock clock clock";gap:3px 8px}
 body.phone.tablet #game #hud .clock{height:39px;grid-template-rows:27px 10px}
 body.phone.tablet #game #hud #week{width:min(37vw,230px);max-width:none}
 body.phone.tablet #game #mapViewport{bottom:calc(64px + env(safe-area-inset-bottom));background:linear-gradient(#394e42,#69765a 38%,#4b5e48)}
}
body.phone.tablet #game #objective{width:clamp(176px,26vw,268px);max-width:36%;padding:8px 11px}
body.phone.tablet #game #objective small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.phone.tablet #game #panel{top:calc(var(--hud-bottom) + 12px);width:min(680px,calc(100vw - 32px))}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr) 76px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .money{grid-template-columns:minmax(0,1fr) auto}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .cash-counter{grid-column:1/3;grid-row:1;height:23px;gap:2px;padding:0 3px 0 1px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .cash-coin{width:16px;height:16px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .cash-counter #cash{font-size:15px;line-height:21px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #jewelBalance{grid-column:2;grid-row:3;font-size:9px;padding:0 3px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .jewel-icon{width:11px;height:11px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .clock{grid-template-columns:minmax(0,1fr) 44px 43px auto;gap:1px 4px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #activeOrders{grid-column:2;grid-row:1/3;min-height:36px;height:36px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #energyMeter{grid-column:3;width:43px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #clock{grid-column:4}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #day{grid-column:1}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #hudControls{gap:4px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud :is(#hudFullscreen,#pauseButton){width:36px;min-width:36px;max-width:36px;min-height:44px;flex:0 0 36px;font-size:20px}

.office-upgrade-details{display:contents}

#game #objective{position:absolute;z-index:11}
#game #objective>button{inset:0;width:100%;height:100%;padding:0;opacity:1;background:none;border:0;box-shadow:none;touch-action:manipulation}
#game #objective>button:focus-visible{outline:2px solid #796225;outline-offset:-3px}

#game #panelBody .unlock-card,#game #panelBody .unlock-card :is(button,p,small,.pill,.ledger){font-family:"TD Pixel","Courier New",monospace}
#game #panelBody .unlock-card :is(p,button,.ledger){line-height:1.3}
#game #panelBody .unlock-card button{white-space:normal;overflow-wrap:anywhere}
#game #panelBody .unlock-card button:disabled{opacity:.8;box-shadow:none;color:#534d3b}
#game #panelBody .unlock-checks{list-style:none;display:grid;gap:4px;margin:7px 0;padding:0;line-height:1.2;font-size:13px}
#game #panelBody .unlock-checks li{display:flex;align-items:baseline;gap:7px;padding:5px 6px;border:1px solid #d1b48d;border-radius:5px;background:#fbecd4;color:#653d21}
#game #panelBody .unlock-checks .requirement-met{background:#e6efd9;color:#2e5736;border-color:#a9bd97}
#game #panelBody .requirement-state{font-weight:700;flex:none;min-width:61px}
#game #panelBody .requirement-label{min-width:0;overflow-wrap:anywhere}
#game #panelBody .requirement-label small{display:block;margin:1px 0 0;color:inherit;font-size:12px}
@media(max-width:460px){#game #panelBody .office-upgrade-grid{grid-template-columns:minmax(0,1fr)}}

:root{--game-pixel-font:Arial,"Liberation Sans",sans-serif}
html,body,#game,#game :where(*){font-family:var(--game-pixel-font)!important}
#game :is(input,textarea,select,button){font-family:var(--game-pixel-font)!important}
#game .pixel-control-icon{display:inline-block;width:18px;height:18px;flex:none;vertical-align:middle}
#game #hud :is(#hudFullscreen,#pauseButton),#game :is(#closePanel,.pixel-close,[data-mine^="close-"]){
 display:inline-grid;place-items:center;padding:0;border:2px solid #a9ad7e;border-radius:5px;
 color:#fff0c8;background:#395a45;box-shadow:inset 0 2px #71866a,0 3px #293f32;touch-action:manipulation
}
#game #hud :is(#hudFullscreen,#pauseButton)[hidden]{display:none}
#game :is(#closePanel,.pixel-close,[data-mine^="close-"]){width:44px;height:44px;min-width:44px;min-height:44px}
#game :is(#closePanel,.pixel-close,[data-mine^="close-"],#hudFullscreen,#pauseButton):hover{background:#537759}
#game .pause-card{position:relative;padding-right:62px}
#game .pause-sound{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;}
.pause-sound p{margin:4px 0;}
.pause-effects-volume{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;color:#2d513d;}
.pause-effects-volume output{font-weight:700;white-space:nowrap;}
.pause-effects-volume input{grid-column:1/-1;width:100%;min-height:32px;min-width:0;margin:0;accent-color:#286144;cursor:pointer;}
#game .pause-close{position:absolute;right:12px;top:12px}
#game #panelBody .office-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:12px}
#game #panelBody .office-tabs button{display:grid;place-items:center;align-content:center;gap:4px;min-height:52px;padding:6px 2px;line-height:1.1;color:#334b37;background:#f0ebd5;border:2px solid #a9ad83;border-radius:6px;font-size:13px;white-space:normal}
#game #panelBody .office-tabs .selected{background:#d9e9c8;border-color:#6d925f;color:#284b2c}
#game #panelBody .office-tabs .game-icon{width:19px;height:19px}
#game #panelBody .office-intro{margin:0 0 12px}
#game #panelBody .office-intro h2{margin:0 0 4px}
#game #panelBody .office-intro p{margin:0;line-height:1.35}
#game #panelBody .unlock-checks .requirement-state{display:inline-flex;align-items:center;gap:3px}
#game #panelBody .unlock-checks .pixel-control-icon{width:12px;height:12px}
#game #panelBody .unlock-checks li:has(.requirement-link){display:block;padding:0}
#game #panelBody .requirement-link{display:flex;align-items:center;gap:7px;width:100%;min-height:42px;padding:5px 6px;margin:0;background:none;border:0;border-radius:4px;color:inherit;text-align:left;box-shadow:none;font-size:inherit}
#game #panelBody .requirement-link:hover,#game #panelBody .requirement-link:focus-visible{background:#f6dfb8}
#game #panelBody .requirement-link>.pixel-control-icon{margin-left:auto;width:10px;height:10px}
#game #panelBody .requirement-link .requirement-label{flex:1}
#game #panelBody .unlock-guide>p{font-weight:700;margin:8px 0 3px}
#game #panelBody .requirement-link{min-height:44px}
#game #panelBody .requirement-open{display:grid;flex:none;place-items:center;width:24px;height:24px;background:#eee2bf;border-radius:4px}
#game #panelBody .requirement-open .pixel-control-icon{width:12px;height:12px}
#game #panelBody .unlock-back{position:sticky;top:0;z-index:4;min-height:44px;margin-bottom:10px;max-width:100%;white-space:normal}
#game #panelBody .orders-priority{grid-template-columns:minmax(0,1fr)}
#game #panelBody .orders-priority .quest-card{min-width:0;overflow-wrap:anywhere}
#game #panelBody .orders-priority .quest-card li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start}
#game #panelBody .orders-priority .quest-card button{min-height:44px;max-width:100%;white-space:normal}
#game #panelBody .quest-checks>div{display:grid;grid-template-columns:auto minmax(0,1fr) auto;overflow-wrap:anywhere}
#game button .jewel-icon{display:inline-block;width:16px;height:16px;margin-left:5px;flex:none;vertical-align:middle}

#game #dialogBody:has(.hank-story){width:min(880px,94%);padding:14px;max-height:calc(100% - 22px);overflow:auto}
#game #dialog .hank-story{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
#game #dialog .hank-story>*{grid-column:1;grid-row:auto}
#game .hank-illustration{margin:0;position:relative;overflow:hidden;isolation:isolate;border:3px solid #9d8659;border-radius:6px;height:clamp(145px,35vh,330px);background:#334a40 center 67%/cover no-repeat}
#game .hank-story.speaking .hank-actor{animation:hank-gesture 1.35s steps(1,end) 2}
@keyframes hank-gesture{0%,78%,100%{background-position:var(--hank-first)}30%,64%{background-position:var(--hank-next)}}
#game .hank-illustration figcaption{position:absolute;right:8px;top:8px;max-width:68%;padding:5px 8px;background:#294538;color:#fff1ce;border:1px solid #b5ab7c;font-size:13px}
#game .hank-illustration figcaption span{margin-left:6px;color:#ddd399;white-space:nowrap}
#game #dialog .hank-story .story-speech{min-height:112px;padding:12px 15px;line-height:1.35}
#game #dialog .hank-story .dialog-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:space-between}
#game #dialog .hank-story .mini{margin:0}
#game .team-section-nav{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:9px;margin:0 0 11px;background:#e7ebd1;border:1px solid #9fa77c;border-radius:7px}
#game .team-section-nav button{min-height:44px}
#game #energyWarning{position:absolute;top:calc(var(--hud-bottom) + 8px);right:14px;z-index:28;display:flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:calc(100% - 28px);padding:8px 10px;background:#492e27;color:#fff0c2;border:2px solid #e4a35f;border-radius:7px}
#game #energyWarning[hidden]{display:none}
#game #energyWarning button{min-height:40px;padding:4px 8px}
#game .energy-stop{padding:12px;margin:0 0 10px;background:#f5dfc5;border:2px solid #b96449;border-radius:8px;color:#562f20}
#game .energy-stop h2{margin:0}
#game .help-search{display:grid;gap:4px;margin-bottom:12px}
#game #helpSearch{width:100%;min-height:44px;padding:7px 10px;color:#2c4936;background:#fff9e5;border:2px solid #9caa83;border-radius:6px}
#game #panelBody :is([data-help-section],[data-help-entry],#helpNoMatch)[hidden]{display:none}
@media(max-width:520px){#game #dialogBody:has(.hank-story){padding:8px}#game #dialog .hank-story .story-speech{font-size:14px;min-height:120px}#game .hank-illustration{height:clamp(140px,54vw,220px)}#game #energyWarning{font-size:12px}}
@media(prefers-reduced-motion:reduce){#game .hank-story.speaking .hank-actor{animation:none}}

#game .purchase-coin{display:inline-block;width:17px;height:17px;flex:none;vertical-align:middle;margin-left:5px;background:url('./assets/hud-coin-v2.png') center/contain no-repeat;image-rendering:pixelated}
#game #panelBody :is(.software-upgrades,.server-farm-grid) .upgrade-card{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:6px;padding:12px}
#game #panelBody :is(.software-upgrades,.server-farm-grid) .upgrade-card>:is(h3,p,ul){margin:0;min-height:0}
#game #panelBody :is(.software-upgrades,.server-farm-grid) .upgrade-card>button,
#game #panel[data-kind="room"] #panelBody .server-farm-grid+.buttons>button{display:flex;align-items:center;justify-content:center;align-self:stretch;min-height:42px;height:auto;padding:7px 6px;font-size:14px;line-height:1.15}
#game .pet-skin-image.extra-pet-atlas,#game #dock #petDock .dock-pet-sprite.extra-pet-atlas{background-image:url('./assets/premium-pets-bank-extra-v1.png');background-size:300% 100%;background-position:var(--pet-x) 50%}
#game .hank-illustration.hank-city{height:auto;aspect-ratio:16/9;background-image:url('./assets/lindenburg-city-brass-v1.jpg');background-size:100% 100%}
#game .hank-illustration.hank-world{aspect-ratio:16/9;background-image:url('./assets/lindenburg-globe-v1.jpg')}
body.world-fullscreen #game{border:0;border-radius:0;box-shadow:none}
#game .hank-city .hank-actor{height:46%;left:0;bottom:2%;z-index:1}
#game .hank-city-marker{position:absolute;width:17%;height:23%;transform:translate(-50%,-50%);border:3px solid #fff09c;box-shadow:0 0 0 2px #6a492a,0 0 12px #fff2bc;background:#eecb5b22;border-radius:5px}
#game .mila-illustration .scene-guest{position:absolute;left:10%;bottom:4%;height:86%;max-width:32%;object-fit:contain;object-position:center bottom;image-rendering:pixelated}
#game .training-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#game .training-grid .card{display:flex;flex-direction:column;gap:6px;margin:0}
#game .training-grid .card button{margin-top:auto;min-height:44px}
#game .training-options{display:flex;flex-wrap:wrap;gap:8px}
#game .training-options button{min-width:76px;min-height:44px}
#game .training-pattern{font-size:clamp(19px,4vw,30px);color:#284f3c;letter-spacing:1px}
#game .training-track{position:relative;height:28px;margin:12px 0;background:#a45e4c;border:2px solid #765143;border-radius:5px;overflow:hidden}
#game .training-track span{position:absolute;left:var(--target-left);width:var(--target-width);top:0;bottom:0;background:#82ac67}
#game .training-track i{position:absolute;left:0;top:0;bottom:0;width:3px;background:#fff3bb;box-shadow:0 0 0 1px #674b29;animation:weekly-needle 1.2s linear infinite alternate}
#game #panelBody .pc-summary{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 12px;padding:10px 12px;border:1px solid #9fac82;border-radius:6px;background:#e6efd8;color:#34563d}
#game #panelBody .pc-links{display:grid;gap:7px}
#game #panelBody .pc-link{display:flex;align-items:center;gap:9px;text-align:left;width:100%;min-height:48px;padding:7px 10px;background:#f7efd7;color:#304b36;border:1px solid #adad85;border-radius:6px;box-shadow:none}
#game #panelBody .pc-link:first-child{background:#e5edcf;border-color:#82996e}
#game #panelBody .pc-link :is(strong,small){display:block}
#game #panelBody .pc-link small{margin-top:2px;color:#586c52}
#game #panelBody .pc-link .game-icon{width:20px;height:20px;flex:none}
#game #panelBody .pc-deal-preview{display:flex;justify-content:space-between;gap:8px}
@keyframes weekly-needle{to{left:calc(100% - 3px)}}
@media(max-width:520px){#game .training-grid{grid-template-columns:1fr}}

#game .mine-dialog-art[data-location="city"]{background-image:url('./assets/lindenburg-city-brass-v1.jpg');background-position:center 47%}
#game .mine-dialog-art[data-location="mine"]{background-image:url('./assets/lithium/cutaway-v2-manual.jpg');background-position:center 28%}
#game .mine-dialog-art[data-location="sky"]{background-image:url('./assets/skyline-executive-deco-v2.jpg');background-position:center 40%}
#game .mine-dialog-art .scene-guest{position:absolute;left:10%;bottom:4%;height:76%;width:auto;max-width:32%;object-fit:contain;object-position:center bottom;image-rendering:pixelated;filter:drop-shadow(0 3px 2px #21180d8c)}
#game #hud .level-row{height:auto;gap:6px}
#game #hud .level-row>i{height:8px;min-width:16px;background:#142e24;border:1px solid #9a9e6c}
#game #hud #xp{background:#a8cf76}
#game #hud #xpText{display:block;color:#f9e9ad;font-size:12px;line-height:14px}
body.phone #game #hud #xpText{font-size:11px;line-height:13px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud{height:143px;grid-template-rows:58px 37px 24px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #identity{height:58px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .level-row{display:grid;grid-template-columns:auto minmax(0,1fr);gap:1px 4px;margin-top:0;height:auto}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .level-row>i{height:5px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #xpText{display:block;grid-column:1/-1;font-size:10px;line-height:11px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #firm{line-height:14px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #reputation{line-height:10px}

#game #hud.has-ore-stocks .money{grid-template-columns:minmax(0,1fr) minmax(96px,.78fr)}
#game #hud.has-ore-stocks .money .cash-counter{padding-inline:2px;gap:2px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud.has-ore-stocks{
 height:134px;grid-template-rows:49px 36px 24px;grid-template-areas:"identity money controls" "clock clock clock" "ore ore ore";
}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud.has-ore-stocks .money{grid-template-columns:minmax(0,1fr) auto}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud .money #oreStocks{
 grid-area:ore;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;margin:0;padding:0;border:0;gap:3px;align-self:end;
}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud.has-ore-stocks .money{display:contents}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud.has-ore-stocks .cash-counter{grid-area:money;align-self:start}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud.has-ore-stocks #income{grid-area:money;align-self:start;margin-top:24px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud.has-ore-stocks #depotValue{grid-area:money;align-self:start;margin-top:36px}
body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud.has-ore-stocks #jewelBalance{grid-area:money;align-self:end;justify-self:end}

#game .hank-illustration img.bank-cast-actor{position:absolute;left:7%;bottom:3%;height:91%;width:27%;object-fit:contain;object-position:bottom center;background:none;image-rendering:auto;filter:drop-shadow(1px 4px 3px #20181080)}
#game .hank-city img.bank-cast-actor{height:59%;width:25%;left:4%}
#game .hank-story.speaking img.bank-cast-actor{animation:cast-breath .9s ease-out 1}
@keyframes cast-breath{0%{transform:translateY(2px)}50%{transform:translateY(-2px)}100%{transform:translateY(0)}}
#game .cast-stage[data-location="finance"]{background-image:url('./assets/exchange-hall-v1.jpg')}
#game .cast-stage[data-location="bank"]{background-image:url('./assets/bank-hall-v1.jpg')}
#game .cast-stage[data-location="city"]{background-image:url('./assets/lindenburg-city-brass-v1.jpg')}
#game .cast-stage[data-location="skyline"]{background-image:url('./assets/skyline-executive-deco-v2.jpg')}
#game .cast-stage[data-location="office"]{background-image:url('./assets/office-scene-v4-startup.jpg')}
#game .cast-stage[data-location="office"][data-stage="basis"]{background-image:url('./assets/office-scene-v4-basis.jpg')}
#game .cast-stage[data-location="office"][data-stage="modern"]{background-image:url('./assets/office-scene-v4-modern.jpg')}
#game .cast-stage[data-location="office"][data-stage="premium"]{background-image:url('./assets/office-scene-v4-premium.jpg')}
@media(prefers-reduced-motion:reduce){#game .hank-story.speaking img.bank-cast-actor{animation:none}}

#game .pet-base-row{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:9px;align-items:center}
#game .pet-base-image{width:56px;aspect-ratio:1;background:url('./assets/pets-bank-v1.png') var(--pet-x) 50%/300% 100% no-repeat}
@media(max-width:420px){#game .pet-base-row{grid-template-columns:46px minmax(0,1fr)}#game .pet-base-image{width:46px}#game .pet-base-row>button{grid-column:2;justify-self:start}}
@media(max-width:600px){
 body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud #jewelBalance{position:relative;z-index:2;min-height:22px}
 body.phone.handset-portrait:not(.tablet):not(.landscape) #game #hud.has-ore-stocks #depotValue{justify-self:start;max-width:max(0px,calc(100% - 58px))}
}

#game .pet-base-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}
#game .pet-base-actions button{margin:0}
@media(max-width:420px){#game .pet-base-row>.pet-base-actions{grid-column:2;justify-content:flex-start}}

#game #panelBody .office-deal-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;padding:12px 14px;margin-bottom:10px;background:#e5ebcc;border:1px solid #9ca97c;border-radius:8px}
#game #panelBody .office-deal-card h2{font-size:19px;margin:0}
#game #panelBody .office-deal-card h2 span{display:inline-block;white-space:nowrap;font-size:14px;color:#4d6545}
#game #panelBody .office-deal-card p{font-size:14px;margin:4px 0 0}
#game #panelBody .office-deal-card button{margin:0;white-space:normal}
@media(max-width:360px){#game #panelBody .office-deal-card{grid-template-columns:1fr}#game #panelBody .office-deal-card button{justify-self:start}}

#game .hank-illustration.mine-conversation{
 background:#2c251e var(--mine-dialogue-art) center 37%/cover no-repeat;
 position:relative;isolation:isolate
}
#game .mine-conversation::before{
 content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,#20170b66,transparent 65%)
}
#game .mine-conversation[data-speaker="player"]{background-position:center 45%}
#game .mine-conversation :is(.marek-gesture,.mine-dialogue-player){
 position:absolute;bottom:3%;height:94%;width:min(40%,190px);left:9%;
 object-fit:contain;object-position:center bottom;
 filter:drop-shadow(0 3px 4px #160f0c9e);
}
#game .mine-conversation .mine-dialogue-player{left:auto;right:9%}
#game .mine-conversation .marek-gesture{
 height:90%;width:auto;aspect-ratio:1;
 background:url('./assets/marek-gestures-v1.png') 50% 50%/300% 100% no-repeat;
}
#game .mine-conversation .marek-gesture[data-pose="emphasize"]{background-position:100% 50%}
#game .animated-story.speaking .marek-gesture{animation:marek-explains 1.9s steps(1,end) both}
#game .animated-story.speaking .marek-gesture[data-pose="emphasize"]{animation-name:marek-emphasizes}
#game .animated-story.speaking .mine-dialogue-player{animation:mine-player-reply .8s ease-out both;transform-origin:50% 100%}
@keyframes marek-explains{0%{background-position:0 50%}20%{background-position:50% 50%}65%{background-position:0 50%}85%,100%{background-position:50% 50%}}
@keyframes marek-emphasizes{0%{background-position:0 50%}20%{background-position:50% 50%}55%,100%{background-position:100% 50%}}
@keyframes mine-player-reply{0%,100%{transform:none}45%{transform:translateY(-2px) rotate(2deg)}}
@media(prefers-reduced-motion:reduce){
 #game .animated-story.speaking .marek-gesture,#game .animated-story.speaking .mine-dialogue-player{animation:none}
}
#game .cast-stage[data-location="office"][data-stage="emerald"]{background-image:url('./assets/office-elite-v1-emerald.jpg')}
#game .cast-stage[data-location="office"][data-stage="walnut"]{background-image:url('./assets/office-elite-v1-walnut.jpg')}
#game .cast-stage[data-location="office"][data-stage="ivory"]{background-image:url('./assets/office-elite-v1-ivory.jpg')}

#game #dialog.hank-guide {
 background:transparent;
 backdrop-filter:none;
 -webkit-backdrop-filter:none;
 place-items:end start;
 padding:0 0 120px 24px;
 box-sizing:border-box;
}
#game #dialog.hank-guide #dialogBody:has(.avatar-story) {
 align-self:end;
 width:min(620px,calc(100% - 48px));
 max-height:100%;
 padding:12px 16px;
}
#game #dialog.hank-guide .avatar-story {
 grid-template-columns:72px minmax(0,1fr);
 gap:6px 12px;
}
#game #dialog.hank-guide .avatar-story .story-speech {
 min-height:0;
 padding:8px 10px;
 font-size:clamp(15px,2vw,21px);
 line-height:1.35;
}
#game #dialog.hank-guide .avatar-story > .mini { display:none }
#game.hank-preview #panel:not([hidden]) {
 left:auto;
 right:24px;
 width:min(960px,54%);
 max-width:none;
 transform:none;
}
#game #hud #depotValue.loss {
 color:#ffbe99 !important;
 overflow:hidden;
 text-overflow:ellipsis;
 max-width:100%;
}
@media (max-width:900px) and (orientation:landscape) {
 body.handset-landscape #game #dialog.hank-guide {
  padding:0 0 var(--phone-bottom,8px) var(--phone-left,8px);
 }
 body.handset-landscape #game #dialog.hank-guide #dialogBody:has(.avatar-story) {
  width:min(44vw,390px);
  max-height:calc(100% - var(--hud-bottom,65px) - 8px);
  padding:8px;
 }
 body.handset-landscape #game #dialog.hank-guide .avatar-story {
  grid-template-columns:40px minmax(0,1fr);
  gap:4px 6px;
 }
 body.handset-landscape #game #dialog.hank-guide .story-speech {
  font-size:14px;
 }
 body.handset-landscape #game.hank-preview :is(#panel,#panel.centered):not([hidden]) {
  left:auto;
  right:var(--phone-right,8px);
  width:50%;
  transform:none;
 }
}
@media (orientation:portrait) {
 body.phone #game #dialog.hank-guide {
  padding:0 8px max(8px,env(safe-area-inset-bottom));
 }
 body.phone #game #dialog.hank-guide #dialogBody:has(.avatar-story) {
  width:100%;
  max-height:36%;
 }
 body.phone #game.hank-preview #panel:not([hidden]) {
  left:8px;
  right:8px;
  width:auto;
  bottom:38%;
 }
}
