/* Browser RTS responsive improvements, independent from gameplay. */
#kdHudToggle165{position:fixed;z-index:100;right:14px;top:80px;min-height:38px;padding:7px 13px;border:1px solid #c1a06d;border-radius:4px;background:#14231de8;color:#f3d6a6;box-shadow:0 3px 12px #0009;font:700 12px Georgia,serif}
body.kd-hud-collapsed165 #left{transform:translateX(-120%);opacity:0;pointer-events:none!important}
body.kd-hud-collapsed165 #right{transform:translateX(120%);opacity:0;pointer-events:none!important}
body.kd-hud-collapsed165 #hudlog{opacity:0;pointer-events:none!important}
#left,#right{transition:transform .2s ease,opacity .2s ease;overscroll-behavior:contain}
#left button,#right button,#kd-reference-sidebar button{white-space:normal;overflow-wrap:anywhere}
@media(min-width:801px) and (min-height:521px){
 body:not(.kd-hud-collapsed165) #left{width:clamp(225px,21vw,310px)!important}
 body:not(.kd-hud-collapsed165) #right{width:clamp(225px,21vw,292px)!important}
 #bottom #help{max-height:104px;overflow:auto}
}
@media(max-width:800px),(max-height:520px) and (pointer:coarse){
 html,body{max-width:100vw;overscroll-behavior:none}
 #kdHudToggle165{display:none!important}
 #stage,#vignette{top:86px!important;bottom:calc(60px + env(safe-area-inset-bottom,0px))!important}
 #stage{width:100vw!important;overflow:hidden}
 #top,body.kd-ui-compact154 #top.kd-topbar163{height:86px!important;min-height:86px!important}
 #top .head h1{font-size:clamp(11px,3.1vw,15px)!important}
 #top #statePill>div small{font:clamp(7px,2vw,9px)/1.2 Georgia,serif!important}
 #top #statePill>div b{font:700 clamp(11px,3.4vw,16px)/1.2 Georgia,serif!important}
 #kdMobileBar164{min-height:60px!important;padding-bottom:calc(6px + env(safe-area-inset-bottom,0px))!important}
 #kdMobileBar164 button{min-height:44px!important;font-size:clamp(11px,3.2vw,14px)!important}
 #kd-reference-sidebar{bottom:calc(60px + env(safe-area-inset-bottom,0px))!important;height:min(70dvh,580px)!important;max-height:calc(100dvh - 95px - env(safe-area-inset-bottom,0px))!important;border-radius:12px 12px 0 0}
 #kdMobileBack164{inset:86px 0 calc(60px + env(safe-area-inset-bottom,0px))!important}
 #kd-one-context button,#kd-one-context select{min-height:43px!important}
 #load .inner,#end .inner{max-height:80dvh;overflow:auto!important}
}
@media(max-width:800px) and (orientation:landscape){
 #top,body.kd-ui-compact154 #top.kd-topbar163{height:59px!important;min-height:59px!important;grid-template-rows:20px 33px!important}
 #top #statePill{height:32px!important}
 #stage,#vignette{top:59px!important}
 #kdMobileBack164{top:59px!important}
 #kd-reference-sidebar{max-height:calc(100dvh - 68px)!important}
}
@media(prefers-reduced-motion:reduce){#left,#right,#kd-reference-sidebar{transition:none!important}}
