/* One cell is half a floor's height; eight cells form a 4:1 floor. */
.home-building{background:#c7e1f4 url('assets/building/sky.jpg') center top/cover no-repeat;min-width:0}
.building-toolbar{padding:24px 5vw 18px;display:flex;align-items:center;justify-content:space-between;gap:20px;background:linear-gradient(#ffffffd9,#ffffff70)}
.building-toolbar h2{margin:5px 0;color:#264765;font-size:25px}
.building-toolbar p{margin:0;font-size:12px;color:#526b80}
.building-toolbar .actions{margin:0}
.building-scene{min-width:0;padding:16px 0 30px;flex:1}
.building-scroll{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-color:#6d92b6 #dceafa;padding:0 4vw 16px}
.building-tower{width:100%;max-width:1440px;min-width:720px;margin:auto;box-shadow:0 14px 40px #34536e28;background:#8b99a4;border:8px solid #8b99a4;border-radius:4px}
.building-cap{height:12px;background:linear-gradient(#cad2d9,#8b99a4)}
.building-level{position:relative;border-bottom:8px solid #8b99a4}
.building-level:last-of-type{border-bottom:0}
.building-floor{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));aspect-ratio:4/1;position:relative;background:#d1d0cc;overflow:hidden}
.building-floor-meta{position:absolute;left:0;top:0;z-index:2;display:flex;gap:10px;align-items:center;background:#213d56e8;color:white;border-radius:0 0 7px 0;padding:5px 10px;font-size:10px;pointer-events:none}
.building-floor-meta b{letter-spacing:1px}
.building-room,.building-vacancy{min-height:0;height:100%;padding:0;border:0;border-radius:0;position:relative;overflow:hidden;display:block;background:#e4e0d8;box-shadow:inset -2px 0 #8b99a4}
.building-room img{width:100%;height:100%;display:block;object-fit:contain}
.building-room:hover{background:#e4e0d8;box-shadow:inset 0 0 0 3px #6b9bc4}
.building-room:hover img{filter:brightness(1.07)}
.building-room-label{position:absolute;bottom:7px;left:6px;right:6px;background:#1f334bdf;color:white;border:1px solid #ffffff35;border-radius:5px;padding:5px 7px;font-size:12px;line-height:1.3;display:flex;align-items:center;justify-content:space-between;gap:4px;pointer-events:none}
.building-room-label small{color:#c6d8e8;font-size:10px;white-space:nowrap}
.building-room[style*="span 1"] .building-room-label{font-size:10px;padding:5px 3px;display:block}
.building-room[style*="span 1"] .building-room-label small{display:none}
.building-vacancy{background:#bbb url('assets/building/empty.jpg') var(--empty-position) center/800% 100% no-repeat;border-right:1px dashed #ffffff50;color:white}
.building-vacancy:hover{background-color:#bbb;background-image:linear-gradient(#5884a630,#5884a630),url('assets/building/empty.jpg');background-size:100% 100%,800% 100%;background-position:center,var(--empty-position) center}
.building-vacancy span{display:grid;place-items:center;width:36px;height:36px;border:1px solid #fff9;border-radius:50%;background:#26476585;position:absolute;left:50%;top:52%;transform:translate(-50%,-50%);font-size:24px}
.building-vacancy small{position:absolute;bottom:9px;left:0;right:0;color:white;font-size:10px;text-shadow:0 1px 3px #223}
.building-hint{margin:5px 4vw 0;font-size:11px;color:#3b5870;line-height:1.8}
.building-hint span{display:none}
.workspace.home>footer{background:#d6e8f4}
.facility-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px;align-items:start}
.facility-building{padding:20px;min-width:0;overflow:hidden}
.facility-building .building-scene{background:#d8e9f6 url('assets/building/sky.jpg') center/cover;border-radius:8px;padding:20px 0 12px}
.facility-building .building-scroll{padding:0 16px 12px}
.facility-form p{font-size:12px}
.facility-catalog{margin:12px 0 26px}
.rooms-catalog{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.room-preview{padding:0;border:0;background:#eef2f5;width:100%;height:150px;margin-bottom:16px;border-radius:6px;overflow:hidden}
.room-preview:hover{background:#e3edf5}
.room-preview img{width:100%;height:100%;object-fit:contain;display:block}
.rooms-catalog .panel-head{margin-bottom:4px;gap:8px}
.rooms-catalog .panel-head h3{margin:0}
.rooms-catalog p{font-size:12px}
.public-spaces>div{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.public-spaces figure{margin:0;background:#f3f6f8;border-radius:7px;overflow:hidden}
.public-spaces img{display:block;width:100%;height:140px;object-fit:contain}
.public-spaces figcaption{padding:10px;font-size:12px;color:#617b91}
.public-spaces p{font-size:12px}
.room-dialog{width:min(1050px,calc(100% - 32px));max-width:1050px;padding:22px}
.room-dialog img{display:block;width:100%;max-height:65vh;object-fit:contain;background:#edf1f4;border-radius:7px}
.room-dialog h2{font-size:20px;margin:0}
.room-dialog form{margin:0}
.room-dialog button{width:auto;margin:0}
.room-dialog p{font-size:12px;margin:14px 0 0}
@media(max-width:1050px){.facility-layout{grid-template-columns:1fr}.facility-form{max-width:none}}
@media(max-width:650px){
 .building-toolbar{padding:18px 14px;gap:12px;align-items:flex-start}
 .building-toolbar h2{font-size:19px;overflow-wrap:anywhere}
 .building-toolbar .actions{flex-direction:column;flex-shrink:0;gap:7px}
 .building-toolbar button{padding:7px 10px;font-size:11px;min-height:34px}
 .building-toolbar .eyebrow{font-size:8px;letter-spacing:1px}
 .building-scene{padding-top:8px}
 .building-scroll{padding:0 12px 14px}
 .building-hint{margin:0 14px}
 .building-hint span{display:block}
 .building-tower{min-width:720px;border-width:5px}
 .building-room-label{font-size:11px}
 .facility-building{padding:14px}
 .facility-building .panel-head{align-items:flex-start}
 .facility-building h2{font-size:19px}
 .facility-building .panel-head button{font-size:11px;padding:7px}
 .rooms-catalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .rooms-catalog .card{padding:10px;min-width:0}
 .room-preview{height:110px;margin-bottom:10px}
 .rooms-catalog .panel-head{flex-wrap:wrap}
 .rooms-catalog .panel-head h3{font-size:12px}
 .rooms-catalog .pill{font-size:9px}
 .rooms-catalog p{font-size:10px}
 .rooms-catalog button[data-action="select-room"]{font-size:11px;padding:7px 10px}
 .public-spaces>div{grid-template-columns:1fr}
 .room-dialog{padding:16px}
}

.demolition-controls{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-top:16px;border-top:1px solid var(--line);padding-top:12px}.demolition-controls p{margin:0}.demolition-controls button{border-color:#e4bdc5;color:#a54759;background:#fff7f8}

dialog.facility-build-dialog{width:min(900px,calc(100% - 28px));max-width:900px;max-height:min(90dvh,900px);padding:0;overflow:hidden;border:1px solid #d8bf9b;border-radius:20px;background:#fff8e9;color:#49354f;box-shadow:0 26px 90px #34203b55}
dialog.facility-build-dialog::backdrop{background:#3625419c;backdrop-filter:blur(5px)}
.facility-build-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 22px;border-bottom:1px solid #e7d5b5;background:linear-gradient(110deg,#fff9ed,#f6eefa)}
.facility-build-head .eyebrow{font-size:10px;letter-spacing:.16em;color:#8a6c91}.facility-build-head h2{margin:4px 0 0;font-size:22px;color:#503653}.facility-build-head p{margin:4px 0 0;color:#806e7e;font-size:12px}
.facility-build-head>button{width:38px;height:38px;flex:0 0 38px;margin:0;padding:0;border:1px solid #dfc9ac;border-radius:12px;background:#fff8ed;color:#674d70;font-size:25px;line-height:1}
.facility-build-controls{display:flex;align-items:end;justify-content:space-between;gap:14px;padding:14px 22px 4px}.facility-build-controls label{width:min(400px,58%);margin:0}.facility-build-selected{padding:0 0 10px;color:#75617b;font-size:12px}.facility-build-selected b{color:#503653}
.facility-build-grid{max-height:min(55dvh,560px);padding:14px 22px 20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;overflow:auto}
.facility-build-option{min-width:0;min-height:82px;padding:7px;display:flex;align-items:center;gap:10px;text-align:left;border:1px solid #ead9bd;border-radius:13px;background:#fffdf7;color:#49354f;transition:border-color .15s ease,background .15s ease,transform .15s ease}
.facility-build-option:hover:not(:disabled){transform:translateY(-1px);border-color:#aa8cb1;background:#fff9ec}.facility-build-option.selected{border-color:#80638e;background:#f4edf7;box-shadow:0 0 0 2px #80638e22}.facility-build-option:disabled{opacity:.42;cursor:not-allowed}
.facility-build-option img{width:92px;height:66px;flex:0 0 92px;object-fit:cover;border-radius:8px;background:#e6deec}.facility-build-option-copy{min-width:0;display:grid;gap:3px}.facility-build-option-copy b{font-size:13px}.facility-build-option-copy small{color:#806e7e;font-size:10px}.facility-build-check{margin-left:auto;padding:5px 8px;border-radius:8px;background:#f2eadc;color:#76617f;font-size:10px;white-space:nowrap}.facility-build-option.selected .facility-build-check{background:#80638e;color:#fff}
dialog.facility-build-dialog>footer{position:sticky;bottom:0;padding:12px 22px;display:flex;align-items:center;justify-content:flex-end;gap:8px;border-top:1px solid #e7d5b5;background:#fff9ed}.facility-build-dialog>footer small{margin-right:auto;color:#806e7e;font-size:11px}.facility-build-dialog>footer button{min-height:36px;padding:7px 12px;border:1px solid #dfc9ac;border-radius:10px;background:#fff8ed;color:#674d70}.facility-build-dialog>footer button.primary{border-color:#795d87;background:#795d87;color:#fff8e9}.facility-build-dialog>footer button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:650px){dialog.facility-build-dialog{width:calc(100% - 16px);max-height:94dvh;border-radius:15px}.facility-build-head{padding:12px 14px}.facility-build-head h2{font-size:18px}.facility-build-controls{padding:10px 14px 2px;align-items:start;flex-direction:column;gap:4px}.facility-build-controls label{width:100%}.facility-build-selected{padding:0 0 4px}.facility-build-grid{max-height:calc(94dvh - 215px);padding:10px 12px 14px;grid-template-columns:1fr;gap:7px}.facility-build-option{min-height:72px}.facility-build-option img{width:78px;height:56px;flex-basis:78px}.facility-build-option-copy b{font-size:12px}.facility-build-option-copy small{font-size:9px}.facility-build-dialog>footer{padding:10px 12px;flex-wrap:wrap}.facility-build-dialog>footer small{flex-basis:100%}}

/* Sprite frames share a 64 × 96 cell and foot baseline; time comes from GameClock. */
.room-activity-layer{position:absolute;inset:0;pointer-events:none;container-type:size;z-index:1}
.room-people{position:absolute;inset:0;overflow:hidden}
.pixel-person{position:absolute;bottom:19%;width:64px;height:96px;transform:translateX(-50%);transform-origin:50% 100%;filter:hue-rotate(var(--sprite-hue,0deg))}
.pixel-frame{display:block;width:64px;height:96px;background-image:var(--sprite-sheet);background-position:var(--sprite-x) var(--sprite-y);background-repeat:no-repeat;image-rendering:pixelated}
@supports (height:1cqh){.pixel-person{transform:translateX(-50%) scale(calc(100cqh / 230px))}}
.pixel-person.pixel-ceo{bottom:30%}
.room-work-status{position:absolute;left:6px;right:6px;top:24px;display:block;width:max-content;max-width:calc(100% - 12px);padding:3px 5px;border-radius:4px;background:#213d56da;color:#fff;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.building-room-label{z-index:2}
.room-activity-details{border-top:1px solid var(--line);margin-top:16px;padding-top:16px}
.room-activity-details h3{margin-bottom:8px}.room-activity-details small{display:block;line-height:1.7}
.building-room[style*="span 1"] .room-work-status{font-size:9px;top:24px;left:3px;right:3px;max-width:calc(100% - 6px)}
@media(max-width:650px){.room-work-status{font-size:9px}.pixel-person{bottom:22%}}

.roster-pixel{display:block;width:64px;height:96px;background-repeat:no-repeat;background-position:0 0;image-rendering:pixelated}.employee-pixel{float:right;image-rendering:pixelated;object-fit:contain;margin:0 0 10px 10px}.sprite-preview-link{display:inline-block;text-decoration:none;background:white;border:1px solid var(--line);border-radius:7px;padding:9px 15px;font-size:13px;color:var(--blue)}

.office-desk-foreground{position:absolute;inset:0;clip-path:inset(58% 0 18% 0);pointer-events:none;z-index:1}.room-work-status{z-index:2}

/* Home simulation shell: cutaway studio, operating cards and compact game HUD. */
.game-layout{--hud-top-height:50px;height:100vh;height:100dvh;min-height:0;overflow:hidden;background:#b7b7bd}
.game-layout>.sidebar{position:fixed;inset:0 auto 0 0;width:46px;height:100vh;height:100dvh;margin:0;padding:8px 0;display:flex;flex-direction:column;align-items:center;gap:0;border:0;background:#777ba9;box-shadow:2px 0 8px #20233b42;z-index:30}
.game-layout .sidebar .brand,.game-layout .sidebar-company,.game-layout .sidebar-bottom{display:none}
.game-layout .sidebar nav{width:100%;flex:1;min-height:0;margin:0;padding:0;display:flex;flex-direction:column;align-items:center;gap:2px;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}
.game-layout .sidebar nav button{position:relative;width:42px;min-height:37px;flex:0 0 37px;padding:0;border:0;border-radius:4px;background:transparent;color:#f6f5ff;text-align:center;font-size:0;display:grid;place-items:center}
.game-layout .sidebar nav button:hover{background:#9093bf}
.game-layout .sidebar nav button.active{background:#595d8d;border-left:3px solid #f4c856;border-radius:3px;color:#fff}
.game-layout .sidebar nav button .sidebar-logo{display:block;width:27px;height:27px;background-image:url('./assets/ui/sidebar-icons.png');background-size:500% 400%;background-repeat:no-repeat;background-position:var(--icon-position)}
.game-layout .sidebar nav button .sidebar-logo.programs-logo{background-image:url('./assets/ui/programs-logo.svg');background-position:center;background-size:contain;background-repeat:no-repeat}
.game-layout .sidebar nav button .sidebar-logo.company-profile-sidebar-logo{display:grid;place-items:center;background-image:none;background-color:var(--logo-color,#244b7a);border-radius:50%;color:#fff;font-size:8px;font-weight:800;letter-spacing:0;line-height:1;text-align:center;overflow:hidden;white-space:nowrap}
.game-layout .sidebar nav button .sidebar-logo.company-profile-sidebar-logo.company-logo-preset{background-image:url('./assets/company-logo-presets.png');background-size:500% 600%;background-position:var(--logo-position,0% 0%);background-repeat:no-repeat;color:transparent}
.game-layout>.workspace,.game-layout .workspace{position:relative;display:block;margin:0 0 0 46px;width:calc(100% - 46px);height:100vh;height:100dvh;min-height:0;overflow:hidden;background:#c1c1c5}
.game-layout #key-data{position:absolute;inset:0 0 auto 0;width:auto;max-width:none;height:var(--hud-top-height);margin:0;padding:0;background:#8586b9;color:#fff;z-index:12;border:0;box-shadow:0 2px 8px #20233b45}
.game-layout #key-data .stats{height:100%;width:100%;margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0}
.game-layout #key-data .stat{position:relative;min-width:0;height:100%;padding:3px 10px 3px 33px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0;border:0;border-right:1px solid #ffffff20;border-radius:0;background:transparent;color:#fff;overflow:hidden}
.game-layout #key-data .stat::before{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:17px;color:#f4d16f}
.game-layout #key-data .stat:nth-child(1)::before{content:"▤"}.game-layout #key-data .stat:nth-child(2)::before{content:"★"}.game-layout #key-data .stat:nth-child(3)::before{content:"♙"}.game-layout #key-data .stat:nth-child(4)::before{content:"✦"}
.game-layout #key-data .stat small{max-width:100%;color:#e8e8f7;font-size:9px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-layout #key-data .stat b{max-width:100%;margin:1px 0 0;color:#fff;font-size:13px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-layout #key-data .stat b small{display:inline;color:#e8e8f7;font-size:9px}
.game-layout .topbar{position:absolute;inset:auto 0 0 0;height:43px;margin:0;padding:0 10px 0 15px;display:flex;align-items:center;border:0;background:#8586b9;color:#fff;backdrop-filter:none;z-index:14;box-shadow:0 -2px 8px #20233b3d}
.game-layout .topbar>div:first-child{display:none}
.game-layout .time-controls{width:100%;height:100%;margin:0;display:flex;align-items:center;gap:12px;font-size:12px}
.game-layout #date{min-width:160px;color:#fff;font-weight:700;font-size:13px;white-space:nowrap}
.game-layout #clock{flex:0 0 auto;min-height:31px;margin-left:auto;padding:5px 12px;border:0;border-radius:5px;background:#6d4e79;color:#fff;font-size:12px;font-weight:700}
.game-layout #clock:hover{background:#5e416b}
.game-layout .time-track{width:54px;height:5px;flex:0 0 54px;border-radius:4px;background:#ffffff54;overflow:hidden}
.game-layout .time-track i{height:100%;background:#f7d26f}
.game-layout .home-shortcuts{height:100%;display:flex;align-items:center;justify-content:center;gap:4px;flex:1;min-width:0}
.game-layout .home-shortcuts button{min-width:39px;min-height:35px;padding:1px 5px;display:flex;align-items:center;justify-content:center;gap:4px;border:0;border-radius:4px;background:transparent;color:#fff}
.game-layout .home-shortcuts button:hover{background:#ffffff24}
.game-layout .home-shortcuts button span{font-size:17px;color:#fff}
.game-layout .home-shortcuts button small{font-size:9px;color:#f0eff9;white-space:nowrap}
.game-layout .workspace>main{position:absolute;inset:var(--hud-top-height) 0 43px 0;width:100%;max-width:none;min-height:0;margin:0;padding:0;display:block;overflow:hidden}
.game-layout .workspace>footer{display:none}
.game-layout .home-building{width:100%;height:100%;min-width:0;margin:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr);gap:0;overflow:hidden;border:0;border-radius:0;background:#aaa9a7}
.home-task-panel{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:#c7c3bd;border-right:5px solid #777783;box-shadow:3px 0 8px #24253635;z-index:4}
.home-task-heading{height:39px;flex:0 0 39px;display:flex;align-items:center;gap:10px;padding:0 10px;background:#efcf77;color:#4a453c;border-bottom:2px solid #ac9860}
.home-task-heading>span{font-size:10px;font-weight:800;letter-spacing:.04em}
.home-task-heading b{font-size:12px}
.home-task-heading small{margin-left:auto;max-width:46%;color:#6a5f4a;font-size:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-task-list{min-height:0;flex:1;display:flex;flex-direction:column;gap:5px;padding:6px;overflow-y:auto;scrollbar-color:#928c83 #c7c3bd}
.home-task-card{position:relative;width:100%;min-height:76px;flex:1 0 76px;padding:8px 56px 8px 30px;display:block;overflow:hidden;text-align:left;border:1px solid #aca8a1;border-radius:2px;background:#e4e0d7;color:#413e39;box-shadow:0 1px 1px #39363030}
.home-task-card:nth-child(even){background:#d3d1ce}
.home-task-card:hover{background:#f0e7ca;border-color:#8b7c59;transform:translateX(1px)}
.home-task-symbol{position:absolute;top:9px;left:8px;width:16px;height:16px;display:grid;place-items:center;border-radius:50%;background:#6a667b;color:#fff;font-size:11px;font-weight:700}
.home-task-card.attention .home-task-symbol{background:#a88345}
.home-task-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.home-task-copy>b{color:#514b43;font-size:11px;line-height:1.2}
.home-task-copy>strong{color:#454852;font-size:10px;line-height:1.15}
.home-task-copy>small{color:#6b6863;font-size:9px;line-height:1.35}
.home-task-card.done .home-task-copy>strong{color:#517961}
.home-task-portrait{position:absolute;right:2px;bottom:0;width:56px;height:69px;background-position:0 0;background-repeat:no-repeat;background-size:224px auto;image-rendering:pixelated;filter:drop-shadow(-2px 0 0 #ffffff75)}
.home-task-footer{height:26px;flex:0 0 26px;display:flex;align-items:center;gap:6px;padding:0 9px;background:#797a91;color:#f4f1e8;font-size:9px}
.home-live-dot{width:7px;height:7px;border-radius:50%;background:#71c089;box-shadow:0 0 5px #b2e5be}
.home-task-floor{margin-left:auto;color:#f7d47a;font-weight:800}
.home-stage{position:relative;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:#bbb url('assets/building/sky.jpg') center/cover no-repeat}
.home-stage .building-toolbar{position:absolute;top:10px;left:13px;right:13px;z-index:5;min-height:44px;padding:5px 9px;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#eee8d4d9;border:1px solid #766f625e;box-shadow:0 2px 4px #29261d35;pointer-events:none}
.home-stage .building-toolbar>*{pointer-events:auto}
.home-stage .company-building-title{gap:8px}
.home-stage .company-logo{width:28px;height:28px;border-radius:3px;font-size:10px;box-shadow:none}
.home-stage .company-building-title .eyebrow{display:none}
.home-stage .building-toolbar h2{max-width:22vw;margin:0;color:#3c3b3d;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-stage .building-toolbar p{margin:2px 0 0;color:#5e5a55;font-size:9px;line-height:1.1}
.home-stage .building-toolbar .actions{margin:0;gap:4px}
.home-stage .building-toolbar .actions button{min-height:27px;padding:4px 7px;border:1px solid #9d9689;border-radius:3px;background:#f5f2e9;color:#48443d;font-size:9px}
.home-stage .building-toolbar .actions button.primary{background:#73628e;border-color:#665681;color:white}
.home-stage .building-scene{width:100%;height:100%;min-height:0;padding:0;display:flex;flex:1;overflow:hidden;background:transparent}
.home-stage .building-scroll{width:100%;height:100%;min-height:0;padding:0;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;scrollbar-color:#777783 #c3c1bd}
.home-stage .building-tower{width:min(88%, 1400px);max-width:none;min-width:0;height:auto;min-height:0;margin:auto auto 0;flex:0 0 auto;display:flex;flex-direction:column;border:7px solid #74757b;border-top:0;border-radius:0;box-shadow:none;background:#77777d}
.home-stage .building-cap{height:9px;flex:0 0 9px;background:#77777d}
.home-stage .building-level{position:relative;height:auto;min-height:0;flex:0 0 auto;aspect-ratio:4/1;border-bottom:7px solid #77777d}
.home-stage .building-floor{width:100%;height:100%;min-height:0;aspect-ratio:4/1;background:#c6c1b8;box-shadow:inset 0 0 0 2px #a7a39d}
.home-stage .building-floor-meta{top:0;left:0;padding:3px 7px;border-radius:0 0 3px 0;background:#454651dc;font-size:9px}
.home-stage .building-room,.home-stage .building-vacancy{box-shadow:inset -2px 0 #696971;border-radius:0}
.home-stage .building-room img{object-fit:cover}
.home-stage .building-room-label{display:none}
.home-stage .building-room:hover .building-room-label{left:4px;right:4px;bottom:4px;display:flex;padding:3px 5px;border-radius:2px;font-size:9px}
.home-stage .building-room:hover .building-room-label small{font-size:8px}
.home-stage .room-work-status{left:4px;right:4px;top:4px;width:max-content;max-width:calc(100% - 8px);padding:2px 4px;border-radius:2px;background:#383844a6;font-size:8px;line-height:1.2}
.home-stage .room-people{opacity:.92}
.home-stage .building-hint{display:none}
@media(max-width:900px){.game-layout .home-stage .building-toolbar h2{max-width:20vw}.game-layout .home-shortcuts button small{display:none}.game-layout #date{min-width:142px;font-size:12px}}
@media(max-width:650px){
 .game-layout>.sidebar{inset:var(--hud-top-height) 0 auto 0;width:100%;height:34px;margin:0;padding:0;display:flex;border:0;border-bottom:2px solid #5c5d83;box-shadow:0 2px 5px #20233b35}
 .game-layout .sidebar nav{height:100%;flex-direction:row;justify-content:flex-start;gap:2px;padding:0 4px;overflow-x:auto;overflow-y:hidden}
 .game-layout .sidebar nav button{width:34px;min-width:34px;min-height:30px;height:30px;flex:0 0 34px;border-left:0;font-size:0}
 .game-layout .sidebar nav button.active{border-left:0;border-bottom:2px solid #f4c856}
 .game-layout .sidebar nav button .sidebar-logo{display:block!important;width:22px;height:22px}
 .game-layout>.workspace,.game-layout .workspace{margin:0;width:100%}
 .game-layout #key-data{height:var(--hud-top-height)}
 .game-layout #key-data .stat{padding:2px 3px 2px 22px}
 .game-layout #key-data .stat::before{left:5px;font-size:12px}
 .game-layout #key-data .stat small{font-size:8px}
 .game-layout #key-data .stat b{font-size:11px}
 .game-layout .workspace>main{inset:calc(var(--hud-top-height) + 34px) 0 42px 0}
 .game-layout .topbar{height:42px;padding:0 6px}
 .game-layout .time-controls{gap:4px}
 .game-layout #date{min-width:104px;font-size:10px}
 .game-layout #clock{min-height:29px;padding:4px 7px;font-size:10px}
 .game-layout .time-track{width:22px;flex-basis:22px}
 .game-layout .home-shortcuts{justify-content:space-evenly;gap:0}
 .game-layout .home-shortcuts button{min-width:24px;width:27px;min-height:30px;padding:0}
 .game-layout .home-shortcuts button span{font-size:15px}
 .game-layout .home-building{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 .home-task-panel{border-right:0;border-bottom:4px solid #777783}
 .home-task-heading{height:27px;flex-basis:27px;padding:0 8px}
 .home-task-list{flex-direction:row;gap:5px;padding:4px;overflow-x:auto;overflow-y:hidden}
 .home-task-card{width:194px;min-width:194px;height:auto;min-height:0;flex:1 0 194px;padding:6px 48px 5px 28px}
 .home-task-copy{gap:2px}
 .home-task-copy>b{font-size:10px}
 .home-task-copy>strong{font-size:9px}
 .home-task-copy>small{font-size:8px}
 .home-task-symbol{top:7px;left:6px;width:15px;height:15px}
 .home-task-portrait{right:0;width:46px;height:58px;background-size:184px auto}
 .home-task-footer{height:20px;flex-basis:20px;font-size:8px}
 .home-stage .building-toolbar{top:5px;left:6px;right:6px;min-height:36px;padding:3px 5px}
 .home-stage .company-logo{width:22px;height:22px;font-size:8px}
 .home-stage .building-toolbar h2{max-width:31vw;font-size:11px}
 .home-stage .building-toolbar p{font-size:8px}
 .home-stage .building-toolbar .actions button{min-height:24px;padding:3px 5px;font-size:8px}
 .home-stage .building-tower{width:100%;margin:auto 0 0;border-width:4px}
 .home-stage .building-level{min-height:0;flex:0 0 auto;aspect-ratio:4/1;border-bottom-width:4px}
 .home-stage .building-floor-meta{padding:2px 4px;font-size:8px}
 .home-stage .room-work-status{font-size:7px}
}

/* Every management route now uses the same in-game shell and art direction. */
.game-layout .workspace:not(.home)>main{padding:10px 15px 24px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;background:#bbb9bf;scrollbar-color:#8586a4 #d3d0d0}
.game-page-banner{min-height:58px;margin:0 0 10px;padding:7px 12px;display:flex;align-items:center;gap:10px;border:1px solid #8f8c9a;background:linear-gradient(90deg,#d9d5cc,#eee9dd);box-shadow:0 2px 4px #34344228}
.game-page-symbol{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;border:1px solid #9e9aaa;border-radius:3px;background:#8586b9;color:#fff;font-size:21px}
.game-page-banner>div{min-width:0}
.game-page-banner>div>small{display:block;color:#787489;font-size:8px;letter-spacing:.12em}
.game-page-banner h1{margin:2px 0 0;color:#494654;font-size:17px;line-height:1.2}
.game-page-title-row{display:flex;align-items:center;gap:12px}
.game-page-title-row .group-create-top{min-height:30px;padding:5px 10px;font-size:11px}
.game-page-meta{margin-left:auto;display:flex;align-items:center;gap:5px;min-width:0}
.game-page-date{padding-left:4px;color:#6e6a7a;font-size:10px;white-space:nowrap}
.game-layout .workspace:not(.home) .game-page-calendar-link{width:28px;min-width:28px;min-height:28px;padding:0;border:0;background:transparent;color:#fff5e5;box-shadow:none;font-size:17px;line-height:1}
.game-layout .workspace:not(.home) .game-page-calendar-link:hover{background:#fff0dc24}
.game-page-content{max-width:1600px;margin:0 auto;padding:0 2px 14px}
.game-layout .workspace:not(.home) .panel,.game-layout .workspace:not(.home) .card{border:1px solid #aaa7aa;border-radius:3px;background:#e5e2dc;box-shadow:0 2px 5px #302f3820}
.game-layout .workspace:not(.home) .panel{padding:16px;margin-bottom:12px}
.game-layout .workspace:not(.home) .card{padding:12px}
.game-layout .workspace:not(.home) h2{margin-bottom:10px;color:#4c4955;font-size:19px}
.game-layout .workspace:not(.home) h3{margin-bottom:10px;color:#514e58;font-size:14px}
.game-layout .workspace:not(.home) p{margin-top:7px;margin-bottom:7px;color:#5f5d62;font-size:12px;line-height:1.65}
.game-layout .workspace:not(.home) small,.game-layout .workspace:not(.home) .muted{color:#77747a}
.game-layout .workspace:not(.home) .pill{border:1px solid #c3bbd0;border-radius:2px;background:#e5dfee;color:#695a81}
.game-layout .workspace:not(.home) button{min-height:32px;border:1px solid #a6a1a9;border-radius:3px;background:#f1eee8;color:#514d58;box-shadow:0 1px 1px #302f3815}
.game-layout .workspace:not(.home) button:hover{background:#e9e2f0;border-color:#89809b}
.game-layout .workspace:not(.home) button.primary,.game-layout .workspace:not(.home) .tabline button.active{border-color:#716b97;background:#7778a7;color:#fff}
.game-layout .workspace:not(.home) button.danger{border-color:#c68d8e;background:#f6e2e1;color:#904b52}
.game-layout .workspace:not(.home) input:not([type=checkbox]),.game-layout .workspace:not(.home) select,.game-layout .workspace:not(.home) textarea{border:1px solid #b8b4b3;border-radius:2px;background:#f5f2eb;color:#46434d}
.game-layout .workspace:not(.home) label{color:#625e68}
.game-layout .workspace:not(.home) .notice{border:1px solid #beb3ce;border-radius:3px;background:#e5dfed;color:#565164}
.game-layout .workspace:not(.home) th{color:#77718b}
.game-layout .workspace:not(.home) th,.game-layout .workspace:not(.home) td{border-color:#cdc9c4}
.game-layout .workspace:not(.home) .stats{gap:8px}
.game-layout .workspace:not(.home) .stat{min-width:0}
.game-layout .workspace:not(.home) .tabline{gap:5px;flex-wrap:wrap}
.game-layout .workspace:not(.home) .tabline button{padding:6px 11px}
.game-layout .workspace:not(.home) .actions button{padding:6px 9px;font-size:11px}
.game-layout .workspace:not(.home) .empty{border:1px dashed #aaa5ae;border-radius:3px;background:#e5e2dc;color:#77747a}
.game-layout .workspace:not(.home) .empty b{color:#5d586b}
.game-layout .workspace:not(.home) #toast{border:1px solid #666783;border-radius:3px;background:#7778a7;color:#fff}
.game-layout .workspace:not(.home) .home-shortcuts button{min-height:35px;border:0;background:transparent;color:#fff;box-shadow:none}
.game-layout .workspace:not(.home) .home-shortcuts button:hover{background:#ffffff24}
@media(max-width:650px){
 .game-layout .workspace:not(.home)>main{padding:8px 9px 16px}
 .game-page-banner{min-height:48px;margin-bottom:8px;padding:5px 8px;gap:7px}
 .game-page-symbol{width:31px;height:31px;flex-basis:31px;font-size:17px}
 .game-page-banner>div>small{font-size:7px}
 .game-page-banner h1{font-size:14px}
 .game-page-title-row{gap:7px}
 .game-page-title-row .group-create-top{min-height:25px;padding:4px 7px;font-size:9px}
 .game-page-meta{gap:2px;max-width:43%}
 .game-page-calendar-link{flex:0 0 25px}
 .game-page-date{max-width:calc(100% - 27px);padding-left:2px;font-size:8px;white-space:normal;text-align:right}
 .game-layout .workspace:not(.home) .panel{padding:11px;margin-bottom:9px}
 .game-layout .workspace:not(.home) h2{font-size:16px}
 .game-layout .workspace:not(.home) h3{font-size:13px}
 .game-layout .workspace:not(.home) .stats{grid-template-columns:1fr 1fr}
}

/* Cool lavender palette ties the management screens to the purple game HUD. */
.game-layout{background:#d4d4e8}
.game-layout>.workspace,.game-layout .workspace{background:#d9d9eb}
.game-layout .home-building{background:#c9c9de}
.home-task-panel{background:#c7c6dc;border-color:#7778a7}
.home-task-heading{background:#8586b9;color:#fff;border-color:#686a9a}
.home-task-heading small{color:#eeedfa}
.home-task-card{border-color:#b9b7d2;background:#eeedf8;color:#49475f}
.home-task-card:nth-child(even){background:#e5e4f2}
.home-task-card:hover{border-color:#8884b2;background:#d9d8eb}
.home-task-copy>b,.home-task-copy>strong{color:#48465e}
.home-task-copy>small{color:#77758b}
.game-layout .workspace:not(.home)>main{background:linear-gradient(135deg,#d7d7e9 0%,#e3e3f1 52%,#eeedf7 100%);scrollbar-color:#918fb7 #e4e3f0}
.game-page-banner{border-color:#74739f;background:linear-gradient(100deg,#7778a7,#8586b9 66%,#9695c1);box-shadow:0 3px 7px #38334d30}
.game-page-symbol{border-color:#b9b7d5;background:#a8a6c9;color:#fff}
.game-page-banner>div>small,.game-page-banner h1,.game-page-date{color:#fff}
.game-page-date{opacity:.9}
.game-layout .workspace:not(.home) .panel{border-color:#b9b7d2;background:#eeedf8;box-shadow:0 3px 7px #47445f1c}
.game-layout .workspace:not(.home) .card{border-color:#cac8df;background:#f7f6fc;box-shadow:0 2px 5px #47445f18}
.game-layout .workspace:not(.home) h2,.game-layout .workspace:not(.home) h3{color:#4c4967}
.game-layout .workspace:not(.home) p{color:#55536b}
.game-layout .workspace:not(.home) small,.game-layout .workspace:not(.home) .muted{color:#77758b}
.game-layout .workspace:not(.home) .pill{border-color:#c2bedc;background:#e5e2f2;color:#655d87}
.game-layout .workspace:not(.home) button{border-color:#bdbbd5;background:#f4f3fa;color:#514e69;box-shadow:0 1px 2px #47445f18}
.game-layout .workspace:not(.home) button:hover{border-color:#9894bd;background:#e5e3f2}
.game-layout .workspace:not(.home) button.primary,.game-layout .workspace:not(.home) .tabline button.active{border-color:#6d678f;background:#7778a7;color:#fff}
.game-layout .workspace:not(.home) button.danger{border-color:#c99baf;background:#f2e3ed;color:#854f67}
.game-layout .workspace:not(.home) input:not([type=checkbox]),.game-layout .workspace:not(.home) select,.game-layout .workspace:not(.home) textarea{border-color:#c3c0da;background:#f8f7fc;color:#49465d}
.game-layout .workspace:not(.home) label{color:#625e7d}
.game-layout .workspace:not(.home) .notice{border-color:#b9b4d5;background:#e7e4f3;color:#514d6c}
.game-layout .workspace:not(.home) th,.game-layout .workspace:not(.home) td{border-color:#cfcee2}
.game-layout .workspace:not(.home) th{color:#756f96}
.game-layout .workspace:not(.home) .empty{border-color:#bdbbd5;background:#eeedf8;color:#77758b}
.game-layout .workspace:not(.home) .empty b{color:#595571}
#nav-tooltip{position:fixed;z-index:1000;max-width:220px;padding:6px 10px;border:1px solid #aaa7cf;border-radius:4px;background:#494766;color:#fff;box-shadow:0 4px 12px #29243d55;font:700 11px/1.3 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;white-space:nowrap;pointer-events:none;transform:translateY(-50%)}
#nav-tooltip::before{content:"";position:absolute;left:-5px;top:50%;width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #494766;transform:translateY(-50%)}
#nav-tooltip.mobile{transform:translateX(-50%)}
#nav-tooltip.mobile::before{left:50%;top:-5px;border-top:0;border-right:5px solid transparent;border-bottom:5px solid #494766;border-left:5px solid transparent;transform:translateX(-50%)}
.game-layout #key-data .cash-stat{min-height:0;cursor:pointer;padding-right:22px;line-height:1.15}
.game-layout #key-data .cash-stat:hover,.game-layout #key-data .cash-stat:focus-visible{background:#7478a9}
.game-layout #key-data .cash-stat>span{position:absolute;right:8px;top:50%;transform:translateY(-50%);color:#fff;font-size:18px}
.game-layout #key-data .cash-label-compact{display:none}
@media(max-width:650px){.game-layout #key-data .cash-label-full{display:none}.game-layout #key-data .cash-label-compact{display:inline}}
.game-layout #key-data .reputation-stat{min-height:0;cursor:pointer;padding-right:22px;line-height:1.15}
.game-layout #key-data .reputation-stat:hover,.game-layout #key-data .reputation-stat:focus-visible{background:#7478a9}
.game-layout #key-data .reputation-stat>span{position:absolute;right:8px;top:50%;transform:translateY(-50%);color:#fff;font-size:18px}

/* Global visual hierarchy: bright plum-lilac chrome, warm cream work surfaces. */
:root{
 --blue:#654b79;
 --line:#dcc6a4;
 --muted:#806d80;
 color:#3c2b46;
 background:#9b88b1;
}
.game-layout{background:#8d78a3}
.game-layout>.sidebar{background:linear-gradient(180deg,#806892 0%,#6f597f 100%);box-shadow:2px 0 10px #39284345}
.game-layout .sidebar nav button{color:#f7ead4}
.game-layout .sidebar nav button:hover{background:#9278a3}
.game-layout .sidebar nav button.active{background:#a17da9;border-left-color:#f7d18c}
.game-layout>.workspace,.game-layout .workspace{background:#a995bd}
.game-layout #key-data{background:linear-gradient(100deg,#8a739f,#79638f 70%,#715a85);box-shadow:0 2px 9px #39284345}
.game-layout #key-data .stat{border-right-color:#e8d0b326}
.game-layout #key-data .stat::before{color:#f3c975}
.game-layout #key-data .stat small,.game-layout #key-data .stat b small{color:#eadcc7}
.game-layout .topbar{background:linear-gradient(100deg,#8a739f,#79638f 70%,#715a85);box-shadow:0 -2px 9px #39284345}
.game-layout #clock{background:#dc8877;color:#fffaf0;box-shadow:0 2px 0 #a45f68}
.game-layout #clock:hover{background:#e89a82}
.game-layout .time-track{background:#f4e6cc55}
.game-layout .time-track i{background:#f2c46f}
.game-layout .home-shortcuts button:hover{background:#fff0dc24}
.game-layout .home-shortcuts button small{color:#f4e6d1}
.game-layout .workspace:not(.home)>main{background:radial-gradient(ellipse at 90% 0%,#c2acd2 0%,transparent 44%),linear-gradient(145deg,#a993bd 0%,#9b86b3 68%,#ad98c1 100%);scrollbar-color:#816991 #af9bc2}
.game-page-banner{border:1px solid #997eaa;background:linear-gradient(105deg,#806893 0%,#735b87 58%,#68517e 100%);box-shadow:0 4px 12px #46334f35}
.game-page-symbol{border-color:#c18d91;background:#dc8877;color:#fff9ed}
.game-page-banner>div>small{color:#e5cfae}
.game-page-banner h1,.game-page-date{color:#fff5e5}
.game-page-date{opacity:.88}
.game-layout .workspace:not(.home) .panel{border-color:#e3cfae;border-radius:10px;background:#fff6e5;color:#382841;box-shadow:0 5px 16px #170e1d35}
.game-layout .workspace:not(.home) .card{border-color:#ead8b9;border-radius:9px;background:#fffaf0;color:#382841;box-shadow:0 3px 10px #170e1d25}
.game-layout .workspace:not(.home) h2,.game-layout .workspace:not(.home) h3{color:#49304f}
.game-layout .workspace:not(.home) p{color:#5e4b61}
.game-layout .workspace:not(.home) small,.game-layout .workspace:not(.home) .muted{color:#806d80}
.game-layout .workspace:not(.home) .pill{border-color:#e3c98e;background:#f5e5bd;color:#65445f}
.game-layout .workspace:not(.home) button{border-color:#d6c09f;border-radius:7px;background:#fffaf0;color:#4b3453;box-shadow:0 2px 4px #3b26330f}
.game-layout .workspace:not(.home) button:hover{border-color:#b38483;background:#f7e8d2}
.game-layout .workspace:not(.home) button.primary,.game-layout .workspace:not(.home) .tabline button.active{border-color:#755681;background:#795d87;color:#fff8e9;box-shadow:0 3px 8px #513b5c35}
.game-layout .workspace:not(.home) button.danger{border-color:#c77e78;background:#f8e3d7;color:#873c4b}
.game-layout .workspace:not(.home) input:not([type=checkbox]),.game-layout .workspace:not(.home) select,.game-layout .workspace:not(.home) textarea{border-color:#d9c3a2;border-radius:7px;background:#fffaf0;color:#3d2a45}
.game-layout .workspace:not(.home) input:focus-visible,.game-layout .workspace:not(.home) select:focus-visible,.game-layout .workspace:not(.home) textarea:focus-visible,.game-layout .workspace:not(.home) button:focus-visible{outline-color:#dc8b72}
.game-layout .workspace:not(.home) label{color:#5e4664}
.game-layout .workspace:not(.home) .notice{border-color:#d9bf8a;background:#f7e7c7;color:#574057}
.game-layout .workspace:not(.home) th{color:#806783}
.game-layout .workspace:not(.home) th,.game-layout .workspace:not(.home) td{border-color:#ead9bd}
.game-layout .workspace:not(.home) .empty{border-color:#d6c09f;background:#fff6e5;color:#806d80}
.game-layout .workspace:not(.home) .empty b{color:#49304f}
.game-layout .workspace:not(.home) #toast{border-color:#a77c94;border-radius:9px;background:#755681;color:#fff6e5;box-shadow:0 8px 24px #49354f4d}
.game-layout .home-building{background:#a18cae}
.home-task-panel{background:#e9d9bc;border-right-color:#806892;box-shadow:3px 0 12px #49354f38}
.home-task-heading{background:#806893;color:#fff5e5;border-bottom-color:#e49a80}
.home-task-heading small{color:#f2d9b5}
.home-task-card,.home-task-card:nth-child(even){border-color:#d3bd9d;background:#fff4dc;color:#49304f}
.home-task-card:hover{border-color:#dc8877;background:#ffedcf}
.home-task-copy>b,.home-task-copy>strong{color:#49304f}
.home-task-copy>small{color:#806d80}
.home-task-footer{background:#79628d;color:#fff7e8}
.home-task-floor{color:#f3c975}
.home-stage{background-color:#9b86ad}
.home-stage .building-toolbar{background:#fff4dfe8;border-color:#c5a77d;box-shadow:0 3px 10px #24152f45}
.home-stage .building-toolbar h2{color:#49304f}
.home-stage .building-toolbar p{color:#715b6b}
.home-stage .building-toolbar .actions button{border-color:#d6c09f;background:#fffaf0;color:#4b3453}
.home-stage .building-toolbar .actions button.primary{border-color:#795d87;background:#795d87;color:#fff8e9}
.game-layout .workspace:not(.home) .game-select-trigger{border-color:#d9c3a2;background:linear-gradient(180deg,#fffaf0,#f7ecd7);color:#49304f;box-shadow:inset 0 1px #fff9e9,0 2px 5px #38284112}
.game-layout .workspace:not(.home) .game-select-trigger:hover,.game-layout .workspace:not(.home) .game-select.open .game-select-trigger{border-color:#ad7a83;box-shadow:0 0 0 3px #d8786724}
.game-layout .workspace:not(.home) .game-select-trigger>span:not(.game-select-placeholder){background:#f2e2c4;color:#60435f}
.game-layout .workspace:not(.home) .game-select-trigger .game-select-placeholder{color:#907d88}
.game-layout .workspace:not(.home) .game-select-caret{color:#755375}
.game-layout .workspace:not(.home) .game-select-menu{border-color:#d9c3a2;background:#fff8e9;box-shadow:0 14px 32px #24152f55}
.game-layout .workspace:not(.home) .game-select-menu button{background:transparent;color:#604b64;box-shadow:none}
.game-layout .workspace:not(.home) .game-select-menu button:hover,.game-layout .workspace:not(.home) .game-select-menu button[aria-selected=true]{background:#f2e2c4;color:#49304f}
.game-layout .workspace:not(.home) .game-select-check{border-color:#d5bf9d;background:#fffaf0;color:#65436d}
.game-layout .workspace:not(.home) .game-select-menu button[aria-selected=true] .game-select-check{border-color:#b28a72;background:#e8c88d}
.game-layout .workspace:not(.home) .finance-dialog{border-color:#d9c3a2;background:#fff6e5;color:#382841}
.game-layout .workspace:not(.home) .finance-dialog::backdrop,.game-layout .workspace:not(.home) dialog::backdrop{background:#3a284c9e}
.game-layout .workspace:not(.home) .finance-dialog-header{border-color:#e3cfae;background:#fffaf0}
.game-layout .workspace:not(.home) .finance-dialog-body .stat,.game-layout .workspace:not(.home) .reputation-summary>div{border-color:#ead8b9;background:#fffaf0}
.game-layout .workspace:not(.home) .finance-dialog-body .stat b,.game-layout .workspace:not(.home) .reputation-summary b{color:#49304f}
.game-layout .workspace:not(.home) .reputation-next{color:#715b6b}
.game-layout .workspace:not(.home) .finance-category{border-color:#ead9bd}
.game-layout .workspace:not(.home) .cash-stat:hover,.game-layout .workspace:not(.home) .cash-stat:focus-visible,.game-layout .workspace:not(.home) .reputation-stat:hover,.game-layout .workspace:not(.home) .reputation-stat:focus-visible{background:#a17da9}
.game-layout .workspace:not(.home) .home-shortcuts button{background:transparent;color:#fff5e5}
.game-layout .workspace:not(.home) .home-shortcuts button:hover{background:#fff0dc24}
/* Project-drawn checkbox control, retaining the native input semantics and keyboard behavior. */
.game-layout .workspace input[type="checkbox"]{
 -webkit-appearance:none;
 appearance:none;
 position:relative;
 display:inline-grid;
 place-content:center;
 width:19px;
 height:19px;
 flex:0 0 19px;
 margin:0 2px 0 0;
 border:1.5px solid #a58aa0;
 border-radius:5px;
 background:linear-gradient(145deg,#fffaf0,#f1dfbf);
 box-shadow:inset 0 1px #fffdf7,0 2px 4px #50345b1a;
 vertical-align:middle;
 cursor:pointer;
 transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .12s ease;
}
.game-layout .workspace input[type="checkbox"]::before{
 content:"";
 width:8px;
 height:5px;
 border:solid #fff8e9;
 border-width:0 0 2px 2px;
 transform:translateY(-1px) rotate(-45deg) scale(.65);
 opacity:0;
 transition:opacity .12s ease,transform .12s ease;
}
.game-layout .workspace input[type="checkbox"]:hover{border-color:#dc8877;box-shadow:0 0 0 3px #dc887724}
.game-layout .workspace input[type="checkbox"]:active{transform:scale(.92)}
.game-layout .workspace input[type="checkbox"]:checked{border-color:#795d87;background:linear-gradient(145deg,#9675a3,#755681);box-shadow:inset 0 1px #ffffff30,0 2px 5px #513b5c38}
.game-layout .workspace input[type="checkbox"]:checked::before{opacity:1;transform:translateY(-1px) rotate(-45deg) scale(1)}
.game-layout .workspace input[type="checkbox"]:focus-visible{outline:3px solid #dc887766;outline-offset:2px}
.game-layout .workspace input[type="checkbox"]:disabled{cursor:not-allowed;opacity:.5;filter:saturate(.5)}
.game-layout .workspace .check{gap:8px;align-items:center;color:#5e4664}
#nav-tooltip{border-color:#d4ad92;background:#68517e;color:#fff5e5;box-shadow:0 5px 16px #39284345}
#nav-tooltip::before{border-right-color:#68517e}
#nav-tooltip.mobile::before{border-bottom-color:#68517e}
@media(max-width:650px){
 .game-layout>.sidebar{border-bottom-color:#a286ae}
 .game-layout .sidebar nav button.active{border-bottom-color:#f7d18c}
 .game-layout #key-data{height:88px}
 .game-layout #key-data .stat{border-bottom-color:#e8d0b326}
 .game-layout .workspace:not(.home)>main{background:linear-gradient(145deg,#a993bd,#9b86b3 72%,#ad98c1)}
}

/* Comeback workspace and release planner modal. */
.game-layout .comeback-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px;padding:14px 18px;border:1px solid #d8bf9b;border-radius:18px;background:linear-gradient(110deg,#fff7e7,#fffaf1 60%,#f6eafa);box-shadow:0 8px 22px #5b3d6410}
.game-layout .comeback-counts{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.game-layout .comeback-pending{border-color:#e8b19b;background:#fff0e5;color:#874c47}
.game-layout .comeback-toolbar button{width:auto;margin:0;min-width:142px}
.game-layout dialog.comeback-dialog{width:min(980px,calc(100% - 28px));max-width:980px;max-height:min(90dvh,920px);padding:0;overflow:hidden;border:1px solid #d8bf9b;border-radius:22px;background:#fff8e9;color:#49354f;box-shadow:0 26px 90px #34203b55;animation:comeback-dialog-in .2s cubic-bezier(.2,.75,.25,1) both}
.game-layout dialog.comeback-dialog::backdrop{background:#3625419c;backdrop-filter:blur(5px);animation:comeback-backdrop-in .18s ease both}
.game-layout .comeback-dialog-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;border-bottom:1px solid #e7d5b5;background:linear-gradient(110deg,#fff9ed,#f6eefa)}
.game-layout .comeback-dialog-head .eyebrow{font-size:10px;letter-spacing:.16em;color:#8a6c91}
.game-layout .comeback-dialog-head h2{margin:4px 0 0;font-size:22px;color:#503653}
.game-layout .comeback-dialog-head button{width:38px;height:38px;flex:0 0 38px;margin:0;padding:0;border:1px solid #dfc9ac;border-radius:12px;background:#fff8ed;color:#674d70;font-size:25px;line-height:1;transition:transform .16s ease,background .16s ease}
.game-layout .comeback-dialog-head button:hover{transform:rotate(90deg);background:#f7e9e1}
.game-layout .comeback-dialog-body{max-height:calc(min(90dvh,920px) - 76px);overflow:auto;padding:20px 24px 26px;overscroll-behavior:contain}
.game-layout .comeback-dialog-body>.panel{margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.game-layout .comeback-dialog-body>.panel>.panel-head{padding:0 0 14px;border:0;background:transparent}
.game-layout .comeback-dialog-body .release-planner{padding:0}
.game-layout .comeback-dialog-body form>label,.game-layout .comeback-dialog-body .form-grid{margin-bottom:14px}
.game-layout .comeback-dialog-body details.release-week{margin:12px 0}
.game-layout .comeback-dialog-body .release-appearance-grid{max-height:360px;overflow:auto;padding:8px}
@keyframes comeback-dialog-in{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes comeback-backdrop-in{from{opacity:0}to{opacity:1}}
@media(max-width:650px){
 .game-layout .comeback-toolbar{align-items:stretch;flex-direction:column;padding:12px}
 .game-layout .comeback-toolbar button{width:100%}
 .game-layout dialog.comeback-dialog{width:calc(100% - 18px);max-height:94dvh;border-radius:18px}
 .game-layout .comeback-dialog-head{padding:14px 16px}
 .game-layout .comeback-dialog-body{max-height:calc(94dvh - 68px);padding:16px}
}
@media(prefers-reduced-motion:reduce){.game-layout dialog.comeback-dialog,.game-layout dialog.comeback-dialog::backdrop{animation:none}.game-layout .comeback-dialog-head button{transition:none}}
.game-layout .comeback-dialog-body .release-cost-summary{border-color:#e3cfad;background:linear-gradient(125deg,#fff3dc,#fbf1e7);color:#5a405d}
.game-layout .comeback-dialog-body .release-physical-config{border-color:#e3cfad;background:#fff8e9}

/* Keep the running comeback estimate pinned to the lower-left of each planner modal. */
.game-layout dialog.comeback-dialog,.game-layout dialog.release-detail-dialog{display:flex;flex-direction:column}
.game-layout .comeback-dialog-body{flex:1 1 auto;min-height:0;max-height:none}
.game-layout .release-budget-dock{position:relative;z-index:3;align-self:flex-start;display:grid;grid-template-columns:auto auto;align-items:baseline;gap:2px 12px;min-width:230px;max-width:min(480px,calc(100% - 32px));margin:0 0 14px 20px;padding:10px 14px;border:1px solid #e7a5ad;border-radius:12px;background:#fff7f5;box-shadow:0 6px 20px #6d15241c}
.game-layout .release-budget-dock>span{color:#8b3b47;font-size:11px;font-weight:700}
.game-layout .release-budget-dock>b{color:#bd2638;font-size:22px;font-weight:900;line-height:1.2;font-variant-numeric:tabular-nums}
.game-layout .release-budget-dock>small{grid-column:1/-1;max-width:440px;color:#8b666a;font-size:10px;line-height:1.45}
.game-layout dialog.release-detail-dialog .group-dialog-body{flex:1 1 auto;min-height:0;max-height:none}
.game-layout dialog.release-detail-dialog .release-budget-dock{margin:0 0 14px 20px}
@media(max-width:650px){
 .game-layout .comeback-dialog-head{flex:0 0 auto}
 .game-layout .comeback-dialog-body{flex:1 1 auto;min-height:0}
 .game-layout .release-budget-dock{min-width:210px;max-width:calc(100% - 24px);margin:0 0 10px 12px;padding:9px 11px}
 .game-layout .release-budget-dock>b{font-size:20px}
 .game-layout dialog.release-detail-dialog .release-budget-dock{margin-left:12px}
}

/* iPad: show route names and keep controls reachable by touch in landscape. */
@media (min-width:651px) and (max-width:1100px){
 .game-layout{--tablet-nav-height:50px;--tablet-bottom-height:50px}
 .game-layout>.sidebar{inset:var(--hud-top-height) 0 auto 0;width:100%;height:var(--tablet-nav-height);padding:0;display:flex;border-bottom:1px solid #aa8cb8;background:#79618f;box-shadow:0 2px 8px #39284345}
 .game-layout .sidebar nav{width:100%;height:100%;flex-direction:row;justify-content:flex-start;gap:2px;padding:3px 8px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .game-layout .sidebar nav button{width:auto;min-width:76px;height:44px;min-height:44px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 8px;border-left:0;border-radius:5px;font-size:10px;white-space:nowrap}
 .game-layout .sidebar nav button.active{border-left:0;border-bottom:3px solid #f7d18c}
 .game-layout .sidebar nav button .sidebar-logo{width:22px;height:22px;flex:0 0 22px}
 .game-layout>.workspace,.game-layout .workspace{width:100%;margin:0}
 .game-layout .workspace>main{inset:calc(var(--hud-top-height) + var(--tablet-nav-height)) 0 var(--tablet-bottom-height) 0}
 .game-layout .topbar{height:var(--tablet-bottom-height)}
 .game-layout #clock,.game-layout .speed-toggle,.game-layout .home-shortcuts button{min-height:44px}
 .game-layout .home-shortcuts button{min-width:44px}
 .game-layout .home-stage .building-room-label{left:4px;right:4px;bottom:4px;display:flex;padding:3px 5px;border-radius:3px;font-size:9px}
 .game-layout .home-stage .building-room-label small{font-size:8px}
 .game-layout dialog{max-height:calc(100dvh - 28px)}
 .game-layout dialog input,.game-layout dialog select,.game-layout dialog textarea{font-size:16px}
 .game-layout .workspace:not(.home)>main,.game-layout .sidebar nav,.game-layout dialog{-webkit-overflow-scrolling:touch}
 #nav-tooltip{display:none!important}
}
