.craft-panel,.socket-panel{border:1px solid #59432e;background:#211912;padding:12px;margin:14px 0;color:#eee8db;border-radius:8px;font:12px/1.6 system-ui,sans-serif}.craft-heading{display:flex;gap:10px;align-items:center}.craft-heading h3{margin:0;font-size:13px;flex:1}.craft-heading strong{color:#d9b879;white-space:nowrap}.craft-plus{font-size:18px!important;min-width:30px}.craft-panel p,.socket-panel p{font-size:11px;color:#b9a58a;margin:7px 0}.gem-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:7px;margin-top:12px}.gem-card{display:flex;align-items:center;flex-direction:column;gap:5px;padding:10px;border:1px solid #59432e;background:#19130e;text-align:center}.gem-card strong{font-size:11px}.gem-card>span:last-of-type{font-size:10px;color:#b9a58a}.gem-card button,.gem-socket button{color:#eee8db;background:#32271b;border:1px solid #856540;font:11px system-ui;cursor:pointer;border-radius:5px;padding:7px}.craft-panel button:disabled,.socket-panel button:disabled{opacity:.4;cursor:default}.gem-art{display:inline-block;flex:none;width:48px;height:48px;filter:drop-shadow(0 2px 4px #0008)}.gem-socket{display:flex;align-items:center;gap:7px;margin-top:8px}.gem-socket select{min-width:0;flex:1;background:#14110e;color:#eee8db;border:1px solid #59432e;padding:7px;font:11px system-ui}.gem-socket.filled{font-size:11px}.socket-summary{color:#b9a58a;font-size:11px}.craft-float{position:fixed;left:50%;transform:translateX(-50%);z-index:2147483647;width:max-content;max-width:calc(100vw - 24px);padding:12px 18px;border:1px solid currentColor;border-radius:9px;background:#171310f5;box-shadow:0 8px 30px #000b;color:#94dfaa;font:700 16px/1.4 system-ui;text-align:center;pointer-events:none;animation:craft-rise 4.2s ease-out forwards}.craft-float.failure{color:#f0a188}@keyframes craft-rise{0%{opacity:0;translate:0 12px}12%,75%{opacity:1}100%{opacity:0;translate:0 -55px}}@media(prefers-reduced-motion:reduce){.craft-float{animation:none}}
.common{--item-color:#eee8db}.uncommon{--item-color:#f3d16a}.rare{--item-color:#84b7ff}.legendary{--item-color:#d9b879}
:is(.compact-item-detail,.item-tooltip,.item,.rpg-hover) :is(h3,.item-title,.item-heading h3){color:var(--item-color,#d9b879)!important}
:is(.equipment-slot,.rpg-bag-cell,.inventory-cell,.equip-box,.loot-pickup):is(.common,.uncommon,.rare,.legendary){border-color:var(--item-color)}
.loot-pickup:is(.common,.uncommon,.rare,.legendary)>span:last-child{color:var(--item-color)}


.compact-potion-belt,.potion-belt{grid-template-columns:repeat(6,minmax(0,1fr))}@media(max-width:340px){.compact-potion-belt,.potion-belt{grid-template-columns:repeat(3,minmax(0,1fr))}}

.gem-strength{background-position:33.333333% 75%}.gem-agility{background-position:66.666667% 75%}.gem-intelligence{background-position:100% 75%}.gem-stamina{background-position:0 100%}.gem-spirit{background-position:33.333333% 100%}.gem-luck{background-position:66.666667% 100%}.gem-augment{background-position:100% 100%}
.gem-socket .gem-art,.loot-pickup .gem-art{width:32px;height:32px}

.craft-socket-item{margin:14px 0}.craft-socket-item>h3{font-size:13px}.craft-socket-item .socket-panel{margin-top:7px}
.craft-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:15px 0}.craft-slot{display:flex;min-height:100px;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:8px;border:1px dashed #856540;border-radius:7px;color:#b9a58a;background:#15100b;font:11px/1.4 system-ui;cursor:pointer}.craft-slot.filled{border-style:solid;color:#eee8db}.craft-slot .gem-art{width:48px;height:48px}.craft-recipe-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.craft-recipe-actions p{flex-basis:100%}.craft-recipe-message{min-height:2em}.gem-quality-guide{margin:14px 0;color:#d9b879;font-size:10px}.gem-card:disabled{opacity:.5;cursor:default}.inventory-cell .gem-art,.rpg-bag-cell .gem-art{width:48px;height:48px}.bag-overflow{border:1px solid #856540;padding:10px;margin-top:10px}.bag-overflow .gem-grid{grid-template-columns:repeat(auto-fit,minmax(70px,1fr))}

.gem-card{color:#eee8db;font:12px/1.4 system-ui;cursor:pointer;border-radius:7px}.inventory-cell .gem-art,.rpg-bag-cell .gem-art{width:80%;height:auto;aspect-ratio:1}

.socket-display{display:flex;flex-direction:column;gap:5px;margin:10px 0}.socket-display-entry{display:flex;gap:8px;align-items:center;font-size:11px;color:#b9a58a}.socket-marker{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex:none;border:2px solid #856540;border-radius:50%;background:#100c09;box-shadow:inset 0 2px 5px #000}.socket-marker.filled{border-color:#d9b879}.socket-marker .gem-art{width:28px;height:28px}

/* Socket rings sit on the original item bitmap; the bitmap is never redrawn. */
.socket-overlays{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;pointer-events:none;z-index:2}
.socket-target{width:var(--socket-size,16px);height:var(--socket-size,16px);flex:none;display:flex;align-items:center;justify-content:center;border:1px solid #d9b87985;border-radius:50%;background:#0c09065e;box-shadow:inset 0 1px 3px #0009;pointer-events:auto;cursor:default}
.socket-target.filled{border-color:#d9b879;background:#100b08df;box-shadow:0 0 4px #000a}
.socket-target .gem-art{width:85%!important;height:85%!important;aspect-ratio:1;filter:drop-shadow(0 0 2px #000)}
.gem-dragging .socket-target.empty:not(.socket-broken){border:2px solid #e9c888;background:#21160bb3}
.socket-target.socket-drop-target{outline:2px solid #91c69b;outline-offset:2px;transform:scale(1.12)}
.gem-selected{outline:2px solid #e9c888;outline-offset:-2px}
.socket-gear-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin:10px 0}
.socket-gear-card{min-width:0;padding:10px;border:1px solid #59432e;border-radius:6px;background:#19130e;text-align:center}
.socket-gear-card strong{display:block;font:11px/1.4 system-ui;color:var(--item-color,#d9b879)}
.socket-gear-art{position:relative;display:grid;place-items:center;width:90px;height:110px;max-width:100%;margin:0 auto 8px;--socket-size:24px}
.socket-gear-art .item-art,.socket-gear-art .rpg-item-art{width:90px;height:90px;max-width:100%;float:none;margin:0}
.socket-gallery>h3{font-size:13px;color:#d9b879;margin-top:18px}
.item-preview{position:relative;display:grid;place-items:center;width:120px;height:120px;flex:none;--socket-size:27px}
.item-preview .item-art,.item-preview .rpg-item-art{width:100%!important;height:100%!important;float:none;margin:0}
.item-detail-heading{display:flex;align-items:center;gap:12px;margin-bottom:10px}.item-detail-heading h3{font-size:16px;margin:0;overflow-wrap:anywhere}
.hover-item-heading{display:flex;align-items:center;gap:10px;margin-bottom:9px}.hover-item-heading .rpg-item-art{width:72px;height:72px;flex:none;margin:0;float:none}.hover-item-heading h3{margin:0;font-size:16px}
.item-hover .item-heading>.item-art{width:80px;height:80px}

/* Picture-first stock; item details belong to the hover card. */
.equipment-shop-grid{grid-template-columns:repeat(auto-fill,minmax(128px,1fr))}
.equipment-offer{position:relative;height:186px;padding:8px;gap:0;cursor:pointer}
.equipment-offer .equipment-offer-art{width:100%;height:100%;max-height:none;aspect-ratio:auto;display:grid;place-items:center;padding-bottom:22px}
.equipment-offer .equipment-offer-art .rpg-item-art{width:100%;height:auto;aspect-ratio:1}
.equipment-offer .offer-price{position:absolute;right:7px;bottom:6px;display:flex;align-items:center;gap:4px;color:#efd08a;font:600 12px/1.3 system-ui;background:#17100bd9;padding:2px 5px;border-radius:4px}
.offer-price .rpg-item-art{width:24px!important;height:24px!important;margin:0!important}
.equipment-purchase{box-sizing:border-box;background:#21180f;border:1px solid #b98e51;border-radius:10px;color:#eee8db;max-width:340px;width:calc(100% - 30px);padding:20px;text-align:center;box-shadow:0 12px 40px #000c}
.equipment-purchase::backdrop{background:#090604c9}
.equipment-purchase .purchase-picture{display:grid;place-items:center}.equipment-purchase .equipment-offer-art{width:160px;height:160px;max-height:none;aspect-ratio:1}
.equipment-purchase .rpg-item-art{width:160px!important;height:160px!important;aspect-ratio:1}
.equipment-purchase #equipment-purchase-question{color:#f3d394;font:600 17px/1.5 system-ui;margin:12px 0}
.purchase-actions{display:flex;justify-content:center;gap:12px;margin-top:16px}.purchase-actions button{min-width:96px;min-height:40px}
.equipment-purchase .requirement-missing,.purchase-error{color:#ff8b84;font:12px/1.5 system-ui}
/* Diablo-style description hierarchy, with our existing rarity name colours. */
.item-base-stat,.item-base-stats{color:#eee8df!important}
.item-magic-stat,.item-affixes li,.item-affixes strong,.socket-display-entry:has(.filled){color:#8faaff!important}
.item-affixes .muted,.socket-display-entry:has(.empty){color:#b1aaa2!important}
.item-magic-stat small,.item-affixes small{color:#9eaed4!important}
.item-requirements{color:#d2ccc3!important}.item-requirements .requirement-missing,.requirement-missing{color:#ff8585!important}
.rpg-hover.common h3,.item-hover.common h3{color:#eee8db}.rpg-hover.uncommon h3,.item-hover.uncommon h3{color:#f3d16a}.rpg-hover.rare h3,.item-hover.rare h3{color:#84b7ff}.rpg-hover.legendary h3,.item-hover.legendary h3{color:#d9b879}
.item-hover .item-heading>.item-art{width:80px;height:80px}

.service-entry.shop-scene{position:relative;min-height:240px;display:flex;flex-direction:column;justify-content:space-between;gap:100px;padding:16px;border:1px solid #896239;border-radius:8px;background-color:#17100b;background-size:cover;background-position:center;overflow:hidden;box-shadow:inset 0 -75px 75px -15px #100b08}
.shop-scene-blacksmith{background-image:var(--shop-blacksmith)}.shop-scene-potion{background-image:var(--shop-potion)}.shop-scene-jewelcraft{background-image:var(--shop-jewelcraft)}.shop-scene-itemshop{background-image:var(--shop-itemshop)}
.shop-scene-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.shop-scene-heading h3{color:#f8dfb1!important;font:600 23px/1.2 Georgia,serif;text-shadow:0 2px 5px #000;background:#110c08a8;padding:7px 10px;border-radius:4px}.shop-access-badge{font:11px/1.4 system-ui;color:#f2dcab;padding:5px 8px;background:#141008c9;border:1px solid #76593b;border-radius:4px}
.shop-scene .service-actions{position:relative;z-index:1}.shop-scene .service-actions .ghost{background:#21170ee8}.mall-categories{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.mall-categories [aria-selected=true]{border-color:#ddbd81;background:#3a2b1b}.mall-potions[hidden]{display:none!important}
@media(min-width:620px){.service-entry.shop-scene{min-height:300px}}

.equipment-purchase .rpg-button{background:#32271b;color:#eee8db;border:1px solid #85653f;border-radius:6px;padding:8px 14px;font:600 13px system-ui;cursor:pointer}.equipment-purchase .rpg-button:disabled{opacity:.45;cursor:default}

.hover-item-heading .hover-item-preview,.item-hover .item-heading .hover-item-preview{width:100px;height:100px;--socket-size:22px}
.hover-item-heading .hover-item-preview .rpg-item-art{width:100%;height:100%;flex:none}
.rpg-hover .socket-target,.item-hover .socket-target{pointer-events:none}

/* Four aligned buttons per row, independent of label length. */
.mall-categories,.smith-rarities{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:100%;margin:10px 0}.mall-categories>button,.smith-rarities>button{min-width:0;width:100%;padding:8px 3px;white-space:nowrap}.blacksmith-grid{grid-template-columns:repeat(auto-fill,minmax(min(150px,100%),1fr))}.blacksmith-item{padding:8px}.smith-item-actions{display:flex;flex-wrap:wrap;gap:4px;justify-content:center}.smith-item-actions button{display:flex;align-items:center;gap:6px;margin:0}.smith-cost{display:inline-flex;align-items:center;gap:3px}.smith-cost .art-gold{width:20px;height:20px;float:none}

.mall-categories[hidden],.smith-rarities[hidden]{display:none!important}.blacksmith-item{border-radius:5px;display:flex;flex-direction:column;justify-content:space-between;gap:8px}.blacksmith-item .equipment-offer-art{min-height:140px;max-height:170px;width:100%;display:grid;place-items:center}.blacksmith-item .equipment-offer-art .rpg-item-art,.blacksmith-item .equipment-offer-art .item-art{width:min(100%,140px);height:140px;float:none;margin:0}

/* Neutral stock outlines; only interaction reveals rarity. */
.equipment-offer.common,.equipment-offer.uncommon,.equipment-offer.rare,.equipment-offer.legendary,.blacksmith-item{border-color:#655036;outline:none}
.equipment-offer:is(:hover,:focus-visible),.blacksmith-item:is(:hover,:focus-visible){border-color:var(--item-color,#eee8db);outline:1px solid var(--item-color,#eee8db);outline-offset:1px}
.mall-trade-tabs{display:flex;gap:6px;margin:12px 0}.mall-trade-tabs [aria-pressed=true]{border-color:#ddbd81;color:#f3d16a}
[data-mall-panel][hidden]{display:none!important}
.ingredient-count{position:absolute;right:7px;top:5px;color:#eee8db;font-weight:bold}
.alchemy-materials{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:16px}.ingredient-card{position:relative;color:#eee8db;border:1px solid #655036;background:#211a13;padding:8px;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:5px}.ingredient-card:disabled{opacity:.5;cursor:default}.ingredient-card .rpg-item-art{width:64px;height:64px;float:none;margin:0}.alchemy-slot{min-width:0}.ingredient-remove{background:none;border:0;color:#eee8db;cursor:pointer;display:grid;place-items:center;gap:4px;min-width:0;padding:0;font:11px system-ui}.ingredient-remove .rpg-item-art{width:64px;height:64px;margin:0;float:none}.ingredient-amount{display:flex;gap:8px;align-items:center}.ingredient-amount button{color:#eee8db;background:#32271b;border:1px solid #856540;border-radius:4px;padding:4px 9px}.alchemy-workbench h3{font-size:16px}.sell-gallery .gem-art{width:95%;height:auto;aspect-ratio:1}
