/* KAELEN DOUR RTS — Approved art implementation V149.
   Cropped from the three user-approved UI asset sheets. Real DOM bindings are
   untouched: never replace the canvas, button IDs, handlers or game engine. */
:root{
  --kd-art:'/kaelen-rts-beta50/assets/ui/kd149/parts/';
  --kd149-gold:#edc78e;
  --kd149-shadow:#080b0b;
  --kd149-bronze:#aa773e;
}
#top,#kd-reference-sidebar,.kd149-mission,#kd-tooltip,#kdHelpTip82{font-family:Georgia,"Times New Roman",serif!important}
#top{isolation:isolate;background:#090c0b!important;border:0!important;
 border-bottom:3px solid #a9793c!important;box-shadow:0 3px 19px #000d}
#top::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:0;
 background:url("./../assets/ui/kd149/parts/top_crown.png") center/100% 100% no-repeat;opacity:.94}
#top>*{position:relative;z-index:1}
#top .head{display:flex;align-items:center;min-width:0!important;flex:0 0 218px;padding-left:clamp(40px,5vw,82px)!important}
#top .head h1{font:700 clamp(14px,1.15vw,21px)/1.05 Georgia,serif!important;
 color:#f3dab0!important;letter-spacing:.095em!important;text-shadow:0 2px 4px #000,0 0 10px #b77b2e99}
#top .head h1::after{content:"LE TERRE SPEZZATE";display:block;
 font:10px/1.15 Georgia,serif;letter-spacing:.12em;color:#c5a574;margin-top:3px}
#statePill{margin-left:auto!important;background:#0b0e0bb0!important;box-shadow:inset 0 0 0 1px #916b4655!important;
 height:calc(var(--kd-top) - 9px)!important}
#statePill>div{display:grid!important;grid-template-columns:33px auto!important;
 grid-template-rows:auto auto!important;align-content:center;justify-content:start!important;
 column-gap:4px!important;text-align:left!important;min-width:80px!important;
 padding:2px 6px!important;border-left:1px solid #a2733d75!important}
#statePill>div::before{content:"";width:33px;height:35px;grid-row:1/3;grid-column:1;
 align-self:center;background-size:contain;background-repeat:no-repeat;background-position:center;filter:drop-shadow(0 2px 3px #0008)}
#statePill>div:nth-child(1)::before{background-image:url("./../assets/ui/kd149/parts/res_wood.png")}
#statePill>div:nth-child(2)::before{background-image:url("./../assets/ui/kd149/parts/res_basalt.png")}
#statePill>div:nth-child(3)::before{background-image:url("./../assets/ui/kd149/parts/res_iron.png")}
#statePill>div:nth-child(4)::before{background-image:url("./../assets/ui/kd149/parts/res_resonance.png")}
#statePill>div:nth-child(5)::before{background-image:url("./../assets/ui/kd149/parts/res_population.png")}
#statePill>div:nth-child(6)::before{background-image:url("./../assets/ui/kd149/parts/orn_rune_red.png")}
#statePill>div small{grid-row:1;grid-column:2;white-space:nowrap;align-self:end;font:10px Georgia,serif!important;color:#cbaa77!important}
#statePill>div b{grid-row:2;grid-column:2;font:bold 17px Georgia,serif!important;color:#f2ddb4!important}
#kd-quick-menu123 summary{
 font:bold 11px Georgia,serif!important;
 border:2px ridge #bd9656!important;background:#080e0bc9 url("./../assets/ui/kd149/parts/icon_book.png") 7px center/29px 29px no-repeat!important;
 padding:12px 8px 12px 38px!important;
}
#kd-quick-menu123 .kd-menu-links123{border:12px solid transparent!important;
 border-image-source:url("./../assets/ui/kd149/parts/menu_frame.png")!important;
 border-image-slice:26 fill!important;border-image-width:12px!important;
 background:#111715!important}
#kd-quick-menu123 .kd-menu-links123 a{border:1px solid #b38b50!important}
#kdMusicDock91 button,#kdAudioButton66,#kdCollisionToggle100,.kd-mixer-trigger122,.kd-light130-toggle{
 border:2px ridge #947344!important;background:linear-gradient(#28211a,#0b1311)!important;
 color:#f0d3a1!important;box-shadow:inset 0 1px #e2c17b33!important;font:11px Georgia,serif!important}
#kdMusicDock91 input[type=range],#kdAudioMixer122 input[type=range]{accent-color:#dba453}
#kdMusicDock91{max-width:165px}
#kdMusicDock91 .kd-music91{min-width:0}
#kdAudioButton66,#kdCollisionToggle100{min-width:0!important}
#top button:hover,#top a:hover{filter:brightness(1.18)}
#top button:focus-visible,#top a:focus-visible{outline:2px solid #ffe2aa;outline-offset:2px}
#kd-reference-sidebar{background:#0b1110!important;box-shadow:0 -15px 40px #000e!important}
#kd-reference-sidebar>.kd-hud-block:first-child{
 border:17px solid transparent!important;
 border-image-source:url("./../assets/ui/kd149/parts/minimap_frame.png")!important;
 border-image-slice:54 fill!important;border-image-width:17px!important;
 border-image-repeat:stretch!important;background:#080f0f!important;
 box-shadow:none!important;
}
#kd-reference-sidebar>.kd-hud-block:first-child .kd-hud-header{
 border:0!important;background:#100e0cbd!important;font:700 15px Georgia,serif!important;color:var(--kd149-gold)!important;
 min-height:29px!important;text-shadow:0 2px 5px #000}
#kd-reference-sidebar>.kd-hud-block:first-child .kd-hud-header::before{content:"◆";color:#e9b467}
#kd-reference-sidebar #mini{border:1px solid #a5804d!important;box-shadow:0 0 14px #f4a43b20,inset 0 0 0 1px #10140f!important}
#kd-reference-sidebar #kd-one-context{
 border:17px solid transparent!important;
 border-image-source:url("./../assets/ui/kd149/parts/context_frame.png")!important;
 border-image-slice:57 fill!important;border-image-width:17px!important;border-image-repeat:stretch!important;
 box-shadow:none!important;background:#0b0f0eed!important;
}
#kd-one-context .kd-hud-header{
 min-height:39px!important;padding:5px 12px 5px 47px!important;
 background:#151412eb url("./../assets/ui/kd149/parts/orn_banner_small.png") left 3px center/37px 42px no-repeat!important;
 color:#f4d69d!important;font:bold 17px Georgia,serif!important;
 letter-spacing:.095em!important;text-shadow:0 2px 7px black;
 border:0!important;border-bottom:1px solid #ae804a!important;
}
#kd-one-context .kd-hud-header::before{content:none!important}
#kd-one-context .kd-context-description{color:#c6b7a1!important;
 border-bottom:1px solid #a0804d66!important;font:11px/1.3 Georgia,serif!important;
 background:#060c0a88!important;padding:3px 11px!important}
#kd-one-context #kd-context-body{gap:7px!important;padding:5px 7px 6px!important}
#kd-one-context #kd-selection-slot{
 border:9px solid transparent!important;
 border-image-source:url("./../assets/ui/kd149/parts/menu_frame.png")!important;
 border-image-slice:29 fill!important;border-image-width:9px!important;
 padding:6px!important;background:#0c1311e9!important;
 box-shadow:inset 0 0 26px #000!important;
}
#kd-one-context #kd-selection-slot .panel{background:transparent!important;padding:1px!important;border:0!important}
#kd149-portrait{display:none;float:left;position:relative;width:96px;height:134px;
 margin:0 10px 4px 0;border:9px solid transparent;box-sizing:border-box;
 border-image-source:url("./../assets/ui/kd149/parts/minimap_frame.png");
 border-image-slice:53 fill;border-image-width:9px;
 background:#141a18;overflow:visible}
#kd149-portrait img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;
 box-shadow:inset 0 0 20px #0009}
#kd149-portrait::after{content:"";position:absolute;left:-18px;bottom:-17px;width:47px;height:68px;
 pointer-events:none;background:url("./../assets/ui/kd149/parts/orn_banner_small.png") center/contain no-repeat}
#kd149-portrait[data-mode=worker] img{object-position:42% center}
#kd149-portrait[data-mode=unit] img{object-position:55% center}
#kd-one-context #kd-selection-slot .kd-lore-top122{gap:6px!important;margin-bottom:6px!important}
#kd-one-context #kd-selection-slot .kd-lore-top122 h2{font:bold 15px Georgia,serif!important;color:#f5d4a3!important}
#kd-one-context #kd-selection-slot .stat{padding:4px!important;font:11px Georgia,serif!important}
#kd-one-context #kd-selection-slot .kd-lore-foot122{font:italic 10px Georgia,serif!important;
 background:#b18c4920!important;color:#dbc9aa!important}
#kd149-health{height:13px;border:3px solid #956b40;border-radius:2px;
 background:#211510;clear:both;margin:5px 1px 3px;overflow:hidden}
#kd149-health>span{display:block;height:100%;width:100%;background:linear-gradient(#9af755,#349126);
 box-shadow:0 0 9px #5ba83387;transition:width .2s}
#kd149-health[hidden]{display:none!important}
#kd-one-context #kd-action-zone123{
 border:14px solid transparent!important;
 border-image-source:url("./../assets/ui/kd149/parts/build_frame.png")!important;
 border-image-slice:50 fill!important;border-image-width:14px!important;
 background:#0b1010e8!important;padding:3px!important;
 box-shadow:inset 0 0 20px #000b!important;
}
#kd149-tabs{flex:none;display:flex;gap:4px;min-height:30px;margin:0 0 6px;
 justify-content:stretch;align-items:stretch}
#kd149-tabs button{flex:1;min-width:0;padding:5px 6px!important;
 font:bold 10px Georgia,serif!important;letter-spacing:.045em;
 color:#cfb997!important;border:1px solid #8b6639!important;
 background:linear-gradient(120deg,#241d16,#090e0c)!important}
#kd149-tabs button[aria-selected=true]{color:#fff1c6!important;
 border-color:#ecc274!important;
 background:linear-gradient(#783d21,#3e241c 62%,#17110f)!important;
 box-shadow:0 2px 12px #d59c493b!important}
#kd149-tabs[hidden]{display:none!important}
.kd149-hidden{display:none!important}
#kd149-command-help{display:block;margin:7px 3px;padding:8px;border:1px solid #906c3a;
 background:#141a14;color:#dbc69e;font:11px/1.5 Georgia,serif}
#kd149-command-help[hidden]{display:none!important}
#kd-one-context #kd-action-zone123 .orders-buttons{gap:6px!important}
#kd-one-context #kd-action-zone123 .orders-buttons button{
 min-height:80px!important;background:linear-gradient(#1a1b18cc,#0a0d0bef)!important;
 border:9px solid transparent!important;
 border-image-source:url("./../assets/ui/kd149/parts/button_frame.png")!important;
 border-image-slice:24 fill!important;border-image-width:9px!important;
 padding:42px 3px 1px!important;color:#eddaac!important;
 font:11px/1.2 Georgia,serif!important;position:relative;overflow:hidden;
 text-align:center!important;justify-content:flex-end!important}
#kd-one-context .orders-buttons button::before{
 content:"";display:block;position:absolute;left:50%;top:1px;width:45px;height:45px;
 transform:translateX(-50%);background-position:center;background-size:contain;background-repeat:no-repeat;
 pointer-events:none}
#cmdMove::before{background-image:url("./../assets/ui/kd149/parts/action_move.png")}
#cmdAttack::before,#cmdAggressive::before{background-image:url("./../assets/ui/kd149/parts/action_attack.png")}
#cmdStop::before,#cmdPassive::before{background-image:url("./../assets/ui/kd149/parts/action_stop.png")}
#cmdPatrol::before{background-image:url("./../assets/ui/kd149/parts/action_patrol.png")}
#cmdHold::before,#cmdGuard::before{background-image:url("./../assets/ui/kd149/parts/action_rally.png")}
#kd-one-context .orders-buttons .kd-btn-icon{display:none!important}
#kd-one-context .orders-buttons button.active{
 border-image-source:url("./../assets/ui/kd149/parts/button_active.png")!important;
 filter:brightness(1.25)!important}
#kd-one-context #kd-action-zone123 #kd-build-grid{min-height:0;overflow:visible}
#kd-one-context #kd-action-zone123 .build-catalog{gap:4px!important}
#kd-one-context #kd-action-zone123 .build-catalog .kd-build-option82{min-width:0!important}
#kd-one-context #kd-action-zone123 .build-catalog button{
 width:100%;height:82px!important;min-height:82px!important;
 display:flex!important;flex-direction:column!important;justify-content:flex-end!important;
 padding:41px 2px 3px!important;
 background-color:#111410!important;background-position:center 1px!important;
 background-size:auto 47px!important;background-repeat:no-repeat!important;
 border:7px solid transparent!important;
 border-image-source:url("./../assets/ui/kd149/parts/button_frame.png")!important;
 border-image-slice:24 fill!important;border-image-width:7px!important;
 color:#f1ddbc!important;text-align:center!important;
 font:10px/1.15 Georgia,serif!important;overflow:hidden;
}
#kd-one-context #kd-action-zone123 .build-catalog button[data-build-type=fattoria]{background-image:url("./../assets/ui/kd149/parts/bld_farm.png")!important}
#kd-one-context #kd-action-zone123 .build-catalog button[data-build-type=deposito]{background-image:url("./../assets/ui/kd149/parts/bld_depot.png")!important}
#kd-one-context #kd-action-zone123 .build-catalog button[data-build-type=caserma]{background-image:url("./../assets/ui/kd149/parts/bld_barracks.png")!important}
#kd-one-context #kd-action-zone123 .build-catalog button[data-build-type=segheria]{background-image:url("./../assets/ui/kd149/parts/bld_lumber.png")!important}
#kd-one-context #kd-action-zone123 .build-catalog button[data-build-type=cava]{background-image:url("./../assets/ui/kd149/parts/bld_quarry.png")!important}
#kd-one-context #kd-action-zone123 .build-catalog button[data-build-type=fucina]{background-image:url("./../assets/ui/kd149/parts/bld_forge.png")!important}
#kd-one-context #kd-action-zone123 .build-catalog button[data-build-type=generatore]{background-image:url("./../assets/ui/kd149/parts/bld_generator.png")!important}
#kd-one-context #kd-action-zone123 .build-catalog button[data-build-type=torre]{background-image:url("./../assets/ui/kd149/parts/bld_tower.png")!important}
#kd-one-context #kd-action-zone123 .build-catalog button .kd-btn-icon{display:none!important}
#kd-one-context #kd-action-zone123 .build-catalog button strong{
 font:bold 9.3px/1.1 Georgia,serif;max-width:100%;white-space:normal;text-shadow:0 1px 3px #000;
 overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#kd-one-context #kd-action-zone123 .build-catalog button small{font:8px Georgia,serif!important;display:none!important}
#kd-one-context #kd-action-zone123 .build-catalog button.active{
 border-image-source:url("./../assets/ui/kd149/parts/button_active.png")!important;filter:brightness(1.18)}
#kd-one-context #kd-action-zone123 .build-catalog button:disabled{filter:grayscale(.70) brightness(.65)}
#kd-one-context #kd-action-zone123 button:hover:not(:disabled){filter:brightness(1.25);cursor:pointer}
#kd-one-context #kd-action-zone123 button:focus-visible{outline:2px solid #f3d187;outline-offset:0}
#kd-one-context #kd-action-zone123 #kd-worker-actions,
#kd-one-context #kd-action-zone123 .kd-worker-actions{gap:5px}
#kd-one-context #kd-action-zone123 .kd-worker-actions select{background:#0a100f;border:1px solid #a98753;color:#f3d9ac;
 padding:7px 5px;min-width:0}
#kd-one-context #kd-action-zone123 .kd-worker-actions button,
#kd-one-context #kd-action-zone123 #kd-build-details button,
#kd-one-context #kd-action-zone123 .kd-hire-actions button{
 background:linear-gradient(#4e3828,#1c1714)!important;border:2px ridge #a87b45!important;
 color:#f4d8aa!important;font:10px Georgia,serif!important;
 min-height:30px;cursor:pointer}
#kd-one-context #kd-action-zone123 #kd-build-details{
 min-width:0;background:#110e0c88;border-top:1px solid #866841!important;
 padding:2px!important}
#kd-one-context #kd-action-zone123 #kd-build-details #buildInfo{
 color:#d8bc91!important;white-space:normal!important;font:10px/1.35 Georgia,serif!important}
#kd-one-context #kd-hire-actions button{padding:5px!important}
#kd-tooltip,#kdHelpTip82{border:12px solid transparent!important;
 border-image-source:url("./../assets/ui/kd149/parts/tooltip_frame.png")!important;
 border-image-slice:23 fill!important;border-image-width:12px!important;
 background:#0b100fee!important;color:#eddbb3!important;border-radius:0!important;
 box-shadow:0 11px 30px #000e!important;pointer-events:none!important;
 max-width:min(380px,90vw)!important}
#kd-tooltip strong{color:#edcc99!important}
@media(min-width:1200px) and (min-height:680px){
 :root{--kd-top:66px;--kd-dock-h:clamp(272px,31vh,326px);--kd-map-col:clamp(240px,19vw,315px)}
 #kd-reference-sidebar{padding:0 3px 2px!important;gap:0!important;
 border-top:4px solid #a87c49!important;grid-template-columns:var(--kd-map-col) minmax(0,1fr)}
 #kd-reference-sidebar>.kd-hud-block:first-child{margin-right:0!important}
 #kd-reference-sidebar #kd-one-context{margin-left:0!important}
 #kd-one-context #kd-context-body{
  grid-template-columns:minmax(205px,36%) minmax(0,1fr)!important}
 #kd-one-context #kd-action-zone123 .build-catalog button{min-height:82px!important;height:82px!important}
}
@media(min-width:1200px) and (max-width:1430px) and (min-height:680px){
 #top .head{flex-basis:170px;padding-left:53px!important}
 #top .head h1{font-size:15px!important}
 #statePill>div{min-width:65px!important;grid-template-columns:25px auto!important}
 #statePill>div::before{width:26px;height:28px}
 #statePill>div small{font-size:9px!important}
 #statePill>div b{font-size:15px!important}
 #kd-one-context #kd-context-body{grid-template-columns:minmax(195px,32%) minmax(0,1fr)!important}
}
@media(max-width:1199px),(max-height:679px){
 #top::before{background-size:cover;opacity:.72}
 #top .head{flex:0 1 190px;min-width:115px!important;padding-left:24px!important}
 #statePill>div{min-width:56px!important}
 #statePill>div::before{width:24px;height:24px}
 #kd149-portrait{width:82px;height:100px}
}

/* Asset-sheet 2: genuine artwork on real menu, audio and command controls. */
#kd-quick-menu123 .kd-menu-links123 a{background-repeat:no-repeat!important;background-position:7px center!important;
 background-size:27px 27px!important;padding:10px 8px 10px 40px!important}
#kd-quick-menu123 .kd-menu-links123 a:nth-child(1){background-image:url("./../assets/ui/kd149/parts/icon_book.png")!important}
#kd-quick-menu123 .kd-menu-links123 a:nth-child(2){background-image:url("./../assets/ui/kd149/parts/icon_archive.png")!important}
#kd-quick-menu123 .kd-menu-links123 a:nth-child(3){background-image:url("./../assets/ui/kd149/parts/icon_diplomacy.png")!important}
#kd-quick-menu123 .kd-menu-links123 a:nth-child(4){background-image:url("./../assets/ui/kd149/parts/icon_editor.png")!important}
#kd-quick-menu123 .kd-menu-links123 a:nth-child(5){background-image:url("./../assets/ui/kd149/parts/action_attack.png")!important}
#kdAudioButton66{padding-left:33px!important;background-image:url("./../assets/ui/kd149/parts/icon_audio.png")!important;
 background-position:2px center!important;background-size:29px 29px!important;background-repeat:no-repeat!important}
#kdCollisionToggle100{padding-left:28px!important;background-image:url("./../assets/ui/kd149/parts/icon_settings.png")!important;
 background-position:2px center!important;background-size:24px 24px!important;background-repeat:no-repeat!important}
#kdMusicDock91 button{background-image:url("./../assets/ui/kd149/parts/icon_music.png")!important;
 background-position:center!important;background-size:23px 23px!important;background-repeat:no-repeat!important}
#kd149-tabs button{background-repeat:no-repeat!important;background-position:6px center!important;
 background-size:25px 25px!important;padding-left:31px!important}
#kd149-tabs button[data-mode=build]{background-image:url("./../assets/ui/kd149/parts/action_build.png")!important}
#kd149-tabs button[data-mode=harvest]{background-image:url("./../assets/ui/kd149/parts/action_harvest.png")!important}
#kd149-tabs button[data-mode=orders]{background-image:url("./../assets/ui/kd149/parts/action_move.png")!important}
#kd149-portrait::before{content:"";position:absolute;width:87px;height:49px;pointer-events:none;
 left:50%;bottom:-33px;transform:translateX(-50%);z-index:2;
 background:url("./../assets/ui/kd149/parts/orn_selection_green.png") center/contain no-repeat}
#kd149-health{
 background:#181511 url("./../assets/ui/kd149/parts/orn_healthbar.png") center/100% 100% no-repeat;
 border:1px solid #b48d4e}
#kd-one-context #kd-action-zone123 .kd-worker-actions #assignWorker{
 background-image:url("./../assets/ui/kd149/parts/action_harvest.png")!important;
 background-position:5px center!important;background-size:25px 25px!important;background-repeat:no-repeat!important;
 padding-left:34px!important}
#kd-one-context #kd-action-zone123 .kd-worker-actions #stopWorker{
 background-image:url("./../assets/ui/kd149/parts/action_stop.png")!important;
 background-position:5px center!important;background-size:25px 25px!important;background-repeat:no-repeat!important;
 padding-left:34px!important}


/* One live campaign panel: restyle the real mission progress authority, not a duplicate. */
#kdStoryHud89{
 top:calc(var(--kd-top) + 14px)!important;right:14px!important;
 width:min(296px,calc(100vw - 30px))!important;
 max-height:min(405px,58vh)!important;overflow:auto!important;
 border:17px solid transparent!important;
 border-image-source:url("./../assets/ui/kd149/parts/campaign_frame.png")!important;
 border-image-slice:56 fill!important;border-image-width:17px!important;
 background:#0a110fef!important;border-radius:0!important;
 color:#f0dbb5!important;
 box-shadow:0 9px 25px #000b!important;
 font:12px/1.45 Georgia,serif!important;
 z-index:12!important
}
#kdStoryHud89 .head89{
 min-height:52px!important;padding:8px 8px 8px 47px!important;
 background:#131d18 url("./../assets/ui/kd149/parts/orn_banner_small.png") 4px center/40px 50px no-repeat!important;
 border-bottom:1px solid #be915b!important;gap:5px!important
}
#kdStoryHud89 .head89 strong{
 font:bold 15px/1.15 Georgia,serif!important;color:#f3d5a2!important;
 letter-spacing:.045em!important;text-shadow:0 2px 4px #000d!important
}
#kdStoryHud89 .head89 button{
 flex:none!important;color:#f0c994!important;
 padding:5px 7px!important;border:1px solid #9d7948!important;
 background:linear-gradient(#48311f,#141a17)!important;font:10px Georgia,serif!important
}
#kdStoryHud89 .body89{padding:10px 8px!important;background:#0b1110df!important}
#kdStoryHud89 .note89{color:#b7c5ae!important;font:11px Georgia,serif!important}
#kdStoryHud89 #storyGoals89{list-style:none!important;margin:9px 0!important;padding:0!important}
#kdStoryHud89 #storyGoals89 li{
 margin:5px 0!important;padding:6px 4px 6px 26px!important;
 background:url("./../assets/ui/kd149/parts/orn_rune_red.png") 1px center/18px 23px no-repeat!important;
 border-bottom:1px solid #987c4d44!important;color:#ebd7b8!important;
 font:11px/1.3 Georgia,serif!important
}
#kdStoryHud89 #storyGoals89 li.done{
 color:#a7e2aa!important;
 background-image:url("./../assets/ui/kd149/parts/orn_rune_green.png")!important
}
#kdStoryHud89 .end89{border-top:1px solid #b393575c!important;padding-top:8px!important}
#kdStoryHud89 .end89 a{color:#edcc91!important}
#kdStoryHud89[data-trust=KHAR_FERRUM] .head89{background-image:url("./../assets/ui/kd149/parts/orn_khar.png")!important}
#kdStoryHud89[data-trust=BASALTO] .head89{background-image:url("./../assets/ui/kd149/parts/orn_basalt.png")!important}
#kdStoryHud89[data-trust=AETHEL] .head89{background-image:url("./../assets/ui/kd149/parts/orn_aethel.png")!important}
#kdStoryHud89[data-trust=FAUCI] .head89{background-image:url("./../assets/ui/kd149/parts/orn_fauci.png")!important}
@media(max-width:1000px){#kdStoryHud89{width:min(245px,40vw)!important;top:calc(var(--kd-top) + 8px)!important}}
@media(max-width:650px){#kdStoryHud89{width:208px!important;max-height:210px!important}}

/* Intentional empty-state composition: relevant gameplay actions, not fake buttons. */
#top .head{position:relative}
#top .head::before{content:"";position:absolute;left:0;top:0;width:47px;height:calc(var(--kd-top) - 5px);
 background:url("./../assets/ui/kd149/parts/orn_banner_small.png") center/contain no-repeat;
 pointer-events:none;filter:drop-shadow(0 2px 6px #ff9e4355)}
#kd-reference-sidebar[data-kd149-mode=none] #kd-empty-selection{
 min-height:125px!important;padding:19px 14px 15px!important;text-align:center!important;
 background:#0c1613 url("./../assets/ui/kd149/parts/orn_khar_plate.png") center/100% 100% no-repeat!important;
 color:#f2d6a4!important;font:13px/1.5 Georgia,serif!important;
 text-shadow:0 2px 5px #000!important}
#kd-reference-sidebar[data-kd149-mode=none] #kd-action-zone123 .kd-hire-actions{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:12px!important;align-items:start!important;padding:12px!important}
#kd-reference-sidebar[data-kd149-mode=none] #kd-action-zone123 .kd-hire-actions button{
 display:flex!important;flex-direction:column!important;align-items:center!important;
 justify-content:flex-end!important;height:116px!important;min-height:116px!important;
 padding:60px 8px 12px!important;text-align:center!important;line-height:1.2!important;
 border:11px solid transparent!important;border-image-source:url("./../assets/ui/kd149/parts/button_frame.png")!important;
 border-image-slice:25 fill!important;border-image-width:11px!important;
 background-position:center 6px!important;background-size:70px 64px!important;background-repeat:no-repeat!important;
 background-color:#111813!important;color:#f2d6a5!important;font:bold 12px Georgia,serif!important}
#kd-reference-sidebar[data-kd149-mode=none] #hireWood{
 background-image:url("./../assets/ui/kd149/parts/action_harvest.png")!important}
#kd-reference-sidebar[data-kd149-mode=none] #deploy{
 background-image:url("./../assets/ui/kd149/parts/action_attack.png")!important}
#kd-reference-sidebar[data-kd149-mode=none] #kd-action-zone123::after{
 content:"Schiera un Custode oppure assumi un bracciante. Seleziona l’unità sul campo per aprire i comandi reali.";
 display:block;text-align:center;margin:14px 15px;padding:12px 8px;color:#ddc397;
 border-top:1px solid #a37749aa;font:italic 11px/1.45 Georgia,serif;pointer-events:none}
#selector{border:2px solid #efbe6d!important;
 background:#f0c05a26!important;box-shadow:inset 0 0 0 1px #191711,0 0 13px #ddb26277!important}

/* Browser visual QA: keep illustration subordinate to readable controls. */
#kd-reference-sidebar[data-kd149-mode=none] #kd-empty-selection{
 background-image:linear-gradient(#080e0c99,#080e0cd6),
  url("./../assets/ui/kd149/parts/orn_khar_plate.png")!important;
 background-size:100% 100%,100% 100%!important;background-position:center!important;
 background-repeat:no-repeat!important}
#kd-reference-sidebar[data-kd149-mode=none] #kd-one-context #kd-action-zone123 #hireWood{
 background-image:url("./../assets/ui/kd149/parts/action_harvest.png")!important;
 background-position:center 4px!important;background-repeat:no-repeat!important;
 background-size:70px 64px!important}
#kd-reference-sidebar[data-kd149-mode=none] #kd-one-context #kd-action-zone123 #deploy{
 background-image:url("./../assets/ui/kd149/parts/action_attack.png")!important;
 background-position:center 4px!important;background-repeat:no-repeat!important;
 background-size:70px 64px!important}

/* Correct legacy full-row rule: both real recruitment controls fit in one row. */
#kd-reference-sidebar[data-kd149-mode=none] #kd-one-context #kd-action-zone123 .kd-hire-actions>#deploy{
 grid-column:auto!important;width:100%!important;margin:0!important;
 opacity:.62!important;filter:none!important;
}
#kd-reference-sidebar[data-kd149-mode=none] #kd-one-context #kd-action-zone123 .kd-hire-actions>#deploy:not(:disabled){opacity:1!important}


/* ========================================================================
   KD154 — CANONICAL COMPACT RTS PASS
   Single authority for the existing illustrated HUD. No new stylesheets.
   Scoped to the actual art-mode root; classic ?ui=classic remains available.
   ======================================================================== */
@media (min-width:1200px) and (min-height:680px){
  body.kd-ui-compact154{--kd-top:56px;--kd-dock-h:clamp(216px,27vh,250px);--kd-map-col:clamp(196px,17vw,260px)}
}
body.kd-ui-compact154 #top{
  min-height:0!important;gap:3px!important;padding:0 7px!important;
  align-items:center!important;height:var(--kd-top)!important
}
body.kd-ui-compact154 #top .head{
  flex:0 0 187px!important;max-width:187px!important;min-width:0!important;
  padding:0 3px 0 45px!important;overflow:hidden!important
}
body.kd-ui-compact154 #top .head::before{
  width:37px!important;height:calc(var(--kd-top) - 4px)!important
}
body.kd-ui-compact154 #top .head h1{
  font:700 13px/1.05 Georgia,serif!important;letter-spacing:.012em!important;
  white-space:nowrap!important;max-width:140px!important
}
body.kd-ui-compact154 #top .head h1::after{
  font:8px/1.1 Georgia,serif!important;letter-spacing:.07em!important;margin-top:2px!important
}
body.kd-ui-compact154 #top #kd-quick-menu123 summary{
  min-height:29px!important;padding:6px 6px 6px 29px!important;
  font:10px Georgia,serif!important;background-size:23px 23px!important;
  background-position:3px center!important
}
body.kd-ui-compact154 #top button:not(.kd-light130-toggle){
  min-height:24px!important;font-size:10px!important
}
body.kd-ui-compact154 #kdAudioButton66,
body.kd-ui-compact154 #kdCollisionToggle100{
  padding:4px 5px 4px 23px!important;background-size:19px 19px!important
}
body.kd-ui-compact154 #kdMusicDock91{max-width:134px!important}
body.kd-ui-compact154 #kdMusicDock91 [data-music-volume]{width:35px!important}
body.kd-ui-compact154 #statePill{
  gap:0!important;height:calc(var(--kd-top) - 5px)!important;
  align-items:center!important;margin-left:auto!important
}
body.kd-ui-compact154 #statePill>div{
  min-width:61px!important;width:auto!important;
  padding:0 3px!important;grid-template-columns:23px auto!important;
  column-gap:3px!important
}
body.kd-ui-compact154 #statePill>div::before{width:22px!important;height:25px!important}
body.kd-ui-compact154 #statePill>div small{
  font:8px/1.15 Georgia,serif!important;letter-spacing:0!important
}
body.kd-ui-compact154 #statePill>div b{font:bold 13px/1.05 Georgia,serif!important}
body.kd-ui-compact154 #kd-reference-sidebar{
  border-top-width:3px!important;padding:0 2px 2px!important;gap:0!important
}
body.kd-ui-compact154 #kd-reference-sidebar>.kd-hud-block:first-child,
body.kd-ui-compact154 #kd-reference-sidebar #kd-one-context{
  box-sizing:border-box!important;
  border-width:9px!important;border-image-width:9px!important;
  padding:0!important;min-height:0!important
}
body.kd-ui-compact154 #kd-reference-sidebar>.kd-hud-block:first-child{
  margin:0!important
}
body.kd-ui-compact154 #kd-reference-sidebar>.kd-hud-block:first-child .kd-hud-header{
  font:bold 12px/1.2 Georgia,serif!important;min-height:23px!important;
  padding:3px 5px!important
}
body.kd-ui-compact154 #kd-reference-sidebar .kd-map-wrap{
  padding:0!important;min-height:0!important;
  place-items:center!important;overflow:hidden!important
}
body.kd-ui-compact154 #kd-reference-sidebar #mini{
  width:min(100%,calc(var(--kd-dock-h) - 52px),190px)!important;
  height:min(100%,calc(var(--kd-dock-h) - 52px),190px)!important;
  aspect-ratio:1!important;margin:auto!important;
  border:1px solid #9b7d51!important;display:block!important
}
body.kd-ui-compact154 #kd-one-context .kd-hud-header{
  font:bold 13px/1.15 Georgia,serif!important;letter-spacing:.038em!important;
  min-height:24px!important;padding:2px 6px 2px 34px!important;
  background-size:26px 28px!important;background-position:left 1px center!important
}
body.kd-ui-compact154 #kd-one-context .kd-context-description{
  min-height:17px!important;max-height:25px!important;
  padding:2px 6px!important;font:9px/1.35 Georgia,serif!important;
  overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important
}
body.kd-ui-compact154 #kd-one-context #kd-context-body{
  gap:4px!important;padding:3px 5px 4px!important;
  min-height:0!important;overflow:hidden!important;
  grid-template-rows:minmax(0,1fr)!important
}
body.kd-ui-compact154 #kd-one-context #kd-selection-slot,
body.kd-ui-compact154 #kd-one-context #kd-action-zone123{
  border-width:8px!important;border-image-width:8px!important;
  min-width:0!important;min-height:0!important;padding:2px 3px!important;
  scrollbar-width:thin
}
body.kd-ui-compact154 #kd-one-context #kd-selection-slot{
  overflow:hidden!important;max-height:100%!important
}
body.kd-ui-compact154 #kd-one-context #kd-selection-slot .panel{
  padding:1px!important;margin:0!important;
  font:10px/1.18 Georgia,serif!important
}
body.kd-ui-compact154 #kd149-portrait{
  float:left!important;width:78px!important;height:102px!important;
  border-width:5px!important;border-image-width:5px!important;
  margin:0 8px 2px 0!important;
  background:#1a2520!important;overflow:hidden!important
}
body.kd-ui-compact154 #kd149-portrait img{
  display:block!important;width:100%!important;height:100%!important;
  object-fit:contain!important;object-position:center center!important;
  background:radial-gradient(ellipse at center,#4b4230,#101714)!important
}
body.kd-ui-compact154 #kd149-portrait::before,
body.kd-ui-compact154 #kd149-portrait::after{display:none!important}
body.kd-ui-compact154 #kd149-portrait[data-mode=unit]{display:none!important}
body.kd-ui-compact154 #kd149-health{
  height:8px!important;border-width:1px!important;margin:2px 2px 3px!important
}
body.kd-ui-compact154 #kd-one-context .kd-lore-top122{
  gap:4px!important;min-height:0!important;
  padding:0 0 3px!important;margin:0 0 3px!important
}
body.kd-ui-compact154 #kd-one-context .kd-lore-sigil122{
  flex:0 0 28px!important;width:28px!important;height:30px!important;
  font-size:14px!important;border-width:1px!important
}
body.kd-ui-compact154 #kd-one-context .kd-lore-top122 h2{
  margin:0!important;font:bold 12px/1.17 Georgia,serif!important
}
body.kd-ui-compact154 #kd-one-context .kd-lore-top122 small,
body.kd-ui-compact154 #kd-one-context .kd-lore-sub122,
body.kd-ui-compact154 #kd-one-context .kd-lore-kicker122{
  font:8px/1.18 Georgia,serif!important;letter-spacing:.02em!important
}
body.kd-ui-compact154 #kd-one-context #unitPanel,
body.kd-ui-compact154 #kd-one-context #workerPanel122,
body.kd-ui-compact154 #kd-one-context #buildingPanel,
body.kd-ui-compact154 #kd-one-context #kdResourcePanel68{
  border-width:0!important;padding:2px 3px!important;
  box-shadow:none!important;outline:0!important;background:transparent!important;
  overflow:hidden!important
}
body.kd-ui-compact154 #kd-one-context #unitPanel::before,
body.kd-ui-compact154 #kd-one-context #workerPanel122::before,
body.kd-ui-compact154 #kd-one-context #buildingPanel::before,
body.kd-ui-compact154 #kd-one-context #kdResourcePanel68::before{display:none!important}
body.kd-ui-compact154 #kd-one-context .stat{
  margin:0!important;padding:2px 3px!important;
  font:9px/1.25 Georgia,serif!important;min-height:0!important
}
body.kd-ui-compact154 #kd-one-context .stat b{font-size:9px!important}
body.kd-ui-compact154 #kd-one-context .kd-lore-foot122{
  margin:3px 0 0!important;padding:2px 4px!important;
  font:9px/1.25 Georgia,serif!important
}
body.kd-ui-compact154 #kd-one-context .unit-info{
  margin:2px 0!important;font:9px/1.2 Georgia,serif!important
}
body.kd-ui-compact154 #kd-one-context #squadGrid{
  display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
  max-height:50px!important;gap:3px!important;margin:2px 0!important;
  overflow:hidden!important
}
body.kd-ui-compact154 #kd-one-context #squadGrid .squad-unit{
  min-height:44px!important;max-height:48px!important;
  padding:1px!important;overflow:hidden!important
}
body.kd-ui-compact154 #kd-one-context #squadGrid .squad-portrait{
  width:32px!important;height:32px!important;
  max-width:100%!important;display:grid!important;place-items:center!important
}
body.kd-ui-compact154 #kd-one-context #squadGrid .squad-portrait img{
  object-fit:contain!important;object-position:center center!important;
  width:100%!important;height:100%!important
}
body.kd-ui-compact154 #kd149-tabs{
  min-height:22px!important;height:23px!important;
  gap:2px!important;margin:0 0 2px!important;flex:0 0 23px!important
}
body.kd-ui-compact154 #kd149-tabs button{
  min-height:21px!important;padding:2px 4px 2px 24px!important;
  font:bold 9px/1.1 Georgia,serif!important;
  background-size:18px 18px!important;background-position:3px center!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123{
  overflow-y:hidden!important;overflow-x:hidden!important;
  gap:3px!important;display:flex!important;flex-direction:column!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 #kd-orders-slot,
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 #kd-build-grid{
  flex:0 0 auto!important;min-height:0!important;overflow:visible!important;
  padding:0!important;margin:0!important
}
body.kd-ui-compact154 #kd-one-context .orders-buttons{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:4px!important;margin:0!important
}
body.kd-ui-compact154 #kd-one-context .orders-buttons button{
  min-height:57px!important;height:57px!important;
  border-width:5px!important;border-image-width:5px!important;
  padding:30px 1px 3px!important;
  font:9px/1.12 Georgia,serif!important
}
body.kd-ui-compact154 #kd-one-context .orders-buttons button::before{
  width:31px!important;height:28px!important;top:1px!important;
  background-size:contain!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .build-catalog{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:4px!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .kd-build-option82{
  min-width:0!important;min-height:0!important;height:64px!important;
  overflow:hidden!important;border-width:0!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .kd-build-option82 button{
  position:relative!important;width:100%!important;
  min-width:0!important;min-height:64px!important;height:64px!important;
  box-sizing:border-box!important;
  border-width:5px!important;border-image-width:5px!important;
  padding:33px 2px 2px!important;margin:0!important;
  display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:flex-end!important;
  gap:1px!important;font:9px/1.04 Georgia,serif!important;
  background-color:#111712!important;background-image:none!important;
  overflow:hidden!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .kd-build-option82 button::before{
  content:"";position:absolute;left:5px;right:5px;top:1px;height:30px;
  background-size:contain!important;background-position:center center!important;
  background-repeat:no-repeat!important;pointer-events:none
}
body.kd-ui-compact154 .kd-build-option82[data-build-type=fattoria] button::before{background-image:url("./../assets/ui/kd149/parts/bld_farm.png")}
body.kd-ui-compact154 .kd-build-option82[data-build-type=deposito] button::before{background-image:url("./../assets/ui/kd149/parts/bld_depot.png")}
body.kd-ui-compact154 .kd-build-option82[data-build-type=caserma] button::before{background-image:url("./../assets/ui/kd149/parts/bld_barracks.png")}
body.kd-ui-compact154 .kd-build-option82[data-build-type=segheria] button::before{background-image:url("./../assets/ui/kd149/parts/bld_lumber.png")}
body.kd-ui-compact154 .kd-build-option82[data-build-type=cava] button::before{background-image:url("./../assets/ui/kd149/parts/bld_quarry.png")}
body.kd-ui-compact154 .kd-build-option82[data-build-type=fucina] button::before{background-image:url("./../assets/ui/kd149/parts/bld_forge.png")}
body.kd-ui-compact154 .kd-build-option82[data-build-type=generatore] button::before{background-image:url("./../assets/ui/kd149/parts/bld_generator.png")}
body.kd-ui-compact154 .kd-build-option82[data-build-type=torre] button::before{background-image:url("./../assets/ui/kd149/parts/bld_tower.png")}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .kd-build-option82 button strong{
  font:bold 8.5px/1.05 Georgia,serif!important;
  max-width:100%!important;text-overflow:ellipsis;
  -webkit-line-clamp:1!important;white-space:nowrap!important;
  overflow:hidden!important;display:block!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .kd-build-option82 button small{
  display:block!important;font:7.4px/1 Georgia,serif!important;
  color:#cdb78c!important;letter-spacing:0!important;
  max-width:100%!important;overflow:hidden!important;
  white-space:nowrap!important;text-overflow:ellipsis!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 #kd-build-details{
  display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
  flex:0 0 auto!important;gap:5px!important;margin:1px 0 0!important;
  padding:1px 2px!important;border-top:0!important;max-height:29px!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 #kd-build-details #buildInfo{
  flex:1 1 auto!important;min-width:0!important;max-width:none!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  font:9px/1.2 Georgia,serif!important;margin:0!important;padding:0!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 #kd-build-details #cancelBuild{
  flex:0 0 auto!important;max-width:148px!important;
  min-height:23px!important;height:23px!important;margin:0!important;
  padding:2px 5px!important;white-space:nowrap!important;
  font:bold 9px/1 Georgia,serif!important
}
body.kd-ui-compact154 #kd-one-context .kd-worker-actions{
  display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
  gap:5px!important;padding:2px!important
}
body.kd-ui-compact154 #kd-one-context .kd-worker-actions .kd-mini-label{
  display:none!important
}
body.kd-ui-compact154 #kd-one-context .kd-worker-actions>select,
body.kd-ui-compact154 #kd-one-context .kd-worker-actions>button{
  min-width:0!important;min-height:28px!important;height:28px!important;
  padding:3px 5px!important;font:10px Georgia,serif!important
}
body.kd-ui-compact154 #kd-one-context #kd149-command-help{
  font:10px/1.3 Georgia,serif!important;margin:3px 0!important;padding:4px 6px!important
}
body.kd-ui-compact154 #kd-one-context .kd-hire-actions{
  gap:5px!important;padding:3px!important;margin:0!important
}
body.kd-ui-compact154 #kd-one-context .kd-hire-actions button{
  height:70px!important;min-height:70px!important;
  border-width:6px!important;border-image-width:6px!important;
  background-position:center 2px!important;background-size:40px 40px!important;
  padding:42px 3px 3px!important;font:bold 9.5px/1.1 Georgia,serif!important
}
body.kd-ui-compact154 #kd-one-context #kd-empty-selection{
  min-height:0!important;font:11px/1.3 Georgia,serif!important;padding:7px!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123::after{
  font:10px/1.2 Georgia,serif!important;margin:7px 5px!important;padding:5px!important
}
body.kd-ui-compact154 #kd-tooltip,body.kd-ui-compact154 #kdHelpTip82{
  max-width:305px!important;padding:6px 8px!important;border-width:7px!important;
  border-image-width:7px!important;font:10px/1.25 Georgia,serif!important
}
body.kd-ui-compact154 #kd-tooltip strong{font:12px/1.2 Georgia,serif!important;margin:1px!important}
body.kd-ui-compact154 #kd-tooltip p{font:10px/1.3 Georgia,serif!important}
body.kd-ui-compact154 #kdStoryHud89{max-height:40vh!important;overflow:auto!important}
@media (min-width:1200px) and (min-height:680px){
 body.kd-ui-compact154 #kd-one-context #kd-context-body{
   grid-template-columns:minmax(190px,32%) minmax(0,1fr)!important;
 }
}
@media (max-width:1199px), (max-height:679px){
 body.kd-ui-compact154 #kd-reference-sidebar #kd-action-zone123,
 body.kd-ui-compact154 #kd-reference-sidebar #kd-selection-slot{
   overflow-y:auto!important
 }
 body.kd-ui-compact154 #kd-one-context .kd-build-option82 button{
   min-height:65px!important
 }
}


/* KD155: live-visibility authority. Respect ui_context31 display:none.
   Earlier art selectors using display:* !important exposed hidden commands. */
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 #kd-build-details,
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .kd-worker-actions{
 display:flex; /* deliberately NOT important: dynamic inline style.display controls mode */
}
body.kd-ui-compact154 #kd-reference-sidebar[data-kd149-mode=none] #kd-action-zone123
 > :not(#kd-hire-actions):not(#kd149-tabs),
body.kd-ui-compact154 #kd-reference-sidebar[data-kd149-mode=unit] #kd-action-zone123
 > :not(#kd-orders-slot):not(#kd149-tabs),
body.kd-ui-compact154 #kd-reference-sidebar[data-kd149-mode=worker] #kd-action-zone123
 > #kd-orders-slot,
body.kd-ui-compact154 #kd-reference-sidebar[data-kd149-mode=worker] #kd-action-zone123
 > #kd-hire-actions{
 display:none!important
}
body.kd-ui-compact154 #kd-reference-sidebar:not([data-kd149-mode=worker])
 #kd-action-zone123 > #kd-worker-actions,
body.kd-ui-compact154 #kd-reference-sidebar:not([data-kd149-mode=worker])
 #kd-action-zone123 > #kd-build-grid,
body.kd-ui-compact154 #kd-reference-sidebar:not([data-kd149-mode=worker])
 #kd-action-zone123 > #kd-build-details{
 display:none!important
}
body.kd-ui-compact154 #kd-action-zone123 .kd149-hidden,
body.kd-ui-compact154 #kd-action-zone123 #kd-build-details.kd149-hidden{
 display:none!important
}
/* Do not force construction details or harvest actions above an ID/inline
   mode switch. Scroll is reserved for low-resolution fallback only. */
body.kd-ui-compact154 #kd-reference-sidebar[data-kd149-mode=none] #kd-one-context
 #kd-action-zone123 .kd-hire-actions{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:7px!important;align-items:start!important;
}
body.kd-ui-compact154 #kd-reference-sidebar[data-kd149-mode=none] #kd-one-context
 #kd-action-zone123 .kd-hire-actions button{
 min-height:68px!important;height:68px!important;
 background-size:35px 35px!important;padding:37px 3px 3px!important;
 border-width:6px!important;border-image-width:6px!important;
}
body.kd-ui-compact154 #kd-reference-sidebar[data-kd149-mode=none] #kd-one-context
 #kd-action-zone123::after{
 font:10px/1.2 Georgia,serif!important;margin:4px 7px!important;padding:5px!important
}


/* KD156 final density/readability cleanup: no repeated empty-state prose. */
body.kd-ui-compact154 #kd-reference-sidebar[data-kd149-mode=none]
 #kd-action-zone123::after{content:none!important;display:none!important}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123
 .kd-build-option82 button strong{font-size:9px!important}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123
 .kd-build-option82 button small{font-size:8.2px!important}
body.kd-ui-compact154 #kd-reference-sidebar[data-kd149-mode=none]
 #kd-action-zone123 .kd-hire-actions{align-self:stretch!important}
/* Retain tooltips only above the game area, without covering command cards. */
@media(min-width:1200px) and (min-height:680px){
 body.kd-ui-compact154 #kd-tooltip{
  bottom:calc(var(--kd-dock-h) + 6px)!important;
  max-height:27vh!important;overflow:hidden!important
 }
}

/* KD157: 8 real construction options fit without a scroll bar at 900p.
   Show placement details only while a real build is selected. */
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .kd-build-option82,
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .kd-build-option82 button{
 height:56px!important;min-height:56px!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .kd-build-option82 button{
 padding:26px 2px 1px!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 .kd-build-option82 button::before{
 height:25px!important;top:0!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 #kd-build-details.kd149-hidden{
 display:none!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123[data-kd149-placing=true] .kd-build-option82,
body.kd-ui-compact154 #kd-one-context #kd-action-zone123[data-kd149-placing=true] .kd-build-option82 button{
 height:45px!important;min-height:45px!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123[data-kd149-placing=true] .kd-build-option82 button{
 padding-top:20px!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123[data-kd149-placing=true] .kd-build-option82 button::before{
 height:19px!important
}
body.kd-ui-compact154 #kd-one-context #kd-action-zone123 #kd-build-details{
 max-height:23px!important;height:23px!important;min-height:23px!important
}


/* KD160 — Restore approved mockup proportions at desktop size.
   The earlier 216px dock was too shallow: distorted portraits & tiny controls. */
@media(min-width:1200px) and (min-height:760px){
 body.kd-ui-compact154.kd-topbar159{
  --kd-dock-h:clamp(282px,33vh,325px);
  --kd-map-col:clamp(245px,19.2vw,315px);
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-context-body{
  grid-template-columns:minmax(260px,44%) minmax(0,1fr)!important;
 }
 body.kd-ui-compact154.kd-topbar159 #kd-reference-sidebar #mini{
  width:min(100%,calc(var(--kd-dock-h) - 58px),235px)!important;
  height:min(100%,calc(var(--kd-dock-h) - 58px),235px)!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd149-portrait{
  width:113px!important;height:151px!important;margin:0 11px 4px 0!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context .kd-lore-top122 h2{
  font-size:15px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context .stat{
  padding:4px 5px!important;font-size:11px!important;line-height:1.35!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context .kd-lore-foot122{
  font-size:10px!important;padding:4px 5px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #squadGrid{
  max-height:92px!important;grid-template-columns:repeat(6,minmax(0,1fr))!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #squadGrid .squad-unit{
  min-height:66px!important;max-height:83px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #squadGrid .squad-portrait{
  width:49px!important;height:49px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context .orders-buttons button{
  height:83px!important;min-height:83px!important;padding-top:48px!important;
  font-size:11px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context .orders-buttons button::before{
  width:40px!important;height:42px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd149-tabs{
  min-height:28px!important;height:28px!important;flex-basis:28px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd149-tabs button{
  min-height:26px!important;font-size:11px!important;
  padding-left:32px!important;background-size:25px 25px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123 .kd-build-option82,
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123 .kd-build-option82 button{
  height:85px!important;min-height:85px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123 .kd-build-option82 button{
  padding-top:48px!important;gap:1px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123 .kd-build-option82 button::before{
  height:46px!important;top:0!important;left:2px!important;right:2px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123 .kd-build-option82 button strong{
  font-size:10.5px!important;line-height:1.1!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123 .kd-build-option82 button small{
  font-size:9px!important;line-height:1.1!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123[data-kd149-placing=true] .kd-build-option82,
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123[data-kd149-placing=true] .kd-build-option82 button{
  height:71px!important;min-height:71px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123[data-kd149-placing=true] .kd-build-option82 button{
  padding-top:34px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123[data-kd149-placing=true] .kd-build-option82 button::before{
  height:34px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123 #kd-build-details{
  max-height:29px!important;height:29px!important;min-height:29px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123 .kd-hire-actions button{
  height:100px!important;min-height:100px!important;
  background-size:59px 59px!important;padding-top:62px!important;
  font-size:12px!important
 }
 body.kd-ui-compact154.kd-topbar159 #kd-one-context #kd-action-zone123{
  overflow-y:hidden!important
 }
}