/* Final shell overrides: scoped, never hide emergency overlays. */
body.wn-active{--dock-space:110px}body.wn-active #app{padding-bottom:var(--dock-space)!important}body.wn-active #app.hc-home-active{max-width:1180px!important;padding-top:12px!important}#wn-home-shortcuts.hc-console{margin:0 auto 20px!important;max-width:1080px}#app.hc-home-active .hc-top{margin:0 0 4px;padding:0 12px;align-items:center}#app.hc-home-active .hc-top h2{font-size:18px;line-height:1.2;color:#fff;margin:0}#app.hc-home-active .hc-top p{font-size:12px;color:#e2edf5;margin:2px 0}#app.hc-home-active .hc-top button{background:#162a3de0;color:#eef8ff;border:1px solid #a9cddd55}#app.hc-home-active .hc-grid.world-launcher{gap:12px;max-width:1080px;margin:0 auto!important;display:flex;align-items:stretch}#app.hc-home-active .hc-grid.world-launcher .hc-profile-slot{width:min(100%,540px)!important;min-height:0!important;align-self:center;display:block;padding:4px 10px 8px!important}#app.hc-home-active .world-launcher #mp-home-profile{display:flex!important;align-items:center!important;flex-direction:column!important;gap:0!important;width:100%!important;overflow:visible!important}#app.hc-home-active .world-launcher .mpw-visual{width:140px!important;min-height:0!important;max-height:135px;overflow:visible!important}#app.hc-home-active .world-launcher .mpw-visual .av-stage{width:100%;min-height:0!important;display:block!important}#app.hc-home-active .world-launcher .mpw-visual .av-stage>*:not(svg){display:none!important}#app.hc-home-active .world-launcher .mpw-visual svg{width:140px!important;height:auto!important;max-width:none!important;max-height:125px!important;display:block;margin:auto!important}#app.hc-home-active .world-launcher .mpw-content{width:100%!important;max-width:none!important;min-width:0!important;text-align:center!important}#app.hc-home-active .world-launcher .mpw-content h2{font-size:20px!important;line-height:1.25!important;max-width:none!important;width:100%!important;overflow-wrap:normal!important;word-break:normal!important;text-align:center!important;color:#fff!important;margin:0 0 7px!important}#app.hc-home-active .world-launcher .mpw-stats{margin:5px auto!important;justify-content:center;gap:7px}#app.hc-home-active .world-launcher .mpw-stats>div{min-width:115px;padding:6px 10px!important;background:#102235b8!important;color:#fff!important;gap:2px}#app.hc-home-active .world-launcher .mpw-stats strong{font-size:13px!important;color:#edf8ff!important}#app.hc-home-active .world-launcher .mpw-actions{margin:6px 0 0!important;gap:5px!important;display:flex!important;justify-content:center!important}#app.hc-home-active .world-launcher .mpw-actions button{min-height:36px!important;padding:5px 9px!important;font-size:11px!important;color:#f3faff!important;background:#162a3dbf!important;flex:none!important}#app.hc-home-active .world-launcher .mpw-actions button.primary{background:#bfe7d9!important;color:#133b30!important}#app.hc-home-active .world-launcher .world-home-roses{color:#f5e0ea!important;min-height:28px!important;margin:0!important}#app.hc-home-active .world-appgroups{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 30px;max-width:900px;padding:0 10px}#app.hc-home-active .world-appgroup h3{margin:0 0 5px;color:#fff!important}#app.hc-home-active .world-apps{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px 5px}#app.hc-home-active .world-app{min-height:67px;font-size:12px!important;color:#fff!important}#app.hc-home-active .world-app-icon{width:44px;height:44px;border-radius:13px}#app.hc-home-active .world-app-icon svg{width:23px;height:23px}#app.hc-home-active .world-app>span:last-child{overflow-wrap:normal;text-shadow:0 1px 4px #000,0 0 10px #000}
body.wn-active #nav,.mpc-lib-dock{position:fixed!important;bottom:max(14px,env(safe-area-inset-bottom))!important;left:50%!important;right:auto!important;transform:translateX(-50%);width:min(640px,calc(100% - 24px))!important;max-width:none!important;display:flex;gap:4px!important;padding:7px!important;border:1px solid #b8d6e24d!important;border-radius:23px!important;background:#142435f5!important;box-shadow:0 8px 30px #0007;backdrop-filter:blur(16px);z-index:100!important;box-sizing:border-box;overflow:visible!important}body.wn-active #nav[style*="none"]{display:none!important}body.wn-active #nav button,.mpc-lib-dock button{flex:1;min-width:0!important;max-width:none!important;min-height:52px!important;background:transparent!important;border:0!important;border-radius:15px!important;color:#e2eef7!important;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;font-size:11px!important;padding:5px!important;line-height:1.2}body.wn-active #nav button.active,.mpc-lib-dock button[aria-current]{background:#274c58!important;color:#d2ffef!important}body.wn-active #nav svg,.mpc-lib-dock svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6}body.wn-active header .world-role{display:none}body.wn-active header>span{white-space:normal;word-break:normal;color:#e1eff8!important}body.wn-active header button{color:#f1f7ff!important}body.wn-active header button:focus-visible,.mpc-lib-dock button:focus-visible,.mpc-lib button:focus-visible{outline:2px solid #bff4e2;outline-offset:2px}
.mpc-lib{position:fixed;inset:0;z-index:12000;background:radial-gradient(ellipse at 80% 0%,#30435b,#101828 48%,#0a111f 100%);color:#edf4ff;overflow:auto;overscroll-behavior:contain;scroll-padding-top:82px;padding:0 0 110px;font-family:inherit;color-scheme:dark}.mpc-lib *{box-sizing:border-box}.mpc-lib button{cursor:pointer;color:#f0f6ff;background:#26364a;border:1px solid #b0cce236;border-radius:12px;padding:10px 14px;min-height:42px}.mpc-lib button.primary{background:#bfe7da;color:#123d32;border-color:#bfe7da}.mpc-lib-top{position:sticky;top:0;z-index:3;background:#101c2cf5;display:flex;align-items:center;gap:10px;padding:13px max(15px,calc((100vw - 1180px)/2));border-bottom:1px solid #afc8e42b;backdrop-filter:blur(12px)}.mpc-lib-top strong{flex:1;color:#fff;font-size:18px;line-height:1.15}.mpc-lib-top button{white-space:nowrap;padding:8px 11px}.mpc-lib-main{width:min(1180px,100%);padding:18px;margin:auto}.mpc-lib-hero{position:relative;min-height:190px;overflow:hidden;isolation:isolate;padding:27px 24px;display:flex;flex-direction:column;justify-content:center;background:linear-gradient(90deg,#0b1429f5,#14223a9c 60%,#13213944),url('/workspace-art.svg') center/cover;border:1px solid #b7cde339;border-radius:22px}.mpc-lib-hero h1{font-size:clamp(28px,4vw,49px);letter-spacing:-.035em;line-height:1.06;margin:8px 0;color:#fff;max-width:20ch}.mpc-lib-hero p{color:#d9e8f4;margin:0;max-width:50ch}.mpc-lib-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:16px 0}.mpc-lib-tools input,.mpc-lib textarea,.mpc-lib input{min-width:0;background:#101e30;color:#f2f7ff;border:1px solid #b5d1e344;border-radius:9px;padding:10px;font:inherit}.mpc-lib-tools input{flex:1;min-width:150px}.mpc-lib h2{font-size:21px;line-height:1.25;color:#fff;margin:18px 0 9px}.mpc-lib-shelf{display:grid;grid-template-columns:repeat(auto-fill,minmax(152px,1fr));gap:12px}.mpc-lib-card{padding:0!important;display:flex;flex-direction:column;text-align:left;overflow:hidden;border-radius:14px!important;background:#152336!important;min-width:0;position:relative;box-shadow:0 4px 15px #0004;transition:transform .17s}.mpc-lib-card:hover{transform:translateY(-2px)}.mpc-lib-art{display:block;position:relative;width:100%;aspect-ratio:2/3;overflow:hidden;background:#263347}.mpc-lib-art img,.mpc-lib .mpc-lib-art .new-poster-picture{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover!important;display:block!important;opacity:1!important;visibility:visible!important}.mpc-lib-card b,.mpc-lib-card small{padding:0 10px;display:block;overflow-wrap:break-word}.mpc-lib-card b{font-size:14px;color:#f3f8ff;margin:9px 0 4px;line-height:1.3}.mpc-lib-card small{font-size:11px;color:#c6d8e7;padding-bottom:12px}.mpc-lib-preview{display:grid;grid-template-columns:160px minmax(0,1fr);gap:22px;align-items:start;margin:0 0 20px}.mpc-lib-preview .mpc-lib-art{border-radius:13px}.mpc-lib-preview h1{font-size:clamp(24px,4vw,38px);line-height:1.15;margin:7px 0;color:#fff}.mpc-lib-preview p{color:#d4e2f0}.mpc-lib-paper{background:#fbfaf5;color:#17222e;border-radius:8px;padding:clamp(16px,4vw,40px);max-width:850px;margin:15px auto;line-height:1.6;box-shadow:0 10px 40px #0004;font-size:15px;color-scheme:light}.mpc-lib-paper h2,.mpc-lib-paper h3{color:#132c42;margin:14px 0 8px;font-size:19px}.mpc-lib-paper p{white-space:pre-wrap;margin:9px 0;color:#17222e}.mpc-lib-paper .paper-question{padding:16px 0;border-top:1px solid #aab6be}.mpc-lib-paper label{display:block;color:#1d3346;margin:10px 0}.mpc-lib-paper textarea,.mpc-lib-paper input{width:100%;color:#102337;background:#fff;border:1px solid #9aabb5;min-height:44px}.mpc-lib-paper textarea{min-height:120px;resize:vertical;line-height:1.5}.mpc-lib-paper textarea[data-field="source"]{min-height:340px}.mpc-lib-paper img{display:block;max-width:100%;max-height:340px;margin:12px auto}.mpc-lib-paper .source-line{display:grid;grid-template-columns:26px 1fr;gap:8px}.mpc-lib-paper .source-line small{color:#536779}.mpc-lib-paper .source-gap{height:9px}.mpc-lib-dock{z-index:4!important}.mpc-lib-dock button{font-family:inherit}.mpc-lib-note{color:#c0d2e4;font-size:12px;line-height:1.5}.mpc-lib-top .mpc-lib-close{background:#bfe7da;color:#183e35}.mpc-lib .paper-question svg{max-width:100%;height:auto}.mpc-lib .paper-question .math-diagram{max-width:280px}.mpc-lib .paper-question .math-diagram svg{width:100%}
@media(max-width:700px){#app.hc-home-active .world-appgroups{grid-template-columns:1fr;gap:12px;max-width:450px}#app.hc-home-active .hc-top{padding:0 3px}#app.hc-home-active .world-launcher .mpw-visual svg{width:112px!important}#app.hc-home-active .world-launcher .mpw-visual{max-height:102px}#app.hc-home-active .world-launcher .mpw-content h2{font-size:18px!important}#app.hc-home-active .world-app-icon{width:44px;height:44px}body.wn-active #nav,.mpc-lib-dock{bottom:max(9px,env(safe-area-inset-bottom))!important}body.wn-active #nav button,.mpc-lib-dock button{font-size:10px!important;min-height:48px!important}.mpc-lib-main{padding:12px}.mpc-lib-hero{min-height:145px;padding:19px}.mpc-lib-top{padding:10px}.mpc-lib-top strong{font-size:16px}.mpc-lib-shelf{grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:8px}.mpc-lib-card b{font-size:12px}.mpc-lib-preview{grid-template-columns:100px minmax(0,1fr);gap:12px}.mpc-lib-preview h1{font-size:22px}.mpc-lib-preview p{font-size:12px}.mpc-lib-paper{font-size:14px}.mpc-lib-paper .source-line{grid-template-columns:18px 1fr;gap:4px}}
@media print{body:has(.mpc-lib) > :not(.mpc-lib){display:none!important}.mpc-lib{position:static!important;overflow:visible!important;background:white!important;color:#111!important;padding:0!important}.mpc-lib-top,.mpc-lib-dock,.mpc-lib-preview,.mpc-lib-tools,.mpc-lib-note,.mpc-lib-main>h2{display:none!important}.mpc-lib-main{padding:0!important}.mpc-lib-paper{box-shadow:none!important;max-width:none!important;padding:0!important;background:white!important}.mpc-lib-paper .paper-question{break-inside:avoid}.mpc-lib-paper h2,.mpc-lib-paper h3{break-after:avoid}.mpc-lib-paper *{color:#111!important}}
/* Institution viewer remains available via its labelled launcher and profile switch. */
#app.hc-home-active #ic-launcher:has([data-ic="enter"]){display:none!important}
/* Explicit contrast on theme-inherited links, labels and interactive controls. */
body.wn-active .mpc-lib .eyebrow{color:#b5d8ed!important}body.wn-active .mpc-lib .mpc-lib-note{color:#d6e5f2!important}.mpc-lib button:disabled{opacity:.55;cursor:wait}.mpc-lib input::placeholder,.mpc-lib textarea::placeholder{color:#acbfd0;opacity:1}.mpc-lib-paper input::placeholder,.mpc-lib-paper textarea::placeholder{color:#596f80}.world-dialog button:focus-visible,#app.hc-home-active button:focus-visible{outline:2px solid #c4f5e4;outline-offset:3px}
