/* Shared geometry/material for public templates and both cabinets.
   Page styles own their layout, never another copy of these controls. */
html:root body :is(.ui-modal-content,.exchange-modal,.gothic-modal,.download-dialog,.quest-map-dialog,.fish-loot-dialog,.cookie-dialog,.uc-content){
 --ui-dialog-base:var(--raised,var(--glass-floating-solid,var(--bg-raised,#182a32)));
 --ui-dialog-accent:var(--accent,var(--gold,#a7c6e8));
 --ui-dialog-material:radial-gradient(ellipse at 100% 0,color-mix(in srgb,var(--ui-dialog-accent) 19%,transparent),transparent 62%),radial-gradient(ellipse at 0 100%,#d8a24c12,transparent 58%),linear-gradient(125deg,color-mix(in srgb,var(--ui-dialog-base) 96%,transparent),color-mix(in srgb,var(--ui-dialog-base) 91%,transparent));
 min-inline-size:0;max-inline-size:calc(100vw - 32px);box-sizing:border-box;
 background:var(--ui-dialog-material)!important;border:1px solid var(--glass-edge,var(--line));border-radius:8px!important;
 box-shadow:inset 0 1px 0 #ffffff24,0 24px 80px #0006!important;
 backdrop-filter:blur(20px) saturate(1.18);-webkit-backdrop-filter:blur(20px) saturate(1.18);
}
html:root body :is(.btn,.exchange-button,.exchange-button-secondary){box-sizing:border-box;min-inline-size:0;max-inline-size:100%;white-space:normal;overflow-wrap:break-word;line-height:1.35}
html:root body :is(.btn,.exchange-button,.exchange-button-secondary)>svg{flex:none;width:18px;height:18px}
/* A single blur at the containing surface avoids rectangular GPU artefacts. */
html:root body .btn.secondary{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html:root body :is(form,fieldset,.card,.auth-card,.section-shell,.ui-category-tabs){min-inline-size:0;box-sizing:border-box}
html:root body :is(.card,.auth-card,.section-shell)>header{min-inline-size:0;flex-wrap:wrap}
html:root body :is(.card,.auth-card,.ui-modal-content,.exchange-modal,.gothic-modal) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=color]),select,textarea){min-inline-size:0;max-inline-size:100%;box-sizing:border-box}
html:root body :is(.card,.auth-card,.ui-modal-content,.exchange-modal,.gothic-modal) textarea{resize:vertical}
html:root body :is(.card,.auth-card,.ui-modal-content,.exchange-modal,.gothic-modal) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=color]):not([type=file]),select,textarea){border-radius:4px}
@media(prefers-reduced-motion:reduce){html:root body :is(.btn,.ui-modal-content,.exchange-modal,.gothic-modal){transition:none!important;animation:none!important}}
