/* Saved HUD positions outrank native anchor rules, including pinned bars. */
html.hud-layout-enabled body #screen-game .hud-located[data-hud-key]:not(.mm-full),
html.hud-layout-enabled body #toasts.hud-located[data-hud-key]{position:fixed!important;left:var(--hud-x)!important;top:var(--hud-y)!important;right:auto!important;bottom:auto!important;width:var(--hud-w)!important;min-width:0!important;max-width:none!important;margin:0!important;transform:none!important;translate:none!important;scale:var(--hud-s)!important;transform-origin:0 0!important;opacity:var(--hud-o)!important}
html.hud-layout-enabled body #screen-game .screen-msg.hud-located:not(.show),html.hud-layout-enabled body #screen-game :is(.tg-toast,.sense-card).hud-located:not(.show){opacity:0!important}
html.hud-layout-enabled .win .win-lock,html.hud-layout-enabled .win .win-rz{display:none!important}
html.hud-layout-enabled .win .win-head{cursor:default}
html.hud-layout-enabled #ctl-fab:has(.hud-located):before{display:none}
html.hud-layout-enabled .profile-shortcuts button.hud-located{flex:none}
.item-drop-toasts{width:min(340px,90vw)}
.hud-editor{position:fixed;inset:0;z-index:150000;isolation:isolate;font:12px 'Multiverse Nunito Sans',Arial;color:#e4ecf7;touch-action:none}
.hud-edit-grid{position:absolute;inset:0;background:linear-gradient(#07111f17,#07111f33),repeating-linear-gradient(0deg,transparent 0 39px,#c4d9f00a 39px 40px),repeating-linear-gradient(90deg,transparent 0 39px,#c4d9f00a 39px 40px)}
.hud-edit-grid:before,.hud-edit-grid:after{content:'';position:absolute;pointer-events:none;background:#c2d6ef25}.hud-edit-grid:before{left:50%;top:0;bottom:0;width:1px}.hud-edit-grid:after{top:50%;left:0;right:0;height:1px}
.hud-edit-canvas{position:absolute;inset:0;pointer-events:none}
.hud-grab{position:absolute;pointer-events:auto;touch-action:none;padding:0;border:1px dashed #c4dbf4a8;border-radius:5px;background:#c2d6ee09;box-shadow:inset 0 0 0 1px #0917254d;cursor:grab;color:#e5f1ff;text-align:left;user-select:none}
.hud-grab:active{cursor:grabbing}.hud-grab.selected{border:2px solid #f5d66d;box-shadow:0 0 0 2px #08142288,inset 0 0 20px #f5d66d10;background:#f5d66d0a;z-index:3}
.hud-grab>span{position:absolute;top:-1px;left:-1px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#132237ee;border:1px solid #a8c0df6b;border-radius:3px;padding:3px 6px;font:800 9px/1.25 'Multiverse Nunito Sans',Arial;text-shadow:0 1px #000;pointer-events:none}
.hud-grab.selected>span{color:#fff1b2;border-color:#f5d66d88}.hud-grab.ghost{background:repeating-linear-gradient(135deg,#b9d3f013 0 8px,#16263b35 8px 16px);border-style:dashed;min-height:28px}
.hud-edit-panel{position:absolute;right:18px;top:100px;width:274px;max-height:calc(100dvh - 118px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:18px;border:1px solid #b9ccdf9c;border-radius:8px;background:linear-gradient(140deg,#253345f5,#101c2cf5);box-shadow:0 10px 50px #0008,inset 0 1px #eff7ff45;backdrop-filter:blur(6px);z-index:10}
.hud-edit-panel header small{font-size:8px;letter-spacing:1.7px;color:#aebfd5}.hud-edit-panel h2{font:700 23px 'Multiverse Cinzel',Georgia;margin:7px 0;color:#f1f6fc}.hud-edit-panel header p{font-size:11px;line-height:1.6;color:#bdcbdf;margin:0 0 16px}
.hud-field{display:flex;flex-direction:column;gap:8px;margin:12px 0;font-weight:800}.hud-field>span{display:flex;justify-content:space-between;align-items:center}.hud-field b{font-size:11px;color:#d7e5f5;font-variant-numeric:tabular-nums}.hud-field select{width:100%;min-width:0;padding:8px;border:1px solid #8ca4c06b;border-radius:4px;color:#edf5ff;background:#111f31;font:700 11px 'Multiverse Nunito Sans',Arial;touch-action:auto}.hud-field input[type=range]{width:100%;accent-color:#dce8f7;cursor:pointer;touch-action:auto}
.hud-item-note{color:#92a9c5;font-size:10px;line-height:1.6;min-height:32px;margin:8px 0 15px}.hud-coordinates{display:flex;gap:8px;margin:12px 0}.hud-coordinates label{display:flex;align-items:center;gap:7px;width:50%;font-size:10px;font-weight:900;color:#b2c5dd}.hud-coordinates input{width:100%;min-width:0;padding:7px 5px;border:1px solid #9fb6d05c;border-radius:4px;background:#101d2e;color:#eaf4ff;font:700 11px 'Multiverse Nunito Sans',Arial}
.hud-nudge{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.hud-nudge button{height:30px;font-size:18px}.hud-editor button:not(.hud-grab){cursor:pointer;color:#e5edf7;border:1px solid #9db4d16b;border-radius:4px;background:linear-gradient(#b1c7e420,#18263a);font-family:'Multiverse Nunito Sans',Arial}.hud-editor button:not(.hud-grab):hover{border-color:#dfedff;background:#cadcf22e}.hud-editor button:focus-visible,.hud-editor select:focus-visible,.hud-editor input:focus-visible{outline:2px solid #f6da83;outline-offset:2px}.hud-editor button:disabled{opacity:.4;cursor:default}
.hud-snap{display:flex;align-items:center;gap:7px;margin:15px 0;color:#b7c7dd;font-size:10px}.hud-snap input{accent-color:#e7cf72}.hud-editor-tools{display:flex;gap:7px}.hud-editor-tools button{padding:7px;flex:1;font-size:10px;font-weight:800}.hud-reset-all{width:100%;padding:9px;margin-top:8px;font-size:10px;font-weight:800}.hud-save-note{font-size:9px;line-height:1.7;color:#91a7c1;border-top:1px solid #9db4d12b;padding-top:12px;margin:14px 0}
.hud-confirm{display:flex;gap:7px}.hud-confirm button{padding:10px 7px;font-size:10px;font-weight:900}.hud-confirm>button:first-child{flex:1}.hud-editor .hud-save{flex:1.6;background:linear-gradient(#f4df92,#c2a74f)!important;border-color:#fff0b2!important;color:#201d12!important;box-shadow:inset 0 1px #fff6ca,0 3px 10px #d8bd5d20}
.hud-fixed-label{position:absolute;left:50%;top:82px;transform:translateX(-50%);border:1px solid #9bb1cd55;background:#102035d9;border-radius:4px;padding:4px 9px;font:700 9px 'Multiverse Nunito Sans',Arial;color:#becfe4;pointer-events:none}
.hud-panel-tools{display:flex;gap:6px;margin:0 0 10px}.hud-panel-tools button{flex:1;padding:5px;font-size:9px;font-weight:800}.hud-edit-panel.hud-panel-left{left:18px;right:auto}.hud-edit-panel.hud-panel-collapsed{height:auto}.hud-edit-panel.hud-panel-collapsed> :not(header):not(.hud-panel-tools):not(.hud-confirm){display:none}.hud-panel-collapsed header small,.hud-panel-collapsed header p{display:none}.hud-panel-collapsed h2{font-size:18px;margin:0 0 10px}.hud-edit-panel.hud-panel-collapsed{padding:12px}
@media(max-width:760px){.hud-edit-panel{width:236px;right:8px;top:8px;max-height:calc(100dvh - 16px);padding:13px}.hud-edit-panel h2{font-size:19px}.hud-edit-panel header p{font-size:10px;margin-bottom:10px}.hud-field{margin:9px 0;gap:6px}.hud-item-note{min-height:0;margin-bottom:9px}.hud-fixed-label{top:auto;bottom:8px;left:8px;transform:none;max-width:125px}.hud-grab>span{font-size:8px;padding:2px 4px}.hud-confirm button{font-size:9px}}
@media(prefers-reduced-motion:reduce){.hud-editor *{transition:none!important}}
