/* Context currency stays at the resource HUD, in the native modal's top layer. */
#dialog:not(.mother-modal)>.modal-resource-wallet{position:fixed;left:var(--wallet-left,50vw);top:var(--wallet-top,8px);width:var(--wallet-width,120px);transform:translateX(-50%);z-index:30;display:flex;justify-content:center;pointer-events:auto;filter:none}
#dialog:not(.mother-modal)>.modal-resource-wallet .context-gems{justify-content:center;width:100%;min-height:var(--wallet-height,40px);padding:5px 10px;gap:6px;border:1px solid #d6debf;border-radius:10px;background:#f5f6e7;color:#365541;box-shadow:0 2px 8px #183d2926;font-size:17px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
#dialog:not(.mother-modal)>.modal-resource-wallet .context-gems svg{width:21px;height:21px;flex:none}
#dialog:not(.mother-modal)>.modal-resource-wallet .context-gems>span{font-size:17px;font-weight:650;color:#809571}
#dialog:not(.mother-modal).has-dialog-wallet{inset-block-start:calc(var(--modal-hud-bottom,50px) + 12px);inset-block-end:12px;margin-block:auto;max-height:calc(100dvh - var(--modal-hud-bottom,50px) - 24px)}
/* Picture-led building and troop headings keep their existing composition. */
#dialog:not(.mother-modal).has-text-heading{padding-top:62px}
#dialog:not(.mother-modal).has-text-heading>.dialog-text-heading{position:absolute;top:6px;left:53px;right:53px;display:flex;align-items:center;justify-content:center;min-height:44px;margin:0;text-align:center;font-size:clamp(17px,4.8vw,21px);line-height:1.16;font-weight:800;overflow-wrap:break-word}
#dialog:not(.mother-modal).has-text-heading>.close{top:6px;right:8px}
#dialog:not(.mother-modal).has-text-heading .rest-energy-total{text-align:center;margin-top:0}
#dialog:not(.mother-modal).has-text-heading .castle-list{max-height:calc(84dvh - 84px)}
@media(max-height:500px){#dialog:not(.mother-modal).has-text-heading{padding-top:57px}#dialog:not(.mother-modal).has-dialog-wallet{inset-block-start:calc(var(--modal-hud-bottom,50px) + 8px);inset-block-end:8px;max-height:calc(100dvh - var(--modal-hud-bottom,50px) - 16px)}}
