/* Paper Front's command hierarchy: production at right, selected-unit orders below. */
#battle,.art,.research-art{filter:none!important}
#productionCategories{display:flex!important;order:1!important;gap:3px!important;height:38px!important;min-height:38px!important;flex:0 0 38px!important;padding:2px 5px!important;border:0}
#productionCategories[hidden]{display:none!important}#productionCategories button{font-size:10px!important;min-height:34px!important;height:34px;flex:1;min-width:0;padding:2px!important}
#game #cards{order:2}#productionPages{order:3;display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:11px;padding:0 6px;flex:0 0 40px}#productionPages[hidden]{display:none!important}#productionPages button{width:38px;min-height:36px;font-size:22px}
#queueTray{display:none}#radarTray[hidden],#commandBar[hidden],.category-concealed{display:none!important}
#cardPage .card{position:relative}.card .requirement{font-size:9px;color:#733f2c;font-weight:600;line-height:1.1}.card .card-queue-badge{position:absolute;right:5px;top:4px;background:#334a3f;color:#fff;min-width:24px;padding:2px;font-size:12px}.card-queue-badge[hidden]{display:none!important}
#game button.active,#game button.chosen{background-image:linear-gradient(#d8dccbbd,#d8dccbbd),url('paper-ui.png')!important;box-shadow:inset 0 -3px #556549!important;color:#182819!important}#game[data-faction=circuit]{--faction-accent:#337c87}#game[data-faction=ash]{--faction-accent:#985140}#game{--faction-accent:#606b45}
#game.dock-open,#game.army-context.dock-open{grid-template-rows:52px minmax(0,1fr) 318px}
@media(max-width:600px){#game.dock-open,#game.army-context.dock-open{grid-template-rows:48px minmax(0,1fr) 300px}#commandContextText{font-size:11px}}
@media(max-height:500px){#game.dock-open,#game.army-context.dock-open{grid-template-rows:44px minmax(0,1fr) 258px}#game.dock-open #commandContext{min-height:36px;flex-basis:36px}#game.dock-open #commandContext button{min-height:32px}#productionCategories{height:34px!important;min-height:34px!important;flex-basis:34px!important}}
#game.command-desktop,#game.command-desktop.dock-open,#game.command-desktop.army-context,#game.command-desktop.tools-open,#game.command-desktop.has-building{grid-template:52px minmax(0,1fr) 104px/minmax(0,1fr) 288px!important;gap:0;padding:0}
.command-desktop header{grid-column:1/-1;grid-row:1;padding:4px 14px;border:0;border-bottom:1px solid #514f43;background:#e7e2d5 url('paper-ui.png') center/cover}.command-desktop header .resources{gap:28px}.command-desktop header .resources strong{font-size:17px;font-weight:600}.command-desktop header .resources small{font-size:10px;color:#57594e}
.command-desktop #field{grid-row:2;grid-column:1;border:0;min-width:0;min-height:0}.command-desktop #panel{grid-row:2/4;grid-column:2;border:0;border-left:2px solid #5c6150;background:#dedbcd url('paper-ui.png') center/cover;padding:8px;display:flex;gap:5px;min-height:0}
.command-desktop #panel .panel-heading,.command-desktop #quickArmy{display:none!important}.command-desktop #panel>nav:not(#productionCategories){order:0!important;display:flex!important;flex:0 0 42px!important;min-height:42px!important;height:42px!important;padding:0!important;gap:4px}.command-desktop #panel>nav:not(#productionCategories) button{font-size:12px;min-height:40px;padding:4px;max-width:none;min-width:0}
.command-desktop #radarTray{order:-1;position:relative;display:flex;align-items:center;flex-direction:column;flex:0 0 151px;gap:5px;padding:4px 0 8px;border-bottom:1px solid #969782}.desk-caption{font:10px 'IBM Plex Mono',monospace;letter-spacing:1.5px;color:#5f6254}
#game.command-desktop #minimap{position:static!important;inset:auto!important;width:154px!important;height:124px!important;margin:0;border:1px solid #5a6450;transform:none!important;box-shadow:0 1px 3px #4444}
#game.command-desktop #cards{display:flex!important;flex:1 1 0!important;min-height:116px!important;max-height:none!important;padding:0!important;animation:none!important;overflow:hidden!important}#game.command-desktop #cards::after{display:none}
#game.command-desktop #cardPage{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:110px;align-content:start;gap:6px;padding:2px!important;height:100%;width:100%;overflow:hidden!important;cursor:default;touch-action:manipulation}
#game.command-desktop #cardPage .card{min-width:0!important;width:100%;max-width:none!important;min-height:0!important;height:110px;max-height:110px;display:flex;flex-direction:column;justify-content:center;gap:2px;padding:4px!important;border:0!important;transform:none!important;background-color:#eeeadd!important}.command-desktop #cardPage .card .art{height:58px;min-height:30px;max-height:60px;width:110px;flex:1}.command-desktop #cardPage .card b{font-size:11px;line-height:1.1}.command-desktop #cardPage .card .cost{font-size:10px}.command-desktop #cardPage .page-concealed{display:none!important}
.command-desktop #queueTray{order:4;display:flex;flex-direction:column;gap:3px;min-height:40px;flex:0 0 auto;border-top:1px solid #929681;padding-top:3px}.command-desktop #queueTray .queue-overview{font-size:11px;min-height:34px;height:34px;text-align:left;padding:4px 8px}.queue-slots{display:flex;gap:3px}.queue-slots button{width:40px;height:46px;min-height:46px;position:relative;display:flex;flex-direction:column;font-size:10px;padding:2px;align-items:center}.queue-seconds{font-size:9px}.queue-slots progress{width:100%;height:3px;position:absolute;bottom:2px;left:0;accent-color:var(--faction-accent)}
.command-desktop #commandBar{grid-column:1;grid-row:3;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:44px 52px;padding:3px 6px 4px;gap:2px 6px;background:#e6e2d6 url('paper-ui.png') center/cover;border-top:1px solid #626652;z-index:4}
.command-desktop #commandContext{grid-column:1/-1;grid-row:1;order:0;min-height:40px;height:40px;padding:0 3px;background:none;border-bottom:1px solid #b2b09d}.command-desktop #commandContextText{font-size:12px;font-weight:600;color:#3d4539}.command-desktop #quickRepair{font-size:11px;min-height:36px;height:36px;min-width:142px}
#game.command-desktop #quickSelection{display:flex!important;grid-row:2;grid-column:1;min-height:44px;height:44px;padding:1px;gap:3px;order:0;max-width:550px}#game.command-desktop #quickSelection button{font-size:10px;min-height:42px;max-width:90px;min-width:45px;padding:3px 2px!important}
#game.command-desktop #quickOrders{display:flex!important;grid-row:2;grid-column:2;min-height:44px;height:44px;padding:1px;gap:3px;order:0}#game.command-desktop #quickOrders button{font-size:11px;min-height:42px;min-width:50px;padding:3px 6px!important}#game.command-desktop #quickOrders select{height:42px;font-size:11px;width:83px;max-width:83px}
#game.command-desktop.has-building #quickSelection,#game.command-desktop.has-building #quickOrders{display:none!important}#game.command-desktop #buildingActions:not([hidden]){grid-column:1/-1;grid-row:2;min-height:44px;height:44px;padding:1px 2px!important;justify-content:flex-start}#game.command-desktop #buildingActions button{max-width:150px;min-width:105px;flex:0 0 auto}.command-desktop #selectionStats{bottom:58px;left:12px;max-width:320px}.command-desktop .field-tools{bottom:10px;left:12px}.command-desktop #enemySuper{right:12px;bottom:12px!important}.command-desktop #superFire{left:220px;bottom:10px!important}.command-desktop #radioCaption{bottom:12px;left:50%;max-width:50%}
@media(min-width:1000px) and (max-width:1200px){#game.command-desktop{grid-template-columns:minmax(0,1fr) 256px!important}.command-desktop #quickSelection{gap:1px!important}.command-desktop #quickSelection button{min-width:40px!important;font-size:9px!important}.command-desktop #quickOrders button{min-width:42px!important;padding:2px!important;font-size:10px!important}.command-desktop #quickOrders select{max-width:68px!important}}
@media(prefers-reduced-motion:reduce){#game.dock-open #cards{animation:none!important}}
/* A landscape phone uses a side sheet so production does not consume the battlefield height. */
@media(min-width:560px) and (max-height:500px){
 #game.dock-open:not(.command-desktop),#game.dock-open.army-context:not(.command-desktop){grid-template:44px minmax(0,1fr)/minmax(0,1fr) 240px!important}
 #game.dock-open:not(.command-desktop)>header{grid-column:1/-1;grid-row:1}
 #game.dock-open:not(.command-desktop)>#field{grid-column:1;grid-row:2}
 #game.dock-open:not(.command-desktop)>#panel{grid-column:2;grid-row:2;border-left:1px solid #555b49;border-top:0}
 #game.dock-open:not(.command-desktop) #commandContext{flex:0 0 36px!important;min-height:36px!important;padding:2px 4px;gap:2px}
 #game.dock-open:not(.command-desktop) #commandContextText{font-size:9px;font-weight:600}
 #game.dock-open:not(.command-desktop) #quickRepair{min-width:70px;max-width:75px;font-size:9px;padding:2px;min-height:32px}
 #game.dock-open:not(.command-desktop) #panel>nav button{font-size:10px;padding:2px!important}
 #game.dock-open:not(.command-desktop) #productionCategories button{font-size:9px!important}
 #game.dock-open:not(.command-desktop) #buildingActions button{font-size:9px;min-width:0;padding:2px!important}
 #game.dock-open:not(.command-desktop) #cardPage .card{min-width:110px!important;max-width:110px!important;flex-basis:110px!important}
 #game.dock-open:not(.command-desktop) .mission{display:none}
}
