/* N3.7.4.1: equipment improvement number (+N) sourced from item instance. */
#hud-root .n3741-improved{position:relative;isolation:isolate;overflow:visible}
#hud-root .n3741-upgrade-level{
 position:absolute;left:-3px;top:-4px;z-index:6;pointer-events:none;
 color:#ffe14a;font:900 clamp(12px,1.15vw,17px)/1 system-ui,sans-serif;
 letter-spacing:-.04em;white-space:nowrap;
 text-shadow:-1px -1px 1px #090807,1px -1px 1px #090807,-1px 1px 1px #090807,1px 1px 1px #090807,0 2px 4px #000;
 filter:drop-shadow(0 0 2px #a87506)
}
#hud-root .inventory-large-icon.n3741-improved .n3741-upgrade-level{font-size:23px;top:3px;left:4px}
#hud-root .inventory-columns{grid-template-columns:minmax(270px,32%) minmax(300px,38%) minmax(260px,1fr)}
#hud-root .item-detail-column .inventory-object-description{margin:5px 0 7px}
#hud-root .item-detail-column .inventory-type{margin:3px 0}
#hud-root .item-detail-column .inventory-object-stats{margin:6px 0}
#hud-root .item-detail-column .inventory-detail-scroll{min-height:0;overflow-y:auto}
@media(max-width:1050px){#hud-root .inventory-columns{grid-template-columns:minmax(215px,32%) minmax(240px,1fr) minmax(195px,28%)}}
@media(max-width:780px){#hud-root .inventory-columns{grid-template-columns:1fr 1fr}}
@media(max-width:510px){#hud-root .inventory-columns{grid-template-columns:1fr}}

/* N3.7.4.2 — Mochila ONLY. Prevent auto rows from stretching into fused columns. */
#hud-root .bag-column .inventory-grid{
 display:grid;grid-template-columns:repeat(8,minmax(0,1fr));
 grid-auto-rows:min-content;align-content:start;align-items:start;
 gap:5px;overflow-y:auto;overflow-x:hidden;
}
#hud-root .bag-column .inventory-grid>.inventory-cell{
 box-sizing:border-box;width:100%;height:auto;aspect-ratio:1/1;
 min-height:0;min-width:0;align-self:start;justify-self:center;
 border:1px solid #455166;border-radius:3px;
 background:#101820;
}
#hud-root .bag-column .inventory-grid>.inventory-cell:disabled{opacity:1}
#hud-root .bag-column .inventory-grid>.inventory-cell.is-selected{outline:2px solid #efd082;outline-offset:-2px}

/* N3.7.4.2: equipment comparison strictly inside existing object-detail panel. */
#hud-root .n3742-compare{border:1px solid #596780;border-radius:5px;padding:7px;margin-top:7px;background:#101821;color:#e1dfcc;font:11px/1.35 system-ui,sans-serif}
#hud-root .n3742-compare h4{margin:0 0 7px;color:#ffe0a0;font:700 12px Georgia,serif}
#hud-root .n3742-compare p{margin:4px 0}
#hud-root .n3742-compare-row{display:flex;justify-content:space-between;gap:6px;border-bottom:1px solid #354251;padding:3px 0}
#hud-root .n3742-compare-row strong{white-space:nowrap}
#hud-root .n3742-compare-row .positive{color:#8eeab0}
#hud-root .n3742-compare-row .negative{color:#f3a0a0}
#hud-root .n3742-compare-select{width:100%;background:#0b1320;border:1px solid #64748b;color:#ffe6b1;padding:6px}

/* N3.7.4.2 — Success toast replaces the old potion crafting confirmation window. */
#hud-root .n3742-craft-toast{position:fixed;right:25px;bottom:75px;z-index:100000;display:flex;align-items:center;gap:13px;
 padding:12px 18px;border:1px solid #e3ba5f;border-radius:8px;background:#17202df0;box-shadow:0 0 15px #dfba6177;
 pointer-events:none;animation:n3742-craft-fade 2.55s ease-out forwards}
#hud-root .n3742-craft-art{width:56px;height:56px;display:grid;place-items:center}
#hud-root .n3742-craft-art img{width:100%;height:100%;object-fit:contain}
#hud-root .n3742-craft-copy{display:flex;flex-direction:column;gap:5px;color:#dfebff}
#hud-root .n3742-craft-copy strong{color:#ffe39e;font:700 18px Georgia,serif}
@keyframes n3742-craft-fade{0%{opacity:0;transform:translateY(12px)}12%,79%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-7px)}}

/* N3.7.4.4: only 5 category tabs and the INSIDE of the detail panel. */
#hud-root .bag-column .inventory-categories{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
#hud-root .bag-column .inventory-category{min-width:0;padding-inline:2px;font-size:clamp(9px,.70vw,12px);white-space:nowrap}
#hud-root .item-detail-column .n3744-detail-hero{display:grid;grid-template-columns:minmax(94px,43%) minmax(0,1fr);gap:10px;align-items:start;min-width:0;margin:5px 0 9px}
#hud-root .item-detail-column .n3744-detail-hero .inventory-large-icon{height:auto;min-height:112px;aspect-ratio:1/1;min-width:0}
#hud-root .item-detail-column .n3744-detail-meta{min-width:0;display:grid;gap:6px;align-content:start}
#hud-root .item-detail-column .n3744-detail-meta p,#hud-root .item-detail-column .n3744-detail-meta h4{margin:0;overflow-wrap:anywhere}
#n16-pve .n3744-resource-note{display:block;margin:8px 0;color:#9bbac9;font-size:11px}
