/* Existing fairytale palette, server-driven transactions. */
.game .topbar .resources .resource{cursor:pointer;transition:filter .18s,transform .18s}
.game .topbar .resources .resource:hover{filter:brightness(1.18);transform:translateY(-1px)}
.game .topbar .resources .resource:focus-visible{outline:3px solid #ffe9a0;outline-offset:3px}
.resource-store-overlay[hidden]{display:none!important}
.resource-store-overlay{position:fixed;z-index:250;inset:0;background:#0c1c39b9;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;backdrop-filter:blur(6px)}
.resource-store-dialog{width:min(880px,100%);max-height:min(94dvh,840px);overflow:auto;border:5px solid #c5945e;border-radius:24px;background:linear-gradient(158deg,#fffaeb,#f4e0bd);box-shadow:0 22px 70px #04152ab8,inset 0 2px #fffdf2;color:#523b28;font-family:Georgia,serif}
.rs-head{display:flex;align-items:center;gap:12px;padding:12px 15px;border-bottom:3px solid #d8ad70;background:linear-gradient(#845535,#624129);color:#fff1d8}
.rs-head h2{font:700 clamp(18px,2.3vw,27px)/1.25 Georgia,serif;margin:0;flex:1}
.rs-icon{width:42px;height:42px;object-fit:contain;filter:drop-shadow(0 2px 4px #10213c55)}
.rs-close{background:linear-gradient(#d7a85b,#956526);border:2px solid #eecb9b;border-radius:10px;color:#fffaf0;font-size:26px;width:42px;height:40px;cursor:pointer}
.rs-balance{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:13px 16px 4px;padding:11px 15px;background:#fffae9;border:2px solid #e5c38e;border-radius:13px;font-size:15px}
.rs-balance strong{font:700 24px Georgia,serif}
.rs-tabs{display:flex;gap:7px;padding:12px 16px;flex-wrap:wrap}
.rs-tabs button{flex:1 1 120px;cursor:pointer;padding:10px 8px;border-radius:12px;border:2px solid #c6a177;background:linear-gradient(#fef7e8,#eacb9e);color:#4c3323;font:700 14px Georgia,serif}
.rs-tabs button.rs-active{background:linear-gradient(#fdf1c1,#d8a459);box-shadow:0 0 0 2px #fff9df,inset 0 1px white}
.rs-content{padding:0 16px 14px;display:grid;gap:12px}
.rs-group{background:#fff9eb;border:2px solid #d7b98f;border-radius:17px;padding:13px;box-shadow:inset 0 1px white}
.rs-group h3{margin:0 0 12px;font:700 19px Georgia,serif}
.rs-offer{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #dfcbb4;padding:10px 0}
.rs-offer-text{min-width:0;display:grid;gap:5px}
.rs-offer-text strong{font:700 15px Georgia,serif}
.rs-offer-text small,.rs-note{font:13px/1.5 Arial,sans-serif;color:#75573e}
.rs-note{margin:7px 0}
.rs-buy{flex-shrink:0;min-width:122px;min-height:38px;padding:6px 11px;background:linear-gradient(#91a953,#486e2c);border:2px solid #b6c58a;border-radius:11px;color:#fff8df;font:700 13px Arial,sans-serif;cursor:pointer;box-shadow:0 3px 5px #483a2e33}
.rs-buy:disabled{opacity:.45;cursor:not-allowed}
.rs-buy:focus-visible,.rs-tabs button:focus-visible,.rs-close:focus-visible{outline:3px solid #315f9e;outline-offset:2px}
.rs-status{margin:0;padding:12px 17px;background:#f5e5ca;border-top:2px solid #dcc19a;min-height:20px;font:14px/1.4 Arial,sans-serif;color:#633e23}
@media(max-width:600px){.resource-store-overlay{padding:5px}.resource-store-dialog{max-height:95dvh;border-width:3px;border-radius:16px}.rs-head{padding:8px}.rs-icon{width:30px;height:30px}.rs-content{padding:0 8px 8px}.rs-tabs{padding:10px 8px}.rs-tabs button{flex-basis:42%;padding:9px 5px}.rs-balance{margin:8px 8px 2px}.rs-offer{align-items:stretch}.rs-buy{min-width:98px}}
