/* Build351: compact, legible portrait building UI and ground-anchored map pins. */
#s263-public-bases.s348-anchored-pins .s263-base-pin.s351-map-pin{width:32px;height:32px;min-width:32px;max-width:32px;transition:opacity .14s ease;transform:translate(-50%,-100%);filter:drop-shadow(0 2px 2px #0009)}
#s263-public-bases.s348-anchored-pins .s351-map-pin .s263-base-crest{width:27px;height:27px;margin:2px;border-radius:9px;font-size:19px;line-height:25px}
#s263-public-bases.s348-anchored-pins .s351-map-pin .s263-base-name{top:32px;font-size:10px;padding:2px 5px;max-width:100px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
#s263-public-bases.s348-anchored-pins .s351-map-pin.s265-base-cluster .s263-base-crest{font:700 12px/27px system-ui,sans-serif}
#sanctuary-incoming322 .s351-counter-icon{display:grid;place-items:center;width:38px;height:38px;min-width:38px;padding:7px;border-radius:11px;touch-action:manipulation}
#sanctuary-incoming322 .s351-counter-icon svg{width:23px;height:23px;display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
#sanctuary-incoming322 .s351-counter-icon:disabled{opacity:.5}
.building-inspect-rich.s351-compact-building{width:min(94vw,425px);max-height:min(84dvh,740px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
.building-inspect-rich.s351-compact-building .building-inspect-head{padding:8px 11px;gap:7px}
.building-inspect-rich.s351-compact-building .building-inspect-head h2{font-size:17px;line-height:1.2;margin:1px 0}
.building-inspect-rich.s351-compact-building .building-inspect-tabs,.building-inspect-rich.s351-compact-building .s207-building-tabs{display:flex;flex-wrap:nowrap;gap:3px;align-items:stretch;margin:4px 5px}
.building-inspect-rich.s351-compact-building .building-inspect-tabs button,.building-inspect-rich.s351-compact-building .s207-building-tabs button{flex:1;min-width:0;min-height:42px;font-size:11px;padding:5px 3px;gap:3px;line-height:1.15}
.building-inspect-rich.s351-compact-building .s207-feature-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:5px 9px}
.building-inspect-rich.s351-compact-building .s207-feature-links button{min-height:42px;margin:0;min-width:0}
.building-inspect-rich.s351-compact-building .building-inspect-body{padding:7px 10px;gap:7px}
.building-inspect-rich.s351-compact-building .building-inspect-body p{line-height:1.35}
@media(max-width:420px){.building-inspect-rich.s351-compact-building{width:min(96vw,390px);max-height:82dvh}}

.wp351-garrison{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:7px 9px;padding:9px 10px;border:1px solid #ffffff25;border-radius:11px;background:#081a1ec7}.wp351-garrison>div{display:flex;flex-direction:column;gap:2px;min-width:0}.wp351-garrison strong{font-size:14px}.wp351-garrison small{font-size:11px;opacity:.75}.wp351-garrison button{min-height:42px;padding:7px 10px;border-radius:9px;display:flex;align-items:center;gap:5px;font-size:12px}

/* Existing combined styles use #root and !important. Override only the building inspector. */
#root .building-inspect-rich.s351-compact-building{width:min(94vw,425px)!important;max-height:83dvh!important;padding:7px!important}
#root .building-inspect-rich.s351-compact-building .building-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px!important;margin:4px!important;padding:4px!important;overflow:visible!important}
#root .building-inspect-rich.s351-compact-building .building-tabs.tabs-3{grid-template-columns:repeat(3,minmax(0,1fr))}
#root .building-inspect-rich.s351-compact-building .building-tab{min-width:0!important;min-height:44px!important;flex:1 1 auto!important;gap:3px!important;padding:5px 4px!important;font-size:11px!important;white-space:nowrap!important}
#root .building-inspect-rich.s351-compact-building .building-body260{padding:6px 9px!important;max-width:100%}
#root .building-inspect-rich.s351-compact-building .building-inspect-head{padding:7px 9px!important;gap:7px!important}
#root .building-inspect-rich.s351-compact-building .s207-feature-button{min-height:42px!important;padding:6px!important;gap:3px!important}

/* Map-layout legacy class must not remove true world-anchor transforms. */
#s263-public-bases.s348-anchored-pins.s346-map-pins .s263-base-pin.s351-map-pin{transform:translate(-50%,-100%)!important;width:32px!important;height:32px!important;min-width:32px!important;max-width:32px!important}
#s263-public-bases.s348-anchored-pins.s346-map-pins .s263-base-pin.s351-map-pin .s263-base-name{max-width:100px!important}

/* Build 371: one accessible chat launcher; never float on top of army row text. */
body .sanctuary-world-chat-overlay.is-chat-bubble {
 position:fixed!important; top:48dvh!important; bottom:auto!important;
 left:auto!important; right:max(10px,env(safe-area-inset-right))!important;
 z-index:2147482100!important; width:48px!important; height:48px!important;
 max-height:48px!important; background:none!important; border:0!important;
 overflow:visible!important; pointer-events:auto!important;
}
body .sanctuary-world-chat-overlay.is-chat-bubble .sanctuary-chat-fab {
 width:48px!important; height:48px!important; min-width:48px!important; min-height:48px!important;
}
body .sanctuary-world-chat-overlay:not(.is-chat-bubble) {
 position:fixed!important;top:45dvh!important;bottom:auto!important;
 left:auto!important;right:max(10px,env(safe-area-inset-right))!important;
 z-index:2147482100!important;max-width:min(260px,calc(100vw - 20px))!important;
}
body:has(.sanctuary-world-chat-overlay) .s335-chat-launch {display:none!important}
/* Two-line, touch-sized commands rather than crowded one-line military reports. */
body .s338-activity-panel .a59-row {display:grid!important;
 grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important;align-items:center!important;
 padding:10px!important;margin:5px 0!important;}
body .s338-activity-panel .a59-row:has(.a73-recall){grid-template-columns:minmax(0,1fr) auto auto!important;}
body .s338-activity-panel .a59-row .a59-copy{min-width:0!important;max-width:100%!important;overflow:hidden!important}
body .s338-activity-panel .a59-row .a59-copy strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal!important;overflow:hidden!important;overflow-wrap:anywhere!important}
body .s338-activity-panel .a59-row .a59-copy small{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body .s338-activity-panel .a59-row>button{min-width:48px!important;min-height:44px!important;padding:8px!important;font-size:12px!important;white-space:nowrap;}
/* Resource capture and tower controls use the same compact button treatment. */
#sanctuary-resource-action368 {background:linear-gradient(145deg,#233d48,#10222c)!important;
 border:1px solid #c7b381!important;box-shadow:0 16px 42px #0009!important;border-radius:14px!important;}
#sanctuary-resource-action368 button{min-height:44px;touch-action:manipulation}
#sanctuary-resource-action368 .resource-action368 {background:#cfb87e!important;color:#10232c!important;border:1px solid #ddc58b!important;}

/* 372 — Compact one-action strategy controls with legible portrait touch targets. */
#s287-raid-panel{width:min(92vw,390px)!important;border:1px solid #d4b97a78!important;border-radius:18px!important;background:linear-gradient(163deg,#183339 0%,#102832 40%,#0b1b28 100%)!important;box-shadow:0 24px 66px #010c12bc,0 0 0 2px #f6d5940c inset!important;overflow:hidden!important}
#s287-raid-panel .s-raid-head287{padding:13px 16px 11px!important;background:linear-gradient(100deg,#25443f,#152a34)!important;border-bottom:1px solid #dfc48b3f!important}
#s287-raid-panel .s-raid-head287 h2{font-size:21px!important;line-height:1.15!important;letter-spacing:.01em}
#s287-raid-panel .s-order-eyebrow332{color:#ddce9c!important;font-size:9px!important;letter-spacing:.15em!important}
#s287-raid-panel .s-raid-body287{padding:12px 15px!important}
#s287-raid-panel .s-raid-modes287{display:flex!important;background:#0a1d24ba!important;border:1px solid #d7c28b40!important;border-radius:13px!important;padding:4px!important;margin:0 0 10px!important}
#s287-raid-panel .s-raid-mode287{flex:1!important;min-height:45px!important;font-weight:800!important;font-size:14px!important;letter-spacing:.01em!important}
#s287-raid-panel .s-raid-mode287[aria-pressed=true]{background:linear-gradient(125deg,#4d705e,#314c44)!important;box-shadow:0 2px 12px #0005!important;border-color:#ddcc91!important}
#s287-raid-panel .s-raid-protected372{width:100%;text-align:center;padding:12px 8px;color:#ead8ab;font-size:13px;font-weight:800;letter-spacing:.025em}
#s287-raid-panel .s-raid-army287{background:#0a2229bc!important;padding:10px 12px!important;border-radius:12px!important;border-color:#a6bca342!important}
#s287-raid-panel .s-raid-army-head287{margin-bottom:5px!important}
#s287-raid-panel .s-raid-quantity287 input{font-size:24px!important;background:#071b22!important;border-color:#adbcac59!important}
#s287-raid-panel .s-raid-footer287{padding:10px 15px 12px!important;background:#0b1f28!important;gap:6px!important}
#s287-raid-panel .s-raid-primary287{background:linear-gradient(145deg,#c3a466,#9c7640)!important;color:#0b1d25!important;border-color:#efd9a5!important;font-weight:850!important;box-shadow:inset 0 1px #fff5,0 4px 12px #0004!important}
#s287-raid-panel .s-raid-primary287[data-mode=DEFEND]{background:linear-gradient(125deg,#4c9289,#39746d)!important;color:#f7fff3!important;border-color:#97dfc5!important}
#s287-raid-panel .s-raid-secondary287{background:#152e36!important;color:#d2dddc!important;min-height:40px!important;padding:8px!important;font-size:12px!important}
#s287-raid-panel .s-raid-status287{font-size:11px!important;line-height:1.3!important;margin:7px 0 0!important}
body .s338-activity-panel .a59-row{background:linear-gradient(112deg,#132e36f4,#0c2029f5)!important;border:1px solid #bbaf7b30!important;border-radius:14px!important;box-shadow:inset 0 1px #ffffff10!important}
body .s338-activity-panel .a59-row .a59-copy strong{font-size:13px!important;font-weight:750!important;line-height:1.3!important}
body .s338-activity-panel .a59-row .a59-copy small{font-size:11px!important;color:#bed3d1!important}
body .s338-activity-panel .a59-row>button{border-radius:10px!important;background:#d6b77c!important;color:#12262d!important;font-weight:800!important;border:1px solid #f2daa6!important;box-shadow:0 2px 10px #0004!important}
body .s338-activity-panel .a59-row>button.a73-recall{background:#234b50!important;color:#e4f4e9!important;border-color:#86bdb4!important}
@media (max-width:375px){#s287-raid-panel{width:95vw!important}#s287-raid-panel .s-raid-body287{padding:9px 11px!important}}
