/* Shared, task-focused controls. Each game's palette and simulation stay its own. */
body{--deck-bg:#ece4ce;--deck-ink:#302f26;--deck-line:#bdb8a0;--deck-accent:#31594b;--deck-on-accent:#fff8e6}
body[data-game=harbor-co]{--deck-bg:#1c3241;--deck-ink:#e1ebed;--deck-line:#526e7d;--deck-accent:#d8b773;--deck-on-accent:#192e3c}
body[data-game=cinema-tycoon]{--deck-bg:#222a2e;--deck-ink:#f1e4ca;--deck-line:#575d59;--deck-accent:#d9bb83;--deck-on-accent:#222a2e}
body[data-game=venture-office]{--deck-bg:#23494f;--deck-ink:#eff0dc;--deck-line:#668b85;--deck-accent:#e2bd76;--deck-on-accent:#173a3f}
[hidden]{display:none!important}
.has-control-deck{display:flex!important;flex-direction:column;overflow:hidden!important;padding:0!important;min-height:0;min-width:0}
.control-deck{display:flex;flex-direction:column;min-height:0;flex:1;background:var(--deck-bg);color:var(--deck-ink);text-shadow:none}
.deck-heading{padding:14px 18px 0;flex:none}
.deck-heading:empty{display:none}
.deck-heading h2{font-size:22px;margin:0 0 8px}
.deck-heading .intro{font-size:11px;margin:0 0 12px;line-height:1.45}
.deck-heading .panel-department,.deck-heading .department{font-size:9px;margin-bottom:6px}
.deck-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:12px 14px;border-bottom:1px solid var(--deck-line);flex:none}
.deck-tabs button{min-width:0;min-height:37px;padding:7px 5px;font:600 11px/1.3 Arial,sans-serif;letter-spacing:0;text-transform:none;color:var(--deck-ink);background:transparent;border:1px solid var(--deck-line);border-radius:5px;box-shadow:none;text-shadow:none;white-space:normal}
.deck-tabs button[aria-selected=true]{background:var(--deck-accent);color:var(--deck-on-accent);border-color:var(--deck-accent)}
.deck-tabs button:focus-visible,.deck-pager button:focus-visible,.play-view-switch button:focus-visible{outline:3px solid var(--deck-accent);outline-offset:2px}
.deck-common{flex:none;padding:0 14px}.deck-common:empty{display:none}
.deck-body{min-height:0;flex:1;overflow-y:auto;overflow-x:hidden;padding:15px 18px;scrollbar-width:thin;overscroll-behavior:contain}
.deck-body>[data-control-section]{outline:none;min-width:0}
.deck-body section:first-child,.deck-body .section:first-child{margin-top:0;padding-top:0;border-top:0}
.deck-body .card:first-child,.deck-body article:first-child{margin-top:0}
.deck-body button:not(.table-link){min-height:36px}
.deck-body p{line-height:1.55}
.deck-body .room-art{max-height:100px;width:100%;object-fit:contain}
.deck-body .mach-diagram{height:70px;width:100%}
.deck-body .poster{height:95px;min-height:0}
.deck-body .ship-art{max-height:75px}
.deck-pager{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px;padding:0 0 10px;border-bottom:1px solid var(--deck-line)}
.deck-pager button{font:600 11px Arial,sans-serif;min-height:34px;padding:6px 9px;color:var(--deck-ink);border:1px solid var(--deck-line);background:transparent;box-shadow:none;text-shadow:none;border-radius:4px}
.deck-pager span{font:11px Arial,sans-serif;white-space:nowrap;color:var(--deck-ink)}
.deck-pager button:disabled{opacity:.35;cursor:default}
.cargo-quick{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:0 0 12px}
.cargo-quick button{font-size:11px;padding:6px}
.cargo-quick button.active{background:var(--deck-accent);color:var(--deck-on-accent)}
body[data-game=toothpaste-tycoon] .inspector,body[data-game=cinema-tycoon] aside{width:clamp(340px,34vw,470px);min-height:0}
body[data-game=grand-hotel] aside,body[data-game=harbor-co] aside,body[data-game=ironworks] aside{width:clamp(350px,35vw,480px);height:auto;min-height:0}
body[data-game=toothpaste-tycoon] #game,body[data-game=cinema-tycoon] #game{height:100dvh;min-height:0}
body[data-game=toothpaste-tycoon] .rail{padding-top:5px;gap:3px}
body[data-game=toothpaste-tycoon] .rail button{padding:9px 3px}
body[data-game=cinema-tycoon] #tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;flex:none}
body[data-game=cinema-tycoon] #tabs button{white-space:normal;min-width:0;min-height:42px;font-size:11px}
body[data-game=cinema-tycoon] .panel-heading,body[data-game=toothpaste-tycoon] .panel-title{padding:12px 18px;flex:none}
body[data-game=cinema-tycoon] .panel-heading h2,body[data-game=toothpaste-tycoon] .panel-title h2{font-size:23px}
body[data-game=grand-hotel] nav{overflow:visible;height:auto;min-height:48px}
body[data-game=grand-hotel] nav button{flex:1;min-width:0;padding:8px 4px;white-space:normal;font-size:11px}
body[data-game=harbor-co] .workspace>nav,body[data-game=ironworks] .workspace>nav{overflow:visible;gap:3px;padding:6px 4px}
body[data-game=harbor-co] .workspace>nav button,body[data-game=ironworks] .workspace>nav button{min-height:54px;padding:7px 2px}
.play-view-switch{display:none}
/* Venture Office uses the available screen instead of shrinking an 800px desktop. */
body[data-game=venture-office] #screen{position:relative;inset:auto;transform:none;width:100%;height:100dvh;border:0}
body[data-game=venture-office] #app{width:100%;height:100%;display:flex;flex-direction:column;background:#183d43}
body[data-game=venture-office] header{position:relative;inset:auto;flex:none;width:100%;height:auto;border:0}
body[data-game=venture-office] #nav{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));height:auto;padding:7px;gap:5px}
body[data-game=venture-office] #nav button{height:auto;min-height:52px;padding:7px 3px;font-size:11px;color:#f2edcc}
body[data-game=venture-office] #nav .icon{width:19px;height:19px;margin-bottom:5px}
body[data-game=venture-office] .workspace{position:relative;inset:auto;display:flex;width:100%;height:auto;flex:1;min-height:0}
body[data-game=venture-office] #world{position:relative;inset:auto;flex:1;min-width:0}
body[data-game=venture-office] #panel,body[data-game=venture-office] #panel[data-view]{position:relative!important;inset:auto!important;width:clamp(360px,40vw,540px);max-height:none;flex:none;padding:0;border:0;border-left:2px solid #668b85;box-shadow:none}
body[data-game=venture-office] #panel.open{display:flex}
body[data-game=venture-office] #panel-head{height:auto;min-height:40px;padding:11px 36px 9px 15px;margin:0;cursor:default;background:#193c42}
body[data-game=venture-office] #panel-head h1{font:600 18px Georgia,serif}
body[data-game=venture-office] .mobile-panel-close{display:block;right:8px;top:6px}
body[data-game=venture-office] footer{position:relative;inset:auto;width:100%;height:60px;flex:none}
body[data-game=venture-office] .scene-bottom{opacity:1;left:8px;right:8px;bottom:10px;flex-wrap:wrap;justify-content:space-between;gap:8px}
body[data-game=venture-office] .scene-bottom button{min-height:34px;min-width:34px;font-size:11px}
body[data-game=venture-office] .catalog-scroll,body[data-game=venture-office] .record-list,body[data-game=venture-office] .member-list,body[data-game=venture-office] .message-list{height:auto;max-height:none;overflow:visible}
body[data-game=venture-office] .category-grid,body[data-game=venture-office] .build-grid,body[data-game=venture-office] .catalog-categories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
body[data-game=venture-office] .category-grid button,body[data-game=venture-office] .build-grid button,body[data-game=venture-office] .catalog-categories button{height:auto;min-height:74px;padding:6px;width:auto}
body[data-game=venture-office] .catalog-categories button:last-child{grid-column:auto;width:auto}
body[data-game=venture-office] .category-grid canvas,body[data-game=venture-office] .catalog-categories canvas{height:50px;width:100%;object-fit:contain}
body[data-game=venture-office] .build-item>.object-icon{height:auto}
body[data-game=venture-office] .build-item canvas{width:100%;height:70px;object-fit:contain}
body[data-game=venture-office] .build-item strong,body[data-game=venture-office] .build-item small{display:block}
body[data-game=venture-office] .catalog-selection{font-size:12px;line-height:1.5;padding:10px}
body[data-game=venture-office] .catalog-footer{display:flex;gap:8px;margin-top:9px}
body[data-game=venture-office] .member-tabs{height:auto;gap:5px;margin:0 0 12px}
body[data-game=venture-office] .member-tabs button{width:auto;flex:1;min-height:38px;padding:5px;font-size:11px}
body[data-game=venture-office] .member-list button{height:auto;min-height:34px;font-size:11px}
body[data-game=venture-office] .classic-table{font-size:12px;line-height:1.7}
body[data-game=venture-office] .classic-table td,body[data-game=venture-office] .classic-table th{padding:6px 4px;white-space:normal}
body[data-game=venture-office] .member-layout{grid-template-columns:145px minmax(0,1fr)}
body[data-game=venture-office] .deck-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
body[data-game=venture-office] .deck-pager{grid-column:1/-1}
@media(max-width:900px){
 body[data-game=venture-office] #nav{grid-template-columns:repeat(5,minmax(0,1fr))}
 body[data-game=venture-office] #nav button{display:flex;align-items:center;justify-content:center;gap:5px;min-height:38px;font-size:10px}
 body[data-game=venture-office] #nav .icon{margin:0;width:16px;height:16px}
 body[data-game=grand-hotel] .op-result,body[data-game=ironworks] #profit{display:none}
}
@media(max-width:760px),(max-width:1000px) and (max-height:540px){
 html,body{overflow:hidden;height:100%}
 .play-view-switch{display:flex;flex:none;gap:5px;padding:6px 10px;background:var(--deck-bg);border-bottom:1px solid var(--deck-line);order:0}
 .play-view-switch button{flex:1;min-height:32px;font:600 12px Arial,sans-serif;background:transparent;border:1px solid var(--deck-line);border-radius:4px;color:var(--deck-ink);box-shadow:none;text-shadow:none}
 .play-view-switch button[aria-pressed=true]{background:var(--deck-accent);color:var(--deck-on-accent)}
 .deck-heading{padding:10px 14px 0}.deck-heading .intro{display:none}.deck-heading h2{font-size:20px;margin-bottom:4px}
 .deck-tabs{padding:9px 12px;gap:5px}.deck-tabs button{min-height:38px;font-size:11px}
 .deck-body{padding:12px 15px}.deck-body button:not(.table-link){min-height:40px}
 body[data-game=toothpaste-tycoon] .body,body[data-game=cinema-tycoon] .body,body[data-game=harbor-co] .workspace,body[data-game=ironworks] .workspace,body[data-game=grand-hotel]>main,body[data-game=venture-office] .workspace{flex-direction:column;flex-wrap:nowrap;min-height:0;flex:1;overflow:hidden}
 body[data-game=toothpaste-tycoon] .rail,body[data-game=harbor-co] .workspace>nav,body[data-game=ironworks] .workspace>nav,body[data-game=grand-hotel]>nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;height:auto;flex:none;order:0;padding:5px;gap:3px;position:relative;top:auto;overflow:visible}
 body[data-game=toothpaste-tycoon] .rail button,body[data-game=harbor-co] .workspace>nav button,body[data-game=ironworks] .workspace>nav button,body[data-game=grand-hotel]>nav button{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:35px;padding:5px 3px;font-size:10px;white-space:normal}
 body[data-game=toothpaste-tycoon] .rail button svg,body[data-game=harbor-co] .workspace>nav button svg,body[data-game=ironworks] .workspace>nav button svg,body[data-game=grand-hotel]>nav button svg{width:15px;height:15px;margin:0;flex:none}
 body[data-game=toothpaste-tycoon] .inspector,body[data-game=cinema-tycoon] aside,body[data-game=grand-hotel] aside,body[data-game=harbor-co] aside,body[data-game=ironworks] aside,body[data-game=venture-office] #panel,body[data-game=venture-office] #panel[data-view]{width:100%;height:auto;min-height:0;flex:1;border-left:0;order:2;max-height:none}
 body[data-mobile-view=controls][data-game=toothpaste-tycoon] .body>.workspace,body[data-mobile-view=controls][data-game=cinema-tycoon] .body>.left,body[data-mobile-view=controls][data-game=grand-hotel] .hotel-world,body[data-mobile-view=controls][data-game=harbor-co] .workspace>main,body[data-mobile-view=controls][data-game=ironworks] .workspace>main,body[data-mobile-view=controls][data-game=venture-office] #world{display:none}
 body[data-mobile-view=world] aside,body[data-mobile-view=world] #panel{display:none!important}
 body[data-mobile-view=world][data-game=toothpaste-tycoon] .body>.workspace,body[data-mobile-view=world][data-game=cinema-tycoon] .body>.left,body[data-mobile-view=world][data-game=grand-hotel] .hotel-world,body[data-mobile-view=world][data-game=harbor-co] .workspace>main,body[data-mobile-view=world][data-game=ironworks] .workspace>main,body[data-mobile-view=world][data-game=venture-office] #world{display:flex;flex-direction:column;flex:1;width:100%;height:auto;min-height:0;order:1}
 body[data-game=toothpaste-tycoon] .topbar,body[data-game=cinema-tycoon] #game>header{height:68px;min-height:68px;padding-right:9px;gap:9px}
 body[data-game=toothpaste-tycoon] .topbar .wide,body[data-game=cinema-tycoon] header .optional{display:none}
 body[data-game=cinema-tycoon] .brand{min-width:0}.brand small{letter-spacing:.5px}
 body[data-game=cinema-tycoon] .brand strong{font-size:15px;letter-spacing:0}
 body[data-game=cinema-tycoon] .back{width:40px;height:67px;flex:none}
 body[data-game=cinema-tycoon] .stat{padding-left:5px}.stat b{font-size:16px}
 body[data-game=cinema-tycoon] .time button{padding:5px 7px}
 body[data-game=grand-hotel] #operations-bar,body[data-game=ironworks] .operations{display:none}
 body[data-game=grand-hotel] header,body[data-game=harbor-co] header,body[data-game=ironworks] header{min-height:64px;height:64px;padding:7px 10px;gap:8px}
 body[data-game=grand-hotel] header .metrics>div:not(:first-child),body[data-game=harbor-co] header .metrics>div:not(:first-child),body[data-game=ironworks] header .metrics>div:not(:first-child){display:none}
 body[data-game=grand-hotel] footer,body[data-game=harbor-co] footer,body[data-game=ironworks] footer{min-height:46px;height:auto;flex:none;padding:6px 10px}
 body[data-game=grand-hotel] footer #news,body[data-game=harbor-co] footer #ticker,body[data-game=ironworks] footer #news{display:none}
 body[data-game=venture-office] #panel:not(.open){display:flex}
 body[data-game=venture-office] .mobile-panel-close{display:none}
 body[data-game=venture-office] .member-layout{grid-template-columns:125px minmax(0,1fr)}
 body[data-game=toothpaste-tycoon] .jess{max-height:160px}
}
@media(max-height:540px) and (min-width:761px){
 .deck-heading .intro{display:none}.deck-heading h2{font-size:18px}.deck-tabs{padding:7px 10px}.deck-tabs button{min-height:31px}.deck-body{padding:10px 14px}
 body[data-game=toothpaste-tycoon] .rail button,body[data-game=harbor-co] .workspace>nav button,body[data-game=ironworks] .workspace>nav button{min-height:35px;padding:4px 2px;font-size:9px}
 body[data-game=toothpaste-tycoon] .rail button svg,body[data-game=harbor-co] .workspace>nav button svg,body[data-game=ironworks] .workspace>nav button svg{width:16px;height:16px;margin-bottom:2px}
}
body[data-game=venture-office] .modal:not(.onboarding){position:fixed;inset:0;background:#082b35a8;padding:15px;z-index:50}
body[data-game=venture-office] .modal-card:not(.onboarding .modal-card){width:min(680px,100%);max-height:calc(100dvh - 30px);background:#23494f;color:#eff0dc;border:1px solid #668b85;padding:20px;box-shadow:0 18px 80px #0006}
body[data-game=venture-office] .modal-head{height:auto;min-height:35px;margin:0 0 12px;padding:0 36px 8px 0;background:none;flex:none}
body[data-game=venture-office] .modal-head h2{font:24px Georgia,serif;background:none;text-shadow:none;line-height:1.2}
body[data-game=venture-office] .modal-card.with-deck{display:flex;flex-direction:column;height:min(750px,calc(100dvh - 30px));overflow:hidden;padding:16px 0 0}
body[data-game=venture-office] .modal-card.with-deck>.modal-head,body[data-game=venture-office] .modal-card.with-deck>.intro{margin-left:16px;margin-right:16px;flex:none}
body[data-game=venture-office] .dialog-controls{display:flex;min-height:0;flex:1}
body[data-game=venture-office] .project-options{padding:12px 0;border-block:1px solid var(--deck-line);margin:12px 0}
body[data-game=venture-office] .project-options summary{cursor:pointer;font-weight:bold;min-height:28px}
@media(max-width:760px),(max-width:1000px) and (max-height:540px){
 body[data-game=venture-office] .onboarding{position:fixed;inset:0;padding:12px;overflow:auto}
 body[data-game=venture-office] .onboarding .modal-card{width:100%;height:auto;min-height:0;max-height:calc(100dvh - 24px);overflow:auto;padding:18px}
 body[data-game=venture-office] .onboarding .modal-card:before{display:none}
 body[data-game=venture-office] .start-brand{position:static;font-size:27px;margin-bottom:18px}
 body[data-game=venture-office] .start-panel{position:static;width:100%;height:auto;padding:12px}
 body[data-game=venture-office] .start-panel .form-actions{position:static;width:auto;height:auto;flex-direction:row;background:transparent;padding:10px 0;margin:0;gap:10px}
 body[data-game=venture-office] .start-panel .form-actions button{min-height:40px;color:#fff3c2;background:#315a55;padding:9px;text-shadow:none;border:1px solid #8ba68f}
 body[data-game=venture-office] .reference-note{position:static;margin-top:12px}
 body[data-game=venture-office] .modal-card>.intro{font-size:11px;line-height:1.4;margin-bottom:4px}
}
body[data-game=ironworks] #modal{display:flex;align-items:center;justify-content:center}
body[data-game=ironworks] #modal-card{min-width:0;width:min(650px,100%)}
body[data-game=harbor-co] .deck-body .trade-box{margin-top:0;padding:10px}
body[data-game=harbor-co] .deck-body .notice{padding:10px;margin-bottom:10px}
body[data-game=harbor-co] .deck-body .notice p{margin:5px 0;line-height:1.4}
body[data-game=harbor-co] .deck-body .trade-box .quantity-presets{margin:7px 0}
body[data-game=ironworks] [data-control-section="Upgrades & service"]>button{width:100%;margin-top:12px}
@media(max-width:760px),(max-width:1000px) and (max-height:540px){
 body[data-game=toothpaste-tycoon] .body,body[data-game=cinema-tycoon] .body,body[data-game=harbor-co] .workspace,body[data-game=ironworks] .workspace,body[data-game=grand-hotel]>main,body[data-game=venture-office] .workspace{display:flex}
 body[data-game=harbor-co] #operations-bar{display:none}
}
body[data-game=venture-office] .office-session{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 14px;background:#16383d;border-bottom:1px solid #668b85;flex:none;min-height:49px}
body[data-game=venture-office] .office-session button{min-height:32px;min-width:32px;font-size:11px}
body[data-game=venture-office] .office-cash{font-size:10px;color:#c5d5c5;white-space:nowrap}
body[data-game=venture-office] .office-cash strong{font:19px Georgia,serif;display:inline-block;color:#fff1c5;margin-left:6px}
body[data-game=venture-office] .office-session #date{font-size:11px;font-weight:normal}
body[data-game=venture-office] footer .clock{display:none}
@media(max-width:760px),(max-width:1000px) and (max-height:540px){body[data-game=venture-office] .office-session{padding:7px 9px;gap:6px}body[data-game=venture-office] .office-session #date{display:none}body[data-game=venture-office] .office-cash strong{font-size:18px}}

/* A landscape phone keeps one useful working area instead of two tiny panes. */
@media(max-width:1000px) and (max-height:540px){
 body[data-game] header,body[data-game=toothpaste-tycoon] .topbar,body[data-game=cinema-tycoon] #game>header{height:46px;min-height:46px}
 body[data-game=venture-office] header{height:auto;min-height:0}
 body[data-game=venture-office] #nav{grid-template-columns:repeat(10,minmax(0,1fr));padding:4px;gap:3px}
 body[data-game=venture-office] #nav button{min-height:32px;padding:3px;font-size:9px}
 body[data-game=venture-office] .office-session{min-height:37px;padding:3px 10px}
 .play-view-switch{padding:3px 10px}.play-view-switch button{min-height:28px}
 body[data-game=toothpaste-tycoon] .rail,body[data-game=harbor-co] .workspace>nav,body[data-game=ironworks] .workspace>nav,body[data-game=grand-hotel]>nav{grid-template-columns:repeat(7,minmax(0,1fr));padding:3px;gap:3px}
 body[data-game=cinema-tycoon] #tabs{grid-template-columns:repeat(8,minmax(0,1fr));padding:3px}
 body[data-game=cinema-tycoon] #tabs button,body[data-game=toothpaste-tycoon] .rail button,body[data-game=harbor-co] .workspace>nav button,body[data-game=ironworks] .workspace>nav button,body[data-game=grand-hotel]>nav button{min-height:30px;padding:3px;font-size:10px}
 .deck-heading{padding:5px 12px 0}.deck-heading h2{font-size:17px}
 .deck-tabs{display:flex;flex-wrap:wrap;padding:5px 10px}.deck-tabs button{flex:1;min-height:30px}
 body[data-game=cinema-tycoon] .panel-heading,body[data-game=toothpaste-tycoon] .panel-title{padding:6px 12px}
 body[data-game=cinema-tycoon] .panel-heading small,body[data-game=toothpaste-tycoon] .panel-title small,.deck-heading .department,.deck-heading .panel-department{display:none}
 body[data-game=cinema-tycoon] .panel-heading h2,body[data-game=toothpaste-tycoon] .panel-title h2{font-size:18px}
 body[data-game=grand-hotel] footer,body[data-game=harbor-co] footer,body[data-game=ironworks] footer{height:32px;min-height:32px;padding:3px 10px}
 body[data-game=venture-office] footer{height:36px}
 body[data-game=venture-office] #panel-head{min-height:31px;padding:7px 12px}
 body[data-game=cinema-tycoon] .theater-heading{margin:8px 18px}.show-strip{margin-bottom:0}
 body[data-game=cinema-tycoon] .manager,body[data-game=cinema-tycoon] .day-ledger{display:none}
 body[data-game=cinema-tycoon] canvas{flex:1;min-height:0;max-height:none}
}
