/* N3.7.3: HUD-only styles; N3.7.2 tactical geometry and SERVER remain unchanged. */
#n16-pve polygon[data-range-preview="true"]{stroke:#8f9eae;stroke-width:1.4px}
#n16-pve .n373-result{background:linear-gradient(150deg,rgba(17,26,35,.98),rgba(8,15,24,.98));border:1px solid #b49153;box-shadow:0 0 0 3px #10151d,0 12px 48px #000b;width:min(860px,96%);max-height:100%;padding:clamp(12px,2vw,26px);gap:12px;align-items:stretch}
#n16-pve .n373-result.n373-defeat{border-color:#a54755;background:linear-gradient(155deg,#1a1922,#15151e 65%,#29131b)}
#n16-pve .n373-result-heading{display:flex;align-items:center;justify-content:center;gap:12px;border-bottom:1px solid #856c45;padding-bottom:8px}
#n16-pve .n373-result-heading h2{margin:0;font:700 clamp(32px,5vw,60px)/1.05 Georgia,serif;letter-spacing:.06em;color:#f9e2aa;text-shadow:0 2px 12px #aa803a55}
#n16-pve .n373-defeat .n373-result-heading h2{color:#ffb6bc}
#n16-pve .n373-result-top{display:grid;grid-template-columns:minmax(105px,26%) minmax(0,1fr);gap:18px;align-items:center}
#n16-pve .n373-result-hero{width:100%;height:clamp(110px,19vh,205px);display:flex;align-items:center;justify-content:center;background:#070e18a6;border:1px solid #786441;border-radius:8px}
#n16-pve .n373-result-hero .n37-portrait{height:100%;width:100%;border:0;background:transparent;overflow:hidden}
#n16-pve .n373-result-hero img{width:100%;height:100%;object-fit:contain}
#n16-pve .n373-defeat .n373-result-hero img{filter:grayscale(.95)}
#n16-pve .n373-result-summary{display:flex;flex-direction:column;gap:6px;min-width:0}
#n16-pve .n373-result-summary strong{color:#f2deb4;font:700 clamp(15px,1.5vw,20px) Georgia,serif}
#n16-pve .n373-result-fact{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #73808d37;padding:5px 0;font-size:13px}
#n16-pve .n373-result-fact span:last-child{color:#f6e7c5;font-weight:700}
#n16-pve .n373-rewards{display:grid;grid-template-columns:minmax(140px,1fr) minmax(0,2fr);gap:10px}
#n16-pve .n373-result-card{background:#0b1522;border:1px solid #586373;border-radius:7px;padding:11px;min-width:0}
#n16-pve .n373-result-card h3{font:700 14px Georgia,serif;letter-spacing:.07em;color:#e8d0a1;margin:0 0 9px}
#n16-pve .n373-result-card .n37-loot{display:grid;grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:8px}
#n16-pve .n373-result-card .n37-loot>p{grid-column:1/-1}
#n16-pve .n373-result-card .n37-loot-item{flex-direction:column;align-items:center;text-align:center;font-size:10px;min-height:88px;gap:4px;word-break:break-word}
#n16-pve .n373-result-card .n37-loot-item img{width:47px;height:47px;object-fit:contain}
#n16-pve .n373-xp-award{font:800 21px Georgia,serif;color:#92e9a7}
#n16-pve .n373-exp-note{color:#bfcbd6;font:11px/1.5 system-ui,sans-serif}
#n16-pve .n373-exp-bar{height:15px;border-radius:10px;background:#1d2836;border:1px solid #93754c;overflow:hidden}
#n16-pve .n373-exp-bar span{display:block;height:100%;background:linear-gradient(90deg,#429e66,#9decad);width:var(--from,0%);animation:n373-gain-exp 1.4s ease-out both}
@keyframes n373-gain-exp{to{width:var(--to,0%)}}
#n16-pve .n373-result-action{display:flex;justify-content:center;margin-top:7px}
#n16-pve .n373-result-action button{min-height:43px;padding:9px 24px;font:700 15px Georgia,serif;border:1px solid #c7a35d;border-radius:6px;background:#342819;color:#fbe4b8}
#n16-pve .n373-result-action button:disabled{opacity:.5;cursor:not-allowed}
#hud-root .inventory-columns{height:clamp(430px,69vh,690px);min-height:0;align-items:stretch}
#hud-root .inventory-columns .inventory-column{height:100%;min-height:0;max-height:100%;overflow:hidden}
#hud-root .item-detail-column{gap:7px}
#hud-root .inventory-detail-heading{margin:0;padding:3px 0 7px;flex:0 0 auto}
#hud-root .inventory-detail-scroll{overflow-y:auto;overflow-x:hidden;flex:1 1 auto;min-height:0;scrollbar-width:thin;scrollbar-color:#917647 #111820;display:flex;flex-direction:column;gap:6px}
#hud-root .inventory-detail-actions{display:flex;flex-direction:column;gap:6px;flex:0 0 auto;padding-top:7px;border-top:1px solid #49505a}
#hud-root .inventory-detail-actions .inventory-action{margin-top:0;min-height:35px}
#hud-root .item-detail-column .inventory-large-icon{height:clamp(95px,15vh,142px);min-height:95px;margin:0}
#hud-root .item-detail-column .inventory-object-name{margin:2px 0 0;font-size:17px}
#hud-root .item-detail-column .inventory-type,#hud-root .item-detail-column .inventory-object-description{margin:0;line-height:1.4;font-size:11px}
#hud-root .item-detail-column .inventory-object-stats{margin:4px 0;gap:1px}
#hud-root .item-detail-column .inventory-stat-bonus{padding:3px 1px;font-size:12px}
#hud-root .inventory-item-total{font-variant-numeric:tabular-nums}
/* Party remains accessible but cannot compete in stacking with any modal. */
#n19-party-toggle{padding:6px 10px;min-width:72px;max-width:135px;min-height:31px;font-size:11px;z-index:95}
#n19-party{width:min(265px,74vw);max-height:min(40vh,310px);padding:9px;font-size:11px;z-index:96;overflow:auto}
#n19-party button,#n19-party select{margin:4px 0;padding:5px;font-size:11px}
#hud-root .hud-overlay:not([hidden]){z-index:140!important}
@media(max-width:780px){#hud-root .inventory-columns{height:auto;max-height:none}#hud-root .inventory-columns .inventory-column{height:auto;max-height:430px}#hud-root .item-detail-column{min-height:280px;height:360px!important}}
@media(prefers-reduced-motion:reduce){#n16-pve .n373-exp-bar span{animation:none;width:var(--to,0%)}}

#hud-root .bag-column .inventory-grid{overflow-y:auto;overflow-x:hidden;min-height:0;flex:1 1 auto;align-content:start;scrollbar-width:thin}

#n16-pve .p05-turn-clock{display:block;color:#c0e8ff;font:800 15px system-ui,sans-serif;letter-spacing:.03em}
#n16-pve .p05-turn-clock[data-urgent='true']{color:#ff8c82}
