/* KAELEN DOUR RTS — one-menu top bar V163.
 * This is the entire canonical topbar stylesheet, replaces V159 4-section grid.
 * Existing live DOM: logo + resources + details MENU. No clones. */
body.kd-ui-compact154.kd-topbar163 { --kd-top:72px; }
body.kd-ui-compact154 #top.kd-topbar163 {
 position:fixed!important;z-index:30!important;top:0!important;left:0!important;right:0!important;
 width:100%!important;height:var(--kd-top)!important;min-height:var(--kd-top)!important;
 padding:0 clamp(6px,1vw,17px)!important;margin:0!important;
 display:grid!important;grid-template-columns:minmax(204px,270px) minmax(0,1fr) 115px!important;
 align-items:center!important;gap:clamp(5px,1vw,13px)!important;
 overflow:visible!important;border:0!important;border-bottom:3px ridge #9d7844!important;
 box-shadow:0 5px 15px #000c!important;
 background:#090f0c url("./../assets/ui/kd149/parts/top_crown.png") center/100% 100% no-repeat!important;
}
body.kd-ui-compact154 #top.kd-topbar163::before{content:none!important;display:none!important}
body.kd-ui-compact154 #top.kd-topbar163>*{position:relative!important;z-index:1!important;min-width:0!important}
body.kd-ui-compact154 #top.kd-topbar163 .head{
 flex:none!important;width:100%!important;max-width:none!important;min-width:0!important;
 align-self:stretch!important;margin:0!important;padding:8px 4px 5px 53px!important;
 display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:flex-start!important;
 border:0!important;border-right:1px solid #a48150a6!important;
 background:linear-gradient(90deg,#151d18d6,#1017123b)!important;overflow:hidden!important;
}
body.kd-ui-compact154 #top.kd-topbar163 .head::before{
 content:""!important;display:block!important;position:absolute!important;
 width:45px!important;height:calc(var(--kd-top) - 4px)!important;top:0!important;left:0!important;
 background:url("./../assets/ui/kd149/parts/orn_banner_small.png") center/contain no-repeat!important
}
body.kd-ui-compact154 #top.kd-topbar163 .head h1{
 max-width:none!important;margin:0!important;overflow:visible!important;
 white-space:nowrap!important;letter-spacing:.04em!important;
 font:bold clamp(17px,1.5vw,23px)/1.05 Georgia,serif!important;
 color:#f3ddb2!important;text-shadow:0 2px 6px #000!important
}
body.kd-ui-compact154 #top.kd-topbar163 .head h1::after{
 content:"LE TERRE SPEZZATE"!important;display:block!important;margin-top:5px!important;
 font:10px/1.1 Georgia,serif!important;letter-spacing:.12em!important;color:#d8b985!important
}
body.kd-ui-compact154 #top.kd-topbar163 .head>span{display:none!important}
body.kd-ui-compact154 #top.kd-topbar163 #statePill{
 width:100%!important;max-width:840px!important;min-width:0!important;margin:0 auto!important;
 height:calc(var(--kd-top) - 12px)!important;padding:3px 8px!important;
 display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
 align-items:center!important;gap:0!important;border:2px ridge #a07b4a!important;border-radius:1px!important;
 background:linear-gradient(#292a24d9,#0d1510e8)!important;box-shadow:inset 0 0 18px #0008!important
}
body.kd-ui-compact154 #top.kd-topbar163 #statePill>div{
 height:45px!important;min-height:0!important;margin:0!important;padding:1px 4px!important;
 min-width:0!important;max-width:none!important;width:auto!important;
 background:none!important;border:0!important;border-left:1px solid #b38b505c!important;
 display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;
 grid-template-rows:auto auto!important;gap:1px 3px!important;align-content:center!important;align-items:center!important;
}
body.kd-ui-compact154 #top.kd-topbar163 #statePill>div:first-child{border-left:0!important}
body.kd-ui-compact154 #top.kd-topbar163 #statePill>div::before{
 content:""!important;grid-row:1/3!important;grid-column:1!important;
 width:29px!important;height:34px!important;background-size:contain!important;
 background-repeat:no-repeat!important;background-position:center!important
}
body.kd-ui-compact154 #top.kd-topbar163 #statePill>div br{display:none!important}
body.kd-ui-compact154 #top.kd-topbar163 #statePill>div small{
 grid-row:1!important;grid-column:2!important;white-space:nowrap!important;
 text-align:left!important;font:9px/1.1 Georgia,serif!important;
 overflow:hidden!important;text-overflow:ellipsis!important;color:#dbbf96!important
}
body.kd-ui-compact154 #top.kd-topbar163 #statePill>div b{
 grid-row:2!important;grid-column:2!important;text-align:left!important;
 font:bold 18px/1.06 Georgia,serif!important;font-variant-numeric:tabular-nums!important;
 color:#ffe0aa!important;text-shadow:0 2px 4px #000!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kd-quick-menu123{
 display:block!important;justify-self:end!important;align-self:center!important;
 flex:none!important;position:relative!important;z-index:80!important;pointer-events:auto!important;
 width:115px!important;max-width:115px!important;margin:0!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kd-quick-menu123>summary{
 display:flex!important;align-items:center!important;justify-content:center!important;
 height:44px!important;min-height:44px!important;min-width:115px!important;
 max-width:115px!important;margin:0!important;padding:6px 9px 6px 31px!important;
 text-align:center!important;white-space:nowrap!important;cursor:pointer!important;
 color:#f4d5a1!important;letter-spacing:.06em!important;
 font:bold 14px/1 Georgia,serif!important;border:2px ridge #c59b59!important;
 background:#181812 url("./../assets/ui/kd149/parts/icon_book.png") 5px center/25px 25px no-repeat!important;
 box-shadow:inset 0 0 11px #000c!important;list-style:none!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kd-quick-menu123>summary::marker{content:""}
body.kd-ui-compact154 #top.kd-topbar163 #kd-quick-menu123[open]>summary{
 border-color:#ffd18b!important;background-color:#38291c!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kd-quick-menu123 .kd-menu-links123{
 position:absolute!important;top:calc(100% + 10px)!important;right:0!important;left:auto!important;
 display:flex!important;flex-direction:column!important;gap:0!important;
 width:min(390px,calc(100vw - 18px))!important;min-width:0!important;max-width:none!important;
 max-height:calc(100dvh - var(--kd-top) - 22px)!important;overflow-y:auto!important;overflow-x:hidden!important;
 padding:10px 12px!important;box-sizing:border-box!important;
 background:linear-gradient(#19231e,#0d1512)!important;
 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;
 box-shadow:0 12px 32px #000e!important;scrollbar-width:thin!important;z-index:999!important
}
body.kd-ui-compact154 #top.kd-topbar163 .kd-menu-section163{
 padding:5px 4px 9px!important;margin:0!important;border-bottom:1px solid #9e7c4d66!important
}
body.kd-ui-compact154 #top.kd-topbar163 .kd-menu-section163:last-child{border-bottom:0!important}
body.kd-ui-compact154 #top.kd-topbar163 .kd-menu-section163 h3{
 margin:0 0 7px!important;padding:0!important;font:700 11px/1.2 Georgia,serif!important;
 letter-spacing:.10em!important;color:#e6c087!important;text-shadow:0 1px 2px #000!important
}
body.kd-ui-compact154 #top.kd-topbar163 .kd-menu-links-list163{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important
}
body.kd-ui-compact154 #top.kd-topbar163 .kd-menu-links-list163>a{
 display:flex!important;align-items:center!important;min-width:0!important;
 padding:8px 6px 8px 32px!important;margin:0!important;
 font:11px/1.2 Georgia,serif!important;min-height:37px!important;
 white-space:normal!important;background-position:4px center!important;background-size:24px 24px!important;
 border:1px solid #927447!important;color:#f1dbb6!important;text-align:left!important
}
body.kd-ui-compact154 #top.kd-topbar163 .kd-menu-controls163{
 display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:7px!important;
 padding:2px!important;min-width:0!important
}
body.kd-ui-compact154 #top.kd-topbar163 .kd-menu-controls163>div,
body.kd-ui-compact154 #top.kd-topbar163 .kd-menu-controls163>button{
 position:relative!important;flex:0 0 auto!important;max-width:100%!important;
 min-width:0!important;margin:0!important
}
body.kd-ui-compact154 #top.kd-topbar163 .kd-menu-controls163 button{
 min-height:34px!important;font:11px/1.2 Georgia,serif!important;
 padding:6px 9px!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kdMusicDock91{
 width:100%!important;max-width:none!important;flex:1 1 100%!important;margin:0!important;
 background:none!important;box-shadow:none!important;border:0!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kdMusicDock91 .kd-music91{
 display:flex!important;flex-wrap:nowrap!important;gap:8px!important;justify-content:space-between!important;
 width:100%!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kdMusicDock91 [data-music-next]{
 display:inline-block!important;min-width:35px!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kdMusicDock91 [data-music-volume]{
 display:block!important;width:140px!important;max-width:140px!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kdMusicDock91 [data-music-title]{display:none!important}
body.kd-ui-compact154 #top.kd-topbar163 #kdAudioMixer122{position:relative!important}
body.kd-ui-compact154 #top.kd-topbar163 #kdAudioMixer122 .kd-mixer-panel122:not([hidden]),
body.kd-ui-compact154 #top.kd-topbar163 #kdLightingDock130 .kd-light130-panel:not([hidden]){
 position:static!important;top:auto!important;right:auto!important;left:auto!important;
 width:100%!important;max-width:100%!important;margin:7px 0 0!important;
 max-height:none!important;box-shadow:none!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kdAudioMixer122:has(.kd-mixer-panel122:not([hidden])),
body.kd-ui-compact154 #top.kd-topbar163 #kdLightingDock130:has(.kd-light130-panel:not([hidden])){
 flex:1 1 100%!important;width:100%!important;max-width:100%!important
}
body.kd-ui-compact154 #top.kd-topbar163 #kdAudioMixer122 .kd-mixer-panel122[hidden],
body.kd-ui-compact154 #top.kd-topbar163 #kdLightingDock130 .kd-light130-panel[hidden]{display:none!important}
body.kd-ui-compact154 #top.kd-topbar163 #kdCollisionToggle100{
 min-width:130px!important;max-width:none!important
}
body.kd-ui-compact154 #top.kd-topbar163 .kd-menu-controls163 input[type=range]{
 accent-color:#e6b76e!important
}
body.kd-ui-compact154 #top.kd-topbar163 a:focus-visible,
body.kd-ui-compact154 #top.kd-topbar163 button:focus-visible,
body.kd-ui-compact154 #top.kd-topbar163 summary:focus-visible{
 outline:2px solid #f9d18c!important;outline-offset:2px!important
}
@media(max-width:1100px){
 body.kd-ui-compact154.kd-topbar163{--kd-top:65px}
 body.kd-ui-compact154 #top.kd-topbar163{
  grid-template-columns:minmax(150px,215px) minmax(0,1fr) 85px!important;
  gap:5px!important;padding:0 5px!important
 }
 body.kd-ui-compact154 #top.kd-topbar163 .head{padding-left:41px!important}
 body.kd-ui-compact154 #top.kd-topbar163 .head::before{width:38px!important}
 body.kd-ui-compact154 #top.kd-topbar163 .head h1{font-size:15px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #statePill{padding:2px 1px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #statePill>div{grid-template-columns:22px minmax(0,1fr)!important;padding:1px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #statePill>div::before{width:21px!important;height:25px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #statePill>div b{font-size:14px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #statePill>div small{font-size:8px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #kd-quick-menu123{width:85px!important;max-width:85px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #kd-quick-menu123>summary{min-width:85px!important;max-width:85px!important;font-size:11px!important;padding-left:24px!important;background-size:18px 18px!important}
}
@media(max-width:680px){
 body.kd-ui-compact154.kd-topbar163{--kd-top:90px}
 body.kd-ui-compact154 #top.kd-topbar163{
  grid-template-columns:minmax(100px,1fr) 88px!important;grid-template-rows:40px 43px!important;
  grid-template-areas:"brand menu" "resources resources"!important;gap:2px!important;padding:2px 4px!important
 }
 body.kd-ui-compact154 #top.kd-topbar163 .head{grid-area:brand!important;padding:1px 3px 1px 36px!important}
 body.kd-ui-compact154 #top.kd-topbar163 .head::before{height:40px!important;width:33px!important}
 body.kd-ui-compact154 #top.kd-topbar163 .head h1{font-size:12px!important}
 body.kd-ui-compact154 #top.kd-topbar163 .head h1::after{font-size:8px!important;margin-top:1px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #statePill{grid-area:resources!important;height:42px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #statePill>div{height:34px!important;grid-template-columns:19px minmax(0,1fr)!important}
 body.kd-ui-compact154 #top.kd-topbar163 #statePill>div::before{width:17px!important;height:23px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #statePill>div small{display:none!important}
 body.kd-ui-compact154 #top.kd-topbar163 #statePill>div b{font-size:12px!important}
 body.kd-ui-compact154 #top.kd-topbar163 #kd-quick-menu123{grid-area:menu!important;justify-self:end!important}
 body.kd-ui-compact154 #top.kd-topbar163 #kd-quick-menu123 .kd-menu-links123{
  max-height:calc(100dvh - 98px)!important
 }
}
