:root{color-scheme:dark;--bg:#111418;--panel:#191e24;--panel2:#222830;--line:#313944;--text:#e8edf2;--muted:#98a4af;--accent:#ef9e3a;--green:#5fbe7b;--danger:#d86a6a}
*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:var(--bg);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}button,input,select{font:inherit}button,.button-label{border:1px solid var(--line);background:#252c34;color:var(--text);padding:9px 12px;border-radius:7px;cursor:pointer;user-select:none}button:hover,.button-label:hover{background:#303943}button:disabled{opacity:.4;cursor:not-allowed}.topbar{height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid var(--line);background:#15191e}.brand{display:flex;align-items:center;gap:10px;min-width:230px}.brand-mark{width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#e99a37,#813d22);display:grid;place-items:center}.brand strong{display:block;font-size:14px;letter-spacing:.08em}.brand small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.toolbar button,.toolbar .button-label{font-size:12px;padding:8px 10px}.toolbar .active{border-color:var(--accent)}.toolbar .play{background:#245d3b;border-color:#347c50}.toolbar .danger{color:#ffb4b4}.sep{width:1px;height:27px;background:var(--line);margin:0 4px}.workspace{height:calc(100% - 62px);display:grid;grid-template-columns:250px minmax(460px,1fr) 275px}.palette,.inspector{background:var(--panel);overflow:auto;padding:13px;border-right:1px solid var(--line)}.inspector{border-right:0;border-left:1px solid var(--line)}.panel-title{font-weight:800;font-size:12px;letter-spacing:.12em;color:#cfd7df;margin:2px 0 8px}.hint{font-size:11px;color:var(--muted);line-height:1.4;margin-bottom:12px}.palette section{border-top:1px solid var(--line);padding-top:9px;margin-top:9px}.palette h3,.inspector h3{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:0 0 8px}.palette-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.prefab{min-height:59px;padding:7px 5px;font-size:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.prefab span{font-size:20px;color:#c8d1da}.prefab.section{background:#25282f;border-color:#4d4234}.prefab.isometric{background:#2b2822;border-color:#6b5b43}.prefab.isometric span{color:#d6c59c}.prefab.bridge-module{border-color:#79694f;background:#302b24}.prefab.bridge-module span{color:#e0c88f}.prefab.gameplay{background:#202b28;border-color:#30473f}.help-card{margin-top:14px;border:1px solid var(--line);border-radius:8px;padding:10px;background:#151a20;font-size:10px;color:var(--muted);display:grid;gap:4px}.help-card strong{color:var(--text);margin-bottom:3px}.viewport-wrap{position:relative;min-width:0;min-height:0;background:#0d1014;display:flex;flex-direction:column}.viewport-wrap.playing{outline:2px solid #3c8a58;outline-offset:-2px}#viewport{position:relative;flex:1;min-height:0;overflow:hidden;outline:none;overscroll-behavior:contain;touch-action:none}#viewport canvas{display:block;width:100%;height:100%;overscroll-behavior:contain;touch-action:none}#modeBadge,#status,#playHelp,#dropHint{position:absolute;z-index:5;pointer-events:none;background:#131820d9;border:1px solid #3a424c;border-radius:7px;padding:6px 9px;font-size:11px}#modeBadge{top:10px;left:10px;font-weight:700;color:#f4b25f}#status{bottom:10px;left:10px;color:#b8c4cf}#playHelp{top:10px;left:50%;transform:translateX(-50%);color:#cbe9d3}#dropHint{inset:20px;border:2px dashed #d89443;display:none;align-items:center;justify-content:center;font-size:22px;font-weight:800;color:#f3b35e;background:#18140c88}.viewport-wrap.dragover #dropHint{display:flex}.quickbar{height:48px;display:flex;justify-content:center;gap:7px;padding:7px;border-top:1px solid var(--line);background:#15191e}.quickbar button{font-size:12px;padding:7px 11px}.inspector-group{border-top:1px solid var(--line);padding-top:11px;margin-top:11px}.inspector-group.always{margin-top:18px}.empty-state{padding:14px 10px;border:1px dashed var(--line);border-radius:8px;color:var(--muted);font-size:12px}.entity-head{display:grid;gap:8px}.entity-head strong,.entity-head small{display:block}.entity-head small{color:var(--muted);font-size:10px;text-transform:uppercase;margin-top:2px}input,select{width:100%;background:#10151a;border:1px solid #39424c;color:var(--text);border-radius:6px;padding:7px 8px;font-size:12px}label{font-size:10px;color:var(--muted);display:grid;gap:5px}.triple{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.check{display:flex;align-items:center;gap:7px;margin-top:9px}.check input{width:auto}.stats{display:flex;justify-content:space-between;padding:4px 0;font-size:12px;color:var(--muted)}.stats strong{color:var(--text)}.inspector-group button{width:100%;margin-top:8px;font-size:11px}
@media(max-width:1000px){.workspace{grid-template-columns:200px minmax(360px,1fr) 220px}.palette-grid{grid-template-columns:1fr}.brand{min-width:170px}.toolbar button,.toolbar .button-label{padding:6px 8px}.topbar{height:70px}.workspace{height:calc(100% - 70px)}}

/* v0.3.13 freeform resize + Shift proportional lock */
.workspace{grid-template-columns:300px minmax(460px,1fr) 285px}
.palette{padding:0;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.palette-head{padding:13px 13px 8px;border-bottom:1px solid var(--line);background:#171c22}
.asset-search{margin-top:6px}
.palette-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;border-bottom:1px solid var(--line);background:#151a20}
.palette-tab{border:0;border-right:1px solid var(--line);border-radius:0;padding:9px 3px;font-size:10px;color:var(--muted);background:#171c22;min-width:0}
.palette-tab:last-child{border-right:0}.palette-tab.active{background:#242b33;color:var(--text);box-shadow:inset 0 -2px var(--accent)}
.palette-scroll{flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;padding:10px 10px 18px}
.palette-scroll::-webkit-scrollbar,.texture-grid::-webkit-scrollbar,.texture-folders::-webkit-scrollbar{width:10px}.palette-scroll::-webkit-scrollbar-thumb,.texture-grid::-webkit-scrollbar-thumb,.texture-folders::-webkit-scrollbar-thumb{background:#3d4651;border-radius:10px;border:2px solid #1a1f25}
.palette-pane{display:none}.palette-pane.active{display:block}.palette-pane details{border:1px solid var(--line);border-radius:8px;margin-bottom:9px;background:#171c22;overflow:hidden}.palette-pane summary{cursor:pointer;list-style:none;padding:9px 10px;font-size:11px;font-weight:700;color:#d5dde5;display:flex;align-items:center;justify-content:space-between;background:#1d232a;user-select:none}.palette-pane summary::-webkit-details-marker{display:none}.palette-pane summary:before{content:'▸';margin-right:7px;color:var(--muted)}.palette-pane details[open] summary:before{content:'▾'}.palette-pane summary span{font-size:9px;color:var(--muted);font-weight:600;margin-left:auto}.palette-pane .palette-grid{padding:8px}.palette-pane .prefab{position:relative}.prefab.has-default-texture:after{content:'T';position:absolute;right:4px;top:4px;width:15px;height:15px;border-radius:50%;display:grid;place-items:center;background:#8d642d;color:#fff;font-size:9px;font-weight:800}.library-note{font-size:10px;line-height:1.5;color:var(--muted);border:1px dashed var(--line);border-radius:8px;padding:9px;margin:6px 0}.library-note code{color:#e5c28f}.saved-toolbar,.texture-tab-toolbar{display:flex;gap:6px;margin-bottom:8px}.saved-toolbar button,.texture-tab-toolbar button{width:100%;font-size:11px}.saved-assets{display:grid;grid-template-columns:1fr;gap:7px}.saved-asset{display:grid;grid-template-columns:72px 1fr;align-items:start;gap:9px;padding:9px;border:1px solid var(--line);border-radius:8px;background:#20262d;cursor:pointer}.saved-asset:hover{background:#29313a}.saved-asset .saved-icon{width:68px;height:52px;border-radius:7px;background:#171b20;display:grid;place-items:center;font-size:20px;overflow:hidden}.saved-asset .saved-icon img{width:100%;height:100%;object-fit:cover;display:block}.saved-asset strong{font-size:11px}.saved-asset small{display:block;color:var(--muted);font-size:9px;margin-top:2px}.saved-asset .saved-delete{color:#e5a1a1}.saved-main{min-width:0}.saved-actions{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px}.saved-actions button{padding:4px 6px;font-size:9px;line-height:1.1}.texture-mini{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px}.texture-mini-item{aspect-ratio:1;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:#11161b;position:relative}.texture-mini-item img{width:100%;height:100%;object-fit:cover;display:block}.texture-mini-item span{position:absolute;left:3px;right:3px;bottom:3px;background:#111a;color:#fff;font-size:8px;padding:2px 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.compact-help{margin:0 10px 10px;flex:0 0 auto}

.appearance-summary{font-size:10px;line-height:1.45;color:#cbd5df;background:#11161b;border:1px solid var(--line);border-radius:7px;padding:8px;margin-bottom:8px;min-height:34px}.appearance-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.appearance-actions button{padding:7px 5px}.inspector-note{font-size:9px;line-height:1.45;color:var(--muted);margin:8px 0 0}.subtle{color:var(--muted)}

.context-menu{position:fixed;z-index:1000;min-width:190px;background:#20262d;border:1px solid #46515d;border-radius:8px;padding:5px;box-shadow:0 12px 32px #0008}.context-menu button{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:5px;padding:8px 9px;font-size:11px}.context-menu button:hover{background:#303944}
.modal-backdrop{position:fixed;inset:0;z-index:1100;background:#0009;display:grid;place-items:center;padding:22px}.modal-backdrop[hidden]{display:none}.texture-modal{width:min(980px,94vw);height:min(760px,88vh);background:#181d23;border:1px solid #424c57;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 25px 80px #000b}.small-modal{width:min(480px,92vw);background:#181d23;border:1px solid #424c57;border-radius:12px;padding:14px;box-shadow:0 25px 80px #000b}.small-modal p{font-size:11px;line-height:1.5;color:var(--muted)}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line);background:#1e242b}.small-modal .modal-head{padding:0 0 12px;margin-bottom:12px}.modal-head strong{font-size:13px}.modal-head small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.modal-head button{font-size:20px;line-height:1;padding:4px 9px}.texture-controls{display:grid;grid-template-columns:1.4fr 1.2fr 1.3fr .75fr .75fr .9fr 1fr;gap:7px;padding:10px 12px;border-bottom:1px solid var(--line);background:#151a20}.tile-lock-label{display:flex!important;flex-direction:column;justify-content:flex-end;gap:7px}.tile-lock-label input{width:18px;height:18px;margin:4px auto 5px}.tile-quick-row{grid-column:1/-1;display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding-top:2px;color:var(--muted);font-size:9px}.tile-quick-row .tile-quick{padding:4px 8px;font-size:9px}.tile-quick-row small{margin-left:5px;color:var(--muted)}.texture-browser-head{display:flex;gap:8px;padding:9px 12px;border-bottom:1px solid var(--line)}.texture-browser-head input{flex:1}.texture-browser-head button{white-space:nowrap}.texture-browser-body{display:grid;grid-template-columns:180px minmax(0,1fr);min-height:0;flex:1}.texture-folders{overflow-y:auto;border-right:1px solid var(--line);padding:8px;background:#14191f}.texture-folder-btn{width:100%;text-align:left;border:0;background:transparent;padding:7px 8px;border-radius:6px;font-size:10px;color:var(--muted);display:flex;justify-content:space-between;gap:6px}.texture-folder-btn.active{background:#29323b;color:var(--text)}.texture-grid{overflow-y:auto;padding:10px;display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));align-content:start;gap:9px}.texture-card{border:1px solid var(--line);border-radius:8px;padding:5px;background:#20262d;text-align:left;min-width:0}.texture-card:hover{background:#2b333d}.texture-card.selected{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.texture-card img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:5px;display:block;background:#10151a}.texture-card strong{display:block;font-size:10px;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.texture-card small{display:block;font-size:8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.texture-empty{grid-column:1/-1;color:var(--muted);font-size:11px;border:1px dashed var(--line);border-radius:8px;padding:18px;text-align:center;line-height:1.5}.modal-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-top:1px solid var(--line);background:#151a20;font-size:10px;color:var(--muted)}.modal-foot>div{display:flex;gap:6px}.primary{background:#7b572b;border-color:#aa793c!important;color:#fff!important}

@media(max-width:1200px){.workspace{grid-template-columns:265px minmax(420px,1fr) 250px}.palette-tabs{grid-template-columns:repeat(3,1fr)}.texture-controls{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1000px){.workspace{grid-template-columns:225px minmax(360px,1fr) 220px}.palette-grid{grid-template-columns:1fr}.palette-tabs{grid-template-columns:repeat(2,1fr)}.texture-browser-body{grid-template-columns:140px minmax(0,1fr)}}


/* v0.3.5 full-width category sub-tabs */
.palette-subtabs{display:flex;overflow-x:auto;overflow-y:hidden;gap:0;border-bottom:1px solid var(--line);background:#11161b;scrollbar-width:thin;flex:0 0 auto}
.palette-subtabs[hidden]{display:none}
.palette-subtab{flex:1 0 auto;min-width:112px;border:0;border-right:1px solid var(--line);border-radius:0;padding:9px 11px;font-size:10px;white-space:nowrap;color:var(--muted);background:#151b21}
.palette-subtab:last-child{border-right:0}.palette-subtab.active{background:#29323b;color:#fff;box-shadow:inset 0 -2px #62c4ff}
.palette-pane.subtabbed>details{border:0;margin:0;background:transparent;overflow:visible}
.palette-pane.subtabbed>details>summary{display:none}
.palette-pane.subtabbed>details>.palette-grid{padding:0;grid-template-columns:repeat(2,minmax(0,1fr))}
.palette-pane.subtabbed>details[hidden]{display:none}
@media(max-width:1000px){.palette-pane.subtabbed>details>.palette-grid{grid-template-columns:1fr}.palette-subtab{min-width:104px}}


.scale-guide-legend{position:absolute;top:10px;right:10px;z-index:6;pointer-events:none;background:#131820d9;border:1px solid #3a424c;border-radius:8px;padding:9px 10px;min-width:220px;max-width:280px;box-shadow:0 12px 28px #0006}
.scale-guide-legend[hidden]{display:none}
.scale-guide-legend-title{font-size:11px;font-weight:800;letter-spacing:.08em;color:#f2f6fb;margin-bottom:7px;text-transform:uppercase}
.scale-guide-row{display:flex;align-items:center;gap:8px;font-size:10px;color:#c7d1da;line-height:1.35;margin:4px 0}
.scale-guide-swatch{width:18px;height:10px;border:2px solid #fff;border-radius:3px;display:inline-block;flex:0 0 auto}
.scale-guide-note{margin-top:8px;padding-top:8px;border-top:1px solid #2f3843;color:#91a0ae;font-size:9px;line-height:1.45}


/* v0.3.9 actual 3D prefab thumbnails */
.palette-pane .prefab{min-height:116px;padding:5px 5px 7px;gap:4px;overflow:hidden}
.prefab-thumb{width:100%;height:70px;border-radius:6px;overflow:hidden;background:#151b21;border:1px solid #323b45;display:grid;place-items:center;pointer-events:none}
.prefab-thumb img{width:100%;height:100%;display:block;object-fit:cover}
.prefab-thumb-placeholder{font-size:10px!important;letter-spacing:.08em;color:#6f7d8a!important;font-weight:800}
.prefab-name{font-size:10px!important;color:#e2e8ee!important;line-height:1.15;text-align:center;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.prefab-footprint{font-size:8px;color:#8997a5;line-height:1.1;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.palette-pane.subtabbed>details>.palette-grid{align-items:start}
@media(max-width:1000px){.palette-pane .prefab{min-height:126px}.prefab-thumb{height:78px}}


/* v0.3.11 no visible scrollbars + paged library */
.palette-scroll{overflow:hidden!important;scrollbar-width:none!important;padding-bottom:8px}
.palette-scroll::-webkit-scrollbar,.palette-subtabs::-webkit-scrollbar,.texture-grid::-webkit-scrollbar,.texture-folders::-webkit-scrollbar,.inspector::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.palette-subtabs,.texture-grid,.texture-folders,.inspector{scrollbar-width:none!important}
.palette-subtabs{overflow:visible!important;flex-wrap:wrap}
.palette-subtab{flex:1 1 112px;min-width:96px}
.palette-pager{display:flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:4px 10px 7px;border-top:1px solid var(--line);background:#151a20;flex:0 0 auto}
.palette-pager[hidden]{display:none}
.palette-pager>button{width:32px;height:28px;padding:0;border-radius:6px;font-size:17px;line-height:1}
.palette-page-numbers{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0}
.palette-page-number{min-width:28px;height:28px;padding:0 6px;font-size:10px;border-radius:6px}
.palette-page-number.active{border-color:var(--accent);background:#373027;color:#fff}
.marquee-select{position:absolute;z-index:9;pointer-events:none;border:1px solid #63c6ff;background:rgba(74,177,235,.14);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.marquee-select[hidden]{display:none}


/* v0.3.13 gamepad editor support */
#gamepadBadge{position:absolute;z-index:7;left:10px;top:43px;pointer-events:none;background:#131820cc;border:1px solid #395067;border-radius:7px;padding:5px 8px;font-size:10px;color:#9ed1ff;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#gamepadBadge[hidden]{display:none}
#gamepadReticle{position:absolute;z-index:6;left:50%;top:50%;width:18px;height:18px;transform:translate(-50%,-50%);pointer-events:none;border:1px solid #dbe7f1aa;border-radius:50%;box-shadow:0 0 0 1px #0008}
#gamepadReticle[hidden]{display:none}
#gamepadReticle:before,#gamepadReticle:after{content:'';position:absolute;background:#dbe7f1cc}
#gamepadReticle:before{width:7px;height:1px;left:5px;top:8px}
#gamepadReticle:after{width:1px;height:7px;left:8px;top:5px}


/* v0.3.15 elevation + controller asset browser */
.prefab.gamepad-asset-focus,.saved-asset.gamepad-asset-focus,.texture-mini-item.gamepad-asset-focus{outline:3px solid #62c4ff;outline-offset:-3px;background:#263746!important;box-shadow:inset 0 0 0 1px #b6e1ff}
.palette.gamepad-library-focus{box-shadow:inset 0 0 0 2px #62c4ff}

/* v0.4.0 ARPG Game Designer foundation */
.designer-nav{height:44px;display:flex;align-items:stretch;gap:0;background:#101419;border-bottom:1px solid var(--line);overflow:hidden;flex:0 0 auto}
.designer-nav-btn{border:0;border-right:1px solid var(--line);border-radius:0;background:#171c22;color:var(--muted);font-size:11px;font-weight:700;padding:0 15px;white-space:nowrap;min-width:0}
.designer-nav-btn:hover{background:#202730}.designer-nav-btn.active{background:#28313a;color:#fff;box-shadow:inset 0 -3px var(--accent)}
.workspace{height:calc(100% - 106px)}
.designer-surface{display:none}.designer-surface.active{display:grid}
.designer-page{height:calc(100% - 106px);display:none;overflow:auto;scrollbar-width:none;background:#11161b;padding:18px 20px 24px}
.designer-page::-webkit-scrollbar{display:none}.designer-page.active{display:block}
.designer-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px;border-bottom:1px solid var(--line);padding-bottom:13px}
.designer-page-head h1{margin:0;color:#edf3f8;font-size:22px;letter-spacing:.01em}.designer-page-head p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.45;max-width:760px}
.designer-two-col{display:grid;grid-template-columns:270px minmax(0,1fr);gap:14px;min-height:470px}
.designer-list-panel,.designer-editor-panel{background:#181e24;border:1px solid var(--line);border-radius:9px;padding:12px;min-width:0}
.designer-entity-list{display:grid;gap:7px}.designer-list-item{width:100%;text-align:left;padding:10px 11px;border-radius:7px;background:#222a32;color:#dce4eb;border:1px solid #323c47;font-size:11px}.designer-list-item small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.designer-list-item.active{border-color:var(--accent);background:#302a22;box-shadow:inset 3px 0 var(--accent)}
.designer-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 12px}.designer-span-2{grid-column:1/-1}.designer-form-grid textarea{width:100%;resize:vertical;min-height:76px;background:#10151a;border:1px solid #39424c;color:var(--text);border-radius:6px;padding:8px;font:inherit;font-size:12px}.designer-form-grid label{font-size:10px}.designer-form-grid .designer-check{display:flex;align-items:center;gap:8px;min-height:40px;border:1px solid #323b45;background:#12171c;border-radius:7px;padding:8px 10px;color:#cbd4dc}.designer-check input{width:auto}
.designer-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.designer-actions .danger{color:#ffb4b4}.designer-info-card{margin-top:12px;border:1px dashed #3b4651;border-radius:8px;background:#13181e;padding:10px;color:#aebbc6;font-size:10px;line-height:1.5}
.designer-editor-panel h2{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#d9e1e8;margin:0 0 12px}
.designer-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.designer-settings-grid>.designer-editor-panel:last-child{grid-column:1/-1}
.designer-hud-layout{display:grid;grid-template-columns:minmax(320px,.8fr) minmax(420px,1.2fr);gap:14px}.hud-preview{position:relative;min-height:430px;border:1px solid #39434e;border-radius:10px;background:linear-gradient(135deg,#263139,#151b20 55%,#11161b);overflow:hidden;padding:18px;color:#eef5f7}.hud-preview-health{position:absolute;top:18px;left:18px;width:190px;height:28px;border:2px solid #e9e9e9;background:#632b2b;border-radius:5px;display:flex;align-items:center;padding:0 8px;font-size:9px;font-weight:800}.hud-preview-stack{position:absolute;left:18px;top:56px;display:grid;gap:5px;font-size:9px}.hud-preview-stack span{display:block;background:#111b;border:1px solid #ffffff24;padding:5px 7px;border-radius:4px}.hud-preview-boss{position:absolute;bottom:20px;left:22%;right:22%;height:26px;border:2px solid #d6d6d6;background:#4e2626;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:800}
@media(max-width:1100px){.designer-nav-btn{padding:0 9px;font-size:10px}.designer-two-col{grid-template-columns:220px minmax(0,1fr)}.designer-hud-layout,.designer-settings-grid{grid-template-columns:1fr}.designer-settings-grid>.designer-editor-panel:last-child{grid-column:auto}}
@media(max-width:1000px){.workspace,.designer-page{height:calc(100% - 114px)}}


/* v0.4.5 humanoid animation library */
.character-editor-panel{overflow:hidden}.character-subtabs{display:flex;border-bottom:1px solid var(--line);margin:-12px -12px 12px;background:#12171c}.character-subtab{flex:1;border:0;border-right:1px solid var(--line);border-radius:0;background:#171d23;color:var(--muted);font-size:11px;font-weight:700;padding:11px}.character-subtab:last-child{border-right:0}.character-subtab.active{background:#28313a;color:#fff;box-shadow:inset 0 -3px var(--accent)}
.character-subpane{display:none}.character-subpane.active{display:block}.animation-help-card{display:grid;gap:4px;border:1px solid #3b4752;background:#13191f;border-radius:8px;padding:10px;margin-bottom:10px;font-size:10px;color:var(--muted)}.animation-help-card strong{color:#eef4f8;font-size:11px}.animation-help-card code{color:#e5c28f}
.animation-toolbar{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:9px}.animation-toolbar button,.animation-toolbar .button-label{font-size:10px;padding:7px 9px}.animation-slot-section{border-top:1px solid var(--line);margin-top:12px;padding-top:12px}.designer-section-title{font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:#dce5ec;margin-bottom:8px}.animation-slot-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.animation-slot-grid select{font-size:10px;padding:7px}.animation-library-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;border-top:1px solid var(--line);margin-top:14px;padding-top:12px}.animation-library-head small{color:var(--muted);font-size:9px}.animation-library-filters{display:flex;gap:6px;min-width:360px}.animation-library-filters input{min-width:190px}.animation-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:9px;min-height:192px}.animation-card{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:9px;text-align:left;border:1px solid #35404b;background:#20272e;border-radius:8px;padding:8px;min-width:0}.animation-card:hover{background:#29323a}.animation-card.selected{border-color:var(--accent);box-shadow:inset 3px 0 var(--accent)}.animation-card-icon{width:42px;height:42px;border-radius:7px;background:#11171c;display:grid;place-items:center;font-size:18px;color:#bdd3e3;border:1px solid #303b45}.animation-card strong{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.animation-card small{display:block;color:var(--muted);font-size:8px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.animation-pager{display:flex;justify-content:center;align-items:center;gap:9px;margin-top:9px}.animation-pager button{font-size:10px;padding:6px 10px}.animation-pager span{font-size:9px;color:var(--muted)}
@media(max-width:1100px){.animation-slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.animation-library-grid{grid-template-columns:1fr}.animation-library-head{align-items:stretch;flex-direction:column}.animation-library-filters{min-width:0}}


/* v0.4.5 categorized animation library + live motion thumbnails */
.animation-category-tabs{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0 4px;overflow:visible}
.animation-category-tab{display:flex;align-items:center;gap:6px;padding:6px 9px;border-radius:7px;font-size:9px;background:#1b2229;border:1px solid #35404b;color:#aebbc6;white-space:nowrap}
.animation-category-tab small{font-size:8px;color:#7f8c98;background:#10161b;border-radius:9px;padding:1px 5px}
.animation-category-tab.active{border-color:var(--accent);color:#fff;background:#2b2a26;box-shadow:inset 0 -2px var(--accent)}
.animation-library-filters{min-width:320px}.animation-library-filters select{min-width:125px}
.animation-library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;min-height:340px}
.animation-card{grid-template-columns:160px minmax(0,1fr);align-items:stretch;min-height:128px;padding:7px;gap:9px;overflow:hidden}
.animation-preview{position:relative;width:160px;height:112px;border-radius:7px;overflow:hidden;background:#10161c;border:1px solid #303b45;display:block;align-self:center}
.animation-preview-canvas{display:block;width:160px;height:112px;background:#10161c}
.animation-preview-canvas.preview-error{opacity:.35}
.animation-preview-fallback{position:absolute;inset:0;display:grid;place-items:center;color:#91a0ad;font-size:9px;background:#10161ccc;text-align:center;padding:8px}
.animation-preview-fallback[hidden]{display:none}
.animation-card-meta{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:5px}
.animation-card-meta strong{font-size:11px;line-height:1.3;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.animation-card-meta small{font-size:8px;color:var(--muted)}
.animation-card-badges,.animation-info-badges{display:flex;flex-wrap:wrap;gap:4px}
.animation-card-badges em,.animation-info-badges b{font-style:normal;font-weight:700;font-size:7px;letter-spacing:.02em;padding:3px 5px;border-radius:5px;background:#15212a;border:1px solid #344654;color:#b9d3e3}
.animation-card-badges em+em,.animation-info-badges b+b{background:#221e17;border-color:#4e4230;color:#d9c08d}
.animation-info-badges{display:inline-flex;margin:4px 0}
.animation-help-card code{white-space:nowrap}
@media(max-width:1200px){.animation-library-grid{grid-template-columns:1fr}.animation-card{grid-template-columns:150px minmax(0,1fr)}.animation-preview,.animation-preview-canvas{width:150px}.animation-library-filters{min-width:260px}}


/* v0.4.6 compact assigned animation preview cards */
.character-assigned-section{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
.character-assigned-head{display:flex;justify-content:space-between;align-items:flex-end;gap:10px}
.character-assigned-head small{display:block;color:var(--muted);font-size:9px;margin-top:3px}
.character-preview-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:9px 0}
.character-preview-tab{font-size:9px;padding:7px 5px;background:#192027;border:1px solid #35404b;color:#aebbc6}
.character-preview-tab.active{border-color:var(--accent);color:#fff;background:#2b2a26;box-shadow:inset 0 -2px var(--accent)}
.character-assigned-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-height:214px}
.character-assigned-preview-card{padding:5px;border:1px solid #35404b;background:#1b2229;border-radius:8px;display:flex;flex-direction:column;min-width:0;overflow:hidden;text-align:left}
.character-assigned-preview-card:hover{background:#263039;border-color:#506170}
.character-assigned-preview{position:relative;display:block;width:100%;aspect-ratio:160/112;border-radius:6px;overflow:hidden;background:#10161c;border:1px solid #303b45}
.character-assigned-preview-canvas{display:block;width:100%;height:100%;background:#10161c}
.character-assigned-preview-canvas[hidden]{display:none}
.character-assigned-preview-fallback{position:absolute;inset:0;display:grid;place-items:center;color:#8998a5;font-size:9px;background:#10161c;text-align:center;padding:6px}
.character-assigned-preview-fallback[hidden]{display:none}
.character-assigned-preview-meta{display:block;padding:5px 3px 2px;min-width:0}
.character-assigned-preview-meta strong{display:block;font-size:9px;color:#e7edf3}
.character-assigned-preview-meta small{display:block;font-size:8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.animation-picker-status{margin:9px 0;padding:9px 10px;border:1px solid #8a6a38;background:#2c251b;border-radius:8px;color:#dec38f;font-size:10px;line-height:1.45}
.animation-picker-status[hidden]{display:none}
@media(max-width:1200px){.character-assigned-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.character-preview-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.character-assigned-preview-grid{grid-template-columns:1fr}}


/* v0.4.5 character animation workspace */
.character-designer-grid{grid-template-columns:340px 175px minmax(0,1fr);gap:12px;align-items:stretch;min-height:0}
.character-animation-library-panel{padding:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;overscroll-behavior:contain;min-height:0;max-height:calc(100vh - 190px);outline:none}
.character-animation-library-panel::-webkit-scrollbar{display:none}
.character-animation-library-panel:focus{border-color:#4f6374;box-shadow:inset 0 0 0 1px #4f6374}
.character-library-sticky-head{position:sticky;top:0;z-index:5;background:#181e24;border-bottom:1px solid var(--line);padding:10px}
.character-library-sticky-head .designer-section-title{margin-bottom:2px}
.character-library-sticky-head>div>small{color:var(--muted);font-size:8px}
.character-library-filters{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}
.character-library-filters input{grid-column:1/-1;font-size:10px;padding:6px 7px}
.character-library-filters select{font-size:9px;padding:6px 5px}
.character-library-status{margin-top:6px;color:#8fa0ad;font-size:8px;line-height:1.35}
.character-library-count{position:sticky;bottom:0;z-index:4;background:#151b21e8;border-top:1px solid var(--line);padding:6px 9px;text-align:center;color:#8fa0ad;font-size:8px;backdrop-filter:blur(4px)}
.character-library-selected-info{margin:7px 8px 10px;font-size:8px;padding:7px;overflow-wrap:anywhere}
.character-list-panel{padding:10px;overflow-y:auto;scrollbar-width:none;max-height:calc(100vh - 190px)}
.character-list-panel::-webkit-scrollbar{display:none}
.animation-library-left-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px;margin:0;min-height:0;align-content:start}
.animation-library-left-grid .animation-card{display:flex;flex-direction:column;gap:4px;min-height:0;padding:4px;border-radius:7px;align-items:stretch}
.animation-library-left-grid .animation-preview{width:100%;height:auto;aspect-ratio:160/112;border-radius:5px;align-self:stretch}
.animation-library-left-grid .animation-preview-canvas{width:100%;height:100%}
.animation-library-left-grid .animation-card-meta{gap:2px;padding:0 2px 2px}
.animation-library-left-grid .animation-card-meta strong{font-size:8px;line-height:1.2;-webkit-line-clamp:1;white-space:nowrap;display:block;text-overflow:ellipsis}
.animation-library-left-grid .animation-card-meta small{font-size:7px;margin:0}
.animation-library-left-grid .animation-card-badges{gap:2px}
.animation-library-left-grid .animation-card-badges em{font-size:6px;padding:2px 3px}
.animation-left-hint{margin-top:10px}
.animation-pager,.animation-category-tabs,.animation-library-head{display:none!important}

.character-preview-tabs[hidden]{display:none!important}
.character-assigned-preview-grid{grid-template-columns:repeat(5,minmax(92px,1fr));gap:6px;min-height:0;max-height:390px;overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain;padding-right:1px;outline:none}
.character-assigned-preview-grid::-webkit-scrollbar{display:none}
.character-assigned-preview-card{padding:3px;border-radius:6px}
.character-assigned-preview{aspect-ratio:160/112;border-radius:5px}
.character-assigned-preview-meta{padding:3px 2px 1px}
.character-assigned-preview-meta strong{font-size:8px}
.character-assigned-preview-meta small{font-size:7px;margin-top:1px}
.character-assigned-preview-fallback{font-size:7px;padding:4px}
.character-assigned-head small{font-size:8px}

@media(max-width:1500px){.character-designer-grid{grid-template-columns:300px 155px minmax(0,1fr)}.character-assigned-preview-grid{grid-template-columns:repeat(4,minmax(88px,1fr))}}
@media(max-width:1220px){.character-designer-grid{grid-template-columns:265px 135px minmax(0,1fr)}.animation-library-left-grid{grid-template-columns:1fr}.character-assigned-preview-grid{grid-template-columns:repeat(3,minmax(88px,1fr))}}
@media(max-width:980px){.character-designer-grid{grid-template-columns:220px minmax(0,1fr)}.character-list-panel{display:none}.character-assigned-preview-grid{grid-template-columns:repeat(3,minmax(82px,1fr))}}


/* v0.4.5 animation-browser scrolling + slot mini previews */
.character-animation-library-panel{height:calc(100vh - 190px);max-height:calc(100vh - 190px);overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:none!important;overscroll-behavior:contain;touch-action:pan-y}
.character-animation-library-panel::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.animation-library-left-grid{min-height:max-content}
.animation-slot-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 9px}
.animation-slot-grid>label{min-width:0}
.animation-slot-control-row{display:grid;grid-template-columns:48px minmax(0,1fr);gap:6px;align-items:center;min-width:0}
.animation-slot-control-row select{min-width:0;width:100%;height:38px;font-size:9px;padding:5px 6px}
.animation-slot-mini-preview{width:48px;height:38px;padding:0!important;margin:0!important;border:1px solid #35404b;border-radius:5px;background:#0f151a;overflow:hidden;position:relative;display:block}
.animation-slot-mini-preview:hover{border-color:var(--accent);background:#141c22}
.animation-slot-mini-canvas{display:block;width:100%;height:100%;background:#0f151a}
.animation-slot-mini-canvas[hidden]{display:none}
.animation-slot-mini-fallback{position:absolute;inset:0;display:grid;place-items:center;color:#788795;font-size:8px;background:#0f151a}
.animation-slot-mini-fallback[hidden]{display:none}
@media(max-width:1300px){.animation-slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.animation-slot-grid{grid-template-columns:1fr}}


/* v0.4.6 page-flow chosen movements + shared character preview renderer */
.character-assigned-preview-grid{max-height:none!important;overflow:visible!important;overscroll-behavior:auto!important;padding-right:0!important}
.character-assigned-section{overflow:visible}
.character-editor-panel{overflow:visible}
.character-model-preview-panel{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
.character-model-preview-head{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:7px}
.character-model-preview-head small{color:var(--muted);font-size:8px;overflow-wrap:anywhere;text-align:right}
.character-model-preview{position:relative;width:min(360px,100%);aspect-ratio:320/220;border:1px solid #35404b;border-radius:8px;background:#10161c;overflow:hidden}
.character-model-preview-canvas{display:block;width:100%;height:100%;background:#10161c}
.character-model-preview-fallback{position:absolute;inset:0;display:grid;place-items:center;color:#8998a5;font-size:9px;background:#10161c;text-align:center;padding:8px}
.character-model-preview-fallback[hidden]{display:none}
.preview-soft-note{inset:auto 5px 5px 5px!important;min-height:0!important;height:auto!important;padding:3px 5px!important;background:#10161ccb!important;border:1px solid #35404b!important;border-radius:4px!important;font-size:7px!important;display:block!important;text-align:center!important;place-items:unset!important}
.animation-preview-canvas.preview-error,.character-assigned-preview-canvas.preview-error,.animation-slot-mini-canvas.preview-error{opacity:.25}

/* v0.4.7 live motion preview cue */
.animation-preview:after,.character-assigned-preview:after,.animation-slot-mini-preview:after{content:'▶';position:absolute;right:4px;top:4px;z-index:3;font-size:8px;line-height:1;color:#bfe8ff;background:#0a1016aa;border:1px solid #32434f;border-radius:4px;padding:2px 3px;pointer-events:none}
.animation-slot-mini-preview:after{font-size:7px;right:2px;top:2px;padding:1px 2px}


/* v0.4.9 character folder browser */
.character-model-picker-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:7px 0 2px}
.character-model-picker-row button{font-size:10px;padding:7px 9px}
.character-model-picker-row small{color:var(--muted);font-size:9px;margin-left:auto}
.character-model-picker-row code{color:#e0bd88}
.character-select-modal{width:min(960px,94vw);max-height:88vh;background:#181d23;border:1px solid #424c57;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 25px 80px #000b}
.character-select-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;gap:7px;padding:10px 12px;border-bottom:1px solid var(--line);background:#151a20}
.character-select-toolbar input{min-width:0}
.character-library-modal-status{padding:7px 12px;color:#91a0ae;font-size:9px;border-bottom:1px solid var(--line);background:#171c22}
.character-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:9px;padding:12px;overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain;align-content:start;min-height:220px}
.character-library-grid::-webkit-scrollbar{display:none}
.character-library-card{display:flex;flex-direction:column;min-width:0;padding:5px;border:1px solid #35404b;background:#1b2229;border-radius:8px;text-align:left}
.character-library-card:hover{background:#253039;border-color:#506170}
.character-library-card.selected{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.character-library-card-preview{position:relative;display:block;width:100%;aspect-ratio:10/7;border-radius:6px;overflow:hidden;background:#10161c;border:1px solid #303b45}
.character-library-card-canvas{display:block;width:100%;height:100%;background:#10161c}
.character-library-card-fallback{position:absolute;inset:0;display:grid;place-items:center;color:#8998a5;font-size:9px;text-align:center;padding:6px;background:#10161c}
.character-library-card-fallback[hidden]{display:none}
.character-library-card-meta{display:block;padding:6px 3px 2px;min-width:0}
.character-library-card-meta strong{display:block;font-size:10px;color:#e7edf3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.character-library-card-meta small{display:block;font-size:8px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.character-library-card-meta code{display:block;font-size:7px;color:#9eb1bf;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:720px){.character-select-toolbar{grid-template-columns:1fr 1fr}.character-select-toolbar input{grid-column:1/-1}.character-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* v0.4.11 character orientation + compact chosen movements + page scrolling */
.designer-page[data-designer-page="characters"]{overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;scrollbar-width:none!important}
.designer-page[data-designer-page="characters"]::-webkit-scrollbar{display:none!important}
.character-editor-panel,.character-assigned-section{overflow:visible!important;min-height:0}
.character-assigned-preview-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(112px,142px))!important;
  justify-content:start!important;
  align-items:start!important;
  gap:5px!important;
  max-height:none!important;
  overflow:visible!important;
  min-height:0!important;
  padding:0!important;
}
.character-assigned-preview-card{width:100%!important;min-width:0!important;max-width:142px!important;padding:3px!important}
.character-assigned-preview{width:100%!important;aspect-ratio:96/68!important;max-height:82px!important}
.character-assigned-preview-meta{padding:2px 2px 1px!important}
.character-assigned-preview-meta strong{font-size:7px!important}
.character-assigned-preview-meta small{font-size:6px!important}
.character-assigned-preview-fallback{font-size:6px!important}
@media(max-width:1200px){.character-assigned-preview-grid{grid-template-columns:repeat(auto-fill,minmax(104px,130px))!important}.character-assigned-preview-card{max-width:130px!important}}

.character-facing-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:-2px}.character-facing-tools span{font-size:10px;color:var(--muted);font-weight:700}.character-facing-tools button{padding:5px 8px;font-size:10px}.character-facing-tools small{color:var(--muted);font-size:9px;margin-left:4px}

/* v0.4.16 clean native Mixamo import status */
.character-import-status{margin-top:8px;font-size:10px;line-height:1.45}.character-import-status.import-ok{border-color:#3f7656;color:#bfe9ca;background:#142019}.character-import-status.import-warn{border-color:#7a683d;color:#ead9aa;background:#211d13}

/* v0.4.19 canonical Mixamo baseline + bone correction editor */
.character-library-card.canonical-character{border-color:#55b97a;box-shadow:inset 0 0 0 1px #55b97a55}.canonical-baseline-note{border-color:#3f7654;background:#17251d}.canonical-baseline-note strong{color:#9be0b0}


/* v0.4.19 character bone correction editor */
.bone-correction-panel{margin-top:12px;border:1px solid var(--line);border-radius:10px;background:#151b21;padding:10px;overflow:visible}
.bone-correction-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:9px}
.bone-correction-head small{display:block;color:var(--muted);font-size:9px;line-height:1.4;max-width:620px}
.bone-mirror-toggle{display:flex!important;grid-auto-flow:column;align-items:center;gap:7px;white-space:nowrap;color:#cbd5df;font-size:10px}
.bone-mirror-toggle input{width:16px;height:16px;margin:0}
.bone-correction-axis-head,.bone-correction-row{display:grid;grid-template-columns:minmax(112px,1.25fr) 72px 72px 72px minmax(265px,2.4fr);gap:6px;align-items:center}
.bone-correction-axis-head{padding:0 6px 5px;color:#7f8c99;font-size:8px;text-transform:uppercase;letter-spacing:.06em}
.bone-correction-row{padding:6px;border-top:1px solid #2a333d}
.bone-correction-row strong{font-size:10px;color:#e5ebf1;white-space:nowrap}
.bone-correction-row input{padding:5px 6px;font-size:10px;min-width:0}
.bone-quick{display:flex;gap:4px;flex-wrap:wrap}
.bone-quick button{padding:5px 7px;font-size:9px;min-width:40px}
.bone-correction-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding-top:9px;border-top:1px solid #2a333d;margin-top:4px}
.bone-correction-actions button{font-size:10px;padding:6px 9px}
.bone-correction-actions small{color:var(--muted);font-size:9px;line-height:1.35;margin-left:4px}
@media(max-width:1250px){.bone-correction-axis-head,.bone-correction-row{grid-template-columns:minmax(100px,1fr) 62px 62px 62px minmax(190px,1.7fr)}.bone-correction-head{flex-direction:column}}


/* v0.4.20 reliable whole-right Character editor scrolling */
.designer-page[data-designer-page="characters"] .character-editor-panel{
  height:calc(100vh - 190px)!important;
  max-height:calc(100vh - 190px)!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-width:none!important;
  overscroll-behavior-y:contain!important;
  touch-action:pan-y;
  scroll-behavior:auto;
  outline:none;
  align-self:start;
}
.designer-page[data-designer-page="characters"] .character-editor-panel::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
/* The chosen-movement grid stays in normal document flow; it is NOT its own scroll window. */
.designer-page[data-designer-page="characters"] .character-assigned-preview-grid{
  max-height:none!important;
  overflow:visible!important;
  overscroll-behavior:auto!important;
}
@media(max-width:1000px){
  .designer-page[data-designer-page="characters"] .character-editor-panel{
    height:calc(100vh - 198px)!important;
    max-height:calc(100vh - 198px)!important;
  }
}


/* v0.4.24 exact visible stair-tread grounding + chest/upper-chest corrections preview */
.bone-correction-workspace{display:grid;grid-template-columns:minmax(560px,1.35fr) minmax(360px,.85fr);gap:12px;align-items:start;margin-top:12px}
.bone-correction-workspace .bone-correction-panel{margin-top:0}
.character-correction-preview-panel{position:sticky;top:0;border:1px solid var(--line);border-radius:10px;background:#151b21;padding:10px;min-width:0}
.character-correction-preview-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.character-correction-preview-toolbar label{min-width:150px;flex:1}
.character-correction-preview-actions{display:flex;gap:5px;flex-wrap:wrap}
.character-correction-preview-actions button{padding:6px 9px;font-size:10px}
.character-correction-preview-actions button.active{border-color:#62c4ff;background:#233846}
.character-model-preview-large{width:100%!important;max-width:none!important;aspect-ratio:520/430!important;min-height:360px}
.character-correction-preview-tip{margin-top:7px;color:var(--muted);font-size:9px;line-height:1.4}
@media(max-width:1500px){.bone-correction-workspace{grid-template-columns:minmax(500px,1.2fr) minmax(320px,.8fr)}.character-model-preview-large{min-height:320px}}
@media(max-width:1180px){.bone-correction-workspace{grid-template-columns:1fr}.character-correction-preview-panel{position:static}.character-model-preview-large{min-height:360px}}

/* v0.4.29 two-column Characters workspace + rig view */
.character-designer-grid{
  display:grid!important;
  grid-template-columns:minmax(330px,390px) minmax(0,1fr)!important;
  grid-template-areas:"left editor"!important;
  gap:12px!important;
  align-items:start!important;
  min-height:0!important;
}
.character-left-column{
  grid-area:left;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  height:calc(100vh - 190px);
  overflow:hidden;
}
.character-left-column .character-list-panel{
  order:0;
  flex:0 0 auto;
  max-height:150px!important;
  overflow-y:auto!important;
  scrollbar-width:none!important;
}
.character-left-column .character-list-panel::-webkit-scrollbar{display:none!important}
.character-left-column .character-animation-library-panel{
  order:1;
  flex:1 1 auto;
  min-height:0;
  max-height:none!important;
  height:auto!important;
  overflow-y:auto!important;
  scrollbar-width:none!important;
}
.character-left-column .character-animation-library-panel::-webkit-scrollbar{display:none!important}
.character-editor-panel{grid-area:editor;min-width:0}

.character-rig-toolbar{display:grid;grid-template-columns:minmax(170px,.75fr) minmax(180px,1fr);gap:8px;align-items:end;margin:7px 0 8px}
.character-rig-toggle{display:flex!important;align-items:center;gap:7px;border:1px solid #33414b;background:#111820;border-radius:7px;padding:8px 9px;color:#d5e2eb!important;font-size:10px!important;min-height:35px}
.character-rig-toggle input{width:16px!important;height:16px!important;margin:0!important}
.character-rig-numbers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:8px}
.rig-number-group{border:1px solid #303a44;border-radius:8px;background:#11171d;padding:7px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;min-width:0}
.rig-number-group>strong{grid-column:1/-1;font-size:9px;color:#d8e3eb;letter-spacing:.04em}
.rig-number-group label{font-size:8px!important;gap:3px!important}
.rig-number-group input{padding:5px 5px!important;font-size:9px!important}
.rig-live-values{grid-template-columns:1fr;align-content:start}
.rig-live-values span{font-size:9px;color:#aebbc6;background:#0c1217;border:1px solid #28323b;border-radius:5px;padding:5px 6px;white-space:nowrap}
.rig-number-actions{border:1px solid #303a44;border-radius:8px;background:#11171d;padding:7px;display:grid;grid-template-columns:1fr 1fr;gap:5px;align-content:start}
.rig-number-actions button{padding:6px 7px!important;font-size:9px!important;margin:0!important}
.character-correction-preview-panel{min-width:430px}
.character-model-preview-large{min-height:460px!important;aspect-ratio:560/500!important}
.bone-correction-workspace{grid-template-columns:minmax(520px,1fr) minmax(440px,1.05fr)!important;gap:14px!important}

@media(max-width:1350px){
  .character-designer-grid{grid-template-columns:310px minmax(0,1fr)!important}
  .bone-correction-workspace{grid-template-columns:1fr!important}
  .character-correction-preview-panel{min-width:0;position:static!important}
  .character-model-preview-large{min-height:420px!important}
}
@media(max-width:950px){
  .character-designer-grid{grid-template-columns:1fr!important;grid-template-areas:"left" "editor"!important}
  .character-left-column{height:auto;max-height:420px}
  .character-rig-numbers{grid-template-columns:1fr}
}


/* v0.4.35 non-destructive SkeletonUtils retarget + preview fallback */
.simple-rig-status{margin:4px 0 5px;border:1px solid #2e4853;border-radius:6px;background:#0f171d;padding:6px 8px;color:#b9d8e2;font-size:9px;line-height:1.35}.simple-rig-status.rig-map-warn{border-color:#7b5635;color:#efbf87}.character-rig-legend{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 8px;color:#8fa0ad;font-size:8px}.character-rig-legend span[class$="-dot"]{width:9px;height:9px;border-radius:50%;display:inline-block;margin-left:5px}.rig-center-dot{background:#55e6d7}.rig-left-dot{background:#4ba3ff}.rig-right-dot{background:#67df78}


/* v0.4.44 drag-and-drop animation sets / sequences */
.animation-card[draggable="true"]{cursor:grab}.animation-card.dragging{opacity:.45;outline:1px dashed #62c4ff}
.character-assigned-preview-grid.animation-set-editor{display:block!important;max-width:none!important;overflow:visible!important}
.animation-set-section{border:1px solid #303b46;border-radius:10px;background:#12181e;margin:0 0 9px;padding:8px;min-width:0}
.animation-set-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:7px}
.animation-set-head>div{min-width:0}.animation-set-head strong{display:block;font-size:11px;color:#edf3f7}.animation-set-head small{display:block;font-size:8px;color:#8f9eaa;line-height:1.35;margin-top:2px}
.animation-set-head em{font-style:normal;font-size:7px;letter-spacing:.08em;border:1px solid #3a4a56;border-radius:4px;padding:3px 5px;color:#9fd8fa;background:#14232d;white-space:nowrap}
.animation-set-phases{display:flex;align-items:stretch;gap:5px;min-width:0;flex-wrap:wrap}
.animation-set-phase{flex:1 1 150px;min-width:135px;border:1px solid #28333d;border-radius:8px;background:#0d1318;padding:5px}
.animation-set-phase-label{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:4px}.animation-set-phase-label strong{font-size:9px;color:#dce6ed}.animation-set-phase-label small{font-size:6px;text-transform:uppercase;color:#71818d;border:1px solid #27343d;border-radius:3px;padding:2px 3px}
.animation-set-phase-clips{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:4px;align-items:stretch}
.animation-set-clip{position:relative;min-width:0;border:1px solid #35414c;border-radius:6px;background:#161e25;padding:3px;cursor:grab}.animation-set-clip.drag-over,.animation-set-dropzone.drag-over{border-color:#62c4ff!important;box-shadow:inset 0 0 0 1px #62c4ff;background:#172a35!important}.animation-set-clip.dragging{opacity:.45}
.animation-set-clip-preview{position:relative;display:block;width:100%;aspect-ratio:96/68;border-radius:4px;overflow:hidden;background:#0a0f13}.animation-set-clip-canvas{display:block;width:100%;height:100%}.animation-set-clip-fallback{position:absolute;inset:0;display:grid;place-items:center;font-size:6px;color:#6f7d88}
.animation-set-clip-meta{padding:2px 1px 0;min-width:0}.animation-set-clip-meta strong{display:block;font-size:6.5px;line-height:1.15;color:#dbe6ed;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.animation-set-clip-meta small{display:block;font-size:5.5px;color:#73828e;margin-top:1px}
.animation-set-remove{position:absolute;right:2px;top:2px;width:16px!important;height:16px!important;min-width:16px!important;padding:0!important;margin:0!important;border-radius:50%!important;border:1px solid #663f43!important;background:#321b1e!important;color:#f5a7ac!important;font-size:10px!important;line-height:14px!important;z-index:4}
.animation-set-dropzone{min-height:64px!important;border:1px dashed #3b4a56!important;border-radius:6px!important;background:#10171d!important;color:#758794!important;padding:4px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:1px!important;margin:0!important}.animation-set-dropzone span{font-size:16px;color:#79bce4}.animation-set-dropzone small{font-size:5.5px;line-height:1.1}
.animation-set-arrow{display:flex;align-items:center;justify-content:center;flex:0 0 12px;color:#60727e;font-size:14px;font-weight:800}
.animation-set-phases.states .animation-set-arrow{display:none}
@media(max-width:1250px){.animation-set-phase{flex-basis:130px;min-width:120px}.animation-set-phase-clips{grid-template-columns:repeat(auto-fill,minmax(66px,1fr))}.animation-set-arrow{display:none}}


/* v0.4.44 Play Test hero state + reliable animation drag/drop */
#setPlayCharacterBtn.play-hero-active{background:#245d3b!important;border-color:#5fbe7b!important;color:#eaffef!important;font-weight:800;box-shadow:inset 0 0 0 1px #5fbe7b55}
body.animation-drag-active .animation-set-phase{outline:1px dashed #4a7895;outline-offset:-2px}
body.animation-drag-active .animation-set-dropzone{border-color:#62c4ff!important;background:#13232c!important;color:#a9dbfa!important}
.animation-set-phase.drag-over{outline:2px solid #62c4ff!important;outline-offset:-2px;background:#13242d!important}
.animation-card.dragging{opacity:.45;outline:2px solid #62c4ff}

/* v0.4.45 Play Test character-state safety + hero feedback */
.play-character-debug{position:absolute;left:10px;top:46px;z-index:8;pointer-events:none;max-width:min(820px,calc(100% - 20px));padding:6px 9px;border:1px solid #3d566a;border-radius:7px;background:#101820e6;color:#aee1ff;font:600 10px/1.35 Consolas,monospace;white-space:normal}
.play-hero-feedback{margin:7px 0 0;padding:8px 10px;border:1px solid #3a424c;border-radius:7px;background:#151a20;color:#98a4af;font-size:10px;font-weight:700}.play-hero-feedback.active{border-color:#3f8b58;background:#163322;color:#9ff0b7}.play-hero-active{background:#245d3b!important;border-color:#56a874!important;color:#fff!important}

/* v0.4.47 Characters workspace readability + six-tab workflow */
.designer-page[data-designer-page="characters"] .designer-page-head h1{font-size:28px!important;letter-spacing:0!important}
.designer-page[data-designer-page="characters"] .designer-page-head p{font-size:13px!important;max-width:900px!important}
.character-workspace-tabs{display:grid!important;grid-template-columns:repeat(6,minmax(105px,1fr));margin:-12px -12px 16px!important;position:sticky;top:-12px;z-index:20;background:#11171c!important}
.character-workspace-tabs .character-subtab{font-size:13px!important;padding:13px 8px!important;letter-spacing:.01em!important}
.character-page-title{margin:2px 0 16px;padding:0 0 12px;border-bottom:1px solid #34404a}
.character-page-title h2{margin:0;color:#f2f6f9;font-size:24px;line-height:1.15;letter-spacing:.01em}
.character-page-title p{margin:6px 0 0;color:#9aa8b4;font-size:12px;line-height:1.5;max-width:920px}
.designer-page[data-designer-page="characters"] .designer-section-title{font-size:15px!important;letter-spacing:.02em!important;text-transform:none!important;margin-bottom:7px!important;color:#ecf2f6!important}
.designer-page[data-designer-page="characters"] label{font-size:11px!important;color:#aebac5!important}
.designer-page[data-designer-page="characters"] input,.designer-page[data-designer-page="characters"] select{font-size:12px!important}
.character-overview-grid{display:grid;grid-template-columns:minmax(350px,.85fr) minmax(420px,1.15fr);gap:14px;align-items:start;margin-bottom:14px}
.character-overview-preview-card{border:1px solid #35424d;border-radius:11px;background:#141b21;padding:11px;position:sticky;top:52px}
.character-section-heading h3{margin:0;color:#edf4f8;font-size:17px}.character-section-heading p{margin:4px 0 9px;color:#8f9eaa;font-size:10px;line-height:1.4}
.character-overview-preview{position:relative;width:100%;aspect-ratio:480/420;min-height:360px;border:1px solid #303c46;border-radius:9px;background:#0d1318;overflow:hidden}
#characterOverviewPreviewCanvas{display:block;width:100%;height:100%}.character-overview-preview-fallback{position:absolute;inset:0;display:grid;place-items:center;color:#8998a5;font-size:11px}.character-overview-preview-fallback[hidden]{display:none}
.character-overview-fields{min-width:0}.character-overview-fields .designer-form-grid{margin:0}
.character-tab-callout,.character-playtest-help{display:grid;gap:5px;border:1px solid #354653;background:#111a21;border-radius:9px;padding:11px;margin-bottom:12px;color:#9eacb8;font-size:11px;line-height:1.45}.character-tab-callout strong,.character-playtest-help strong{font-size:13px;color:#e9f1f6}
.animation-compiler-panel{border:1px solid #3b4d5a;background:#121a20;border-radius:10px;padding:12px;margin:12px 0}
.animation-compiler-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.animation-compiler-head h3{margin:0;color:#f0f5f8;font-size:17px}.animation-compiler-head p{margin:4px 0 0;color:#90a0ad;font-size:10px;line-height:1.45;max-width:700px}
.animation-compiler-badge{flex:0 0 auto;border:1px solid #45515c;border-radius:999px;padding:6px 9px;color:#a9b5bf;background:#171d23;font-size:9px;font-weight:800;letter-spacing:.04em}.animation-compiler-badge.ready{border-color:#4f9765;color:#aef0c1;background:#163121}.animation-compiler-badge.compile{border-color:#9b7442;color:#ffd29a;background:#342613}.animation-compiler-badge.blocked{border-color:#94525a;color:#ffb1b8;background:#35181d}.animation-compiler-badge.working{border-color:#4c7e9d;color:#b8e7ff;background:#122936}
.animation-compiler-actions{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0 8px}.animation-compiler-actions button{font-size:11px;padding:8px 10px}.animation-compiler-status{border-top:1px solid #2d3942;padding-top:8px;color:#b5c2cb;font-size:10px;line-height:1.5}
.animation-card-badges em.readiness-ready{border-color:#437957!important;color:#a8e7b8!important;background:#14291d!important}.animation-card-badges em.readiness-compile{border-color:#80623d!important;color:#ffd09a!important;background:#2c2114!important}.animation-card-badges em.readiness-blocked{border-color:#70434a!important;color:#f5a7af!important;background:#2a171a!important}
.character-playtest-page{display:grid;gap:12px;max-width:880px}.character-playtest-hero-card{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #3d5148;border-radius:11px;background:#132119;padding:14px}.character-playtest-hero-card h3{margin:0;color:#eaf6ee;font-size:18px}.character-playtest-hero-card p{margin:5px 0 0;color:#a7c8b1;font-size:13px;font-weight:700}.character-hero-rig-badge{border:1px solid #4d795c;border-radius:999px;padding:6px 9px;color:#b9ebc7;font-size:9px;font-weight:800;background:#183524}.character-playtest-actions{display:flex;gap:8px;flex-wrap:wrap}.character-playtest-actions button{font-size:12px;padding:10px 14px}.character-playtest-actions .play{background:#245d3b;border-color:#347c50}
/* Keep the left library only where it is useful; Character/Rig/Play Test stay uncluttered. */
.character-animation-library-panel[hidden]{display:none!important}.character-list-panel.character-list-expanded{max-height:none!important;flex:1 1 auto!important}.character-list-panel.character-list-expanded .designer-entity-list{display:grid;gap:7px}
/* Each tab is a normal page inside the one right-hand scroll area. */
.character-subpane{min-height:0}.character-subpane.active{display:block!important}
@media(max-width:1450px){.character-workspace-tabs{grid-template-columns:repeat(3,1fr)}.character-overview-grid{grid-template-columns:1fr}.character-overview-preview-card{position:static}.character-overview-preview{min-height:400px}}
@media(max-width:950px){.character-workspace-tabs{grid-template-columns:repeat(2,1fr)}.character-page-title h2{font-size:21px}.designer-page[data-designer-page="characters"] .designer-section-title{font-size:14px!important}}


/* v0.4.51 — Animation Sets source of truth + strict visible-runtime animation safety */
.character-subpane[data-character-pane="sets"] .character-page-title h2{font-size:28px;line-height:1.05;margin-bottom:8px}
.character-subpane[data-character-pane="sets"] .character-page-title p{font-size:14px;line-height:1.55;max-width:1050px}
.character-subpane[data-character-pane="sets"] .character-tab-callout strong{font-size:15px}
.character-subpane[data-character-pane="sets"] .character-tab-callout span{font-size:12px;line-height:1.5}
.character-subpane[data-character-pane="sets"] .designer-section-title{font-size:17px;letter-spacing:.02em}
.character-subpane[data-character-pane="sets"] .character-assigned-head small{font-size:11px;line-height:1.45}
.character-subpane[data-character-pane="sets"] .animation-set-section{padding:13px 14px;margin-bottom:14px;border-radius:12px}
.character-subpane[data-character-pane="sets"] .animation-set-head{margin-bottom:11px}
.character-subpane[data-character-pane="sets"] .animation-set-head strong{font-size:16px;line-height:1.25}
.character-subpane[data-character-pane="sets"] .animation-set-head small{font-size:11px;line-height:1.45;margin-top:4px}
.character-subpane[data-character-pane="sets"] .animation-set-head em{font-size:9px;padding:4px 7px}
.character-subpane[data-character-pane="sets"] .animation-set-phases{gap:10px}
.character-subpane[data-character-pane="sets"] .animation-set-phase{flex:1 1 245px;min-width:220px;padding:9px;border-radius:10px}
.character-subpane[data-character-pane="sets"] .animation-set-phase-label{margin-bottom:7px}
.character-subpane[data-character-pane="sets"] .animation-set-phase-label strong{font-size:13px}
.character-subpane[data-character-pane="sets"] .animation-set-phase-label small{font-size:8px;padding:3px 5px}
.character-subpane[data-character-pane="sets"] .animation-set-phase-clips{grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px}
.character-subpane[data-character-pane="sets"] .animation-set-clip{padding:5px;border-radius:8px}
.character-subpane[data-character-pane="sets"] .animation-set-clip-preview{aspect-ratio:4/3;border-radius:6px;min-height:90px}
.character-subpane[data-character-pane="sets"] .animation-set-clip-fallback{font-size:9px}
.character-subpane[data-character-pane="sets"] .animation-set-clip-meta{padding:5px 2px 2px}
.character-subpane[data-character-pane="sets"] .animation-set-clip-meta strong{font-size:11px;line-height:1.25}
.character-subpane[data-character-pane="sets"] .animation-set-clip-meta small{font-size:9px;margin-top:3px}
.character-subpane[data-character-pane="sets"] .animation-set-dropzone{min-height:106px!important;padding:8px!important;border-radius:8px!important}
.character-subpane[data-character-pane="sets"] .animation-set-dropzone span{font-size:24px}
.character-subpane[data-character-pane="sets"] .animation-set-dropzone small{font-size:9px;line-height:1.3;text-align:center}
.character-subpane[data-character-pane="sets"] .animation-set-arrow{font-size:20px;flex-basis:18px}
@media(min-width:1800px){
  .character-subpane[data-character-pane="sets"] .animation-set-phase{flex-basis:280px;min-width:250px}
  .character-subpane[data-character-pane="sets"] .animation-set-phase-clips{grid-template-columns:repeat(auto-fill,minmax(132px,1fr))}
  .character-subpane[data-character-pane="sets"] .animation-set-clip-preview{min-height:102px}
}


/* v0.4.50 in-app flat ZIP updater */
.app-update-drop{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;background:rgba(5,9,13,.74);backdrop-filter:blur(4px);padding:28px}
.app-update-drop[hidden]{display:none}
.app-update-card{width:min(620px,92vw);border:2px dashed #68b7ff;border-radius:18px;background:#151b22;padding:34px 38px;text-align:center;box-shadow:0 28px 90px #000b;display:grid;gap:12px;justify-items:center}
.app-update-icon{width:66px;height:66px;border-radius:50%;display:grid;place-items:center;background:#21394e;border:1px solid #4e8bb9;color:#9ed4ff;font-size:38px;font-weight:800}
.app-update-card strong{font-size:22px;letter-spacing:.01em;color:#f3f7fb}
.app-update-card span{font-size:13px;line-height:1.5;color:#c6d2dc}
.app-update-card small{font-size:11px;line-height:1.5;color:#91a0ae}
.app-update-progress{width:min(470px,90%);height:10px;border-radius:999px;background:#0e1318;border:1px solid #34404b;overflow:hidden;margin-top:4px}
.app-update-progress i{display:block;width:0;height:100%;background:#68b7ff;transition:width .18s ease}
.app-update-drop.installing .app-update-card{border-style:solid;border-color:#6fcf87}.app-update-drop.installing .app-update-icon{background:#203c2a;border-color:#4a9a61;color:#8de2a3}.app-update-drop.installing .app-update-progress i{background:#70d28a}
.app-update-drop.error .app-update-card{border-style:solid;border-color:#d96d6d}.app-update-drop.error .app-update-icon{background:#452526;border-color:#9f4f50;color:#ffaaaa}


/* v0.4.54 built-in starter texture labels */
.texture-card{position:relative}
.texture-built-in{position:absolute;top:9px;left:9px;padding:3px 6px;border-radius:999px;background:rgba(19,34,47,.9);border:1px solid #568db6;color:#a8d8fb;font-size:8px;font-style:normal;font-weight:800;letter-spacing:.05em;text-transform:uppercase;pointer-events:none}
.texture-card.is-built-in small:before{content:'Basic · ';color:#80bde8}


/* v0.4.75 wider/larger Asset Library */
.workspace{grid-template-columns:370px minmax(460px,1fr) 285px}
.palette-head{padding:15px 15px 10px}
.palette-scroll{padding:12px 12px 20px}
.palette-pane .palette-grid{padding:10px;gap:9px}
.palette-pane .prefab{min-height:142px;padding:8px 7px;font-size:11px;gap:6px}
.prefab-thumb{height:88px}
.prefab-name{font-size:11px!important;line-height:1.2}
.prefab-footprint{font-size:9px!important}
.palette-pane summary{padding:10px 12px;font-size:12px}
.library-note{font-size:11px;padding:10px;line-height:1.5}
@media(max-width:1250px){.workspace{grid-template-columns:320px minmax(420px,1fr) 250px}.palette-pane .prefab{min-height:132px}.prefab-thumb{height:80px}}
@media(max-width:1000px){.workspace{grid-template-columns:245px minmax(360px,1fr) 220px}.palette-pane .palette-grid{grid-template-columns:1fr}.palette-pane .prefab{min-height:128px}.prefab-thumb{height:78px}}

/* v0.4.79 explicit construction levels */
.level-group>summary{font-weight:900;letter-spacing:.06em}
.level-ground>summary{border-left:3px solid #8a929b;padding-left:7px}
.level-low>summary{border-left:3px solid #7aa982;padding-left:7px}
.level-mid>summary{border-left:3px solid #7f9fc4;padding-left:7px}
.level-high>summary{border-left:3px solid #b99b67;padding-left:7px}

/* v0.4.82 Structure Builder usability/readability pass */
:root{--muted:#b7c1cb;--text:#f0f4f7}
.workspace{grid-template-columns:410px minmax(460px,1fr) 305px}
.palette-head{padding:16px 16px 11px}
.panel-title{font-size:13px;color:#edf3f8}
.hint,.library-note{font-size:12px;color:#c0cad3}
.palette-tab{font-size:11px;font-weight:750;color:#b8c3cd;padding:10px 4px}
.palette-pane summary{font-size:13px;color:#edf2f6;padding:11px 13px}
.palette-pane summary span{font-size:10px;color:#b2bdc7}
.palette-pane .prefab{min-height:150px;padding:9px 8px}
.prefab-thumb{height:94px}
.prefab-name{font-size:12px!important;color:#f2f5f7!important;line-height:1.22}
.prefab-footprint{font-size:10px!important;color:#b3bec8!important}
.help-card{font-size:11px;color:#bec8d1}
.inspector h3{font-size:12px;color:#bfc9d2}
label{font-size:11px;color:#bdc7d0}
input,select{font-size:13px;color:#f3f6f8}
#status,#modeBadge{font-size:12px}
@media(max-width:1250px){.workspace{grid-template-columns:350px minmax(420px,1fr) 270px}.palette-pane .prefab{min-height:140px}.prefab-thumb{height:86px}}
@media(max-width:1000px){.workspace{grid-template-columns:270px minmax(360px,1fr) 230px}.palette-pane .palette-grid{grid-template-columns:1fr}.palette-pane .prefab{min-height:132px}.prefab-thumb{height:82px}}


/* v0.4.91 Low-Poly Character Maker */
.character-maker-page{padding:18px 22px 26px;overflow:auto}.character-maker-page.active{display:block}.maker-rig-badge{align-self:center;border:1px solid #4d795c;border-radius:999px;padding:7px 11px;color:#bce9c8;background:#193124;font-size:10px;font-weight:900;letter-spacing:.08em}.character-maker-layout{display:grid;grid-template-columns:330px minmax(560px,1fr);gap:16px;min-height:690px}.character-maker-controls{display:flex;flex-direction:column;gap:11px;padding:16px;overflow:auto}.character-maker-controls>label{display:grid;gap:6px;font-size:12px;color:#d3dbe2}.character-maker-controls input[type=range]{width:100%}.maker-toggle-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;border-top:1px solid #34404a;border-bottom:1px solid #34404a;padding:10px 0}.maker-toggle-grid label{display:flex;align-items:center;gap:7px;font-size:12px;color:#d6dde3}.maker-color-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.maker-color-grid label{display:grid;grid-template-columns:1fr 48px;align-items:center;gap:8px}.maker-color-grid input[type=color]{width:48px;height:34px;padding:2px;border-radius:6px}.maker-actions{margin-top:2px}.maker-actions button{flex:1}.maker-note{font-size:11px;line-height:1.5}.character-maker-preview-panel{display:flex;flex-direction:column;gap:12px;min-width:0}.character-maker-preview-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.character-maker-preview-head small{display:block;margin-top:4px;color:#aeb9c3}.character-maker-preview-head>span{font-size:11px;color:#b8d5c2;border:1px solid #3d5a49;padding:6px 9px;border-radius:999px;background:#142119}.character-maker-canvas-wrap{position:relative;min-height:520px;flex:1;border:1px solid #38434d;border-radius:12px;overflow:hidden;background:radial-gradient(circle at 50% 35%,#26313b 0,#151c23 58%,#0f1419 100%)}#characterMakerCanvas{display:block;width:100%;height:100%;min-height:520px}.maker-loading{position:absolute;inset:0;display:grid;place-items:center;background:#111820dd;color:#c9d5df;font-size:13px;font-weight:800}.maker-loading[hidden]{display:none}.maker-animation-bar,.maker-export-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.maker-animation-bar strong{margin-right:4px;color:#dce4ea;font-size:12px}.maker-animation-bar button,.maker-export-bar button{padding:9px 12px;font-size:12px}.maker-export-bar .primary{background:#245d3b;border-color:#347c50}.character-maker-page code{color:#aad7f4}.character-maker-page .designer-page-head p{max-width:900px}@media(max-width:1050px){.character-maker-layout{grid-template-columns:1fr}.character-maker-controls{max-height:none}.character-maker-canvas-wrap,#characterMakerCanvas{min-height:460px}}


/* v0.4.92 Character Maker reachability + sticky save controls */
.designer-page.character-maker-page{
  height:calc(100% - 106px)!important;
  max-height:calc(100% - 106px)!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain;
  scrollbar-width:none!important;
  padding-bottom:86px!important;
}
.designer-page.character-maker-page::-webkit-scrollbar{display:none!important}
.character-maker-layout{
  grid-template-columns:minmax(280px,330px) minmax(420px,1fr)!important;
  min-height:0!important;
  align-items:start;
}
.character-maker-controls{
  overflow:visible!important;
  max-height:none!important;
  min-height:0!important;
}
.character-maker-preview-panel{min-height:0!important}
.character-maker-canvas-wrap{
  flex:0 0 auto!important;
  height:clamp(340px,50vh,500px)!important;
  min-height:340px!important;
}
#characterMakerCanvas{height:100%!important;min-height:0!important}
.maker-sticky-actions{
  position:sticky;
  bottom:0;
  z-index:40;
  display:grid;
  grid-template-columns:repeat(4,minmax(135px,1fr));
  gap:9px;
  margin:16px -4px -70px;
  padding:11px 12px;
  border:1px solid #43505b;
  border-bottom:0;
  border-radius:10px 10px 0 0;
  background:#111820f2;
  box-shadow:0 -8px 26px #0008;
  backdrop-filter:blur(8px);
}
.maker-sticky-actions button{min-height:44px;font-size:12px;font-weight:800}
.maker-sticky-actions .maker-save-character{background:#245d3b;border-color:#347c50}
.maker-actions{margin-top:2px;padding-top:8px}.maker-actions button{width:100%}
@media(max-height:820px){
  .character-maker-page{padding-top:12px!important}
  .character-maker-page .designer-page-head{margin-bottom:10px;padding-bottom:9px}
  .character-maker-canvas-wrap{height:clamp(310px,43vh,410px)!important;min-height:310px!important}
  .character-maker-layout{gap:12px}
  .character-maker-controls{gap:8px;padding:12px}
}
@media(max-width:1050px){
  .character-maker-layout{grid-template-columns:1fr!important}
  .character-maker-canvas-wrap{height:420px!important;min-height:320px!important}
  .maker-sticky-actions{grid-template-columns:repeat(2,minmax(140px,1fr))}
}
@media(max-width:650px){.maker-sticky-actions{grid-template-columns:1fr}}


/* v0.4.94 Item Library foundation */
.designer-head-actions{display:flex;gap:8px;flex-wrap:wrap}.item-library-toolbar{display:grid;grid-template-columns:minmax(180px,1.6fr) repeat(4,minmax(110px,.75fr));gap:8px;margin:0 0 12px;padding:10px;border:1px solid var(--line);border-radius:9px;background:#171d23}.item-library-toolbar label{font-size:10px;color:#cbd5de}.item-library-toolbar input,.item-library-toolbar select{margin-top:5px}.item-library-layout{grid-template-columns:330px minmax(0,1fr)}.item-library-summary{font-size:10px;color:#b9c6d1;margin-bottom:9px;padding:8px;border-radius:6px;background:#11171c;border:1px solid #303a44}.item-card-list .designer-list-item{padding:11px 12px}.item-card-list .designer-list-item small{font-size:9.5px}.item-editor-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px}.item-editor-title>div{display:flex;align-items:center;gap:10px}.item-editor-title h2{margin:0}.item-editor-title small{font-weight:900;letter-spacing:.08em;padding:4px 7px;border-radius:4px;border:1px solid #4a5561;background:#252d35}.item-preview-card{margin-top:12px;border:1px solid #3b4651;border-radius:9px;background:#11171c;padding:12px;min-height:86px;display:grid;gap:4px}.item-preview-card strong{font-size:15px;color:#f0f5f9}.item-preview-card .item-preview-meta{font-size:10px;color:#abb9c5}.item-preview-card .item-preview-stat{font-size:12px;font-weight:800;color:#e5c78d}.item-preview-card .item-preview-blessing{font-size:10px;color:#9cd9b4}.item-foundation-grid{display:grid;grid-template-columns:minmax(320px,.8fr) minmax(500px,1.2fr);gap:14px;margin-top:14px}.item-section-help{font-size:10px;color:var(--muted);margin:-6px 0 10px;line-height:1.45}.equipment-slot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.equipment-slot{border:1px solid #35414c;background:#11171c;border-radius:7px;padding:8px}.equipment-slot label{font-size:10px;color:#cbd5de}.equipment-slot select{margin-top:5px}.item-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.loot-table-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:10px}.compact-form{gap:8px}.loot-match-count{align-self:end;border:1px dashed #3d4954;border-radius:6px;padding:8px;color:#b7c5cf;font-size:10px}.rarity-common{color:#d8dfe5!important}.rarity-uncommon{color:#8ed493!important}.rarity-rare{color:#84b7ff!important}.rarity-epic{color:#c39aff!important}.rarity-legendary{color:#f1b268!important}.rarity-unique{color:#ffd978!important}.designer-list-item.item-rarity-unique{border-color:#746536}.designer-list-item.item-rarity-legendary{border-color:#704b32}.designer-list-item.item-rarity-epic{border-color:#57426f}@media(max-width:1200px){.item-library-toolbar{grid-template-columns:repeat(3,minmax(120px,1fr))}.item-foundation-grid{grid-template-columns:1fr}}@media(max-width:900px){.item-library-layout,.loot-table-layout{grid-template-columns:1fr}.item-library-toolbar{grid-template-columns:1fr 1fr}.equipment-slot-grid{grid-template-columns:1fr}}

/* v0.4.95 automatic Item Library thumbnails */
.item-card-row{display:grid!important;grid-template-columns:82px minmax(0,1fr);align-items:center;gap:10px;text-align:left}.item-card-thumbnail{width:82px;height:62px;border:1px solid #3b4752;border-radius:7px;background:#10161b;display:grid;place-items:center;overflow:hidden}.item-card-thumbnail img{width:100%;height:100%;object-fit:contain;display:block}.item-thumb-placeholder{font-size:10px;color:#75838f;font-weight:900;letter-spacing:.08em}.item-card-copy{min-width:0;display:grid;gap:4px}.item-card-copy strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-card-copy small{line-height:1.35}.item-preview-layout{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;align-items:center}.item-preview-thumbnail{height:112px;border:1px solid #3d4954;border-radius:8px;background:#0f151a;display:grid;place-items:center;overflow:hidden;color:#788691;font-size:10px}.item-preview-thumbnail img{width:100%;height:100%;object-fit:contain}.item-preview-copy{display:grid;gap:4px;min-width:0}@media(max-width:900px){.item-card-row{grid-template-columns:72px minmax(0,1fr)}.item-card-thumbnail{width:72px;height:56px}.item-preview-layout{grid-template-columns:110px minmax(0,1fr)}.item-preview-thumbnail{height:90px}}


/* v0.4.96 Item Studio visual redesign */
.item-studio-page{font-size:13px}.item-studio-head{padding-bottom:12px}.item-studio-head h1{font-size:27px}.item-studio-head p{font-size:13px;max-width:820px;color:#b9c8d4}.item-studio-head button{min-height:40px;font-size:12px;padding:0 14px}.item-studio-tabs{display:flex;gap:8px;padding:0 0 14px;border-bottom:1px solid #303943;margin-bottom:14px}.item-subtab{min-height:42px;padding:0 20px;border:1px solid #37434e;border-radius:8px;background:#151c22;color:#c5d1da;font-size:13px;font-weight:800}.item-subtab.active{border-color:#d79635;background:#2b241a;color:#ffe1a8}.item-subpane{display:none}.item-subpane.active{display:block}.item-studio-main{display:grid;grid-template-columns:210px minmax(440px,1.05fr) minmax(520px,1.25fr);gap:14px;align-items:start}.item-category-panel,.item-gallery-panel,.item-detail-panel{border:1px solid #34404b;border-radius:10px;background:#12181e;padding:12px;min-width:0}.item-panel-title{font-size:13px;font-weight:900;color:#eef4f8;letter-spacing:.05em;margin-bottom:10px}.item-category-btn{width:100%;min-height:48px;margin:0 0 7px;padding:0 11px;border:1px solid #34414b;border-radius:8px;background:#182027;color:#cbd7df;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;font-weight:800;text-align:left}.item-category-btn strong{min-width:28px;padding:4px 7px;border-radius:999px;background:#0e1419;color:#8fa0ad;text-align:center}.item-category-btn.active{border-color:#d89532;background:#2b241a;color:#ffe0a3}.item-category-btn.active strong{color:#f7c66e}.item-category-help{margin-top:13px;padding-top:12px;border-top:1px solid #2d3842;color:#8fa0ac;font-size:11px;line-height:1.5}.item-gallery-toolbar{display:grid;grid-template-columns:minmax(180px,1.6fr) minmax(110px,.7fr) 90px 90px;gap:8px;margin-bottom:9px}.item-gallery-toolbar label{font-size:11px;font-weight:700;color:#b9c7d1}.item-gallery-toolbar input,.item-gallery-toolbar select{margin-top:5px;min-height:38px;font-size:12px}.item-library-summary{font-size:11px;margin-bottom:10px}.item-gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:650px;overflow-y:auto;padding-right:4px}.item-gallery-grid .designer-list-item{margin:0!important;min-height:150px;padding:10px!important;border-radius:9px;display:grid!important;grid-template-columns:128px minmax(0,1fr)!important;align-items:center;gap:10px;text-align:left}.item-gallery-grid .item-card-thumbnail{width:128px;height:112px;border-radius:8px}.item-gallery-grid .item-card-copy strong{font-size:14px;color:#eef3f7}.item-gallery-grid .item-card-copy small{font-size:11px;line-height:1.5;color:#aebdca}.item-detail-panel{padding:14px}.item-selected-hero{min-height:220px;border:1px solid #44515d;border-radius:10px;background:#0e1419;padding:14px;margin-bottom:10px}.item-selected-hero .item-preview-layout{grid-template-columns:230px minmax(0,1fr);gap:18px}.item-selected-hero .item-preview-thumbnail{height:190px;border-radius:9px;background:#0a0f13}.item-selected-hero .item-preview-copy strong{font-size:24px;line-height:1.1}.item-selected-hero .item-preview-meta{font-size:12px;margin-top:5px}.item-selected-hero .item-preview-stat{font-size:18px;margin-top:9px}.item-selected-hero .item-preview-blessing{font-size:13px;margin-top:7px}.item-detail-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.item-detail-actions button{min-height:38px}.item-setting-group{border:1px solid #303c46;border-radius:9px;background:#151c22;padding:11px;margin-top:10px}.item-setting-title{font-size:13px;font-weight:900;color:#e8eff4;margin-bottom:9px}.item-friendly-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.item-friendly-grid label,.item-description-field{font-size:11px;font-weight:700;color:#c5d1da}.item-friendly-grid input,.item-friendly-grid select,.item-description-field textarea{margin-top:5px;min-height:38px;font-size:12px}.blessing-group{border-color:#3f5b4c;background:#142019}.item-advanced-settings{margin-top:10px;border:1px solid #303b45;border-radius:8px;background:#10161b;padding:9px}.item-advanced-settings summary{cursor:pointer;font-size:11px;font-weight:800;color:#aebcc6}.item-advanced-settings[open] summary{margin-bottom:10px}.item-description-field{display:block;margin-top:10px}.item-description-field textarea{width:100%;min-height:72px}.item-big-section{padding:18px}.item-big-section h2{font-size:24px}.item-big-section p{font-size:13px;color:#aebdca}.item-big-section .equipment-slot-grid{grid-template-columns:repeat(4,minmax(190px,1fr));gap:12px}.item-big-section .equipment-slot{padding:14px}.item-big-section .equipment-slot label{font-size:12px}.item-big-section .equipment-slot select{min-height:42px;font-size:12px}.item-big-section .loot-table-layout{grid-template-columns:280px minmax(0,1fr);gap:16px}.item-big-section .designer-list-item{padding:14px;font-size:12px}.item-maker-placeholder{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px}.item-maker-selected{grid-column:1/-1;border:1px dashed #3c4a55;border-radius:9px;padding:16px;color:#aebbc5;min-height:80px}.item-maker-placeholder button{min-height:44px;font-size:12px}@media(max-width:1500px){.item-studio-main{grid-template-columns:185px minmax(360px,.9fr) minmax(460px,1.2fr)}.item-gallery-grid{grid-template-columns:1fr}.item-selected-hero .item-preview-layout{grid-template-columns:180px minmax(0,1fr)}.item-selected-hero .item-preview-thumbnail{height:160px}}@media(max-width:1100px){.item-studio-main{grid-template-columns:170px minmax(0,1fr)}.item-detail-panel{grid-column:1/-1}.item-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}.item-big-section .equipment-slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.item-studio-main{grid-template-columns:1fr}.item-category-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.item-panel-title,.item-category-help{grid-column:1/-1}.item-category-btn{margin:0}.item-gallery-toolbar{grid-template-columns:1fr 1fr}.item-gallery-grid{grid-template-columns:1fr}.item-selected-hero .item-preview-layout{grid-template-columns:130px minmax(0,1fr)}.item-selected-hero .item-preview-thumbnail{height:120px}.item-friendly-grid{grid-template-columns:1fr}.item-big-section .equipment-slot-grid,.item-big-section .loot-table-layout{grid-template-columns:1fr}.item-maker-placeholder{grid-template-columns:1fr}}


/* v0.4.97 — global 30% UI readability scale
   Deliberately leaves #viewport canvas geometry/camera alone. */
:root{--ui-scale:1.3}

/* Main chrome */
.topbar{height:81px;padding:0 18px;gap:12px}
.brand{gap:13px;min-width:300px}
.brand-mark{width:44px;height:44px;border-radius:12px;font-size:18px}
.brand strong{font-size:18px}.brand small{font-size:14px;margin-top:3px}
.toolbar{gap:9px}.toolbar button,.toolbar .button-label{font-size:15px;padding:10px 13px;min-height:40px;border-radius:9px}.sep{height:35px;margin:0 5px}
.designer-nav{height:57px}.designer-nav-btn{font-size:14px;padding:0 19px}
.workspace,.designer-page{height:calc(100% - 138px)}

/* Level Designer side panels */
.workspace{grid-template-columns:530px minmax(520px,1fr) 395px}
.palette-head{padding:20px 20px 14px}.panel-title{font-size:17px}.hint,.library-note{font-size:15px;line-height:1.5}
.palette-tab{font-size:14px;padding:13px 5px;min-height:46px}.palette-subtab{font-size:13px!important;min-height:40px!important;padding:8px 11px!important}
.palette-scroll{padding:13px 13px 23px}.palette-pane details{border-radius:10px;margin-bottom:12px}.palette-pane summary{font-size:16px;padding:14px 16px}.palette-pane summary span{font-size:13px}
.palette-pane .palette-grid{padding:11px;gap:9px}.palette-pane .prefab{min-height:195px;padding:12px 10px;border-radius:10px}.prefab-thumb{height:122px}.prefab-name{font-size:15.5px!important}.prefab-footprint{font-size:13px!important}.prefab span{font-size:26px}
.help-card{font-size:14px;padding:13px;gap:5px}.compact-help{margin:0 13px 13px}.asset-search{min-height:43px;font-size:16px!important}
.saved-asset{grid-template-columns:94px 1fr;gap:12px;padding:12px}.saved-asset .saved-icon{width:88px;height:68px}.saved-asset strong{font-size:14px}.saved-asset small{font-size:12px}.saved-actions button{font-size:12px;padding:6px 8px}.texture-mini{gap:8px}.texture-mini-item span{font-size:11px}

/* Inspector and generic controls */
.inspector{padding:17px}.inspector h3{font-size:15px}.inspector-group{padding-top:14px;margin-top:14px}.inspector-group.always{margin-top:23px}.inspector-group button{font-size:14px;margin-top:10px;min-height:40px}.inspector-note{font-size:12px}.appearance-summary{font-size:13px;padding:10px;min-height:44px}.appearance-actions{gap:8px}.appearance-actions button{padding:9px 7px}
input,select,textarea{font-size:16px!important;padding:9px 10px!important;border-radius:8px}label{font-size:14px!important;gap:6px}.check{gap:9px;margin-top:12px}.check input{width:18px;height:18px}.stats{font-size:15px;padding:5px 0}.empty-state{font-size:15px;padding:18px 13px}.entity-head{gap:10px}.entity-head small{font-size:13px}
button,.button-label{font-size:15px;padding:11px 15px;border-radius:9px}

/* Viewport overlays + bottom editing bar only — canvas stays unchanged */
#modeBadge,#status,#playHelp,#dropHint{font-size:14px;padding:8px 12px;border-radius:9px}#modeBadge{top:13px;left:13px}#status{bottom:13px;left:13px}#playHelp{top:13px}.quickbar{height:62px;gap:9px;padding:9px}.quickbar button{font-size:15px;padding:9px 14px}

/* Generic designer pages */
.designer-page{padding:23px 26px 31px}.designer-page-head{gap:21px;margin-bottom:21px;padding-bottom:17px}.designer-page-head h1{font-size:29px}.designer-page-head p{font-size:14px;line-height:1.5;max-width:980px}
.designer-two-col{grid-template-columns:350px minmax(0,1fr);gap:18px;min-height:610px}.designer-list-panel,.designer-editor-panel{padding:16px;border-radius:12px}.designer-entity-list{gap:9px}.designer-list-item{padding:13px 14px;border-radius:9px;font-size:14px}.designer-list-item small{font-size:12px;margin-top:4px}.designer-form-grid{gap:14px 16px}.designer-form-grid textarea{min-height:99px;font-size:16px!important;padding:10px}.designer-form-grid .designer-check{min-height:52px;padding:10px 13px}.designer-actions{gap:9px;margin-top:18px;padding-top:16px}.designer-info-card{margin-top:16px;padding:13px;font-size:13px}.designer-editor-panel h2{font-size:16px;margin-bottom:16px}.designer-settings-grid{gap:18px}.designer-section-title{font-size:14px}

/* Modals / texture browser */
.texture-modal{width:min(1270px,95vw);height:min(900px,90vh);border-radius:16px}.small-modal{width:min(620px,93vw);padding:18px;border-radius:16px}.small-modal p{font-size:14px}.modal-head{gap:13px;padding:16px 18px}.modal-head strong{font-size:17px}.modal-head small{font-size:13px}.modal-head button{font-size:26px;padding:5px 12px}.texture-controls{gap:9px;padding:13px 16px}.tile-quick-row{font-size:12px;gap:7px}.tile-quick-row .tile-quick{font-size:12px;padding:6px 10px}.texture-browser-head{gap:10px;padding:12px 16px}.texture-browser-body{grid-template-columns:235px minmax(0,1fr)}.texture-folders{padding:10px}.texture-folder-btn{padding:9px 10px;font-size:13px}.texture-grid{padding:13px;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px}.texture-card{padding:7px;border-radius:10px}.texture-card strong{font-size:13px;margin-top:8px}.texture-card small{font-size:11px}.texture-empty{font-size:14px;padding:23px}.modal-foot{gap:13px;padding:13px 16px;font-size:13px}
.context-menu{min-width:247px;padding:7px;border-radius:10px}.context-menu button{padding:10px 12px;font-size:14px}

/* Character pages / Character Maker */
.character-subtab{font-size:14px;padding:14px}.animation-help-card{padding:13px;font-size:13px}.animation-help-card strong{font-size:14px}.animation-toolbar{gap:8px}.animation-toolbar button,.animation-toolbar .button-label{font-size:13px;padding:9px 12px}
.character-maker-page{padding:23px 28px 34px}.maker-rig-badge{padding:9px 14px;font-size:13px}.character-maker-layout{grid-template-columns:430px minmax(560px,1fr);gap:21px}.character-maker-controls{gap:14px;padding:21px}.character-maker-controls>label,.maker-toggle-grid label{font-size:15px}.maker-toggle-grid{gap:10px;padding:13px 0}.maker-color-grid{gap:12px}.maker-color-grid label{grid-template-columns:1fr 62px;gap:10px}.maker-color-grid input[type=color]{width:62px;height:44px}.maker-note{font-size:14px}.character-maker-preview-head small{font-size:14px}.character-maker-preview-head>span{font-size:14px;padding:8px 12px}.maker-animation-bar,.maker-export-bar{gap:10px}.maker-animation-bar strong{font-size:15px}.maker-animation-bar button,.maker-export-bar button{font-size:15px;padding:11px 15px}.maker-sticky-actions button{min-height:57px!important;font-size:15px!important}

/* Character animation browser readability */
.character-designer-grid{grid-template-columns:440px 225px minmax(0,1fr);gap:16px}.character-library-sticky-head{padding:13px}.character-library-sticky-head>div>small{font-size:11px}.character-library-filters{gap:7px;margin-top:10px}.character-library-filters input{font-size:13px}.character-library-filters select{font-size:12px}.character-library-status,.character-library-count,.character-library-selected-info{font-size:11px}.animation-library-left-grid{gap:8px;padding:10px}.animation-library-left-grid .animation-card{gap:5px;padding:5px}.animation-library-left-grid .animation-card-meta strong{font-size:11px}.animation-library-left-grid .animation-card-meta small{font-size:9px}.animation-library-left-grid .animation-card-badges em{font-size:8px}.character-assigned-preview-grid{grid-template-columns:repeat(4,minmax(115px,1fr));gap:8px;max-height:500px}.character-assigned-preview-meta strong{font-size:11px}.character-assigned-preview-meta small{font-size:9px}.animation-slot-control-row{grid-template-columns:62px minmax(0,1fr);gap:8px}.animation-slot-control-row select{height:49px;font-size:12px}.animation-slot-mini-preview{width:62px;height:49px}.animation-slot-mini-fallback{font-size:10px}

/* Item Studio: keep the playful redesign, scale it ~30% */
.item-studio-page{font-size:17px}.item-studio-head{padding-bottom:16px}.item-studio-head h1{font-size:35px}.item-studio-head p{font-size:17px;max-width:1060px}.item-studio-head button{min-height:52px;font-size:16px;padding:0 18px}.item-studio-tabs{gap:10px;padding-bottom:18px;margin-bottom:18px}.item-subtab{min-height:55px;padding:0 26px;font-size:17px;border-radius:10px}
.item-studio-main{grid-template-columns:275px minmax(500px,1fr) minmax(620px,1.2fr);gap:18px}.item-category-panel,.item-gallery-panel,.item-detail-panel{padding:16px;border-radius:13px}.item-panel-title{font-size:17px;margin-bottom:13px}.item-category-btn{min-height:62px;margin-bottom:9px;padding:0 14px;font-size:16px;border-radius:10px}.item-category-btn strong{min-width:36px;padding:5px 9px}.item-category-help{margin-top:17px;padding-top:16px;font-size:14px}.item-gallery-toolbar{grid-template-columns:minmax(230px,1.6fr) minmax(145px,.7fr) 115px 115px;gap:10px;margin-bottom:12px}.item-gallery-toolbar label{font-size:14px}.item-gallery-toolbar input,.item-gallery-toolbar select{min-height:49px;font-size:16px}.item-library-summary{font-size:14px;margin-bottom:13px}
.item-gallery-grid{gap:13px;max-height:760px}.item-gallery-grid .designer-list-item{min-height:195px;padding:13px!important;border-radius:12px;grid-template-columns:166px minmax(0,1fr)!important;gap:13px}.item-gallery-grid .item-card-thumbnail{width:166px;height:146px;border-radius:10px}.item-gallery-grid .item-card-copy strong{font-size:18px}.item-gallery-grid .item-card-copy small{font-size:14px}.item-detail-panel{padding:18px}.item-selected-hero{min-height:285px;padding:18px;border-radius:13px}.item-selected-hero .item-preview-layout{grid-template-columns:300px minmax(0,1fr);gap:23px}.item-selected-hero .item-preview-thumbnail{height:247px;border-radius:12px}.item-selected-hero .item-preview-copy strong{font-size:31px}.item-selected-hero .item-preview-meta{font-size:16px}.item-selected-hero .item-preview-stat{font-size:23px}.item-selected-hero .item-preview-blessing{font-size:17px}.item-detail-actions{gap:10px;margin-bottom:16px}.item-detail-actions button{min-height:49px}.item-setting-group{padding:14px;margin-top:13px;border-radius:12px}.item-setting-title{font-size:17px;margin-bottom:12px}.item-friendly-grid{gap:12px}.item-friendly-grid label,.item-description-field{font-size:14px}.item-friendly-grid input,.item-friendly-grid select,.item-description-field textarea{min-height:49px;font-size:16px}.item-advanced-settings{padding:12px}.item-advanced-settings summary{font-size:14px}.item-description-field textarea{min-height:94px}.item-big-section{padding:23px}.item-big-section h2{font-size:31px}.item-big-section p{font-size:17px}.item-big-section .equipment-slot-grid{grid-template-columns:repeat(3,minmax(220px,1fr));gap:16px}.item-big-section .equipment-slot{padding:18px}.item-big-section .equipment-slot label{font-size:16px}.item-big-section .equipment-slot select{min-height:55px;font-size:16px}.item-big-section .loot-table-layout{grid-template-columns:365px minmax(0,1fr);gap:21px}.item-big-section .designer-list-item{padding:18px;font-size:16px}.item-maker-placeholder{gap:23px}.item-maker-selected{padding:21px;min-height:104px;font-size:16px}.item-maker-placeholder button{min-height:57px;font-size:16px}

/* Keep UI readable on moderately narrow desktops without shrinking type back down. */
@media(max-width:1700px){
  .workspace{grid-template-columns:470px minmax(500px,1fr) 350px}
  .item-studio-main{grid-template-columns:240px minmax(440px,1fr) minmax(520px,1.15fr)}
  .item-gallery-grid{grid-template-columns:1fr}
  .character-designer-grid{grid-template-columns:390px 190px minmax(0,1fr)}
}
@media(max-width:1350px){
  .workspace{grid-template-columns:410px minmax(430px,1fr) 320px}
  .item-studio-main{grid-template-columns:220px minmax(0,1fr)}.item-detail-panel{grid-column:1/-1}
  .designer-nav{overflow-x:auto;scrollbar-width:none}.designer-nav::-webkit-scrollbar{display:none}
  .character-maker-layout{grid-template-columns:1fr}
}

/* v0.4.98 — denser scrollable Item Studio + weapon families */
.item-studio-page.active{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  padding:14px 18px 70px!important;
}
.item-studio-page .item-studio-head{margin-bottom:9px!important;padding-bottom:8px!important;gap:12px!important}
.item-studio-page .item-studio-head h1{font-size:31px!important}
.item-studio-page .item-studio-head p{font-size:15px!important;line-height:1.35!important}
.item-studio-page .item-studio-head button{min-height:46px!important;font-size:14px!important;padding:0 13px!important}
.item-studio-tabs{gap:7px!important;padding-bottom:9px!important;margin-bottom:10px!important}
.item-subtab{min-height:47px!important;padding:0 18px!important;font-size:15px!important}
.item-studio-main{grid-template-columns:220px minmax(430px,1.08fr) minmax(520px,1fr)!important;gap:10px!important;align-items:start}
.item-category-panel,.item-gallery-panel,.item-detail-panel{padding:10px!important;border-radius:10px!important}
.item-panel-title{font-size:15px!important;margin-bottom:7px!important}
.item-category-btn{min-height:45px!important;margin-bottom:5px!important;padding:0 10px!important;font-size:14px!important;border-radius:8px!important}
.item-category-btn strong{min-width:30px!important;padding:3px 7px!important;font-size:13px!important}
.item-category-help{margin-top:8px!important;padding-top:8px!important;font-size:12px!important}
.item-family-nav{margin-top:8px;padding-top:8px;border-top:1px solid #303b45;display:grid;grid-template-columns:1fr 1fr;gap:5px}
.item-family-nav[hidden]{display:none!important}.item-family-title{grid-column:1/-1;font-size:12px;font-weight:900;color:#dbe4ea;margin-bottom:2px}
.item-family-btn{min-height:38px!important;padding:5px 7px!important;font-size:11.5px!important;line-height:1.15;border-radius:7px;background:#151d23;color:#aebbc5;border:1px solid #34414b}
.item-family-btn.active{background:#2c251a;border-color:#d59434;color:#ffdfa2}
.item-gallery-toolbar{grid-template-columns:minmax(170px,1.5fr) minmax(105px,.75fr) 88px 88px!important;gap:6px!important;margin-bottom:7px!important}
.item-gallery-toolbar label{font-size:12px!important}.item-gallery-toolbar input,.item-gallery-toolbar select{min-height:42px!important;font-size:14px!important;margin-top:3px!important}
.item-library-summary{font-size:12px!important;margin-bottom:7px!important;padding:6px 8px!important}
/* One scroll surface: the Item Studio page itself. */
.item-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;max-height:none!important;overflow:visible!important;padding-right:0!important}
.item-gallery-grid .designer-list-item{min-height:137px!important;padding:8px!important;border-radius:9px!important;grid-template-columns:118px minmax(0,1fr)!important;gap:9px!important}
.item-gallery-grid .item-card-thumbnail{width:118px!important;height:104px!important;border-radius:8px!important}
.item-gallery-grid .item-card-copy strong{font-size:16px!important;white-space:normal!important;line-height:1.15}
.item-gallery-grid .item-card-copy small{font-size:12px!important;line-height:1.3!important}
.item-detail-panel{padding:10px!important}.item-selected-hero{min-height:215px!important;padding:10px!important;margin-bottom:7px!important}
.item-selected-hero .item-preview-layout{grid-template-columns:190px minmax(0,1fr)!important;gap:13px!important}.item-selected-hero .item-preview-thumbnail{height:175px!important}
.item-selected-hero .item-preview-copy strong{font-size:25px!important}.item-selected-hero .item-preview-meta{font-size:13px!important}.item-selected-hero .item-preview-stat{font-size:19px!important;margin-top:5px!important}.item-selected-hero .item-preview-blessing{font-size:14px!important;margin-top:4px!important}
.item-detail-actions{gap:6px!important;margin-bottom:7px!important}.item-detail-actions button{min-height:42px!important;padding:7px 10px!important;font-size:13px!important}
.item-setting-group{padding:8px!important;margin-top:7px!important;border-radius:8px!important}.item-setting-title{font-size:15px!important;margin-bottom:6px!important}
.item-friendly-grid{grid-template-columns:repeat(3,minmax(145px,1fr))!important;gap:7px!important}.item-friendly-grid label,.item-description-field{font-size:12px!important}.item-friendly-grid input,.item-friendly-grid select,.item-description-field textarea{min-height:42px!important;font-size:14px!important;margin-top:3px!important;padding:7px 8px!important}
.item-advanced-settings{margin-top:7px!important;padding:8px!important}.item-advanced-settings summary{font-size:12px!important}.item-description-field{margin-top:7px!important}.item-description-field textarea{min-height:70px!important}
.item-big-section{padding:14px!important}.item-big-section h2{font-size:25px!important}.item-big-section p{font-size:14px!important}.item-big-section .equipment-slot-grid{grid-template-columns:repeat(4,minmax(180px,1fr))!important;gap:9px!important}.item-big-section .equipment-slot{padding:10px!important}.item-big-section .equipment-slot label{font-size:13px!important}.item-big-section .equipment-slot select{min-height:46px!important;font-size:14px!important}.item-big-section .loot-table-layout{grid-template-columns:280px minmax(0,1fr)!important;gap:11px!important}.item-big-section .designer-list-item{padding:10px!important;font-size:14px!important}
@media(max-width:1700px){.item-studio-main{grid-template-columns:205px minmax(390px,1fr) minmax(475px,1fr)!important}.item-gallery-grid{grid-template-columns:1fr!important}.item-friendly-grid{grid-template-columns:repeat(2,minmax(150px,1fr))!important}}
@media(max-width:1250px){.item-studio-main{grid-template-columns:190px minmax(0,1fr)!important}.item-detail-panel{grid-column:1/-1}.item-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.item-big-section .equipment-slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* v0.4.99 — guaranteed Item Studio page scrolling */
.item-studio-page.active{
  height:calc(100vh - 138px)!important;
  max-height:calc(100vh - 138px)!important;
  min-height:0!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain!important;
  scrollbar-width:auto!important;
  scrollbar-color:#5b6772 #151b20;
  scrollbar-gutter:stable;
  padding-bottom:90px!important;
}
.item-studio-page.active::-webkit-scrollbar{display:block!important;width:13px!important;height:13px!important}
.item-studio-page.active::-webkit-scrollbar-track{background:#151b20!important}
.item-studio-page.active::-webkit-scrollbar-thumb{background:#56616c!important;border:3px solid #151b20!important;border-radius:999px!important}
.item-studio-page.active::-webkit-scrollbar-thumb:hover{background:#73808c!important}
.item-studio-page .item-subpane.active,.item-studio-page .item-studio-main,.item-studio-page .item-gallery-panel,.item-studio-page .item-detail-panel{overflow:visible!important;max-height:none!important}
.item-studio-page .item-gallery-grid{overflow:visible!important;max-height:none!important}
.item-studio-page .item-studio-tabs{position:sticky;top:-14px;z-index:30;background:#11161b;padding-top:8px!important}


/* v0.5.00 — five-tier loot frames + weapon/artifact family browsing */
.item-rarity-legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:-5px 0 10px;padding:7px 9px;border:1px solid #303a43;border-radius:9px;background:#10161b}
.rarity-chip{--rarity:#9aa3aa;display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:3px 9px;border:1px solid var(--rarity);border-radius:7px;background:color-mix(in srgb,var(--rarity) 10%,#10161b);color:var(--rarity)!important;font-size:12px;font-weight:900;letter-spacing:.02em;box-shadow:inset 0 0 0 1px #0007}
.rarity-common,.item-rarity-common,.rarity-frame-common{--rarity:#9ba4aa}.rarity-uncommon,.item-rarity-uncommon,.rarity-frame-uncommon{--rarity:#4fc36d}.rarity-rare,.item-rarity-rare,.rarity-frame-rare{--rarity:#4f91ff}.rarity-epic,.item-rarity-epic,.rarity-frame-epic{--rarity:#a56cff}.rarity-legendary,.item-rarity-legendary,.rarity-frame-legendary{--rarity:#f39a38}
.rarity-common{color:#c4cbd0!important}.rarity-uncommon{color:#69d884!important}.rarity-rare{color:#73a9ff!important}.rarity-epic{color:#bd91ff!important}.rarity-legendary{color:#ffb35e!important}
.item-gallery-grid .designer-list-item[class*="item-rarity-"]{position:relative;overflow:hidden;border:2px solid var(--rarity)!important;background:linear-gradient(145deg,color-mix(in srgb,var(--rarity) 12%,#151c22) 0%,#11171c 48%,#0d1318 100%)!important;box-shadow:inset 0 0 0 1px #0009,inset 0 0 22px color-mix(in srgb,var(--rarity) 7%,transparent),0 1px 0 #ffffff0a}
.item-gallery-grid .designer-list-item[class*="item-rarity-"]::before,.item-gallery-grid .designer-list-item[class*="item-rarity-"]::after{content:"";position:absolute;width:22px;height:22px;pointer-events:none;border-color:var(--rarity);opacity:.9}
.item-gallery-grid .designer-list-item[class*="item-rarity-"]::before{left:4px;top:4px;border-left:3px solid var(--rarity);border-top:3px solid var(--rarity)}
.item-gallery-grid .designer-list-item[class*="item-rarity-"]::after{right:4px;bottom:4px;border-right:3px solid var(--rarity);border-bottom:3px solid var(--rarity)}
.item-gallery-grid .designer-list-item[class*="item-rarity-"] .item-card-thumbnail{border:2px solid var(--rarity)!important;box-shadow:inset 0 0 14px color-mix(in srgb,var(--rarity) 8%,transparent),0 0 0 1px #0008}
.item-gallery-grid .designer-list-item[class*="item-rarity-"] strong{color:#f6f8fa!important}.item-gallery-grid .designer-list-item[class*="item-rarity-"]:hover{filter:brightness(1.08)}.item-gallery-grid .designer-list-item[class*="item-rarity-"].active{box-shadow:0 0 0 2px color-mix(in srgb,var(--rarity) 55%,white),inset 0 0 24px color-mix(in srgb,var(--rarity) 13%,transparent)!important}
.item-selected-hero[class*="rarity-frame-"]{position:relative;overflow:hidden;border:3px solid var(--rarity)!important;background:linear-gradient(145deg,color-mix(in srgb,var(--rarity) 12%,#10161b),#0b1116 55%,color-mix(in srgb,var(--rarity) 6%,#0b1116))!important;box-shadow:inset 0 0 0 1px #000,inset 0 0 34px color-mix(in srgb,var(--rarity) 9%,transparent),0 0 0 1px color-mix(in srgb,var(--rarity) 28%,transparent)}
.item-selected-hero[class*="rarity-frame-"]::before,.item-selected-hero[class*="rarity-frame-"]::after{content:"";position:absolute;width:44px;height:44px;pointer-events:none}.item-selected-hero[class*="rarity-frame-"]::before{left:7px;top:7px;border-left:4px solid var(--rarity);border-top:4px solid var(--rarity)}.item-selected-hero[class*="rarity-frame-"]::after{right:7px;bottom:7px;border-right:4px solid var(--rarity);border-bottom:4px solid var(--rarity)}
.item-selected-hero[class*="rarity-frame-"] .item-preview-thumbnail{border:3px solid var(--rarity)!important;background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--rarity) 12%,#10161b),#080d11 72%)!important;box-shadow:inset 0 0 24px color-mix(in srgb,var(--rarity) 10%,transparent)}
.item-family-btn{display:flex!important;align-items:center;justify-content:space-between;gap:5px;text-align:left}.item-family-btn span{min-width:0}.item-family-btn strong{flex:0 0 auto;min-width:24px;padding:2px 5px;border-radius:999px;background:#0c1216;color:#8f9ba5;font-size:10px;text-align:center}.item-family-btn.active strong{color:#ffd489;background:#18120a}.item-family-title{color:#f2f5f7!important}

/* v0.5.01 — Character Maker redesign + female ninja workflow */
.designer-page.character-maker-page.active{
  height:calc(100vh - 132px)!important;
  max-height:calc(100vh - 132px)!important;
  min-height:0!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  scrollbar-width:auto!important;
  scrollbar-color:#5d6873 #151b20!important;
  scrollbar-gutter:stable;
  padding:22px 24px 52px!important;
}
.designer-page.character-maker-page.active::-webkit-scrollbar{display:block!important;width:13px!important}
.designer-page.character-maker-page.active::-webkit-scrollbar-track{background:#151b20!important}
.designer-page.character-maker-page.active::-webkit-scrollbar-thumb{background:#596570!important;border:3px solid #151b20!important;border-radius:999px!important}
.maker-page-head{margin-bottom:14px!important;padding-bottom:13px!important}.maker-page-head h1{font-size:30px!important}.maker-page-head p{font-size:15px!important;max-width:920px!important}
.character-maker-layout{display:grid!important;grid-template-columns:minmax(330px,390px) minmax(600px,1fr) minmax(290px,340px)!important;gap:16px!important;align-items:start!important;min-height:0!important}
.character-maker-controls,.character-maker-preview-panel,.maker-export-panel{border-radius:13px!important;min-width:0!important}
.character-maker-controls{display:flex!important;flex-direction:column!important;gap:10px!important;padding:14px!important;overflow:visible!important}
.maker-section-block{border:1px solid #34404a;border-radius:10px;background:#12191f;padding:12px;display:grid;gap:9px}.maker-section-block+.maker-section-block{margin-top:1px}.maker-section-help{font-size:12px;color:#9eacb7;margin:-3px 0 2px;line-height:1.35}
.maker-section-block>label{display:grid;gap:5px;font-size:14px!important;font-weight:750;color:#d3dce4}.maker-section-block input,.maker-section-block select{min-height:42px!important;font-size:14px!important}.maker-section-block input[type=range]{min-height:24px!important;padding:0!important}
.maker-preset-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.maker-preset-card{min-height:64px;padding:8px 9px!important;border:1px solid #394652;background:#172028;border-radius:9px;text-align:left;display:grid;align-content:center;gap:3px}.maker-preset-card strong{font-size:14px}.maker-preset-card small{font-size:11px;color:#96a7b4}.maker-preset-card.active{border-color:#d79635;background:#302619;box-shadow:inset 0 0 0 1px #d7963544}.maker-preset-card.active strong{color:#ffe0a3}.maker-preset-card.active small{color:#d8b879}
.maker-toggle-grid{gap:7px!important;padding:8px 0!important}.maker-toggle-grid label{font-size:13px!important}.maker-color-grid{gap:8px!important}.maker-color-grid label{font-size:13px!important;grid-template-columns:1fr 52px!important}.maker-color-grid input[type=color]{width:52px!important;height:38px!important;min-height:38px!important}
.maker-note{font-size:12px!important;line-height:1.45!important;margin-top:0!important}.maker-actions{padding-top:6px!important;margin-top:0!important}.maker-actions button{min-height:42px!important;font-size:13px!important}
.character-maker-preview-panel{padding:14px!important;display:flex!important;flex-direction:column!important;gap:10px!important;background:#11181e}.character-maker-preview-head{min-height:48px}.character-maker-preview-head .designer-section-title{font-size:16px!important}.character-maker-preview-head small{font-size:12px!important}.character-maker-preview-head>span{font-size:12px!important;padding:6px 9px!important}
.character-maker-canvas-wrap{height:clamp(500px,62vh,720px)!important;min-height:500px!important;max-height:none!important;flex:0 0 auto!important;border-radius:12px!important}#characterMakerCanvas{height:100%!important;min-height:0!important}.maker-animation-bar{gap:7px!important;padding-top:2px}.maker-animation-bar strong{font-size:14px!important;margin-right:4px}.maker-animation-bar button{min-height:42px!important;font-size:13px!important;padding:8px 12px!important}
.maker-export-panel{position:sticky;top:6px;padding:13px!important;background:#11181e;display:grid;gap:11px}.maker-ready-card{border:1px solid #3b4853;border-radius:11px;background:linear-gradient(145deg,#19231f,#11181d);padding:13px}.maker-ready-kicker{display:block;color:#79c994;font-size:10px;font-weight:950;letter-spacing:.12em;margin-bottom:5px}.maker-ready-card h2{font-size:21px;margin:0 0 4px;color:#f2f6f8;line-height:1.1}.maker-ready-card p{font-size:12px;color:#aab8c2;margin:0 0 12px}.maker-summary-row{display:flex;justify-content:space-between;gap:10px;border-top:1px solid #2d393f;padding:7px 0;font-size:12px}.maker-summary-row span{color:#95a5b0}.maker-summary-row strong{color:#e2ebf0;text-align:right}
.maker-export-actions{display:grid;gap:7px}.maker-export-actions button{min-height:48px!important;font-size:14px!important;font-weight:850!important}.maker-export-actions .maker-save-character{background:#245d3b!important;border-color:#3a8456!important;color:#effff4!important}.maker-save-location{border:1px solid #34414b;border-radius:10px;background:#10161b;padding:11px;display:grid;gap:5px}.maker-save-location strong{font-size:13px;color:#e5edf2}.maker-save-location span{font-size:12px;color:#8fcaa1;overflow-wrap:anywhere}.maker-save-location small{font-size:10px;color:#8e9ca7;line-height:1.4}.maker-workflow{border:1px solid #343f49;border-radius:10px;background:#131a20;padding:11px}.maker-workflow strong{font-size:13px;color:#e2e9ee}.maker-workflow ol{margin:7px 0 0 20px;padding:0;color:#a9b7c2;font-size:11px;line-height:1.65}.maker-export-panel #makerStatus{margin:0!important;font-size:11px!important;line-height:1.45!important}
/* Characters page gets a little more breathing room and a clear maker entry point. */
.designer-page[data-designer-page="characters"] .designer-page-head .designer-head-actions{display:flex;gap:8px;flex-wrap:wrap}.designer-page[data-designer-page="characters"] #openCharacterMakerBtn{background:#245d3b;border-color:#3a8456;color:#effff4}.character-overview-preview-card,.character-overview-fields{min-width:0}.character-overview-preview{min-height:390px}
@media(max-width:1550px){.character-maker-layout{grid-template-columns:minmax(300px,350px) minmax(520px,1fr)!important}.maker-export-panel{grid-column:1/-1;position:static;grid-template-columns:minmax(260px,.7fr) minmax(280px,.8fr) minmax(280px,1fr);align-items:start}.maker-ready-card{height:100%}.maker-workflow{height:100%}.maker-save-location{grid-column:2}.maker-export-panel #makerStatus{grid-column:3;grid-row:1/3}.maker-export-actions{grid-column:1;grid-row:2}}
@media(max-width:1050px){.character-maker-layout{grid-template-columns:1fr!important}.maker-export-panel{grid-column:auto;display:grid;grid-template-columns:1fr;position:static}.maker-save-location,.maker-export-panel #makerStatus,.maker-export-actions{grid-column:auto;grid-row:auto}.character-maker-canvas-wrap{height:500px!important;min-height:420px!important}}


/* v0.5.02 — Play Test gets the viewport back from the enlarged editor UI. */
body.playtest-focus .designer-nav{display:none!important}
body.playtest-focus .topbar{height:48px!important;min-height:48px!important;padding:0 10px!important;justify-content:flex-end!important}
body.playtest-focus .topbar .brand{display:none!important}
body.playtest-focus .topbar .toolbar{width:100%!important;justify-content:flex-end!important;gap:0!important;flex-wrap:nowrap!important}
body.playtest-focus .topbar .toolbar>*{display:none!important}
body.playtest-focus .topbar .toolbar #stopBtn{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:36px!important;padding:7px 14px!important;font-size:14px!important;background:#523034!important;border-color:#8c4b52!important;color:#ffe5e7!important}
body.playtest-focus .workspace[data-designer-page="level"].active{height:calc(100% - 48px)!important;grid-template-columns:0 minmax(0,1fr) 0!important}
body.playtest-focus .workspace[data-designer-page="level"]>.palette,
body.playtest-focus .workspace[data-designer-page="level"]>.inspector{display:none!important}
body.playtest-focus .workspace[data-designer-page="level"] .quickbar{display:none!important}
body.playtest-focus .workspace[data-designer-page="level"] .viewport-wrap{grid-column:1/-1!important;width:100%!important;min-width:0!important}
body.playtest-focus #viewport{width:100%!important;height:100%!important}
body.playtest-focus #status{bottom:14px!important}


/* v0.5.12 — Auto Generate Segment dropdown */
.generate-control{position:relative;display:inline-flex;align-items:center}
.generate-menu{position:absolute;top:calc(100% + 9px);right:0;z-index:1450;width:min(720px,86vw);max-height:min(780px,78vh);background:#171d23;border:1px solid #4a5662;border-radius:13px;box-shadow:0 22px 70px #000c;overflow:hidden;color:#e8eef3}
.generate-menu[hidden]{display:none}
.generate-menu-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:15px 17px;border-bottom:1px solid #36414b;background:#20272e}
.generate-menu-head strong{display:block;font-size:17px}.generate-menu-head small{display:block;margin-top:4px;font-size:12px;line-height:1.4;color:#aebbc6}.generate-menu-head button{font-size:24px;line-height:1;padding:3px 9px}
.generate-menu-scroll{max-height:calc(min(780px,78vh) - 125px);overflow-y:auto;padding:15px 17px}
.generate-options-grid{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:11px}.generate-options-grid label{font-size:12px;font-weight:800;color:#cbd5dd}.generate-options-grid select{display:block;width:100%;margin-top:6px;min-height:39px;font-size:13px}
.generate-assets-title{margin:17px 0 9px;font-size:13px;font-weight:900;letter-spacing:.04em;color:#f1f5f8}.generate-assets-grid{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:8px}.generate-assets-grid label{display:flex;align-items:center;gap:8px;min-height:39px;padding:8px 10px;border:1px solid #34404b;border-radius:8px;background:#11181e;font-size:12px;font-weight:700;color:#c7d2db}.generate-assets-grid input{width:17px;height:17px;accent-color:#d89638}.generate-hint{margin-top:13px;padding:10px 12px;border:1px dashed #46535e;border-radius:8px;background:#10161b;color:#aab8c3;font-size:11px;line-height:1.45}
.generate-menu-actions{display:flex;justify-content:flex-end;gap:9px;padding:12px 16px;border-top:1px solid #36414b;background:#12181d}.generate-menu-actions button{min-height:40px;font-size:13px;padding:0 14px}
@media(max-width:900px){.generate-menu{position:fixed;left:4vw;right:4vw;top:95px;width:auto}.generate-options-grid,.generate-assets-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.generate-options-grid,.generate-assets-grid{grid-template-columns:1fr}}


/* v0.5.13 — camera-filling outside terrain foundation */
.outside-terrain-control{margin:0 13px 13px;padding:12px;border:1px solid #34404a;border-radius:10px;background:#12191f;display:grid;gap:10px}.outside-terrain-copy{display:grid;gap:3px}.outside-terrain-copy strong{font-size:15px;color:#e4edf3}.outside-terrain-copy small{font-size:12px;line-height:1.35;color:#8f9eaa}.outside-terrain-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(122px,auto);gap:8px;align-items:center}.outside-terrain-actions select,.outside-terrain-actions button{min-height:40px;margin:0!important}.outside-terrain-actions button.active{border-color:#5f9c70;background:#1d3b2a;color:#c9f1d3}

/* v0.5.16 explicit Play Camera commit state */
#savePlayCameraBtn.camera-saved{background:#214e36;border-color:#4ea66f;color:#dff7e7;font-weight:800}


/* v0.5.20 — real contained Asset Library scrolling, still no visible scrollbar */
.palette-scroll{overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:none!important;overscroll-behavior:contain;min-height:0;touch-action:pan-y;padding-bottom:18px!important}
.palette-scroll::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.palette{overflow:hidden!important;min-height:0}


/* v0.5.21 — lock Asset Library to editor height; scroll asset cards only */
.workspace[data-designer-page="level"].active{min-height:0!important;overflow:hidden!important}
.workspace[data-designer-page="level"].active>.palette{height:100%!important;max-height:100%!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
.palette>.palette-head,.palette>.outside-terrain-control,.palette>.palette-tabs,.palette>.palette-subtabs,.palette>.palette-pager,.palette>.compact-help{flex:0 0 auto!important}
.palette-scroll{flex:1 1 0!important;height:0!important;min-height:0!important;max-height:none!important;overflow-y:scroll!important;overflow-x:hidden!important;overscroll-behavior-y:contain!important;scrollbar-width:none!important;touch-action:pan-y!important}
.palette-scroll::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}

/* v0.5.24 chest + heart-health HUD pass */
.play-hud{position:absolute;z-index:24;left:50%;bottom:24px;transform:translateX(-50%) scale(var(--play-hud-scale,1));transform-origin:50% 100%;pointer-events:none;user-select:none}.play-hud[hidden]{display:none!important}.play-health-heart{width:132px;height:122px;display:grid;place-items:center;filter:drop-shadow(0 5px 8px #0009)}.play-health-heart svg{display:block;width:100%;height:100%;overflow:visible}.heart-shell{fill:#35171a}.heart-fill{fill:#d72f34}.heart-outline{fill:none;stroke:#f0d8c6;stroke-width:4;stroke-linejoin:round;paint-order:stroke}.play-health-heart.damage-pulse{animation:healthHeartPulse .24s ease-out}.play-health-heart.critical .heart-fill{animation:healthHeartCritical .7s ease-in-out infinite}@keyframes healthHeartPulse{0%{transform:scale(1)}42%{transform:scale(1.13)}100%{transform:scale(1)}}@keyframes healthHeartCritical{0%,100%{opacity:1}50%{opacity:.52}}@media(prefers-reduced-motion:reduce){.play-health-heart.damage-pulse,.play-health-heart.critical .heart-fill{animation:none}}
.hud-preview-health{top:auto;left:50%;bottom:58px;width:126px;height:116px;border:0;background:transparent;border-radius:0;padding:0;transform:translateX(-50%);display:block}.hud-preview-health svg{display:block;width:100%;height:100%;filter:drop-shadow(0 4px 7px #0008)}


/* v0.5.39 Asset Library compact browse mode: four structure thumbnails per row.
   Kept as a final override so older responsive rules cannot silently collapse the library. */
.palette-pane .palette-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;padding:6px!important}
.palette-pane .prefab{min-width:0!important;min-height:91px!important;padding:4px 3px 5px!important;gap:3px!important;border-radius:7px!important}
.palette-pane .prefab-thumb{height:55px!important;border-radius:5px!important}
.palette-pane .prefab-name{font-size:8.5px!important;line-height:1.05!important}
.palette-pane .prefab-footprint{font-size:7px!important;line-height:1!important}
.palette-pane .prefab span{font-size:17px!important}
@media(max-width:760px){.palette-pane .palette-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}


/* v0.5.40 asset library condensed rail layout */
.palette{padding:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;min-height:0!important}
.palette-head{padding:12px 12px 8px!important;border-bottom:1px solid var(--line)!important;background:#131920!important;flex:0 0 auto!important}
.palette-head .panel-title{font-size:15px!important;letter-spacing:.11em!important;margin:0 0 7px!important}
.asset-search{margin-top:0!important;min-height:38px!important;font-size:14px!important}
.asset-library-browser{display:grid;grid-template-columns:68px minmax(0,1fr);gap:0;flex:1 1 0;min-height:0;overflow:hidden}
.asset-library-rail{min-height:0;border-right:1px solid var(--line);background:#121820;display:flex;flex-direction:column}
.palette-tabs{display:flex!important;flex-direction:column!important;flex:1 1 auto;min-height:0;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:none!important;background:#121820!important;border-bottom:0!important}
.palette-tabs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.palette-tab{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:62px;min-width:0;padding:8px 4px!important;border:0!important;border-bottom:1px solid #23303a!important;border-right:0!important;background:#141b23!important;color:#a8b6c4!important;border-radius:0!important}
.palette-tab:last-child{border-bottom:0!important}
.palette-tab.active{background:#1f2b35!important;color:#fff!important;box-shadow:inset 3px 0 0 var(--accent)!important}
.palette-tab-icon{font-size:18px;line-height:1;color:#f0b15e}
.palette-tab-label{font-size:9px;line-height:1.1;font-weight:700;letter-spacing:.04em;text-align:center;max-width:100%;word-break:break-word}
.asset-library-main{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--panel)}
.outside-terrain-control{margin:8px 10px 8px!important;padding:9px 10px!important;border-radius:9px!important;gap:8px!important;flex:0 0 auto!important}
.outside-terrain-copy strong{font-size:13px!important}
.outside-terrain-copy small{font-size:10px!important;line-height:1.25!important}
.outside-terrain-actions{grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important}
.outside-terrain-actions select,.outside-terrain-actions button{min-height:34px!important;font-size:12px!important}
.palette-subtabs{padding:0 0 0 0!important;background:#11171d!important;flex:0 0 auto!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;flex-wrap:nowrap!important}
.palette-subtab{min-width:max-content!important;padding:8px 10px!important;font-size:10px!important;flex:0 0 auto!important}
.palette-scroll{padding:8px 8px 14px!important;overflow-y:auto!important;overflow-x:hidden!important;flex:1 1 0!important;min-height:0!important}
.palette-pane .palette-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;padding:8px!important}
.palette-pane .prefab{min-height:96px!important;padding:5px 4px 6px!important;gap:4px!important}
.prefab-thumb{height:58px!important}
.prefab-name{font-size:9px!important;line-height:1.12!important}
.prefab-footprint{font-size:7px!important;line-height:1!important}
.library-note{font-size:11px!important;line-height:1.35!important;padding:8px!important;margin:6px 0!important}
.palette-pager{padding:5px 8px 6px!important;flex:0 0 auto!important}
.compact-help{margin:0 8px 8px!important;font-size:11px!important;padding:9px!important;flex:0 0 auto!important}
@media(max-width:1400px){.workspace{grid-template-columns:330px minmax(420px,1fr) 250px!important}}
@media(max-width:1200px){.workspace{grid-template-columns:300px minmax(360px,1fr) 230px!important}.palette-pane .palette-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:900px){.workspace{grid-template-columns:270px minmax(320px,1fr) 220px!important}.asset-library-browser{grid-template-columns:58px minmax(0,1fr)}.palette-pane .palette-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}


/* v0.5.44 modular equipment HUD */
.play-hud{min-width:330px;text-align:center}.play-hud-core{display:grid;grid-template-columns:78px 132px 78px;gap:9px;align-items:end;justify-content:center}.play-artifact-row{display:flex;justify-content:center;gap:8px;margin-top:-4px}.play-equipment-slot{position:relative;border:2px solid #64717c;background:linear-gradient(#202830dd,#10161bdd);border-radius:12px;display:grid;place-items:center;overflow:hidden;filter:drop-shadow(0 4px 7px #0008)}.play-equipment-slot.primary{width:78px;height:78px}.play-equipment-slot.artifact{width:48px;height:48px;border-radius:10px}.play-equipment-slot img{position:absolute;inset:5px;width:calc(100% - 10px);height:calc(100% - 10px);object-fit:contain;display:none}.play-equipment-slot.has-icon img{display:block}.play-equipment-slot.has-icon .play-slot-glyph{display:none}.play-slot-glyph{font-size:30px;color:#aebbc5;opacity:.78}.play-equipment-slot.artifact .play-slot-glyph{font-size:20px}.play-slot-label{position:absolute;z-index:2;left:3px;top:3px;padding:2px 4px;border-radius:4px;background:#0b1015cc;color:#dce5eb;font-size:8px;font-weight:900;letter-spacing:.05em}.play-equipment-slot.empty{opacity:.62;border-style:dashed}.play-equipment-slot.rarity-uncommon{border-color:#63b873}.play-equipment-slot.rarity-rare{border-color:#5c96ef}.play-equipment-slot.rarity-epic{border-color:#ad75e2}.play-equipment-slot.rarity-legendary{border-color:#dfab4e}.play-health-heart[hidden]{display:none!important}


/* v0.5.46 real Enemy Studio GLB previews */
.enemy-studio-layout{display:grid;grid-template-columns:260px minmax(390px,1.15fr) minmax(300px,.85fr);gap:14px;align-items:stretch;min-height:0}
.enemy-library-panel,.enemy-live-preview-panel,.enemy-settings-panel{min-width:0;min-height:0}
.enemy-library-panel{display:flex;flex-direction:column;overflow:hidden}.enemy-preview-list{overflow-y:auto;min-height:0;scrollbar-width:none;display:grid;gap:8px;padding-right:2px}.enemy-preview-list::-webkit-scrollbar{display:none}
.enemy-preview-card{width:100%;padding:0!important;overflow:hidden;text-align:left;display:grid;grid-template-columns:112px minmax(0,1fr);align-items:stretch;border-radius:9px;background:#151c22;border:1px solid #34414b;min-height:88px}
.enemy-preview-card:hover{background:#1d2730}.enemy-preview-card.active{border-color:var(--accent);box-shadow:inset 3px 0 0 var(--accent)}.enemy-preview-card.giant{border-color:#73583a}
.enemy-preview-card-canvas{width:112px;height:88px;display:block;background:#11181e}.enemy-preview-card-copy{min-width:0;padding:9px 8px;display:flex;flex-direction:column;justify-content:center;gap:3px}.enemy-preview-card-copy strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.enemy-preview-card-copy small{font-size:9px;color:var(--muted);line-height:1.25}.enemy-preview-card-size{color:#c9d3db!important}
.enemy-live-preview-panel{display:flex;flex-direction:column;padding:12px!important}.enemy-preview-head{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}.enemy-preview-head small{color:var(--muted);font-size:10px}.enemy-preview-canvas-wrap{position:relative;flex:1 1 320px;min-height:300px;border:1px solid #34414b;border-radius:10px;overflow:hidden;background:#10171d}.enemy-preview-canvas-wrap canvas{width:100%;height:100%;display:block;touch-action:none}
.enemy-preview-status{font-size:10px;color:#aebbc6;line-height:1.4;padding:8px 3px 3px}.enemy-preview-status strong{color:#f0f4f7}.enemy-preview-status span{color:#93a3af}
.enemy-preview-animation-bar{display:flex;gap:5px;flex-wrap:wrap;padding-top:8px}.enemy-preview-animation-bar button{font-size:10px;padding:7px 9px;min-width:58px}.enemy-preview-animation-bar button.active{border-color:var(--accent);background:#303942}.enemy-preview-animation-bar button:disabled{opacity:.28}
.enemy-settings-panel{overflow:auto;scrollbar-width:none}.enemy-settings-panel::-webkit-scrollbar{display:none}
@media(max-width:1250px){.enemy-studio-layout{grid-template-columns:225px minmax(340px,1fr)}.enemy-settings-panel{grid-column:1/-1}.enemy-preview-canvas-wrap{min-height:330px}}
@media(max-width:850px){.enemy-studio-layout{grid-template-columns:1fr}.enemy-library-panel{max-height:320px}.enemy-settings-panel{grid-column:auto}.enemy-preview-canvas-wrap{min-height:300px}}


/* v0.5.47 Enemy assets inside the Level Designer */
.palette-pane[data-pane="enemies"] .enemy-library-list{display:flex;flex-direction:column;gap:8px;padding:8px 8px 10px}
.palette-pane[data-pane="enemies"] .enemy-preview-card{width:100%;min-height:86px}
.palette-pane[data-pane="enemies"] .enemy-preview-card-canvas{width:112px;height:86px}
.palette-pane[data-pane="enemies"] .enemy-preview-card-copy strong{font-size:12px}
.palette-pane[data-pane="enemies"] .enemy-preview-card-copy small{font-size:9px;line-height:1.25}
.palette-pane[data-pane="enemies"] details + details{margin-top:2px}
.palette-pane[data-pane="enemies"] .library-note{margin:8px}


/* v0.5.48 independent Asset Library scroll zones */
.asset-library-browser{min-height:0!important;overflow:hidden!important}
.asset-library-rail{min-height:0!important;overflow:hidden!important}
.asset-library-rail>.palette-tabs{flex:1 1 0!important;height:0!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain!important;touch-action:pan-y!important;scrollbar-width:none!important}
.asset-library-rail>.palette-tabs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.asset-library-main{min-height:0!important;overflow:hidden!important}
.asset-library-main>.palette-scroll{flex:1 1 0!important;height:0!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain!important;touch-action:pan-y!important;scrollbar-width:none!important}
.asset-library-main>.palette-scroll::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}


/* v0.5.49 dual-weapon HUD + D-pad loadout */
.play-hud-core{grid-template-columns:88px 132px 88px!important}.play-equipment-slot.primary{width:88px!important;height:78px!important}.play-equipment-slot.gear{width:48px;height:48px;border-radius:10px}.play-slot-label{font-size:7px!important;max-width:calc(100% - 6px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.play-loadout-overlay{position:absolute;z-index:70;left:14px;top:14px;bottom:14px;width:min(570px,calc(100% - 28px));pointer-events:none}.play-loadout-overlay[hidden]{display:none!important}.play-loadout-panel{height:100%;max-height:720px;display:flex;flex-direction:column;background:#111820f2;border:1px solid #465661;border-radius:14px;box-shadow:0 14px 34px #0009;overflow:hidden;pointer-events:auto}.play-loadout-head{height:58px;display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #34414b;background:#171f27}.play-loadout-head strong{display:block;font-size:13px;letter-spacing:.1em}.play-loadout-head small{display:block;color:#aebbc6;margin-top:3px}.play-loadout-head>span{font-size:10px;color:#93a6b5}.play-loadout-stage{position:relative;flex:1;min-height:370px;background:radial-gradient(circle at 50% 45%,#26343e 0,#151d24 46%,#10161c 100%)}.play-loadout-character{position:absolute;left:50%;top:8px;bottom:8px;width:270px;transform:translateX(-50%);display:grid;place-items:center}.play-loadout-character canvas{width:100%;height:100%;display:block}.loadout-slot-card{position:absolute;width:132px;min-height:92px;padding:7px;border:1px solid #465560;border-radius:10px;background:#182129e8;display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:7px;align-content:center}.loadout-slot-card.left{left:12px}.loadout-slot-card.right{right:12px}.loadout-slot-card.top{top:18px}.loadout-slot-card.middle{top:50%;transform:translateY(-50%)}.loadout-slot-card.bottom{bottom:18px}.loadout-slot-card b{grid-column:1/-1;font-size:8px;letter-spacing:.07em;color:#9fb1be;margin-bottom:5px}.loadout-slot-card img{grid-row:2/4;width:42px;height:42px;object-fit:contain;border-radius:7px;background:#0d1318}.loadout-slot-card .loadout-item-name{font-size:10px;line-height:1.15;align-self:end;overflow:hidden;text-overflow:ellipsis}.loadout-slot-card .loadout-item-detail{font-size:8px;line-height:1.15;color:#9baab5;align-self:start;margin-top:2px}.loadout-slot-card.empty{opacity:.58;border-style:dashed}.loadout-slot-card.rarity-uncommon{border-color:#63b873}.loadout-slot-card.rarity-rare{border-color:#5c96ef}.loadout-slot-card.rarity-epic{border-color:#ad75e2}.loadout-slot-card.rarity-legendary{border-color:#dfab4e}.loadout-artifacts-title{padding:8px 12px 3px;color:#9eabb5;font-size:9px;letter-spacing:.09em;background:#121a21}.loadout-artifacts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:7px 10px 10px;background:#121a21}.loadout-artifacts .loadout-slot-card{position:relative;inset:auto!important;transform:none!important;width:auto;min-height:78px}.play-loadout-foot{padding:7px 12px;border-top:1px solid #34414b;color:#93a4b0;font-size:9px;text-align:center;background:#0e151b}
@media(max-width:850px){.play-loadout-overlay{width:calc(100% - 28px)}.loadout-slot-card.left{left:6px}.loadout-slot-card.right{right:6px}.loadout-slot-card{width:112px}.play-loadout-character{width:230px}}


/* v0.5.49 reference-inspired character / equipment screen */
.play-loadout-overlay{left:12px!important;right:12px!important;top:12px!important;bottom:12px!important;width:auto!important;max-width:none!important}
.play-loadout-panel{max-height:none!important;background:linear-gradient(180deg,#343331f5,#242522f7)!important;border:2px solid #77715f!important;border-radius:8px!important;box-shadow:0 16px 44px #000b,inset 0 0 0 1px #1a1b19!important}
.play-loadout-head{height:62px!important;background:linear-gradient(180deg,#5a574c,#403f39)!important;border-bottom:2px solid #817b67!important;padding:9px 16px!important}.play-loadout-head strong{font-size:16px!important;letter-spacing:.08em;color:#f3ead2!important;text-shadow:0 1px #000}.play-loadout-head small{color:#d0c8b2!important;font-size:11px!important}.play-loadout-head>span{color:#e2d8bd!important;font-size:10px!important}
.play-loadout-body{display:grid;grid-template-columns:minmax(520px,1.08fr) minmax(300px,.72fr);flex:1;min-height:0;overflow:hidden}
.play-loadout-equipped{display:flex;flex-direction:column;min-width:0;min-height:0;border-right:2px solid #706b5c;background:linear-gradient(135deg,#343733 0,#292c2a 55%,#222521 100%)}
.play-loadout-stage{flex:1;min-height:390px!important;background:radial-gradient(ellipse at 50% 46%,#74766f 0,#4d504b 34%,#30332f 68%,#242722 100%)!important;border-bottom:1px solid #716b5b}
.play-loadout-stage:before{content:'';position:absolute;inset:13px 21%;border:1px solid #98917a44;border-radius:50%;background:radial-gradient(circle,#d7d0bb10,transparent 67%);pointer-events:none}
.play-loadout-character{width:300px!important;top:4px!important;bottom:4px!important}
.loadout-slot-card{width:150px!important;min-height:104px!important;padding:7px!important;border:2px solid #756e5b!important;border-radius:4px!important;background:linear-gradient(145deg,#d7d1bd,#aaa58f)!important;color:#24241f!important;box-shadow:inset 0 0 0 2px #eee7d044,0 4px 8px #0005!important;grid-template-columns:50px minmax(0,1fr)!important}.loadout-slot-card b{font-size:8px!important;color:#4b493f!important}.loadout-slot-card .loadout-item-name{font-size:10px!important;color:#1e1f1b!important}.loadout-slot-card .loadout-item-detail{font-size:8px!important;color:#555247!important}
.loadout-slot-card.left{left:16px!important}.loadout-slot-card.right{right:16px!important}.loadout-slot-card.top{top:20px!important}.loadout-slot-card.middle{top:50%!important}.loadout-slot-card.bottom{bottom:20px!important}
.loadout-item-visual{grid-row:2/4;width:48px;height:48px;border:1px solid #514d40;border-radius:3px;background:radial-gradient(circle,#343838,#171a18);display:grid;place-items:center;overflow:hidden}.loadout-item-visual img{grid-area:1/1;width:100%!important;height:100%!important;object-fit:contain!important;background:transparent!important}.loadout-item-glyph{grid-area:1/1;font-style:normal;font-size:27px;color:#d9b766;text-shadow:0 1px 2px #000}
.loadout-slot-card.empty{opacity:.62!important;border-style:dashed!important}.loadout-slot-card.rarity-uncommon{border-color:#5f9e5d!important}.loadout-slot-card.rarity-rare{border-color:#5c86c9!important}.loadout-slot-card.rarity-epic{border-color:#8c62bb!important}.loadout-slot-card.rarity-legendary{border-color:#d4a33f!important;background:linear-gradient(145deg,#e2d4ac,#b89c61)!important;box-shadow:inset 0 0 0 2px #fff0bc66,0 0 14px #d39d3855!important}
.loadout-artifacts-title{padding:8px 12px 4px!important;color:#eee2c2!important;background:#30312d!important;font-size:10px!important}.loadout-artifacts{grid-template-columns:repeat(3,minmax(0,1fr))!important;background:#30312d!important;padding:7px 12px 11px!important}.loadout-artifacts .loadout-slot-card{min-height:84px!important;width:auto!important}.loadout-artifacts .loadout-slot-card b{color:#3c392f!important}
.loadout-inventory-panel{min-width:0;min-height:0;display:flex;flex-direction:column;background:linear-gradient(180deg,#383733,#2a2a27);overflow:hidden}.loadout-inventory-head{padding:12px 14px 10px;border-bottom:1px solid #6c6656;background:#45433d}.loadout-inventory-head strong{display:block;font-size:13px;color:#f2e7c9;letter-spacing:.08em}.loadout-inventory-head small{display:block;margin-top:3px;font-size:9px;color:#c8bea5}.loadout-inventory-grid{padding:10px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;overflow-y:auto;scrollbar-width:none;align-content:start}.loadout-inventory-grid::-webkit-scrollbar{display:none}.loadout-inventory-card{position:relative;min-height:128px;padding:6px;border:2px solid #6b6659;border-radius:4px;background:linear-gradient(145deg,#cbc5b0,#99947f);color:#24231f;display:flex;flex-direction:column;gap:5px;min-width:0}.loadout-inventory-card:hover{filter:brightness(1.08)}.loadout-inventory-card.rarity-legendary{border-color:#d5a33c;background:linear-gradient(145deg,#dfd1a9,#b29558);box-shadow:inset 0 0 0 2px #fff2c855,0 0 12px #d49b3540}.loadout-inventory-card.equipped{outline:2px solid #f4d57c;outline-offset:-5px}.loadout-inventory-visual{height:76px;display:grid;place-items:center;background:radial-gradient(circle,#393b38,#181b19);border:1px solid #575143;overflow:hidden}.loadout-inventory-visual img{width:100%;height:100%;object-fit:contain}.loadout-inventory-visual i{font-style:normal;font-size:42px;color:#ddb758;text-shadow:0 2px 3px #000}.loadout-inventory-copy{min-width:0}.loadout-inventory-copy strong{display:block;font-size:9px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.loadout-inventory-copy small{display:block;font-size:7px;color:#575246;margin-top:2px}.loadout-inventory-card em{position:absolute;top:4px;right:4px;background:#1c3322;color:#d4f1d7;border:1px solid #5d8665;padding:2px 4px;font-size:6px;font-style:normal;font-weight:800;letter-spacing:.04em}.loadout-inventory-hint{padding:7px 10px;border-top:1px solid #5e594c;color:#bdb49d;font-size:8px;text-align:center}.loadout-inventory-empty{grid-column:1/-1;padding:28px 12px;text-align:center;color:#c0b79f;font-size:10px;border:1px dashed #706a59}
.play-loadout-foot{background:#272823!important;border-top:2px solid #706a59!important;color:#d5cbb2!important;font-size:9px!important}
@media(max-width:1050px){.play-loadout-body{grid-template-columns:minmax(480px,1fr) minmax(260px,.65fr)}.loadout-inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.loadout-slot-card{width:132px!important}.play-loadout-character{width:260px!important}}
@media(max-width:780px){.play-loadout-body{grid-template-columns:1fr}.loadout-inventory-panel{display:none}.play-loadout-equipped{border-right:0}.loadout-slot-card{width:118px!important}.play-loadout-character{width:230px!important}}


/* v0.5.55 Creature Rigging module */
.creature-rigging-page{padding:18px;overflow:auto}.creature-rig-head{margin-bottom:14px}.creature-rig-layout{display:grid;grid-template-columns:280px minmax(420px,1fr) 260px;gap:12px;min-height:650px}.creature-rig-controls,.creature-rig-joints{min-height:0;overflow-y:auto;scrollbar-width:none}.creature-rig-controls::-webkit-scrollbar,.creature-rig-joints::-webkit-scrollbar,.creature-rig-joint-list::-webkit-scrollbar{display:none}.creature-rig-section{padding:12px;border-bottom:1px solid var(--line);display:grid;gap:9px}.creature-rig-inline{display:grid;grid-template-columns:1fr 1fr;gap:7px}.creature-rig-section>button{width:100%}.creature-rig-view-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.creature-rig-view-grid button{padding:7px 5px;font-size:11px}.creature-rig-save{border-bottom:0}.creature-rig-stage{min-width:0;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:10px;background:#0f151b;overflow:hidden}.creature-rig-stage-head{padding:11px 13px;border-bottom:1px solid var(--line);background:#151c23;display:flex;align-items:center;justify-content:space-between;gap:10px}.creature-rig-stage-head strong{display:block;font-size:13px}.creature-rig-stage-head small{display:block;color:var(--muted);font-size:10px;margin-top:2px}.creature-rig-stage-head>span{font-size:10px;color:#b8c8d4;text-align:right;max-width:46%}.creature-rig-canvas-wrap{position:relative;flex:1;min-height:520px}.creature-rig-canvas-wrap canvas{width:100%;height:100%;display:block;touch-action:none}.creature-rig-tip{padding:8px 12px;border-top:1px solid var(--line);font-size:10px;color:var(--muted)}.creature-rig-joints{display:flex;flex-direction:column}.creature-rig-joints>.designer-section-title{padding:12px 12px 8px}.creature-rig-joint-list{flex:1;min-height:260px;overflow-y:auto;padding:0 8px 8px;display:grid;align-content:start;gap:4px}.creature-rig-joint-row{width:100%;padding:7px 8px;text-align:left;display:grid;gap:1px;border-radius:6px}.creature-rig-joint-row strong{font-size:10px}.creature-rig-joint-row small{font-size:8px;color:var(--muted)}.creature-rig-joint-row.active{border-color:#f0aa4d;background:#3a2c1e}.creature-rig-selected-card{border-top:1px solid var(--line);padding:10px;display:grid;gap:8px}.creature-rig-selected-card>strong{font-size:11px}.creature-rig-coords{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.creature-rig-coords input{padding:6px 5px;font-size:10px}.creature-rig-joints>.designer-info-card{margin:8px;font-size:10px;line-height:1.45}@media(max-width:1150px){.creature-rig-layout{grid-template-columns:230px minmax(360px,1fr) 220px}.creature-rig-canvas-wrap{min-height:470px}}@media(max-width:900px){.creature-rig-layout{grid-template-columns:1fr}.creature-rig-canvas-wrap{min-height:440px}.creature-rig-joints{max-height:420px}}

/* v0.5.60 native Mesh2Motion creature + villager animation profiles */
.play-currency-row{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:7px;font-size:10px;font-weight:900;letter-spacing:.06em;text-shadow:0 2px 4px #000}.play-currency-row span{display:inline-flex;align-items:center;gap:4px;padding:5px 9px;border-radius:8px;background:#111820dc;border:1px solid #53606a}.play-currency-row .gold b{color:#e0b54e}.play-currency-row .silver b{color:#d8e1e8}.play-currency-row .wood b{color:#b98a59}.play-currency-row .metal b{color:#b4c2cf}.play-currency-row .ore b{color:#89b2ff}.play-currency-row .bag b{color:#e5d07a}.play-currency-row strong{font-size:12px;color:#fff}.play-loot-toast{position:absolute;right:22px;top:170px;z-index:65;pointer-events:none;transform-origin:right center}.play-loot-toast-card{display:flex;align-items:center;gap:12px;min-width:240px;max-width:340px;padding:14px 16px;border-radius:16px;background:linear-gradient(180deg,#1a232cd9,#0f141add);border:1px solid #768390;box-shadow:0 18px 42px rgba(0,0,0,.45);color:#fff}.play-loot-toast-visual{width:64px;height:64px;border-radius:14px;display:grid;place-items:center;background:radial-gradient(circle at 30% 30%,#ecf4ff 0,#6fa7ff 45%,#1a2733 100%);font-size:32px;font-weight:900;overflow:hidden}.play-loot-toast-visual img{width:100%;height:100%;object-fit:cover}.play-loot-toast-copy strong{display:block;font-size:15px;letter-spacing:.04em}.play-loot-toast-copy small{display:block;margin-top:4px;color:#cad6e2;font-size:11px;line-height:1.35}.play-loot-toast.pop{animation:lootToastPop 1.15s ease}.play-loot-toast.zoom{animation:lootToastZoom .75s ease forwards}@keyframes lootToastPop{0%{opacity:0;transform:translateX(20px) scale(.7)}12%{opacity:1;transform:translateX(0) scale(1.03)}78%{opacity:1;transform:translateX(0) scale(1)}100%{opacity:1;transform:translateX(0) scale(1)}}@keyframes lootToastZoom{0%{opacity:1;transform:translate(0,0) scale(1)}100%{opacity:0;transform:translate(-250px,-150px) scale(.18)}}.loadout-inventory-card.controller-focus{outline:2px solid #9ed1ff;box-shadow:0 0 0 3px rgba(158,209,255,.18)}.loadout-salvage-btn{margin-top:8px;align-self:flex-start;padding:6px 10px;border-radius:8px;border:1px solid #7f8c98;background:#222b33;color:#fff;font-size:11px;font-weight:700;cursor:pointer}.loadout-salvage-btn.disabled{opacity:.45;cursor:not-allowed}.loadout-salvage-copy{display:block;margin-top:6px;color:#c8d3dd;font-size:10px;letter-spacing:.04em}
.village-board-overlay{position:absolute;z-index:80;inset:clamp(10px,2.2vh,28px);display:grid;place-items:center;background:#070a0dc4;pointer-events:auto}.village-board-overlay[hidden]{display:none!important}.village-board-panel{width:min(920px,92%);max-height:92%;display:flex;flex-direction:column;overflow:hidden;border:3px solid #7a5d38;border-radius:10px;background:linear-gradient(145deg,#4a3827,#2e241b 56%,#221b15);box-shadow:0 20px 70px #000d,inset 0 0 0 2px #b08a5538;color:#f4e8ce}.village-board-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:2px solid #80623d;background:#35281c}.village-board-head strong{display:block;font-size:clamp(15px,1.4vw,22px);letter-spacing:.08em}.village-board-head small{display:block;margin-top:3px;color:#ccb995}.village-board-head button{width:42px;height:42px;border-radius:7px;border:1px solid #8e7450;background:#241b14;color:#f4e8ce;font-size:18px}.village-board-currency{display:flex;gap:10px;flex-wrap:wrap;padding:10px 16px;border-bottom:1px solid #745a39;background:#2b2118}.village-board-currency span{padding:6px 10px;border:1px solid #765b39;border-radius:7px;background:#17120e}.village-board-levels{padding:14px;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;overflow:auto}.village-level-card{min-height:112px;padding:12px;border:1px solid #8a6b43;border-radius:9px;background:#2c241b;color:#efe2c6;text-align:left}.village-level-card:hover,.village-level-card:focus-visible{border-color:#d1ad6b;background:#382d21}.village-level-card.locked{opacity:.48}.village-level-card.completed{box-shadow:inset 0 0 0 1px #85a56e}.village-level-card strong{display:block;font-size:14px}.village-level-card small{display:block;margin-top:6px;color:#c5b493;line-height:1.35}.village-level-card em{display:inline-block;margin-top:8px;font-style:normal;font-size:9px;font-weight:900;letter-spacing:.08em;color:#e2c787}.village-board-foot{padding:9px 14px;border-top:1px solid #745a39;color:#c7b692;font-size:10px;text-align:center;background:#251d16}
@media(min-width:1800px) and (min-height:1000px){.play-loadout-character{width:clamp(320px,30vh,480px)!important}.play-loadout-head strong{font-size:clamp(16px,1.05vw,22px)!important}.loadout-slot-card{width:clamp(132px,8.2vw,190px)!important;min-height:clamp(92px,8.5vh,130px)!important}.loadout-slot-card .loadout-item-name{font-size:clamp(10px,.7vw,14px)!important}.loadout-slot-card .loadout-item-detail{font-size:clamp(8px,.55vw,11px)!important}.loadout-inventory-card{min-height:clamp(86px,8vh,118px)!important}.play-loadout-foot{font-size:clamp(9px,.55vw,12px)!important}}
@media(min-aspect-ratio:21/9){.play-loadout-panel{max-width:min(1500px,88vw);margin-inline:auto;width:100%}.play-loadout-body{grid-template-columns:minmax(580px,1.1fr) minmax(360px,.72fr)}.play-loadout-character{width:clamp(330px,30vh,480px)!important}.village-board-panel{width:min(1100px,76vw)}}

/* v0.5.70 polished Character & Gear inventory */
.play-loadout-panel{background:#11161c!important;border-color:#6f6654!important;box-shadow:0 24px 70px #000e,0 0 0 1px #c8ad7040 inset!important}
.play-loadout-head{background:linear-gradient(180deg,#282d33,#171c22)!important;border-bottom:1px solid #8d7a52!important}.play-loadout-head strong{color:#fff4d2!important}.play-loadout-head small{color:#9eabb6!important}.play-loadout-head>span{color:#d9c99d!important}
.play-loadout-equipped{background:radial-gradient(ellipse at 50% 42%,#303942 0,#1c242b 48%,#11171d 100%)!important;border-right-color:#4c5560!important}.play-loadout-stage{background:radial-gradient(ellipse at 50% 43%,#3b4650 0,#252e35 37%,#141b21 75%,#0e1419 100%)!important;border-bottom-color:#47525c!important}.play-loadout-stage:before{border-color:#d4be8652!important;background:radial-gradient(circle,#bfd8e80a,transparent 68%)!important}
.loadout-slot-card{background:linear-gradient(145deg,#252d34,#171e24)!important;color:#edf3f6!important;border:1px solid #65717b!important;border-left-width:4px!important;border-radius:8px!important;box-shadow:0 8px 20px #0007,inset 0 1px #ffffff10!important}.loadout-slot-card b{color:#aebbc5!important}.loadout-slot-card .loadout-item-name{color:#fff!important;text-shadow:0 1px #000}.loadout-slot-card .loadout-item-detail{color:#9eacb6!important}.loadout-item-visual{background:radial-gradient(circle at 48% 38%,#28333c,#0b1015)!important;border-color:#56636d!important}.loadout-slot-card.empty{background:linear-gradient(145deg,#20272d,#151a1f)!important;opacity:.78!important}.loadout-slot-card.rarity-common{border-left-color:#aab4bb!important}.loadout-slot-card.rarity-uncommon{border-left-color:#68c77c!important}.loadout-slot-card.rarity-rare{border-left-color:#5ca8ff!important}.loadout-slot-card.rarity-epic{border-left-color:#b778ff!important}.loadout-slot-card.rarity-legendary{border-color:#806c3e!important;border-left-color:#ffc95b!important;background:linear-gradient(145deg,#302d24,#1d2021)!important;box-shadow:0 8px 20px #0008,inset 0 1px #ffe4a226,0 0 16px #dca83b24!important}
.loadout-artifacts-title{background:#121820!important;color:#d9c17d!important;border-top:1px solid #39434c!important}.loadout-artifacts{background:#121820!important}.loadout-artifacts .loadout-slot-card{border-left-color:#a969ed!important;background:linear-gradient(145deg,#292337,#181a25)!important}.loadout-artifacts .loadout-slot-card b{color:#d5b6f4!important}
.loadout-inventory-panel{background:#0e141a!important}.loadout-inventory-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px 10px!important;background:linear-gradient(180deg,#20272e,#161c22)!important;border-bottom:0!important}.loadout-inventory-head strong{color:#fff2cb!important}.loadout-inventory-head small{color:#9ba9b4!important}.loadout-inventory-head>span{flex:0 0 auto;padding:5px 8px;border:1px solid #59636c;border-radius:5px;background:#0d1217;color:#c8d2d9;font-size:10px;font-weight:900;letter-spacing:.08em}
.loadout-inventory-filters{display:flex;gap:5px;padding:0 14px 11px;background:#161c22;border-bottom:1px solid #3f4952}.loadout-inventory-filters button{flex:1;min-width:0;padding:7px 5px;border:1px solid #46515a;border-radius:5px;background:#11171d;color:#8f9da8;font-size:9px;font-weight:900;letter-spacing:.07em;cursor:pointer}.loadout-inventory-filters button:hover{color:#fff;border-color:#7d8992}.loadout-inventory-filters button.active{background:linear-gradient(180deg,#8b713b,#55431f);border-color:#d5b15e;color:#fff2c8;box-shadow:0 0 10px #d7a94028}
.loadout-selected-detail{display:grid;grid-template-columns:92px minmax(0,1fr);gap:13px;margin:12px 14px 4px;padding:12px;border:1px solid #49545e;border-left:4px solid #aeb8bf;border-radius:8px;background:linear-gradient(135deg,#1d252c,#12181e);box-shadow:0 7px 18px #0005}.loadout-selected-detail.rarity-uncommon{border-left-color:#68c77c}.loadout-selected-detail.rarity-rare{border-left-color:#5ca8ff}.loadout-selected-detail.rarity-epic{border-left-color:#b778ff}.loadout-selected-detail.rarity-legendary{border-left-color:#ffc95b}.loadout-selected-detail.category-scrolls{background:linear-gradient(135deg,#282038,#151722)}.loadout-selected-detail.category-keys{background:linear-gradient(135deg,#312a1d,#181817)}.loadout-selected-icon{width:92px;height:92px;display:grid;place-items:center;border:1px solid #596771;border-radius:8px;background:radial-gradient(circle,#34414b,#0c1116);color:#e3c36c;font-size:48px;overflow:hidden}.loadout-selected-icon img{width:100%;height:100%;object-fit:contain}.loadout-selected-copy{min-width:0}.loadout-selected-copy>div:first-child{display:flex;justify-content:space-between;gap:8px;align-items:center}.loadout-selected-copy>div:first-child span{color:#e0c36e;font-size:9px;font-weight:1000;letter-spacing:.11em}.loadout-selected-copy>div:first-child em{color:#9eabb4;font-size:8px;font-style:normal;font-weight:900;letter-spacing:.07em}.loadout-selected-copy>strong{display:block;margin-top:5px;color:#fff;font-size:18px;line-height:1.05}.loadout-selected-copy>small{display:block;margin-top:5px;color:#aeb9c2;font-size:10px;line-height:1.3}.loadout-selected-stats{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.loadout-selected-stats span{padding:4px 6px;border:1px solid #46515a;border-radius:4px;background:#0d1318;color:#82919c;font-size:8px;font-weight:900}.loadout-selected-stats b{margin-left:4px;color:#eef4f7;font-size:9px}
.loadout-inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;padding:10px 14px 14px!important}.loadout-inventory-card{min-height:176px!important;padding:8px!important;gap:6px!important;border:1px solid #4d5962!important;border-left:4px solid #9ba6ad!important;border-radius:8px!important;background:linear-gradient(145deg,#222a31,#141a20)!important;color:#edf3f6!important;box-shadow:0 7px 16px #0005!important}.loadout-inventory-card[hidden]{display:none!important}.loadout-inventory-card:hover{filter:none!important;border-color:#8b98a2!important;transform:translateY(-1px)}.loadout-inventory-card.rarity-uncommon{border-left-color:#68c77c!important}.loadout-inventory-card.rarity-rare{border-left-color:#5ca8ff!important}.loadout-inventory-card.rarity-epic{border-left-color:#b778ff!important}.loadout-inventory-card.rarity-legendary{border-color:#62583e!important;border-left-color:#ffc95b!important;background:linear-gradient(145deg,#292820,#181b1e)!important}.loadout-inventory-card.category-scrolls{background:linear-gradient(145deg,#292238,#171923)!important}.loadout-inventory-card.category-keys{background:linear-gradient(145deg,#302a1f,#191a19)!important}
.loadout-type-badge{align-self:flex-start;padding:4px 6px;border:1px solid #59656e;border-radius:4px;background:#0b1116;color:#c2ccd3;font-size:8px;font-weight:1000;letter-spacing:.09em}.category-scrolls .loadout-type-badge{border-color:#8b5db5;color:#d7afff;background:#21172d}.category-keys .loadout-type-badge{border-color:#9a783b;color:#f1d17f;background:#2b2314}.loadout-inventory-visual{height:86px!important;border-color:#46525c!important;background:radial-gradient(circle at 50% 42%,#303b44,#0b1015)!important}.category-scrolls .loadout-inventory-visual i{color:#c68cff!important}.category-keys .loadout-inventory-visual i{color:#f0ca64!important}.loadout-inventory-copy strong{font-size:14px!important;color:#fff!important}.loadout-inventory-copy small{font-size:9px!important;color:#99a7b1!important}.loadout-inventory-card em{background:#173a25!important;border-color:#4f9366!important;color:#c8ffd8!important}.loadout-salvage-copy{margin-top:auto!important;color:#8f9da7!important;font-size:8px!important;font-weight:800!important}.loadout-inventory-card.controller-focus{outline:3px solid #86cfff!important;outline-offset:-3px!important;box-shadow:0 0 0 4px #5db9f329,0 10px 24px #0009!important}
.loadout-inventory-hint,.play-loadout-foot{background:#11171c!important;border-color:#3e4850!important;color:#9ba8b2!important}.loadout-inventory-grid::-webkit-scrollbar{display:block;width:8px}.loadout-inventory-grid::-webkit-scrollbar-thumb{background:#46525c;border-radius:8px}.loadout-inventory-grid{scrollbar-width:thin;scrollbar-color:#46525c transparent}
@media(max-width:1200px){.loadout-selected-detail{grid-template-columns:72px minmax(0,1fr)}.loadout-selected-icon{width:72px;height:72px}.loadout-selected-copy>strong{font-size:15px}.loadout-inventory-filters button{font-size:8px}.loadout-inventory-card{min-height:158px!important}.loadout-inventory-visual{height:70px!important}}
.village-level-card.gamepad-focus{outline:3px solid #e2bc70;outline-offset:2px;border-color:#e2bc70;background:#403223}

/* v0.5.66 Professional workspace navigation + independent scroll regions */
#app{height:100%;position:relative;overflow:hidden}
.topbar{height:64px!important;min-height:64px!important;padding:0 16px!important;position:relative;z-index:90;background:#12181e!important}
.topbar .brand{min-width:250px}
.topbar .toolbar{min-width:0;flex:1;justify-content:flex-end;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap!important;scrollbar-width:none;padding:4px 0}
.topbar .toolbar::-webkit-scrollbar{display:none}
.topbar .toolbar>*{flex:0 0 auto}

/* Former top tabs become the permanent global rail. */
.designer-nav{position:absolute!important;left:0;top:64px;bottom:0;width:72px!important;height:auto!important;z-index:70;display:flex!important;flex-direction:column!important;align-items:stretch;background:#10161c!important;border-right:1px solid #2d3944!important;border-bottom:0!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:none!important;padding:6px 0!important}
.designer-nav::-webkit-scrollbar{display:none!important}
.designer-nav-btn{width:72px!important;min-width:72px!important;min-height:64px!important;height:auto!important;padding:7px 4px!important;border:0!important;border-bottom:1px solid #222d36!important;border-radius:0!important;background:#111820!important;color:#9eafbd!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important;font-size:9px!important;line-height:1.05!important;white-space:normal!important;text-align:center!important;box-shadow:none!important}
.designer-nav-btn:hover{background:#19232c!important;color:#dce7ef!important}
.designer-nav-btn.active{background:#202b35!important;color:#fff!important;box-shadow:inset 3px 0 0 var(--accent)!important}
.workspace-rail-icon{font-size:20px;line-height:1;color:#e4a04b}
.workspace-rail-label{font-size:8.5px;font-weight:800;letter-spacing:.02em;max-width:62px}

/* Workspace thumbnail drawer: global tools, not level assets. */
.workspace-tool-drawer{position:absolute;left:72px;top:64px;bottom:0;width:196px;z-index:65;background:#141b22;border-right:1px solid #303b45;display:flex;flex-direction:column;min-height:0;transition:width .18s ease,transform .18s ease}
.workspace-tool-drawer-head{flex:0 0 auto;padding:11px 10px 9px;border-bottom:1px solid #2d3842;background:#121920;display:flex;align-items:center;justify-content:space-between;gap:8px}
.workspace-tool-drawer-title{min-width:0}.workspace-tool-drawer-title strong{display:block;font-size:11px;letter-spacing:.12em;color:#e8eef3}.workspace-tool-drawer-title small{display:block;margin-top:3px;font-size:8.5px;color:#8393a0}
.workspace-drawer-toggle{width:30px;height:30px;padding:0!important;border-radius:7px!important;display:grid!important;place-items:center;font-size:13px!important}
.workspace-tool-drawer-scroll{flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden;padding:9px;scrollbar-width:none;overscroll-behavior:contain}
.workspace-tool-drawer-scroll::-webkit-scrollbar{display:none}
.workspace-tool-group{margin-bottom:12px}.workspace-tool-group-title{font-size:8px;color:#778793;font-weight:900;letter-spacing:.11em;text-transform:uppercase;margin:2px 2px 6px}
.workspace-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.workspace-tool-card{min-width:0;min-height:88px;padding:6px!important;border:1px solid #303c47!important;background:#192129!important;border-radius:9px!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:5px!important;text-align:left!important;color:#bdc9d3!important}
.workspace-tool-card:hover{background:#202b35!important;border-color:#455563!important}.workspace-tool-card.active{border-color:#b9782d!important;background:#29251f!important;box-shadow:inset 0 -2px 0 var(--accent)}
.workspace-tool-thumb{height:48px;border:1px solid #33414d;border-radius:7px;background:linear-gradient(145deg,#1d2a35,#10161c);display:grid;place-items:center;font-size:24px;color:#efab57;overflow:hidden;position:relative}
.workspace-tool-thumb:after{content:'';position:absolute;inset:auto 5px 5px;height:2px;background:linear-gradient(90deg,transparent,#6f7f8c,transparent);opacity:.5}
.workspace-tool-card strong{font-size:9px!important;line-height:1.15!important;white-space:normal!important;color:#e5edf3!important}
.workspace-tool-card small{font-size:7.5px!important;color:#83939f!important;line-height:1.2!important}

/* All working surfaces start after the global navigation. */
.workspace[data-designer-page="level"],.designer-page{margin-left:268px!important;width:calc(100% - 268px)!important;height:calc(100% - 64px)!important;min-height:0!important}
.workspace[data-designer-page="level"]{grid-template-columns:350px minmax(430px,1fr) 300px!important;overflow:hidden!important}
.designer-page{overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-width:none!important;padding-bottom:28px!important}
.designer-page::-webkit-scrollbar{display:none!important}
.inspector{overflow-y:auto!important;overflow-x:hidden!important;min-height:0!important;scrollbar-width:none!important;overscroll-behavior:contain}
.inspector::-webkit-scrollbar{display:none!important}
.character-editor-panel,.enemy-settings-panel,.designer-list-panel,.item-gallery-grid,.creature-rig-joint-list,.texture-grid,.texture-folders{overscroll-behavior:contain}

/* Asset Library is the Level Designer's context browser. */
.palette{min-width:0!important;border-right:1px solid #303b45!important;background:#151c23!important}
.palette-head{display:grid!important;grid-template-columns:minmax(0,1fr) 32px!important;gap:7px!important;align-items:start!important}
.palette-head .panel-title,.palette-head .asset-search{grid-column:1}
.asset-library-collapse-btn{grid-column:2;grid-row:1/3;width:32px;height:32px;padding:0!important;align-self:start;border-radius:7px!important;font-size:12px!important}
.asset-library-browser{grid-template-columns:58px minmax(0,1fr)!important}
.palette-tabs{overflow-y:auto!important;scrollbar-width:none!important}
.palette-scroll{overflow-y:auto!important;scrollbar-width:none!important}
.palette-scroll::-webkit-scrollbar,.palette-tabs::-webkit-scrollbar{display:none!important}

body.workspace-drawer-collapsed .workspace-tool-drawer{width:0;transform:translateX(-6px);overflow:hidden;border-right:0}
body.workspace-drawer-collapsed .workspace[data-designer-page="level"],body.workspace-drawer-collapsed .designer-page{margin-left:72px!important;width:calc(100% - 72px)!important}
body.asset-library-collapsed .workspace[data-designer-page="level"]{grid-template-columns:0 minmax(430px,1fr) 300px!important}
body.asset-library-collapsed .workspace[data-designer-page="level"]>.palette{display:none!important}

/* A compact mode keeps the rail and drawer readable on narrower desktops. */
@media(max-width:1450px){
  .workspace-tool-drawer{width:176px}.workspace[data-designer-page="level"],.designer-page{margin-left:248px!important;width:calc(100% - 248px)!important}.workspace[data-designer-page="level"]{grid-template-columns:310px minmax(380px,1fr) 270px!important}
}
@media(max-width:1180px){
  .workspace-tool-drawer{width:158px}.workspace[data-designer-page="level"],.designer-page{margin-left:230px!important;width:calc(100% - 230px)!important}.workspace-tool-grid{grid-template-columns:1fr}.workspace-tool-card{min-height:66px;display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;align-items:center!important}.workspace-tool-thumb{height:46px}.workspace[data-designer-page="level"]{grid-template-columns:270px minmax(340px,1fr) 240px!important}
}
@media(max-width:900px){
  .workspace-tool-drawer{display:none}.workspace[data-designer-page="level"],.designer-page{margin-left:72px!important;width:calc(100% - 72px)!important}.workspace[data-designer-page="level"]{grid-template-columns:245px minmax(300px,1fr) 220px!important}
}

/* Play Test remains distraction-free. */
body.playtest-focus .workspace-tool-drawer,body.playtest-focus .designer-nav{display:none!important}
body.playtest-focus .workspace[data-designer-page="level"].active{margin-left:0!important;width:100%!important;height:calc(100% - 48px)!important;grid-template-columns:0 minmax(0,1fr) 0!important}

/* v0.5.66 persistent collapsed rails: panels never disappear completely. */
:root{--workspace-rail-w:72px;--workspace-drawer-collapsed-w:34px;--asset-library-collapsed-w:36px}
body.workspace-drawer-collapsed .workspace-tool-drawer{
  display:flex!important;
  width:var(--workspace-drawer-collapsed-w)!important;
  min-width:var(--workspace-drawer-collapsed-w)!important;
  transform:none!important;
  overflow:hidden!important;
  border-right:1px solid #303b45!important;
  background:#111820!important;
}
body.workspace-drawer-collapsed .workspace-tool-drawer-head{
  flex:1 1 auto!important;
  width:100%!important;
  padding:7px 2px!important;
  border-bottom:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  background:#111820!important;
}
body.workspace-drawer-collapsed .workspace-tool-drawer-title,
body.workspace-drawer-collapsed .workspace-tool-drawer-scroll{display:none!important}
body.workspace-drawer-collapsed .workspace-drawer-toggle{
  display:grid!important;
  width:28px!important;
  min-width:28px!important;
  height:38px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #42515e!important;
  background:#1b2630!important;
  color:#f0a64c!important;
  font-size:22px!important;
  line-height:1!important;
  border-radius:7px!important;
  place-items:center!important;
}
body.workspace-drawer-collapsed .workspace-tool-drawer:after{
  content:'WORKSPACE';
  writing-mode:vertical-rl;
  text-orientation:mixed;
  position:absolute;
  top:58px;
  left:9px;
  color:#667886;
  font-size:8px;
  font-weight:900;
  letter-spacing:.13em;
  pointer-events:none;
}
body.workspace-drawer-collapsed .workspace[data-designer-page="level"],
body.workspace-drawer-collapsed .designer-page{
  margin-left:calc(var(--workspace-rail-w) + var(--workspace-drawer-collapsed-w))!important;
  width:calc(100% - var(--workspace-rail-w) - var(--workspace-drawer-collapsed-w))!important;
}

body.asset-library-collapsed .workspace[data-designer-page="level"]{
  grid-template-columns:var(--asset-library-collapsed-w) minmax(430px,1fr) 300px!important;
}
body.asset-library-collapsed .workspace[data-designer-page="level"]>.palette{
  display:block!important;
  width:var(--asset-library-collapsed-w)!important;
  min-width:var(--asset-library-collapsed-w)!important;
  max-width:var(--asset-library-collapsed-w)!important;
  overflow:hidden!important;
  position:relative!important;
  background:#111820!important;
  border-right:1px solid #303b45!important;
}
body.asset-library-collapsed .workspace[data-designer-page="level"]>.palette>*:not(.palette-head){display:none!important}
body.asset-library-collapsed .palette-head{
  display:flex!important;
  width:100%!important;
  height:100%!important;
  min-height:100%!important;
  padding:7px 2px!important;
  margin:0!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  border:0!important;
  background:#111820!important;
}
body.asset-library-collapsed .palette-head .panel-title,
body.asset-library-collapsed .palette-head .asset-search{display:none!important}
body.asset-library-collapsed .asset-library-collapse-btn{
  display:grid!important;
  width:28px!important;
  min-width:28px!important;
  height:38px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #42515e!important;
  background:#1b2630!important;
  color:#f0a64c!important;
  font-size:22px!important;
  line-height:1!important;
  border-radius:7px!important;
  place-items:center!important;
}
body.asset-library-collapsed .workspace[data-designer-page="level"]>.palette:after{
  content:'ASSETS';
  writing-mode:vertical-rl;
  text-orientation:mixed;
  position:absolute;
  top:58px;
  left:10px;
  color:#667886;
  font-size:8px;
  font-weight:900;
  letter-spacing:.14em;
  pointer-events:none;
}

/* Even on narrower screens, collapsed panels keep their visible reopen bars. */
@media(max-width:1450px){
  body.workspace-drawer-collapsed .workspace[data-designer-page="level"],body.workspace-drawer-collapsed .designer-page{margin-left:106px!important;width:calc(100% - 106px)!important}
  body.asset-library-collapsed .workspace[data-designer-page="level"]{grid-template-columns:36px minmax(380px,1fr) 270px!important}
}
@media(max-width:1180px){
  body.workspace-drawer-collapsed .workspace[data-designer-page="level"],body.workspace-drawer-collapsed .designer-page{margin-left:106px!important;width:calc(100% - 106px)!important}
  body.asset-library-collapsed .workspace[data-designer-page="level"]{grid-template-columns:36px minmax(340px,1fr) 240px!important}
}
@media(max-width:900px){
  .workspace-tool-drawer{display:flex!important;width:150px!important}
  .workspace[data-designer-page="level"],.designer-page{margin-left:222px!important;width:calc(100% - 222px)!important}
  body.workspace-drawer-collapsed .workspace-tool-drawer{width:34px!important;min-width:34px!important}
  body.workspace-drawer-collapsed .workspace[data-designer-page="level"],body.workspace-drawer-collapsed .designer-page{margin-left:106px!important;width:calc(100% - 106px)!important}
  body.asset-library-collapsed .workspace[data-designer-page="level"]{grid-template-columns:36px minmax(300px,1fr) 220px!important}
}

/* v0.5.67: Assets reopen rail stays available outside Level Designer. */
.persistent-assets-rail{
  position:absolute;
  left:268px;
  top:64px;
  bottom:0;
  width:36px;
  z-index:64;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:7px 2px;
  background:#111820;
  border-right:1px solid #303b45;
  overflow:hidden;
}
.persistent-assets-rail[hidden]{display:none!important}
.persistent-assets-expand{
  display:grid!important;
  place-items:center!important;
  width:28px!important;
  min-width:28px!important;
  height:38px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #42515e!important;
  border-radius:7px!important;
  background:#1b2630!important;
  color:#f0a64c!important;
  font-size:22px!important;
  line-height:1!important;
}
.persistent-assets-rail>span{
  writing-mode:vertical-rl;
  text-orientation:mixed;
  color:#667886;
  font-size:8px;
  font-weight:900;
  letter-spacing:.14em;
  pointer-events:none;
}
body.non-level-workspace .designer-page{
  margin-left:304px!important;
  width:calc(100% - 304px)!important;
}
body.workspace-drawer-collapsed .persistent-assets-rail{left:106px!important}
body.workspace-drawer-collapsed.non-level-workspace .designer-page{
  margin-left:142px!important;
  width:calc(100% - 142px)!important;
}
body.playtest-focus .persistent-assets-rail{display:none!important}
@media(max-width:1450px){
  .persistent-assets-rail{left:248px}
  body.non-level-workspace .designer-page{margin-left:284px!important;width:calc(100% - 284px)!important}
  body.workspace-drawer-collapsed .persistent-assets-rail{left:106px!important}
  body.workspace-drawer-collapsed.non-level-workspace .designer-page{margin-left:142px!important;width:calc(100% - 142px)!important}
}
@media(max-width:1180px){
  .persistent-assets-rail{left:230px}
  body.non-level-workspace .designer-page{margin-left:266px!important;width:calc(100% - 266px)!important}
  body.workspace-drawer-collapsed .persistent-assets-rail{left:106px!important}
  body.workspace-drawer-collapsed.non-level-workspace .designer-page{margin-left:142px!important;width:calc(100% - 142px)!important}
}
@media(max-width:900px){
  .persistent-assets-rail{left:222px}
  body.non-level-workspace .designer-page{margin-left:258px!important;width:calc(100% - 258px)!important}
  body.workspace-drawer-collapsed .persistent-assets-rail{left:106px!important}
  body.workspace-drawer-collapsed.non-level-workspace .designer-page{margin-left:142px!important;width:calc(100% - 142px)!important}
}

/* v0.5.68 loadout screen readability + controller navigation polish */
.play-loadout-overlay{left:18px!important;right:18px!important;top:18px!important;bottom:18px!important;width:auto!important;max-width:none!important}
.play-loadout-panel{max-width:min(1520px,96vw)!important;margin-inline:auto!important}
.play-loadout-head{height:62px!important;padding:12px 18px!important}
.play-loadout-head strong{font-size:18px!important;letter-spacing:.08em!important}
.play-loadout-head small{font-size:13px!important;color:#d3c7ab!important}
.play-loadout-head>span{font-size:12px!important;color:#f1e0b4!important;max-width:60%;text-align:right;line-height:1.3}
.play-loadout-body{grid-template-columns:minmax(640px,1.05fr) minmax(460px,.9fr)!important}
.play-loadout-equipped{min-width:0;border-right:1px solid #6e6758}
.play-loadout-stage{min-height:520px!important}
.play-loadout-character{width:clamp(360px,34vh,520px)!important;top:16px!important;bottom:16px!important}
.loadout-slot-card{width:190px!important;min-height:124px!important;padding:10px!important;grid-template-columns:64px minmax(0,1fr)!important;column-gap:10px!important}
.loadout-slot-card b{font-size:10px!important;letter-spacing:.08em!important;margin-bottom:7px!important}
.loadout-slot-card img,.loadout-slot-card .loadout-item-visual{width:58px!important;height:58px!important}
.loadout-slot-card img{background:#1a1e20!important}
.loadout-slot-card .loadout-item-glyph{font-size:30px!important}
.loadout-slot-card .loadout-item-name{font-size:17px!important;line-height:1.06!important;font-weight:900!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
.loadout-slot-card .loadout-item-detail{font-size:12px!important;line-height:1.2!important;color:#4f4a3d!important;margin-top:4px!important}
.loadout-slot-card.controller-focus{outline:3px solid #8fd3ff!important;outline-offset:-5px!important;box-shadow:0 0 0 4px rgba(143,211,255,.22),0 0 20px rgba(255,220,145,.22)!important;transform:scale(1.015)!important;z-index:2}
.loadout-artifacts-title{font-size:12px!important;letter-spacing:.12em!important;padding:10px 14px 5px!important}
.loadout-artifacts{gap:10px!important;padding:10px 14px 14px!important}
.loadout-artifacts .loadout-slot-card{min-height:98px!important}
.loadout-inventory-panel{display:flex!important;min-width:0;background:linear-gradient(180deg,#3d3b36,#2c2a26)!important}
.loadout-inventory-head{padding:14px 16px 12px!important}
.loadout-inventory-head strong{font-size:18px!important;letter-spacing:.08em!important}
.loadout-inventory-head small{font-size:12px!important;color:#e0d4b7!important}
.loadout-inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:14px!important}
.loadout-inventory-card{min-height:236px!important;padding:10px!important;gap:8px!important}
.loadout-inventory-card.controller-focus{outline:3px solid #8fd3ff!important;outline-offset:-4px!important;box-shadow:0 0 0 4px rgba(143,211,255,.2),0 0 22px rgba(255,220,145,.18)!important;transform:translateY(-2px)}
.loadout-inventory-visual{height:126px!important;border-radius:8px!important}
.loadout-inventory-visual i{font-size:68px!important}
.loadout-inventory-copy strong{font-size:18px!important;line-height:1.08!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
.loadout-inventory-copy small{font-size:12px!important;color:#565143!important;margin-top:4px!important}
.loadout-inventory-card em{top:8px!important;right:8px!important;padding:4px 6px!important;font-size:9px!important;border-radius:4px!important}
.loadout-salvage-copy{margin-top:4px!important;font-size:13px!important;color:#3f3b30!important;font-weight:800!important;letter-spacing:.05em!important}
.loadout-inventory-hint,.play-loadout-foot{font-size:12px!important;line-height:1.35!important;padding:10px 14px!important;color:#e2d5b7!important}
.loadout-inventory-empty{font-size:14px!important;padding:42px 18px!important}
@media(max-width:1200px){.play-loadout-body{grid-template-columns:minmax(540px,1fr) minmax(360px,.82fr)!important}.loadout-slot-card{width:172px!important;min-height:112px!important}.play-loadout-character{width:clamp(300px,32vh,430px)!important}.loadout-inventory-card{min-height:210px!important}}
@media(max-width:930px){.play-loadout-body{grid-template-columns:1fr!important}.loadout-inventory-panel{min-height:280px!important}.play-loadout-stage{min-height:420px!important}.loadout-slot-card{width:150px!important}.loadout-inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* v0.5.69 reference-guided compact gameplay HUD */
.play-hud{bottom:18px!important;min-width:0!important;width:max-content!important;max-width:calc(100% - 24px);text-align:center}
.play-hud-bar{display:flex;align-items:flex-end;justify-content:center;gap:6px;padding:7px 8px;border:2px solid #4d555b;border-radius:8px;background:linear-gradient(180deg,#20252adf,#0d1115ee);box-shadow:0 8px 24px #0009,inset 0 0 0 1px #ffffff0d}
.play-hud-bar .play-equipment-slot{flex:0 0 auto;border-radius:4px!important;background:linear-gradient(180deg,#252c32,#11171c)!important;border:2px solid #515d66!important;filter:drop-shadow(0 3px 4px #0008)!important}
.play-hud-bar .play-equipment-slot.primary{width:62px!important;height:62px!important}
.play-hud-bar .play-equipment-slot.artifact{width:52px!important;height:52px!important}
.play-hud-bar .play-equipment-slot.gear{width:52px!important;height:52px!important}
.play-hud-bar .play-equipment-slot.scroll{border-color:#716651!important;background:linear-gradient(180deg,#2c2923,#15130f)!important}
.play-hud-bar .play-equipment-slot.scroll .play-slot-glyph{color:#d6bd78!important;font-size:24px!important}
.play-hud-bar .play-slot-label{left:2px!important;top:2px!important;padding:2px 4px!important;border-radius:2px!important;background:#090d10dd!important;color:#e8edf0!important;font-size:8px!important;letter-spacing:.04em!important;max-width:calc(100% - 4px)!important}
.play-hud-bar .play-slot-glyph{font-size:28px!important}
.play-health-heart{position:relative;width:92px!important;height:84px!important;margin:0 2px -4px;filter:drop-shadow(0 5px 8px #000b)!important}
.play-health-heart .play-health-level{position:absolute;left:50%;bottom:23px;transform:translateX(-50%);font-size:16px;font-weight:1000;color:#fff;text-shadow:0 2px 3px #000,0 0 5px #000;letter-spacing:.02em}
.play-potion-slot{position:relative;width:62px;height:62px;flex:0 0 auto;border:2px solid #58636b;border-radius:4px;background:linear-gradient(180deg,#263038,#11171c);display:grid;place-items:center;overflow:hidden;box-shadow:0 3px 6px #0008}
.play-potion-slot[hidden]{display:none!important}.play-potion-slot .play-slot-label{position:absolute;z-index:5;left:2px;top:2px;padding:2px 4px;border-radius:2px;background:#090d10dd;color:#fff;font-size:8px;font-weight:900}
.potion-bottle{position:relative;width:28px;height:38px;margin-top:5px;border:3px solid #c8d7df;border-radius:5px 5px 9px 9px;background:#0d151a;overflow:hidden;box-shadow:0 0 7px #57c9ff55}.potion-bottle:before{content:'';position:absolute;left:7px;top:-7px;width:10px;height:8px;border:3px solid #c8d7df;border-bottom:0;background:#172029;border-radius:3px 3px 0 0}.potion-liquid{position:absolute;left:2px;right:2px;bottom:2px;height:calc(var(--potion-charge,1)*100%);max-height:calc(100% - 4px);background:linear-gradient(180deg,#65d8ff,#1684c0);border-radius:2px 2px 5px 5px;transition:height .12s linear;box-shadow:0 0 8px #49c9ff88 inset}.potion-bottle b{position:absolute;z-index:3;left:50%;top:50%;transform:translate(-50%,-50%);font-size:20px;color:#fff;text-shadow:0 1px 3px #001}.potion-recharge{position:absolute;left:0;right:0;bottom:2px;z-index:4;font-size:7px;font-weight:1000;color:#e9f8ff;text-shadow:0 1px 2px #000;letter-spacing:.04em}.play-potion-slot.recharging{filter:saturate(.55);border-color:#475159}.play-potion-slot.ready{border-color:#72bddc;box-shadow:0 0 10px #4ebfe744,0 3px 6px #0008}
.play-bag-slot{position:relative;width:68px;height:62px;flex:0 0 auto;border:2px solid #70654e;border-radius:4px;background:linear-gradient(180deg,#302a20,#17130e);display:grid;place-items:center;box-shadow:0 3px 6px #0008}.play-bag-slot .play-slot-label{position:absolute;left:2px;top:2px;padding:2px 3px;background:#090d10dd;color:#fff;font-size:7px;font-weight:900}.bag-glyph{font-size:28px;color:#dfbd66;margin-top:6px}.play-bag-slot>strong{position:absolute;right:5px;bottom:3px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#e0bc57;color:#17130e;display:grid;place-items:center;font-size:10px;font-weight:1000}.play-bag-slot.loot-arrive{animation:hudBagArrival .4s ease-out}@keyframes hudBagArrival{0%{transform:scale(1)}35%{transform:scale(1.24);box-shadow:0 0 22px #f4cf66}100%{transform:scale(1)}}
.play-currency-row{margin-top:4px!important;gap:4px!important;justify-content:flex-end!important;font-size:8px!important}.play-currency-row span{padding:3px 6px!important;border-radius:4px!important;background:#0d1216dd!important}.play-currency-row strong{font-size:9px!important}
@media(max-width:800px){.play-hud-bar{gap:3px;padding:5px}.play-hud-bar .play-equipment-slot.primary{width:52px!important;height:52px!important}.play-hud-bar .play-equipment-slot.artifact,.play-hud-bar .play-equipment-slot.gear{width:44px!important;height:44px!important}.play-health-heart{width:78px!important;height:72px!important}.play-potion-slot{width:52px;height:52px}.play-bag-slot{width:56px;height:52px}.play-hud-bar .play-slot-label{font-size:6px!important}.play-currency-row{display:none!important}}

/* v0.5.69 reward reveal: ~200% previous card size, then fly into the actual bag slot */
.play-loot-toast{right:32px!important;top:18%!important;z-index:75!important;transform-origin:center center!important;--loot-dx:-320px;--loot-dy:360px}
.play-loot-toast-card{min-width:480px!important;max-width:600px!important;padding:26px 30px!important;gap:22px!important;border-radius:20px!important;border:2px solid #9aa8b4!important;box-shadow:0 24px 60px #000b,0 0 24px #8fcfff33!important;background:linear-gradient(180deg,#24313beF,#10171deF)!important}
.play-loot-toast-visual{width:128px!important;height:128px!important;border-radius:18px!important;font-size:64px!important;border:2px solid #6d7d88}
.play-loot-toast-copy strong{font-size:28px!important;line-height:1.06!important}.play-loot-toast-copy small{font-size:16px!important;margin-top:8px!important}
.play-loot-toast.pop{animation:lootToastPopLarge 1.18s cubic-bezier(.2,.8,.25,1)}
.play-loot-toast.zoom{animation:lootToastToBag .78s cubic-bezier(.4,0,.2,1) forwards}
@keyframes lootToastPopLarge{0%{opacity:0;transform:translateX(32px) scale(.62)}14%{opacity:1;transform:translateX(0) scale(1.04)}76%{opacity:1;transform:translateX(0) scale(1)}100%{opacity:1;transform:translateX(0) scale(1)}}
@keyframes lootToastToBag{0%{opacity:1;transform:translate(0,0) scale(1)}72%{opacity:.92}100%{opacity:0;transform:translate(var(--loot-dx),var(--loot-dy)) scale(.13)}}
@media(max-width:900px){.play-loot-toast-card{min-width:min(440px,calc(100vw - 44px))!important;max-width:calc(100vw - 44px)!important;padding:18px 20px!important}.play-loot-toast-visual{width:104px!important;height:104px!important}.play-loot-toast-copy strong{font-size:22px!important}.play-loot-toast-copy small{font-size:13px!important}}

/* v0.5.70 weapon enhancement screen */
.play-enhancement-view{flex:1;min-height:0;display:grid;grid-template-columns:minmax(330px,.72fr) minmax(620px,1.28fr);background:linear-gradient(135deg,#2d2b27,#1f211f);overflow:hidden}
.play-enhancement-view[hidden]{display:none!important}
.enhancement-weapon-panel{min-width:0;padding:24px 26px;display:flex;flex-direction:column;align-items:center;border-right:2px solid #706857;background:radial-gradient(circle at 50% 32%,#55554d 0,#34352f 46%,#282823 100%);text-align:center}
.enhancement-kicker{align-self:stretch;text-align:left;color:#dacda9;font-size:12px;font-weight:900;letter-spacing:.12em;margin-bottom:12px}
.enhancement-weapon-visual{width:min(290px,75%);aspect-ratio:1/1;display:grid;place-items:center;margin:8px auto 14px;background:radial-gradient(circle,#303532 0,#141918 72%);border:2px solid #756d5b;border-radius:12px;font-size:88px;color:#e8c76f;box-shadow:inset 0 0 28px #0008,0 10px 24px #0006;overflow:hidden}
.enhancement-weapon-visual img{width:92%;height:92%;object-fit:contain}
.enhancement-weapon-panel h2{margin:2px 0 5px;font-size:28px;line-height:1.05;color:#f4ead0;text-shadow:0 2px #000}
.enhancement-rarity{font-size:13px;font-weight:900;letter-spacing:.08em;color:#9fdcff;text-transform:uppercase}
.enhancement-weapon-panel p{max-width:380px;margin:13px auto 18px;color:#d0c7ae;font-size:14px;line-height:1.4}
.enhancement-stat-grid{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:auto}
.enhancement-stat-grid>div{padding:10px 5px;border:1px solid #655f50;background:#262723;border-radius:7px}.enhancement-stat-grid span{display:block;font-size:9px;letter-spacing:.1em;color:#a9a18d}.enhancement-stat-grid strong{display:block;margin-top:4px;font-size:20px;color:#f2e3bb}
.enhancement-points{width:100%;margin-top:10px;padding:11px 14px;display:flex;align-items:center;justify-content:space-between;border:1px solid #9b813e;background:#3b3526;border-radius:8px;color:#e8d59c}.enhancement-points span{font-size:11px;font-weight:900;letter-spacing:.08em}.enhancement-points strong{font-size:24px;color:#fff0a8}
.enhancement-paths-panel{min-width:0;display:flex;flex-direction:column;padding:20px 22px;background:linear-gradient(180deg,#393732,#292925)}
.enhancement-paths-head{display:flex;align-items:end;justify-content:space-between;gap:14px;padding-bottom:12px;border-bottom:1px solid #6c6556}.enhancement-paths-head strong{font-size:18px;letter-spacing:.08em;color:#f1e5c6}.enhancement-paths-head small{font-size:11px;color:#c4b99c}
.enhancement-path-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:stretch;padding:20px 0;overflow:auto;scrollbar-width:none}.enhancement-path-grid::-webkit-scrollbar{display:none}
.enhancement-path-card{position:relative;min-width:0;padding:18px 14px;display:flex;flex-direction:column;align-items:center;text-align:center;border:2px solid #77705f;border-radius:8px;background:linear-gradient(180deg,#4c4941,#302f2b);color:#f4ead0;box-shadow:inset 0 0 0 2px #ffffff0c;cursor:pointer;transition:transform .12s ease,outline-color .12s ease}
.enhancement-path-card .enhancement-icon{width:92px;height:92px;display:grid;place-items:center;margin:4px auto 14px;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);background:radial-gradient(circle,#8a56c7,#47236b 60%,#24142f);border:0;font-size:48px;color:#fff;text-shadow:0 2px 8px #000}
.enhancement-path-card strong{font-size:19px;line-height:1.08}.enhancement-path-card small{min-height:52px;margin-top:9px;color:#d1c8b1;font-size:12px;line-height:1.35}.enhancement-tier-pips{display:flex;gap:8px;justify-content:center;margin:18px 0 12px}.enhancement-tier-pips i{font-style:normal;font-size:22px;color:#716a5d}.enhancement-tier-pips i.filled{color:#d295ff;text-shadow:0 0 8px #9c55d9}.enhancement-path-card em{margin-top:auto;padding:7px 12px;border:1px solid #8a7d62;border-radius:5px;background:#252722;color:#efe0b9;font-size:11px;font-style:normal;font-weight:900;letter-spacing:.06em}
.enhancement-path-card.controller-focus{outline:4px solid #8fd3ff;outline-offset:3px;transform:translateY(-4px) scale(1.015);box-shadow:0 0 0 6px rgba(143,211,255,.15),0 14px 30px #0008,inset 0 0 0 2px #f2de9c33}
.enhancement-detail{min-height:92px;padding:14px 16px;border:1px solid #706955;border-radius:7px;background:#22231f;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:14px;align-items:center}.enhancement-detail strong{grid-row:1/3;font-size:17px;color:#f2e5c7}.enhancement-detail span{font-size:13px;color:#d5cbb2}.enhancement-detail small{font-size:11px;color:#aebcd0;margin-top:3px}
@media(max-width:1100px){.play-enhancement-view{grid-template-columns:minmax(280px,.7fr) minmax(500px,1.3fr)}.enhancement-weapon-visual{width:210px}.enhancement-path-grid{gap:10px}.enhancement-path-card{padding:14px 10px}.enhancement-path-card .enhancement-icon{width:72px;height:72px;font-size:38px}.enhancement-path-card strong{font-size:16px}}
@media(max-width:860px){.play-enhancement-view{grid-template-columns:1fr;overflow:auto}.enhancement-weapon-panel{border-right:0;border-bottom:2px solid #706857}.enhancement-weapon-visual{width:160px}.enhancement-stat-grid{max-width:560px}.enhancement-paths-panel{min-height:430px}}

/* v0.5.70 chest collect burst: rewards visibly travel from chest to their HUD counters */
.chest-hud-reward{position:fixed;z-index:120;pointer-events:none;display:flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid #e3c96a;border-radius:999px;background:#171b1eea;color:#fff4bc;font-size:11px;font-weight:900;box-shadow:0 0 16px #f0c75a88,0 8px 18px #0009;transform:translate(-50%,-50%);animation:chestRewardFly .76s cubic-bezier(.18,.75,.24,1) forwards}.chest-hud-reward b{font-size:19px;color:#ffe47d;text-shadow:0 0 8px #ffd04f}.chest-hud-reward span{white-space:nowrap}.chest-reward-spark{position:fixed;z-index:119;width:7px;height:7px;border-radius:50%;pointer-events:none;background:#fff3a8;box-shadow:0 0 10px #ffd95c;transform:translate(-50%,-50%);animation:chestSparkBurst .62s ease-out forwards}@keyframes chestRewardFly{0%{opacity:0;transform:translate(-50%,-50%) scale(.55)}14%{opacity:1;transform:translate(-50%,-70%) scale(1.18)}35%{opacity:1;transform:translate(-50%,-85%) scale(1)}100%{opacity:0;transform:translate(calc(-50% + var(--reward-dx)),calc(-50% + var(--reward-dy))) scale(.25)}}@keyframes chestSparkBurst{0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}16%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--spark-x)),calc(-50% + var(--spark-y))) scale(.05)}}

/* v0.5.71 mission-complete / victory overlay */
.victory-overlay{position:absolute;z-index:92;inset:0;display:grid;place-items:center;overflow:hidden;pointer-events:auto}.victory-overlay[hidden]{display:none!important}.victory-dim{position:absolute;inset:0;background:radial-gradient(circle at 50% 44%,rgba(12,19,23,.10),rgba(4,7,10,.58) 68%,rgba(1,3,5,.72));backdrop-filter:blur(1px)}.victory-panel{position:relative;width:min(720px,88%);padding:28px 36px 26px;text-align:center;color:#f6edd7;text-shadow:0 3px 6px #000;background:linear-gradient(180deg,rgba(15,22,28,.36),rgba(11,16,20,.72));border-top:1px solid rgba(230,191,103,.34);border-bottom:1px solid rgba(230,191,103,.34);animation:victoryPanelIn .46s cubic-bezier(.2,.82,.22,1)}.victory-kicker{font-size:13px;font-weight:900;letter-spacing:.20em;color:#d9c695}.victory-panel h1{margin:4px 0 0;font-size:clamp(48px,7vw,90px);line-height:.95;letter-spacing:.05em;color:#f1c45b;text-shadow:0 4px 0 #8d5223,0 7px 15px #000}.victory-countdown{margin:6px auto 2px;font-size:clamp(64px,9vw,116px);font-weight:1000;line-height:1;color:#fff;text-shadow:0 5px 0 #d66c2e,0 10px 22px #000;min-height:1em}.victory-ending{font-size:15px;font-weight:900;letter-spacing:.10em;color:#f0e5ca}.victory-summary{margin:20px auto 12px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.victory-summary>div{padding:10px 8px;border:1px solid rgba(212,191,145,.32);background:rgba(13,19,23,.60)}.victory-summary span{display:block;font-size:9px;font-weight:900;letter-spacing:.12em;color:#bfb293}.victory-summary strong{display:block;margin-top:4px;font-size:18px;color:#fff}.victory-rewards{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;min-height:30px;margin:7px 0 5px}.victory-rewards span{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid rgba(225,190,103,.35);border-radius:6px;background:rgba(17,23,28,.72);font-size:11px;font-weight:900;color:#f3e8cd}.victory-unlock{margin:12px auto 8px;padding:10px 14px;max-width:420px;border:1px solid rgba(112,199,122,.62);background:rgba(21,65,36,.62);animation:victoryUnlockPulse 1.1s ease-in-out infinite alternate}.victory-unlock b{display:block;font-size:11px;letter-spacing:.14em;color:#b8f0bf}.victory-unlock span{display:block;margin-top:3px;font-size:16px;font-weight:900;color:#fff}.victory-continue{margin-top:9px;min-width:190px;padding:10px 18px;border:2px solid #d8c28a;border-radius:5px;background:#315f3b;color:#fff;font-size:14px;font-weight:900;letter-spacing:.08em;box-shadow:inset 0 0 0 2px #78a97c44}.victory-continue span{display:inline-grid;place-items:center;width:24px;height:24px;margin-right:7px;border-radius:50%;background:#70a76e;color:#0e2114;border:2px solid #d8ecd6}.victory-overlay.boss .victory-kicker{color:#f2a873}.victory-overlay.boss .victory-panel h1{color:#ffbf55;text-shadow:0 4px 0 #9e372b,0 0 30px rgba(255,98,48,.42),0 8px 17px #000}.victory-overlay.boss .victory-panel{border-color:rgba(245,124,74,.48)}.victory-burst{position:absolute;width:520px;height:520px;pointer-events:none;opacity:.68;animation:victoryBurstIn .65s ease-out}.victory-burst i{position:absolute;left:50%;top:50%;width:18px;height:110px;background:linear-gradient(#eee8d4,#777b78);clip-path:polygon(50% 0,100% 72%,50% 100%,0 72%);transform-origin:50% 245px}.victory-burst i:nth-child(1){transform:translate(-50%,-245px) rotate(0deg)}.victory-burst i:nth-child(2){transform:translate(-50%,-245px) rotate(45deg)}.victory-burst i:nth-child(3){transform:translate(-50%,-245px) rotate(90deg)}.victory-burst i:nth-child(4){transform:translate(-50%,-245px) rotate(135deg)}.victory-burst i:nth-child(5){transform:translate(-50%,-245px) rotate(180deg)}.victory-burst i:nth-child(6){transform:translate(-50%,-245px) rotate(225deg)}.victory-burst i:nth-child(7){transform:translate(-50%,-245px) rotate(270deg)}.victory-burst i:nth-child(8){transform:translate(-50%,-245px) rotate(315deg)}
@keyframes victoryPanelIn{from{opacity:0;transform:scale(.78) translateY(18px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes victoryBurstIn{from{opacity:0;transform:scale(.35) rotate(-12deg)}to{opacity:.68;transform:scale(1) rotate(0)}}@keyframes victoryUnlockPulse{from{box-shadow:0 0 0 rgba(104,220,126,0)}to{box-shadow:0 0 22px rgba(104,220,126,.34)}}
@media(max-width:760px){.victory-panel{width:94%;padding:22px 14px}.victory-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.victory-burst{width:380px;height:380px}.victory-burst i{height:82px;transform-origin:50% 180px}.victory-burst i:nth-child(1){transform:translate(-50%,-180px) rotate(0deg)}.victory-burst i:nth-child(2){transform:translate(-50%,-180px) rotate(45deg)}.victory-burst i:nth-child(3){transform:translate(-50%,-180px) rotate(90deg)}.victory-burst i:nth-child(4){transform:translate(-50%,-180px) rotate(135deg)}.victory-burst i:nth-child(5){transform:translate(-50%,-180px) rotate(180deg)}.victory-burst i:nth-child(6){transform:translate(-50%,-180px) rotate(225deg)}.victory-burst i:nth-child(7){transform:translate(-50%,-180px) rotate(270deg)}.victory-burst i:nth-child(8){transform:translate(-50%,-180px) rotate(315deg)}}
.victory-rewards .victory-item-reward{border-color:rgba(118,174,255,.58);background:rgba(30,52,77,.78);color:#d9eaff;box-shadow:inset 0 0 12px rgba(91,146,226,.14)}

/* Final loadout overrides intentionally follow all legacy readability patches. */
#playLoadoutOverlay .play-loadout-panel{background:#11161c!important;border-color:#6f6654!important;box-shadow:0 24px 70px #000e,0 0 0 1px #c8ad7040 inset!important}
#playLoadoutOverlay .play-loadout-head{background:linear-gradient(180deg,#282d33,#171c22)!important;border-bottom-color:#8d7a52!important}
#playLoadoutOverlay .play-loadout-equipped{background:radial-gradient(ellipse at 50% 42%,#303942 0,#1c242b 48%,#11171d 100%)!important;border-right-color:#4c5560!important}
#playLoadoutOverlay .play-loadout-stage{background:radial-gradient(ellipse at 50% 43%,#3b4650 0,#252e35 37%,#141b21 75%,#0e1419 100%)!important}
#playLoadoutOverlay .loadout-slot-card{background:linear-gradient(145deg,#252d34,#171e24)!important;color:#edf3f6!important;border:1px solid #65717b!important;border-left-width:4px!important;border-radius:8px!important;box-shadow:0 8px 20px #0007,inset 0 1px #ffffff10!important}
#playLoadoutOverlay .loadout-slot-card b{color:#aebbc5!important}#playLoadoutOverlay .loadout-slot-card .loadout-item-name{color:#fff!important}#playLoadoutOverlay .loadout-slot-card .loadout-item-detail{color:#9eacb6!important}
#playLoadoutOverlay .loadout-artifacts-title,#playLoadoutOverlay .loadout-artifacts{background:#121820!important}#playLoadoutOverlay .loadout-artifacts .loadout-slot-card{background:linear-gradient(145deg,#292337,#181a25)!important;border-left-color:#a969ed!important}
#playLoadoutOverlay .loadout-inventory-panel{background:#0e141a!important}#playLoadoutOverlay .loadout-inventory-head{background:linear-gradient(180deg,#20272e,#161c22)!important}#playLoadoutOverlay .loadout-inventory-grid{gap:9px!important;padding:10px 14px 14px!important}
#playLoadoutOverlay .loadout-inventory-card{min-height:176px!important;padding:8px!important;gap:6px!important;border:1px solid #4d5962!important;border-left:4px solid #9ba6ad!important;border-radius:8px!important;background:linear-gradient(145deg,#222a31,#141a20)!important;color:#edf3f6!important;box-shadow:0 7px 16px #0005!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-uncommon{border-left-color:#68c77c!important}#playLoadoutOverlay .loadout-inventory-card.rarity-rare{border-left-color:#5ca8ff!important}#playLoadoutOverlay .loadout-inventory-card.rarity-epic{border-left-color:#b778ff!important}#playLoadoutOverlay .loadout-inventory-card.rarity-legendary{border-color:#62583e!important;border-left-color:#ffc95b!important;background:linear-gradient(145deg,#292820,#181b1e)!important}
#playLoadoutOverlay .loadout-inventory-card.category-scrolls{background:linear-gradient(145deg,#292238,#171923)!important}#playLoadoutOverlay .loadout-inventory-card.category-keys{background:linear-gradient(145deg,#302a1f,#191a19)!important}
#playLoadoutOverlay .loadout-inventory-visual{height:86px!important;background:radial-gradient(circle at 50% 42%,#303b44,#0b1015)!important;border-color:#46525c!important}#playLoadoutOverlay .loadout-inventory-copy strong{font-size:14px!important;color:#fff!important}#playLoadoutOverlay .loadout-inventory-copy small{font-size:9px!important;color:#99a7b1!important}#playLoadoutOverlay .loadout-salvage-copy{font-size:8px!important;color:#8f9da7!important}

/* v0.5.72 ultrawide character / inventory / selected-item presentation */
#playLoadoutOverlay .play-loadout-panel{width:min(1880px,calc(100vw - 30px))!important;max-width:none!important;height:min(1010px,calc(100vh - 22px))!important}
#playLoadoutOverlay .play-loadout-body{grid-template-columns:minmax(510px,1.02fr) minmax(390px,.72fr) minmax(390px,.72fr)!important}
#playLoadoutOverlay .loadout-inventory-panel{min-width:0;border-right:1px solid #49535b!important}
#playLoadoutOverlay .loadout-inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;align-content:start!important}
#playLoadoutOverlay .loadout-inventory-card{min-height:132px!important;padding:7px!important;gap:4px!important;border-left-width:4px!important}
#playLoadoutOverlay .loadout-inventory-visual{height:64px!important}
#playLoadoutOverlay .loadout-inventory-visual img{width:92%!important;height:92%!important;object-fit:contain!important}
#playLoadoutOverlay .loadout-inventory-copy strong{font-size:12px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#playLoadoutOverlay .loadout-inventory-copy small{font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-common{background:linear-gradient(145deg,#29323a,#151b20)!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-uncommon{background:linear-gradient(145deg,#203a2b,#132019)!important;border-color:#4a8d5b!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-rare{background:linear-gradient(145deg,#203650,#121d2b)!important;border-color:#4b8bd1!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-epic{background:linear-gradient(145deg,#382653,#1e162c)!important;border-color:#955dcc!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-legendary{background:linear-gradient(145deg,#51401e,#241d11)!important;border-color:#d5a83e!important}
#playLoadoutOverlay .loadout-detail-panel{min-width:0;display:flex;flex-direction:column;padding:18px;background:radial-gradient(circle at 50% 28%,#2c353d 0,#171e24 48%,#0e1419 100%);overflow:auto}
#playLoadoutOverlay .loadout-detail-kicker{padding-bottom:12px;border-bottom:1px solid #505961;color:#dfc574;font-size:11px;font-weight:1000;letter-spacing:.16em}
#playLoadoutOverlay .loadout-selected-detail{display:flex!important;flex:1;min-height:0;flex-direction:column;margin:14px 0!important;padding:16px!important;border-width:1px!important;border-top:5px solid #9ba6ad!important;border-left-width:1px!important;background:linear-gradient(180deg,#222b32,#11171c)!important}
#playLoadoutOverlay .loadout-selected-detail.rarity-uncommon{border-top-color:#68c77c!important}#playLoadoutOverlay .loadout-selected-detail.rarity-rare{border-top-color:#5ca8ff!important}#playLoadoutOverlay .loadout-selected-detail.rarity-epic{border-top-color:#b778ff!important}#playLoadoutOverlay .loadout-selected-detail.rarity-legendary{border-top-color:#ffc95b!important}
#playLoadoutOverlay .loadout-selected-icon{width:100%!important;height:clamp(250px,36vh,390px)!important;flex:0 0 auto;border-radius:10px!important;background:radial-gradient(circle,#394751 0,#11181d 68%)!important;font-size:110px!important}
#playLoadoutOverlay .loadout-selected-icon img{width:90%!important;height:90%!important;object-fit:contain!important;filter:drop-shadow(0 14px 12px #0009)}
#playLoadoutOverlay .loadout-selected-copy{padding:17px 5px 4px!important}
#playLoadoutOverlay .loadout-selected-copy>div:first-child span{font-size:11px!important}#playLoadoutOverlay .loadout-selected-copy>div:first-child em{font-size:10px!important}
#playLoadoutOverlay .loadout-selected-copy>strong{font-size:27px!important;margin-top:9px!important}#playLoadoutOverlay .loadout-selected-copy>small{font-size:13px!important;line-height:1.5!important;margin-top:8px!important}
#playLoadoutOverlay .loadout-selected-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;margin-top:18px!important}
#playLoadoutOverlay .loadout-selected-stats span{display:flex;justify-content:space-between;padding:10px!important;font-size:9px!important}#playLoadoutOverlay .loadout-selected-stats b{font-size:14px!important;color:#fff!important}
#playLoadoutOverlay .loadout-detail-actions{display:flex;gap:8px;justify-content:center;padding-top:4px;color:#d9c99f;font-size:10px;font-weight:900}.loadout-detail-actions b{display:inline-grid;place-items:center;width:21px;height:21px;margin-right:4px;border-radius:50%;background:#406e46;color:#fff}
@media(min-width:1900px){#playLoadoutOverlay .loadout-inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:1450px){#playLoadoutOverlay .play-loadout-body{grid-template-columns:minmax(480px,1fr) minmax(340px,.68fr) minmax(330px,.66fr)!important}#playLoadoutOverlay .loadout-inventory-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:1080px){#playLoadoutOverlay .play-loadout-body{grid-template-columns:minmax(480px,1fr) minmax(340px,.75fr)!important}#playLoadoutOverlay .loadout-detail-panel{display:none}}

/* Persistent gameplay level progression */
.play-level-progress{display:grid;grid-template-columns:auto minmax(120px,220px) auto;align-items:center;justify-content:center;gap:7px;margin:5px auto 0;padding:4px 8px;border:1px solid #4f5c66;border-radius:5px;background:#0b1014e8;box-shadow:0 4px 12px #0008;color:#d9e4ea;font-size:8px;font-weight:900;letter-spacing:.06em}.play-level-progress span{color:#e5c467}.play-level-progress span b{font-size:11px;color:#fff}.play-level-progress>div{height:8px;border:1px solid #596570;border-radius:5px;background:#171e24;overflow:hidden}.play-level-progress>div i{display:block;width:0;height:100%;border-radius:4px;background:linear-gradient(90deg,#4d82de,#7bcfff,#f4ce63);box-shadow:0 0 8px #64bdf0;transition:width .4s ease}.play-level-progress strong{min-width:76px;text-align:right;color:#a8b6bf;font-size:8px}

/* Level-up celebration */
.level-up-overlay{position:absolute;z-index:140;inset:0;display:grid;place-items:center;overflow:hidden;background:radial-gradient(circle at 50% 48%,rgba(45,65,78,.32),rgba(2,5,8,.82));backdrop-filter:blur(3px)}.level-up-overlay[hidden]{display:none!important}.level-up-rays{position:absolute;width:760px;height:760px;border-radius:50%;background:repeating-conic-gradient(from 0deg,rgba(255,218,111,.16) 0 7deg,transparent 7deg 20deg);mask-image:radial-gradient(circle,black 0 48%,transparent 72%);animation:levelRays 18s linear infinite}.level-up-overlay section{position:relative;width:min(620px,88vw);padding:38px 42px;text-align:center;border:2px solid #cda954;border-radius:12px;background:linear-gradient(180deg,rgba(40,48,54,.97),rgba(13,18,22,.98));box-shadow:0 25px 80px #000,0 0 55px #e3b94e44,inset 0 0 0 3px #ffffff0b;transform:scale(.82);opacity:0}.level-up-overlay.show section{animation:levelPanelIn .55s cubic-bezier(.18,.9,.25,1.2) forwards}.level-up-overlay section>span{color:#f2d77e;font-size:15px;font-weight:1000;letter-spacing:.24em}.level-up-overlay section>small{display:block;margin-top:20px;color:#b9c5cd;font-size:13px;font-weight:900;letter-spacing:.18em}.level-up-overlay h1{margin:4px 0 8px;color:#fff;font-size:clamp(54px,7vw,92px);line-height:1;text-shadow:0 4px 0 #835321,0 0 24px #e8b74d}.level-up-overlay h1 b{color:#ffd66a}.level-up-overlay p{color:#cbd5da;font-size:14px}.level-up-overlay button{margin-top:24px;padding:11px 24px;border:2px solid #dbc47e;border-radius:6px;background:#315d3a;color:#fff;font-weight:1000;letter-spacing:.09em}.level-up-overlay button i{display:inline-grid;place-items:center;width:22px;height:22px;margin-right:7px;border-radius:50%;background:#7bb47c;font-style:normal}@keyframes levelPanelIn{to{opacity:1;transform:scale(1)}}@keyframes levelRays{to{transform:rotate(360deg)}}
@media(max-width:800px){.play-level-progress{grid-template-columns:auto minmax(90px,150px) auto}.level-up-overlay section{padding:30px 18px}}

/* v0.5.73 icon-only treasure thumbnails and larger combat HUD */
#playLoadoutOverlay .play-loadout-character{position:relative!important}
#playLoadoutOverlay .loadout-character-level{position:absolute;z-index:6;left:50%;top:8px;transform:translateX(-50%);white-space:nowrap;padding:7px 12px;border:1px solid #c7a955;border-radius:999px;background:#10171ddd;color:#d7c78f;font-size:10px;font-weight:1000;letter-spacing:.11em;box-shadow:0 5px 15px #0008}
#playLoadoutOverlay .loadout-character-level b{margin-left:7px;color:#fff;font-size:17px}
#playLoadoutOverlay .loadout-inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
#playLoadoutOverlay .loadout-inventory-card{position:relative;aspect-ratio:1/1;min-height:0!important;padding:5px!important;overflow:hidden;border:2px solid #65717b!important;border-radius:9px!important}
#playLoadoutOverlay .loadout-inventory-visual{width:100%!important;height:100%!important;border:0!important;background:transparent!important}
#playLoadoutOverlay .loadout-inventory-visual img{width:100%!important;height:100%!important;transform:scale(1.18);filter:drop-shadow(0 7px 5px #000a)}
#playLoadoutOverlay .loadout-inventory-visual i{font-size:52px!important}
#playLoadoutOverlay .loadout-thumb-level{position:absolute;right:5px;bottom:5px;z-index:4;display:grid;place-items:center;min-width:25px;height:25px;padding:0 5px;border:2px solid #d8e0e4;border-radius:50%;background:#111820;color:#fff;font-size:11px;box-shadow:0 2px 7px #000}
#playLoadoutOverlay .loadout-inventory-card em{left:4px!important;right:auto!important;top:4px!important;font-size:7px!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-common{background:radial-gradient(circle at 50% 42%,#67737c,#252d34 58%,#11171c)!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-uncommon{background:radial-gradient(circle at 50% 42%,#54a66d,#21462e 58%,#102016)!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-rare{background:radial-gradient(circle at 50% 42%,#558dd8,#233f68 58%,#101d31)!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-epic{background:radial-gradient(circle at 50% 42%,#a15fe0,#4b286f 58%,#21132f)!important}
#playLoadoutOverlay .loadout-inventory-card.rarity-legendary{background:radial-gradient(circle at 50% 42%,#e4b83f,#74581d 58%,#2b210e)!important}
@media(max-width:1450px){#playLoadoutOverlay .loadout-inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
.play-hud{transform:scale(1.16)!important;transform-origin:bottom center!important;bottom:27px!important}.play-hud-bar .play-equipment-slot img{display:block!important;width:88%!important;height:88%!important;object-fit:contain!important}.play-hud-bar .play-equipment-slot:not(.empty) .play-slot-glyph{display:none!important}
@media(max-width:900px){.play-hud{transform:scale(1)!important;bottom:14px!important}}

/* v0.5.81 left-side resource rewards */
.play-hud .play-currency-row{position:absolute!important;right:calc(100% + 10px)!important;bottom:0!important;width:124px!important;height:78px!important;margin:0!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:space-between!important;gap:2px!important;transform:none!important;text-align:left!important}
.play-hud .play-currency-row[hidden]{display:none!important}
.play-hud .play-currency-row span{position:relative!important;box-sizing:border-box!important;min-height:0!important;height:14px!important;padding:1px 5px 1px 24px!important;display:flex!important;align-items:center!important;gap:5px!important;border:1px solid #58636d!important;border-left:3px solid var(--resource-color,#b8c2ca)!important;border-radius:4px!important;background:linear-gradient(100deg,var(--resource-bg,#252c32),#10161ce8 72%)!important;box-shadow:0 2px 6px #0008,inset 0 1px #ffffff12!important;overflow:visible!important;color:#aeb8c0!important;font-size:6px!important;letter-spacing:.08em!important;line-height:1!important;text-shadow:0 1px 2px #000!important}
.play-hud .play-currency-row span>b{position:absolute;left:7px;top:50%;transform:translateY(-50%);font-size:10px!important;color:var(--resource-color)!important;filter:drop-shadow(0 0 3px var(--resource-glow))}
.play-hud .play-currency-row span>strong{order:2!important;margin-left:auto!important;color:#fff!important;font-size:9px!important;letter-spacing:.03em!important;line-height:1!important}
.play-hud .play-currency-row .gold{--resource-color:#ffd45f;--resource-glow:#ffbd35;--resource-bg:#443318}.play-hud .play-currency-row .silver{--resource-color:#e1edf6;--resource-glow:#a8d6ff;--resource-bg:#303b43}.play-hud .play-currency-row .wood{--resource-color:#d69a5c;--resource-glow:#a85d25;--resource-bg:#3c291d}.play-hud .play-currency-row .metal{--resource-color:#aebdca;--resource-glow:#7eb5dd;--resource-bg:#29343c}.play-hud .play-currency-row .ore{--resource-color:#9a8cff;--resource-glow:#765cff;--resource-bg:#30284a}
.play-hud .play-currency-row span.resource-arrive{z-index:4;animation:resourceCardReward .68s cubic-bezier(.2,.8,.22,1)}
.play-hud .play-currency-row strong.loot-arrive{animation:resourceCountReward .68s ease-out!important}
.resource-gain-burst{position:absolute;right:8px;top:-14px;color:var(--resource-color);font-style:normal;font-size:15px;font-weight:1000;letter-spacing:.03em;text-shadow:0 0 8px var(--resource-glow),0 2px 3px #000;pointer-events:none;animation:resourceGainRise .9s ease-out forwards}
.chest-hud-reward.reward-gold,.chest-reward-spark.reward-gold{--reward-color:#ffd45f}.chest-hud-reward.reward-silver,.chest-reward-spark.reward-silver{--reward-color:#e1edf6}.chest-hud-reward.reward-wood,.chest-reward-spark.reward-wood{--reward-color:#d69a5c}.chest-hud-reward.reward-metal,.chest-reward-spark.reward-metal{--reward-color:#aebdca}.chest-hud-reward.reward-ore,.chest-reward-spark.reward-ore{--reward-color:#9a8cff}
.chest-hud-reward[class*="reward-"]{border-color:var(--reward-color)!important;color:var(--reward-color)!important;box-shadow:0 0 22px color-mix(in srgb,var(--reward-color) 72%,transparent),0 8px 18px #0009!important}.chest-hud-reward[class*="reward-"] b{color:var(--reward-color)!important}.chest-reward-spark[class*="reward-"]{background:var(--reward-color)!important;box-shadow:0 0 11px var(--reward-color)!important}
@keyframes resourceCardReward{0%{transform:scale(1)}26%{transform:translateX(8px) scale(1.12);filter:brightness(1.7)}52%{transform:translateX(-2px) scale(1.04)}100%{transform:scale(1);filter:brightness(1)}}
@keyframes resourceCountReward{0%{transform:scale(1)}30%{transform:scale(1.5);color:var(--resource-color)}100%{transform:scale(1);color:#fff}}
@keyframes resourceGainRise{0%{opacity:0;transform:translateY(8px) scale(.6)}18%{opacity:1;transform:translateY(0) scale(1.18)}100%{opacity:0;transform:translateY(-25px) scale(.92)}}
@media(max-width:980px){.play-hud .play-currency-row{right:auto!important;left:0!important;bottom:calc(100% + 8px)!important;width:100%!important;flex-direction:row!important}.play-hud .play-currency-row span{min-width:74px!important;padding-left:27px!important}.play-hud .play-currency-row span>b{left:7px!important;font-size:14px!important}}
@media(prefers-reduced-motion:reduce){.play-hud .play-currency-row span.resource-arrive,.play-hud .play-currency-row strong.loot-arrive,.resource-gain-burst{animation:none!important}}

/* Combat readability: screen-space bars stay crisp and never interfere with input. */
.enemy-combat-hud{position:absolute;inset:0;z-index:24;pointer-events:none;overflow:hidden}
.enemy-overhead-health{position:absolute;width:104px;transform:translate(-50%,-100%);opacity:0;transition:opacity .12s ease;filter:drop-shadow(0 3px 4px #000b)}
.enemy-overhead-health.visible{opacity:1}.enemy-overhead-health.elite{width:128px}.enemy-overhead-health.boss{width:176px}
.enemy-overhead-name{display:none;margin:0 0 3px;color:#f4f0e9;font-size:9px;font-weight:900;letter-spacing:.07em;text-align:center;text-transform:uppercase;text-shadow:0 2px 3px #000}
.enemy-overhead-health.elite .enemy-overhead-name,.enemy-overhead-health.boss .enemy-overhead-name{display:block}
.enemy-overhead-track{height:8px;padding:1px;border:1px solid #d7cbb9;border-radius:5px;background:#130d10e8;box-shadow:inset 0 1px 3px #000}
.enemy-overhead-health.boss .enemy-overhead-track{height:11px;border-color:#f0b85b}
.enemy-overhead-track i{display:block;width:100%;height:100%;border-radius:3px;background:linear-gradient(90deg,#8e1824,#ed4050 70%,#ff7b62);box-shadow:0 0 7px #df263b;transition:width .13s ease-out}
.enemy-damage-numbers{position:absolute;left:50%;top:-9px;width:0;height:0}
.enemy-damage-numbers b{position:absolute;left:0;bottom:0;white-space:nowrap;color:#fff3b1;font-size:16px;font-weight:1000;letter-spacing:.02em;-webkit-text-stroke:1px #4c1907;text-shadow:0 2px 2px #000,0 0 8px #ff8a23;animation:enemyDamageFloat .82s cubic-bezier(.15,.72,.2,1) forwards}
.enemy-damage-numbers b.critical{color:#ffb34f;font-size:20px;text-shadow:0 2px 2px #000,0 0 12px #ff3015}
@keyframes enemyDamageFloat{0%{opacity:0;transform:translate(-50%,4px) scale(.65)}16%{opacity:1;transform:translate(-50%,-8px) scale(1.16)}72%{opacity:1;transform:translate(-50%,-27px) scale(1)}100%{opacity:0;transform:translate(-50%,-42px) scale(.92)}}

/* Active editor level beside the application title */
.brand-copy{min-width:0}.brand-title-line{display:flex;align-items:center;gap:10px;min-width:0}.brand-title-line>strong{flex:0 0 auto}.brand-title-line>span{display:inline-flex;align-items:center;min-width:0;max-width:260px;padding:4px 9px;border:1px solid #806d43;border-radius:5px;background:linear-gradient(180deg,#332d21,#201c16);color:#f2d17c;font-size:11px;font-weight:900;letter-spacing:.07em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:inset 0 1px #ffffff0d}.brand-title-line>span:before{content:'LEVEL';margin-right:7px;color:#958c78;font-size:7px;letter-spacing:.13em}.topbar .brand{min-width:430px!important}@media(max-width:1250px){.topbar .brand{min-width:300px!important}.brand-title-line>span{max-width:150px}}@media(max-width:900px){.brand-title-line>span{max-width:105px}.brand-title-line>span:before{display:none}}

/* Live translucent exploration map */
.play-map-overlay{position:absolute;z-index:18;inset:7% 9% 13%;pointer-events:none;border:1px solid #8aa0a9;border-radius:14px;background:rgba(8,13,17,.66);box-shadow:0 18px 55px rgba(0,0,0,.48),inset 0 0 45px rgba(63,111,121,.09);backdrop-filter:blur(2px);overflow:hidden;color:#e8f2ef}.play-map-overlay[hidden]{display:none}.play-map-head{height:46px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid rgba(151,184,188,.28);background:rgba(13,20,25,.64);letter-spacing:.12em}.play-map-head strong{font-size:15px;color:#f1d08a}.play-map-head span{font-size:10px;color:#a9c9c8}.play-map-overlay canvas{display:block;width:100%;height:calc(100% - 78px)}.play-map-legend{height:32px;display:flex;align-items:center;justify-content:center;gap:22px;border-top:1px solid rgba(151,184,188,.22);font-size:9px;letter-spacing:.09em;color:#a9b8b9}.play-map-legend span{display:flex;align-items:center;gap:6px}.play-map-legend i{display:inline-block;width:9px;height:9px;border-radius:50%}.play-map-legend i.player{background:#65efff;box-shadow:0 0 8px #65efff}.play-map-legend i.known{border-radius:2px;background:#788e91;border:1px solid #bfd1cf}
.demon-presence-overlay{--demon-strength:0;--demon-r:155;--demon-g:53;--demon-b:220;position:absolute;z-index:9;inset:0;pointer-events:none;opacity:0;transition:opacity .24s ease;overflow:hidden;mix-blend-mode:normal}.demon-presence-overlay.active{opacity:1}.demon-presence-overlay:before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 48%,transparent 0 48%,rgba(3,2,7,calc(var(--demon-strength)*.12)) 67%,rgba(2,1,5,calc(var(--demon-strength)*.42)) 100%),linear-gradient(rgba(5,3,9,calc(var(--demon-strength)*.10)),rgba(5,3,9,calc(var(--demon-strength)*.10)));box-shadow:inset 0 0 calc(65px + var(--demon-strength)*120px) rgba(0,0,0,calc(var(--demon-strength)*.30))}.demon-presence-overlay:after{content:"";position:absolute;inset:-8%;background:radial-gradient(circle at 50% 50%,transparent 36%,rgba(var(--demon-r),var(--demon-g),var(--demon-b),calc(var(--demon-strength)*.13)) 72%,transparent 100%);opacity:.72;animation:demonPresencePulse 3.4s ease-in-out infinite;filter:blur(13px)}.demon-presence-overlay[data-tier="1"]:after{animation-duration:4.8s;opacity:.42}.demon-presence-overlay[data-tier="2"]:after{animation-duration:3.3s;opacity:.64}.demon-presence-overlay[data-tier="3"]:before{background:radial-gradient(ellipse at 50% 48%,transparent 0 42%,rgba(3,2,7,calc(var(--demon-strength)*.18)) 66%,rgba(2,1,5,calc(var(--demon-strength)*.48)) 100%),linear-gradient(rgba(20,4,18,calc(var(--demon-strength)*.11)),rgba(3,2,7,calc(var(--demon-strength)*.12)))}@keyframes demonPresencePulse{0%,100%{transform:scale(.98);opacity:.38}50%{transform:scale(1.035);opacity:.82}}

/* Strict player-shell allow-list. Only the live gameplay viewport survives. */
body.player-game.player-running #app>:not(.workspace[data-designer-page="level"]){display:none!important}
body.player-game.player-running #app>.workspace[data-designer-page="level"]>:not(.viewport-wrap){display:none!important}
body.player-game.player-running #app>.workspace[data-designer-page="level"]{visibility:visible!important;opacity:1!important;z-index:1!important}
body.player-game.player-running #app>.workspace[data-designer-page="level"]>.viewport-wrap{display:block!important;visibility:visible!important;z-index:2!important}

.coop-home-panel{position:absolute;left:18px;top:82px;z-index:42;width:min(360px,calc(100% - 36px));font-family:system-ui,sans-serif;color:#f5ead0}.coop-home-panel[hidden]{display:none}.coop-toggle,.coop-home-panel button{border:1px solid #9e8249;border-radius:5px;background:linear-gradient(#28313a,#151b21);color:#f7dfa2;font-weight:800;letter-spacing:.04em;padding:9px 12px;cursor:pointer}.coop-home-panel>section{margin-top:7px;padding:13px;border:1px solid #8f7443;border-radius:8px;background:rgba(11,17,22,.94);box-shadow:0 12px 32px #000a}.coop-home-panel header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.coop-home-panel header button{padding:3px 8px}.coop-home-panel form{display:flex;gap:6px}.coop-home-panel input{min-width:0;flex:1;border:1px solid #566572;border-radius:4px;background:#0d141a;color:#fff;padding:9px}.coop-home-panel h4{margin:12px 0 5px;color:#cbb77f;font-size:11px;letter-spacing:.12em}.coop-list-row{display:flex;align-items:center;gap:8px;padding:7px 0;border-top:1px solid #ffffff18}.coop-list-row span{min-width:0;flex:1}.coop-list-row small{display:block;color:#8fa1ae;overflow:hidden;text-overflow:ellipsis}.coop-list-row button{padding:5px 8px;font-size:10px}.coop-home-panel footer{margin-top:10px;border-top:1px solid #ffffff22;padding-top:9px;color:#abd9c0}.coop-home-panel #coopMessage{min-height:1em;color:#e7b16b;font-size:12px}.coop-nameplate{position:absolute;z-index:34;pointer-events:none;transform:translate(-50%,-100%);padding:3px 7px;border:1px solid #62c9ff;border-radius:4px;background:#07141dcc;color:#d8f5ff;font:800 11px system-ui;text-shadow:0 1px 2px #000;white-space:nowrap}

.user-admin-panel{grid-column:1/-1}.user-admin-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.user-admin-head h2,.user-admin-head p{margin-top:0}.admin-users-list{display:grid;gap:8px;margin-top:12px}.admin-user-row{display:grid;grid-template-columns:minmax(220px,1fr) minmax(190px,280px) auto;gap:9px;align-items:center;padding:10px;border:1px solid #ffffff18;border-radius:6px;background:#0e151a}.admin-user-row strong,.admin-user-row small{display:block}.admin-user-row small{margin-top:3px;color:#90a0aa}.admin-user-row input{padding:9px;border:1px solid #50606b;border-radius:4px;background:#080d11;color:#fff}.admin-users-message{min-height:18px;color:#d9bb70}@media(max-width:850px){.admin-user-row{grid-template-columns:1fr}.admin-user-row button{justify-self:start}}

/* Port 7776 standalone player experience. */
.player-portal [hidden]{display:none!important}
.player-registration-disclaimer{margin:2px 1px 4px;padding:10px 12px;border-left:3px solid #a83a48;background:#0b1015;color:#9eabb2;font-size:10px;line-height:1.55;letter-spacing:.035em}
.player-switch-account{display:block;margin:10px auto 4px;padding:7px 12px;border:1px solid #56626a;border-radius:5px;background:#0b1116;color:#aebbc2;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;cursor:pointer}.player-switch-account:hover{border-color:#c64b58;color:#fff}
.player-portal{position:fixed;z-index:10000;inset:0;display:grid;place-items:center;overflow:auto;padding:30px;background:#05080b;color:#eef4f2}.player-portal[hidden]{display:none}.player-portal-backdrop{position:absolute;inset:0;background:radial-gradient(circle at 50% 20%,#52202a77,transparent 36%),linear-gradient(135deg,#06090d,#11141a 55%,#090507)}.player-portal-card{position:relative;width:min(720px,94vw);padding:34px 40px;border:1px solid #8e313c;border-radius:14px;background:linear-gradient(180deg,#161c22f2,#090d11f7);box-shadow:0 30px 100px #000,0 0 70px #861c2b33,inset 0 1px #ffffff12}.player-portal-card header{text-align:center;padding-bottom:24px}.player-portal-card header>span{color:#aeb7bc;font-size:11px;font-weight:1000;letter-spacing:.55em}.player-portal-card h1{margin:4px 0 0;color:#f2ece3;font-size:clamp(38px,7vw,68px);line-height:.92;letter-spacing:.04em;text-shadow:0 4px #4b1118,0 0 28px #d6354544}.player-portal-card h2{margin:8px 0;color:#b8c2c7;font-size:17px;letter-spacing:.2em}.player-portal-card h2 b{color:#dc5260}.player-portal-card header p{margin:13px 0 0;color:#8e9ba2;font-size:11px;letter-spacing:.13em}.player-auth nav{display:grid;grid-template-columns:1fr 1fr;margin-bottom:18px;border-bottom:1px solid #3c474f}.player-auth nav button{padding:11px;border:0;border-bottom:3px solid transparent;background:none;color:#77868f;font-weight:1000;letter-spacing:.12em}.player-auth nav button.active{border-color:#c43c49;color:#fff}.player-auth form{display:grid;gap:13px}.player-auth label{display:grid;gap:6px;color:#9daab1;font-size:9px;font-weight:1000;letter-spacing:.13em;text-transform:uppercase}.player-auth input{box-sizing:border-box;width:100%;padding:13px 14px;border:1px solid #46525b;border-radius:6px;background:#080d11;color:#fff;font-size:14px}.player-primary{width:100%;margin-top:7px;padding:14px;border:1px solid #e06a73;border-radius:6px;background:linear-gradient(#a83140,#681c28);color:#fff;font-weight:1000;letter-spacing:.12em;text-transform:uppercase}.player-primary:disabled{opacity:.35}.player-auth-message{min-height:18px;margin:12px 0 0;text-align:center;color:#e7797f;font-size:11px}.player-welcome{text-align:center;color:#d8bd7b;font-size:12px}.player-character-select h3{text-align:center;font-size:18px;letter-spacing:.13em;text-transform:uppercase}.player-character-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:330px;overflow:auto;padding:3px}.player-character-card{display:grid;grid-template-columns:58px 1fr;gap:12px;align-items:center;padding:12px;border:2px solid #3d4851;border-radius:8px;background:linear-gradient(135deg,#1c252c,#0d1216);color:#dce4e8;text-align:left}.player-character-card:before{content:"忍";display:grid;place-items:center;width:52px;height:66px;border-radius:5px;background:radial-gradient(circle,#69212c,#15191d 70%);color:#f1c7a5;font-size:27px}.player-character-card strong,.player-character-card small{display:block}.player-character-card small{margin-top:5px;color:#8c9aa2;font-size:9px}.player-character-card.selected{border-color:#d64d5b;box-shadow:0 0 20px #d64d5b35}.player-game:not(.player-running) #app{visibility:hidden}.player-game.player-running{overflow:hidden}.player-game.player-running .player-portal{display:none!important}.player-game.player-running #app{visibility:visible;position:fixed;inset:0}.player-game.player-running .topbar,.player-game.player-running .workspace>.palette,.player-game.player-running .workspace>.inspector,.player-game.player-running .side-rail,.player-game.player-running .selection-actions{display:none!important}.player-game.player-running .workspace{position:fixed!important;inset:0!important;display:block!important;margin:0!important;padding:0!important}.player-game.player-running .viewport-wrap,.player-game.player-running #viewport{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}.player-game.player-running #modeBadge,.player-game.player-running #status{display:none!important}@media(max-width:620px){.player-portal-card{padding:25px 18px}.player-character-grid{grid-template-columns:1fr}}
