*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:#728448;color:#efdec0;font:15px Georgia,serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default;opacity:1}button:focus-visible,a:focus-visible{outline:3px solid #ffe49a;outline-offset:2px}[hidden]{display:none!important}
.map{position:fixed;inset:0;overflow:hidden;touch-action:none;cursor:grab;user-select:none}.map.dragging{cursor:grabbing}.scene{position:absolute;width:2400px;height:1500px;transform-origin:0 0;background:#728448 url('/grod-assets/img/teren_adam.jpg') repeat;background-size:640px 640px;will-change:transform}#buildings,#labels{position:absolute;inset:0}#labels{z-index:200;pointer-events:none}.building{position:absolute;transform:translate(-50%,-50%);background:none;border:0;padding:0;aspect-ratio:1;cursor:pointer;isolation:isolate}.building>img:not(.smoke){display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;mask-image:linear-gradient(#000 78%,#0009 90%,transparent);filter:drop-shadow(0 4px 3px #1f2c1950)}.building.selected>img:not(.smoke){filter:drop-shadow(0 0 2px #c2ff6c) drop-shadow(0 0 6px #83dd45)}.smoke{position:absolute;width:16%;height:23%;left:60%;top:2%;pointer-events:none}.map-label{position:absolute;white-space:nowrap;border:1px solid #a88548;border-radius:3px;background:#30271ae8;color:#f6e8c8;font:11px Georgia,serif;padding:3px 8px;pointer-events:auto;cursor:pointer}.map-label.selected{border-color:#baf273;color:#e5ffc6;background:#344321e8}.map-ornaments{position:absolute;inset:0;z-index:90;pointer-events:none}.map-ornaments img{position:absolute;object-fit:contain;filter:drop-shadow(0 3px 3px #0006)}.banner-left{width:55px;height:170px;left:740px;top:460px}.banner-right{width:55px;height:170px;left:1650px;top:460px}.torch-left{width:48px;height:90px;left:770px;top:1090px}.torch-right{width:48px;height:90px;left:1640px;top:1090px}
.top{position:fixed;z-index:500;top:0;left:0;right:0;height:80px;display:flex;gap:18px;align-items:center;padding:0 20px 0 8px;background:#281a11 url('/grod-assets/img/ui/hud/tekstura.png') repeat;border:7px solid transparent;border-image:url('/grod-assets/img/ui/hud/listwa_gorna.png') 8 / 7px stretch;box-shadow:0 5px 10px #0007}.brand{width:230px;min-width:170px;height:90px;display:flex;align-items:center;justify-content:center}.brand img{width:230px;height:104px;object-fit:contain;filter:drop-shadow(0 2px 3px #0009)}.resources{display:flex;flex:1;align-items:center;gap:0;justify-content:space-between;min-width:0}.resource{display:flex;align-items:center;gap:5px;padding:0 10px;border-left:1px solid #816039;white-space:nowrap}.resource img{width:42px;height:42px;object-fit:contain;border-radius:4px;mix-blend-mode:lighten}.resource span{font-size:12px;color:#e9ce9b}.resource strong{display:block;font-size:21px;color:#fff1d3;font-weight:normal;padding-top:1px}
.sidebar{position:fixed;z-index:450;left:10px;top:96px;width:95px;display:grid;gap:4px}.sidebar:after{content:'';position:absolute;right:-12px;top:0;bottom:0;width:17px;background:none;pointer-events:none}.sidebar button{height:91px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:5px;background:#251a10 url('/grod-assets/img/ui/hud/tekstura.png') center/200px;border:8px solid transparent;border-image:url('/grod-assets/img/ui/hud/rama_kafla.png') 10 / 8px stretch;color:#ffe9c0;text-shadow:0 2px 2px #000;font-size:13px;box-shadow:0 4px 6px #0004}.sidebar img{width:44px;height:44px;object-fit:contain;mix-blend-mode:lighten}.sidebar button.active{background-color:#613225;filter:brightness(1.15)}
.detail{position:fixed;z-index:480;right:14px;top:96px;width:310px;max-height:calc(100vh - 125px);overflow:auto;scrollbar-width:none;border:28px solid transparent;border-image:url('/grod-assets/img/ui/hud/duza_rama.png') 74 55 62 55 / 32px stretch;background:#291e14 url('/grod-assets/img/ui/hud/tekstura.png') repeat;background-clip:padding-box;padding:6px 5px 10px;box-shadow:0 7px 22px #0006}.detail::-webkit-scrollbar{display:none}#close-panel{position:absolute;right:0;top:0;width:29px;height:29px;background:#691e16;border:2px solid #ae7d43;color:#ffe6a5;font-size:27px;line-height:22px}.detail h2{font-size:26px;text-align:center;font-weight:normal;margin:5px 25px 3px 0}.level{display:block;font-size:9px;letter-spacing:1px;text-align:center;color:#c1a378}.portrait{height:180px;margin:9px 0;border-bottom:1px solid #85613a;background:radial-gradient(ellipse,#5e67442e,transparent)}.portrait img{height:100%;width:100%;object-fit:contain}.detail p{font-size:14px;line-height:1.5;margin:10px 0}.divider{color:#bd955e;text-align:center;border-top:1px solid #735033;padding-top:6px;font-size:15px}.stat{display:grid;gap:5px;padding:7px 0;border-bottom:1px solid #62482d;font-size:13px}.stat strong{font-size:14px;font-weight:normal;color:#f5e5bb}.crew-meter{height:4px;background:#241d13;margin:9px 0}.crew-meter div{height:100%;background:#a9b66a}.detail-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:12px}.detail-actions button{padding:5px 2px;background:#39281a url('/grod-assets/img/ui/hud/tekstura.png') center/180px;border:7px solid transparent;border-image:url('/grod-assets/img/ui/hud/rama_kafla.png') 10 / 7px stretch;color:#fbe0b2;min-height:80px;font-size:12px}.detail-actions button:last-child{background-color:#6e251c;background-image:linear-gradient(#801b1744,#801b1744),url('/grod-assets/img/ui/hud/tekstura.png')}.detail-actions img{display:block;width:34px;height:34px;object-fit:contain;margin:0 auto 6px;mix-blend-mode:lighten}.demo-notice{display:block;text-align:center;font-size:8px;color:#bca783;margin-top:10px}
.build-tray{position:fixed;z-index:490;left:50%;bottom:12px;transform:translateX(-50%);width:min(1040px,calc(100vw - 240px));height:120px;display:flex;align-items:center;gap:8px;padding:8px 7px;background:#2c2014 url('/grod-assets/img/ui/hud/tekstura.png') repeat;border:15px solid transparent;border-image:url('/grod-assets/img/ui/hud/duza_rama.png') 74 55 62 55 / 18px stretch;box-shadow:0 4px 14px #0006}.cards{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;flex:1;height:92px;scroll-behavior:smooth}.cards::-webkit-scrollbar{display:none}.card{flex:0 0 102px;padding:3px 2px;border:7px solid transparent;border-image:url('/grod-assets/img/ui/hud/slot_zwykly.png') 10 / 7px stretch;background:#291f15 url('/grod-assets/img/ui/hud/tekstura.png') center/200px;color:#f1dfb7;font-size:10px}.card img{width:100%;height:61px;object-fit:contain;display:block}.card span{white-space:nowrap}.card.selected{background-image:linear-gradient(#991b19bb,#591a15aa),url('/grod-assets/img/ui/hud/tekstura.png');box-shadow:inset 0 0 0 2px #de4b3a}.build-tray>button{width:22px;flex-shrink:0;padding:0;height:45px;border:1px solid #89633a;color:#eac18a;background:#372215;font-size:30px}.map-hint{position:fixed;z-index:300;bottom:144px;left:50%;transform:translateX(-50%);font:10px 'Segoe UI',sans-serif;color:#fff4d3;background:#262419a1;padding:5px 10px;border-radius:3px;pointer-events:none}
@media(min-width:2000px){.resources{flex:0 1 auto;justify-content:flex-start}.resource{padding:0 22px}.top{gap:30px}.detail{width:330px}}
@media(max-width:1200px){.top{gap:8px;padding-right:7px;height:74px}.brand{width:170px;min-width:130px}.brand img{width:170px;height:84px}.resource{padding:0 5px;gap:3px}.resource img{width:30px;height:34px}.resource span{font-size:10px}.resource strong{font-size:17px}.detail{width:270px;top:88px;right:8px;border-width:24px;border-image-width:28px}.portrait{height:140px}.detail p{font-size:12px}.sidebar{top:88px;width:80px}.sidebar button{height:79px;font-size:11px}.sidebar img{width:36px;height:36px}.build-tray{width:calc(100vw - 190px);height:110px}.card{flex-basis:94px}.cards{height:84px}.card img{height:54px}}
@media(max-width:850px){.top{height:104px;padding-left:5px;gap:6px}.brand{min-width:94px;width:94px}.brand img{width:110px;height:83px}.resources{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;flex:1}.resource{padding:0 3px;border-left:0}.resource img{width:24px;height:28px}.resource span{font-size:8px}.resource strong{font-size:14px}.sidebar{top:116px;left:6px;width:65px;gap:3px}.sidebar button{height:65px;border-width:6px;border-image-width:6px;font-size:9px;gap:0}.sidebar img{width:29px;height:29px}.detail{top:116px;width:245px;max-height:calc(100vh - 240px)}.detail h2{font-size:23px}.portrait{height:105px}.detail p{font-size:11px}.detail-actions button{font-size:10px;min-height:64px;border-width:5px;border-image-width:5px}.detail-actions img{width:26px;height:26px}.build-tray{width:calc(100vw - 30px);height:104px;bottom:7px}.map-hint{bottom:116px}.card{flex-basis:85px;font-size:9px}.card img{height:48px}.cards{height:78px}}
@media(max-width:480px){.top{height:110px}.brand{min-width:65px;width:65px}.brand img{width:75px;height:68px}.resources{gap:5px 0}.resource{gap:2px;padding:0}.resource img{width:19px;height:24px}.resource span{font-size:7px}.resource strong{font-size:11px}.sidebar{top:120px;width:55px}.sidebar button{height:59px;font-size:8px}.sidebar img{width:25px;height:25px}.detail{top:120px;width:220px;right:5px;border-width:23px;border-image-width:27px;padding:3px;max-height:calc(100vh - 240px)}.detail h2{font-size:22px}.portrait{height:96px}.detail .stat{font-size:10px;gap:4px}.stat strong{font-size:11px}.detail p{font-size:11px;line-height:1.35}.detail-actions button{font-size:9px;min-height:61px;padding:3px 0}.detail-actions img{width:23px;height:23px}.map-label{font-size:13px}.map-hint{font-size:8px;white-space:nowrap}}

@media(min-width:1201px){.brand img{height:78px}}

/* HUD Adama 2 zastępuje elementy pobrane z makiety. */
.brand{gap:7px;width:225px;min-width:190px;justify-content:flex-start;height:74px}
.brand img{width:64px;height:64px;object-fit:contain}
.brand span{font-size:34px;color:#f3ce8c;text-shadow:0 3px 2px #160c04;font-weight:bold;letter-spacing:1px}
.sidebar{width:106px;height:410px;gap:0;padding:25px 17px 16px 14px;background:url('/grod-assets/img/ui/hud/menu_pionowe.png') center/100% 100% no-repeat;grid-template-rows:repeat(6,minmax(0,1fr))}
.sidebar:after{display:none}.sidebar button{height:auto;padding:0;justify-content:flex-end;background:none;border:0;box-shadow:none;font-size:11px;color:#ffe6b9;position:relative;gap:0;text-shadow:0 2px 2px #000}
.sidebar button img{display:none}.sidebar button span{padding-bottom:5px;position:relative;z-index:1}
.sidebar button.active{background:none;filter:none;box-shadow:inset 0 0 0 1px #cc5a3c}
.detail{width:310px;height:539px;max-height:calc(100vh - 125px);padding:0;border:0;background:transparent url('/grod-assets/img/ui/hud/panel_budynku.png') center/100% 100% no-repeat;overflow:hidden;box-shadow:none;filter:drop-shadow(0 5px 8px #0005)}
#close-panel{right:9%;top:11%;width:26px;height:27px;background:url('/grod-assets/img/ui/hud/zamknij.png') center/contain no-repeat;border:0;z-index:5}
.detail h2{position:absolute;top:14%;left:17%;width:64%;margin:0;text-align:center;font-size:23px;line-height:1.15}
.level{position:absolute;top:18.5%;left:20%;width:60%;font-size:8px;text-align:center}
.portrait{position:absolute;top:21%;left:14%;width:72%;height:21%;border:0;background:none;margin:0}
.detail p{position:absolute;top:46.5%;left:15%;width:70%;height:7.7%;margin:0;font-size:11px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.detail .divider{display:none}.detail .stat{position:absolute;left:15%;width:70%;border:0;padding:0;font-size:11px;gap:3px;line-height:1.15}
.detail .stat:nth-of-type(3){top:56.7%}.detail .stat:nth-of-type(4){top:69%}
.detail .stat strong{font-size:12px}.crew-meter{position:absolute;top:74%;left:15%;width:70%;margin:0;height:3px}
.detail-actions{position:absolute;left:13.7%;top:78.4%;width:74%;height:13.6%;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0}
.detail-actions button,.detail-actions button:last-child{background:none;border:0;padding:4px 1px;min-height:0;font-size:11px;color:#f4d3a1;line-height:1.15}
.detail-actions .action-icon{display:block;font-size:26px;line-height:1.2;margin-bottom:5px;color:#d3a760;text-shadow:0 2px 2px #000}
.demo-notice{position:absolute;bottom:4.5%;left:15%;width:70%;margin:0;font-size:7px}
.build-tray{border-image-source:url('/grod-assets/img/ui/hud/pasek_budowy.png');border-image-slice:25 45 27 45;border-image-width:16px 27px;background:#281d13 url('/grod-assets/img/ui/hud/tekstura.png') repeat}
.card{border-image-source:url('/grod-assets/img/ui/hud/slot_zwykly.png');border-image-slice:12}
.card.selected{border-image-source:url('/grod-assets/img/ui/hud/slot_czerwony.png');background-image:linear-gradient(#8b251855,#481d1455),url('/grod-assets/img/ui/hud/tekstura.png');box-shadow:none}
.build-tray>button{background:transparent center/contain no-repeat;border:0;width:25px;font-size:0;height:55px}
#tray-prev{background-image:url('/grod-assets/img/ui/hud/strzalka_lewo.png')}#tray-next{background-image:url('/grod-assets/img/ui/hud/strzalka_prawo.png')}
@media(min-width:2000px){.detail{width:330px;height:574px}}
@media(max-width:1200px){.brand{min-width:150px;width:160px;gap:5px}.brand img{width:53px;height:53px}.brand span{font-size:27px}.sidebar{width:94px;height:364px;padding:23px 15px 14px 13px}.sidebar button{font-size:10px}.detail{width:270px;height:469px}.detail h2{font-size:21px}.detail p{font-size:10px}.detail .stat,.detail .stat strong{font-size:10px}.detail-actions button{font-size:10px}.detail-actions .action-icon{font-size:23px}}
@media(max-width:850px){.brand{min-width:94px;width:94px;flex-direction:column;gap:0;justify-content:center}.brand img{width:47px;height:47px}.brand span{font-size:19px}.sidebar{width:79px;height:306px;padding:20px 13px 12px 11px}.sidebar button{font-size:8px}.sidebar button span{padding-bottom:3px}.detail{width:245px;height:426px;max-height:none}.detail p{font-size:9px}.detail h2{font-size:19px}.detail-actions button{font-size:9px}.detail .stat,.detail .stat strong{font-size:9px}.detail-actions .action-icon{font-size:21px}#close-panel{width:23px;height:24px}}
@media(max-width:480px){.brand{min-width:64px;width:64px}.brand img{width:42px;height:42px}.brand span{font-size:16px}.sidebar{width:72px;height:281px;padding:19px 12px 11px 10px}.sidebar button{font-size:8px}.detail{width:220px;height:382px}.detail h2{font-size:18px}.detail p{font-size:8px}.detail-actions button{font-size:8px}.detail .stat,.detail .stat strong{font-size:8px}.detail-actions .action-icon{font-size:20px}#close-panel{width:21px;height:22px}}

.brand{text-decoration:none}
.top{background:#25170e url('/grod-assets/img/ui/hud/tekstura_drewno.png') repeat}
.sidebar button{position:absolute;left:14%;right:16%;font-size:11px;line-height:1.1}
.sidebar button span{padding-bottom:0}
.sidebar button:nth-child(1){top:6.6%;height:14.6%}.sidebar button:nth-child(2){top:21.2%;height:15.9%}.sidebar button:nth-child(3){top:37.1%;height:15.9%}.sidebar button:nth-child(4){top:53%;height:15.9%}.sidebar button:nth-child(5){top:68.9%;height:16%}.sidebar button:nth-child(6){top:84.9%;height:13.5%}
@media(max-width:1200px){.sidebar button{font-size:10px}}@media(max-width:850px){.sidebar button{font-size:8px}}

/* Dopisek 3: belka składa się z końcówek i osobnych pól HUD3. */
.top{height:94px;padding:0 76px 0 0;border:0;border-image:none;gap:3px;background:#27170d url('/grod-assets/img/ui/hud3/tekstura_drewno.png') repeat;background-size:auto 62px;box-shadow:0 4px 8px #0006}
.brand{width:232px;min-width:232px;height:94px;gap:0;position:relative;overflow:visible}
.brand img{width:123px;height:110px;flex-shrink:0;object-fit:contain}.brand span{font-size:31px}
.top-end{position:absolute;right:0;top:-5px;width:73px;height:117px;object-fit:contain;pointer-events:none}
.resources{display:flex;flex:1;max-width:1650px;justify-content:flex-start;align-items:center;gap:0;height:88px}
.resource{flex:1;min-width:0;height:82px;min-height:0;border:17px solid transparent;border-image:url('/grod-assets/img/ui/hud3/pole_krotkie.png') 45 fill / 17px / 0 stretch;background:none;padding:0 3px;gap:5px;white-space:nowrap;justify-content:center}
.resource:nth-child(6){border-image-source:url('/grod-assets/img/ui/hud3/pole_srednie.png')}.resource:nth-child(7){border-image-source:url('/grod-assets/img/ui/hud3/pole_srednie.png')}
.resource img{width:48px;height:48px;object-fit:contain;mix-blend-mode:normal;flex-shrink:0;border-radius:0}
.resource span{font-size:12px}.resource strong{font-size:22px;padding:0}
.sidebar,.detail{top:112px}
@media(max-width:1450px){.brand{width:192px;min-width:192px}.brand img{width:103px;height:102px}.brand span{font-size:26px}.top{padding-right:60px}.top-end{width:62px;height:108px}.resource{border-width:14px;border-image-width:14px;padding:0 2px;gap:3px}.resource img{width:40px;height:42px}.resource span{font-size:11px}.resource strong{font-size:19px}}
@media(max-width:1200px){.top{height:88px;padding-right:43px}.brand{width:150px;min-width:150px;height:88px;flex-direction:row}.brand img{width:84px;height:92px}.brand span{font-size:20px}.top-end{width:45px;height:102px}.resources{height:82px}.resource{height:74px;border-width:12px;border-image-width:12px;padding:0;gap:2px}.resource img{width:28px;height:34px}.resource span{font-size:9px}.resource strong{font-size:16px}.sidebar,.detail{top:103px}}
@media(max-width:850px){.top{height:130px;padding-right:30px;gap:0}.brand{min-width:98px;width:98px;height:120px;flex-direction:column;justify-content:center}.brand img{width:86px;height:84px}.brand span{font-size:20px;position:relative;margin-top:-13px}.resources{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));height:120px;gap:0}.resource{height:58px;width:100%;border-width:8px;border-image-width:8px;gap:3px}.resource img{width:27px;height:32px}.resource span{font-size:8px}.resource strong{font-size:14px}.top-end{width:31px;height:115px;top:8px}.sidebar,.detail{top:143px}.detail{max-height:none}}
@media(max-width:480px){.brand{width:72px;min-width:72px}.brand img{width:66px;height:75px}.brand span{font-size:15px;margin-top:-10px}.top{padding-right:24px}.top-end{width:26px;height:105px;top:13px}.resource{border-width:6px;border-image-width:6px;gap:1px}.resource img{width:20px;height:27px}.resource span{font-size:7px}.resource strong{font-size:11px}.sidebar,.detail{top:144px}}
/* Dopisek 4 ma pierwszeństwo: tylko rama/odstępy do 50px, treść bez skalowania. */
.top{height:50px;min-height:0;overflow:hidden;align-items:center}
.brand{height:50px;min-height:0;overflow:hidden}
.top-end{top:50%;transform:translateY(-50%)}
.resources{height:50px;min-height:0;display:flex;gap:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;min-width:0;touch-action:pan-x}
.resources::-webkit-scrollbar{display:none}
.resource{height:50px;min-height:0;min-width:max-content;border-width:0;border-image-width:4px;padding:0 8px;flex:1 0 auto;align-items:center}
.resource img{margin:0}.resource strong{line-height:1.1}
.sidebar,.detail{top:62px}
.detail{max-height:calc(100vh - 74px)}
@media(max-width:1450px){.resource{padding:0 5px}}
@media(max-width:1200px){.top{height:50px}.resources,.brand{height:50px}.resource{height:50px;padding:0 4px}}
@media(max-width:850px){.top{height:50px}.brand{height:50px;min-width:164px;width:164px;flex-direction:row;gap:2px}.brand span{margin-top:0}.resources{display:flex;height:50px;grid-template-columns:none}.resource{height:50px;width:auto;flex:0 0 auto;min-width:80px;padding:0 7px}.sidebar,.detail{top:62px}}
@media(max-width:480px){.brand{width:120px;min-width:120px}.resources{height:50px}.resource{height:50px;min-width:74px;padding:0 6px}.sidebar,.detail{top:62px}}
@media(min-width:851px) and (max-height:750px){.build-tray{width:calc(100vw - 420px);left:calc((100vw - 330px)/2)}}

/* RWD gry 2026-10-05: oddzielne szuflady, zarezerwowane miejsce dla tray. */
.compact-controls{display:none}
@media(max-width:1200px),(max-height:600px){
 .compact-controls{position:fixed;z-index:510;top:58px;left:8px;display:flex;gap:8px;height:38px}
 .compact-controls button{border:1px solid #a88049;border-radius:4px;background:#302115 url('/grod-assets/img/ui/hud/tekstura.png') center/160px;color:#f4deac;padding:0 14px;font-size:14px}
 .compact-controls button[aria-expanded=true]{outline:2px solid #c89b51;outline-offset:-3px}
 .sidebar{display:none;top:106px;left:8px;width:250px;max-width:calc(100vw - 16px);height:auto;padding:10px;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,68px);gap:5px;background:#302115 url('/grod-assets/img/ui/hud/tekstura.png') center/180px;border:2px solid #a88049;border-radius:5px}
 .menu-open .sidebar{display:grid}
 .sidebar button{height:68px;font-size:11px;padding:3px;display:flex;flex-direction:column;gap:2px}
 .sidebar button img{width:35px;height:35px}
 .detail{top:106px;right:8px;width:min(520px,calc(100vw - 16px));height:auto;max-height:calc(100dvh - 226px);display:grid;grid-template-columns:100px minmax(0,1fr);grid-template-areas:'portrait name' 'portrait level' 'portrait production' 'portrait crew' 'desc desc' 'actions actions' 'notice notice';gap:5px 12px;padding:16px;border:2px solid #a88049;border-radius:5px;background:#302115 url('/grod-assets/img/ui/hud/tekstura.png') center/180px;overflow:auto;overscroll-behavior:contain;filter:none}
 .detail h2,.detail .level,.detail .portrait,.detail p,.detail .stat,.detail .crew-meter,.detail-actions,.demo-notice{position:static;inset:auto;width:auto;height:auto;margin:0}
 .detail h2{grid-area:name;font-size:20px;text-align:left;padding-right:28px}
 .detail .level{grid-area:level;text-align:left;font-size:10px}
 .detail .portrait{grid-area:portrait;height:100px;align-self:center}
 .detail p{grid-area:desc;display:block;max-height:none;overflow:visible;font-size:12px;line-height:1.35;-webkit-line-clamp:unset}
 .detail .stat{font-size:12px;display:flex;justify-content:space-between;gap:8px}
 .detail .stat strong{font-size:12px}
 .detail .stat:nth-of-type(3){grid-area:production}.detail .stat:nth-of-type(4){grid-area:crew}
 .detail .crew-meter{display:none}
 .detail-actions{grid-area:actions;display:grid;height:54px;gap:6px}
 .detail-actions button,.detail-actions button:last-child{border:1px solid #936e3c;border-radius:3px;padding:3px;font-size:11px;min-height:0}
 .detail-actions .action-icon{font-size:18px;line-height:1;margin-bottom:3px}
 .demo-notice{grid-area:notice;font-size:9px;text-align:center}
 #close-panel{top:7px;right:7px;width:28px;height:28px}
 .build-tray{left:8px;right:8px;bottom:8px;transform:none;width:auto;max-width:none;height:98px}
 .cards{height:76px}.card{flex-basis:85px;font-size:10px}.card img{height:47px}
 .map-hint{display:none}
}
@media(max-height:500px){
 .detail{grid-template-columns:80px minmax(0,1fr) minmax(0,1fr);grid-template-areas:'portrait name name' 'portrait level level' 'portrait production crew' 'desc desc desc' 'actions actions notice';padding:8px 12px;gap:3px 10px}
 .detail .portrait{height:65px}.detail h2{font-size:17px}.detail p{font-size:11px;line-height:1.2}
 .detail .stat,.detail .stat strong{font-size:11px}.detail .stat{display:block}
 .detail-actions{height:42px}.detail-actions button{font-size:10px}.detail-actions .action-icon{font-size:15px;margin-bottom:1px}
 .demo-notice{align-self:center;font-size:9px}
 .sidebar{grid-template-rows:repeat(2,58px)}.sidebar button{height:58px}.sidebar button img{height:28px;width:28px}
}

@media(max-width:1200px),(max-height:600px){
 .sidebar button:nth-child(n){position:static;inset:auto;height:68px;justify-content:center}
 .sidebar button img{display:block}
}
@media(max-height:500px){.sidebar button:nth-child(n){height:58px}}

/* Dopisek Adama 768px: wszystkie osiem pól widoczne bez przewijania. */
@media(max-width:1200px){
 .top{padding:0;gap:0}
 .brand{width:48px;min-width:48px;height:50px;gap:0}
 .brand img{width:48px;height:48px}.brand span,.top-end{display:none}
 .resources{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:50px;flex:1;height:50px;width:auto;max-width:none;overflow:visible;gap:0;touch-action:auto}
 .resource{width:auto;min-width:0;height:50px;padding:0 2px;gap:3px;justify-content:center;border-image-width:3px}
 .resource img{width:24px;height:24px}
 .resource span{font-size:0;line-height:0;min-width:0}
 .resource strong{font-size:12px;line-height:1.1;padding:0;white-space:nowrap}
}
@media(max-width:650px){
 .brand{width:40px;min-width:40px}.brand img{width:40px;height:44px}
 .resources{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,25px)}
 .resource{height:25px;padding:0 2px;gap:3px;border-image-width:2px}
 .resource img{width:18px;height:18px}.resource strong{font-size:11px}
}
@media(max-width:1200px) and (min-height:501px){
 .detail{width:min(320px,calc(100vw - 16px));top:auto;bottom:116px}
 .detail .stat{flex-wrap:wrap}
}

/* Nazwy lewego menu tylko w tooltipie; ikony HUD pozostają bez zmian. */
.sidebar button[aria-disabled=true]{cursor:default}
.menu-tooltip{position:fixed;z-index:700;max-width:calc(100vw - 16px);padding:7px 11px;border:1px solid #b99150;border-radius:4px;background:#251a10f5;color:#ffe6b9;font:14px/1.2 Georgia,serif;box-shadow:0 3px 9px #0008;pointer-events:none;white-space:nowrap}
/* API MVP: queue/status overlays preserve the existing camera and RWD. */
.building.unbuilt{opacity:.45}.legacy-sprite img{border:2px solid #d5b57c;border-radius:8px;background:#382a18}.legacy-sprite{height:90px!important}.map.placing{cursor:crosshair}.map.placing .building,.map.placing .map-label{pointer-events:none}.building-cost{font-size:11px;line-height:1.35;margin:5px 0;color:#ecd9ad}.queue-panel{position:fixed;z-index:35;bottom:124px;left:140px;max-width:350px;max-height:100px;overflow:auto;background:#291d12df;color:#f4e4bd;border:1px solid #a5834b;border-radius:5px;font-size:12px;padding:5px 9px;pointer-events:none}.queue-panel ol{padding:0;margin:0;list-style:none}.live-status{position:fixed;z-index:80;top:56px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 24px);padding:4px 9px;background:#291d12e8;border:1px solid #95703d;border-radius:5px;color:#f2dfb7;font-size:12px;text-align:center}.live-status.error{color:#ffc4a2}.crew-meter{display:none}
@media(max-width:1200px),(max-height:600px){.queue-panel{left:10px;bottom:116px;max-width:calc(100vw - 20px);font-size:11px}.detail:not([hidden])~.queue-panel{display:none}}
@media(max-height:450px){.queue-panel{bottom:92px;max-height:45px}.building-cost{font-size:10px;margin:3px 0}}
.detail #building-cost{position:absolute;top:64%;left:15%;width:70%;height:3.5%;margin:0;display:block;font-size:9px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1200px),(max-height:600px){.detail{grid-template-areas:'portrait name' 'portrait level' 'portrait production' 'portrait crew' 'desc desc' 'cost cost' 'actions actions' 'notice notice'}.detail #building-cost{position:static;inset:auto;grid-area:cost;width:auto;height:auto;white-space:normal;font-size:11px}}
@media(max-height:500px){.detail{grid-template-areas:'portrait name name' 'portrait level level' 'portrait production crew' 'desc desc desc' 'cost cost cost' 'actions actions notice'}.detail #building-cost{font-size:10px}}
