/* NEXUS // Sovereign Commission Gold + Route Header Geometry Hotfix
   For NEXUS 3.1.749+ / 3.1.750. Scoped to the one-time or replayed Sovereign
   commission cinema and the desktop Sovereign route lane ONLY.
   Does not modify player-selected Node accents, UI themes or gameplay data. */

/* 1. Sovereign ownership at one billion CR gets a dedicated ceremonial palette.
   The inline Node's accent is intentionally overridden ONLY on the overlay. */
.sovereign-commission-overlay.snc-cinematic {
  --sn-accent:#ffcf62 !important;
  --sn-rgb:255,192,69 !important;
  color:#f8ebd0;
  background:#050403;
}
.snc-cinematic .snc-backdrop {
  background:radial-gradient(ellipse 72% 82% at 50% 50%,#241809 0%,#100c08 42%,#050505 84%);
}
.snc-cinematic .snc-screen {
  background:linear-gradient(180deg,rgba(27,19,10,.92),rgba(7,8,7,.96) 72%);
  border-color:rgba(245,190,89,.58);
  box-shadow:0 0 0 5px rgba(5,5,4,.83),0 0 82px rgba(222,151,31,.17),inset 0 0 80px rgba(10,7,4,.88);
}
.snc-cinematic .snc-screen::before,.snc-cinematic .snc-screen::after{border-color:#ffcf62;opacity:1}
.snc-cinematic .snc-topline {color:#b5ac91;border-bottom-color:rgba(255,201,97,.30)}
.snc-cinematic .snc-topline strong {color:#ffe49f}
.snc-cinematic .snc-left small,.snc-cinematic .snc-right small{color:#a39b86}
.snc-cinematic .snc-side{opacity:.92}
.snc-cinematic .snc-side strong{color:#fff3d2}
.snc-cinematic .snc-side b{color:#e6d8b8}
.snc-cinematic .snc-side span{color:#ffcd68}
.snc-cinematic .snc-network-node{background:#ffebaf;box-shadow:0 0 11px #ffb637,0 0 25px rgba(255,203,98,.42)}
.snc-cinematic .snc-flare{
  background:radial-gradient(circle,rgba(255,210,105,.40),rgba(255,169,38,.18) 23%,transparent 60%);
  filter:blur(1px);
}
.snc-cinematic .snc-reactor{filter:drop-shadow(0 0 12px rgba(255,207,107,.48)) drop-shadow(0 0 33px rgba(224,150,35,.19))}
.snc-cinematic .snc-core-hex{fill:#120d08;fill-opacity:.83}
.snc-cinematic .snc-energy-disc{opacity:.53}
.snc-cinematic .snc-glyph{
  color:#ffe093;
  text-shadow:0 0 3px #fff4cd,0 0 15px #ffc35d,0 0 42px rgba(245,157,34,.64),0 0 75px rgba(222,128,17,.32);
}
.snc-cinematic .snc-story{border-top-color:rgba(255,198,87,.37);border-bottom-color:rgba(255,198,87,.27)}
.snc-cinematic .snc-storyline strong{color:#fff4da;text-shadow:0 0 24px rgba(255,199,80,.30)}
.snc-cinematic .snc-storyline small{color:#b2a992}
.snc-cinematic .snc-grants div{border-color:rgba(255,207,101,.44);background:linear-gradient(130deg,rgba(255,189,63,.13),rgba(30,22,12,.18))}
.snc-cinematic .snc-grants b{color:#fff0d2}
.snc-cinematic .snc-progress{color:#e1c88c}
.snc-cinematic .snc-controls{border-top-color:rgba(255,197,82,.36)}
.snc-cinematic .snc-skip{color:#d5b977}
.snc-cinematic .snc-enter{
  background:linear-gradient(180deg,#ffe7a3 0%,#ffd36e 38%,#efa92f 100%);
  color:#221403;border-color:#ffe9ae;
  box-shadow:0 0 26px rgba(250,179,38,.43),inset 0 1px rgba(255,255,255,.72);
}
.snc-cinematic .snc-enter:hover{filter:brightness(1.12)}
/* Brighter FINAL FRAME; initial boot and animation remain restrained. */
.snc-cinematic[data-phase="4"] .snc-screen{
  border-color:#e8b85e;
  box-shadow:0 0 0 5px rgba(7,5,3,.8),0 0 115px rgba(255,190,56,.26),inset 0 0 90px rgba(53,30,6,.20);
}
.snc-cinematic[data-phase="4"] .snc-reactor{
  filter:drop-shadow(0 0 25px rgba(255,218,122,.78)) drop-shadow(0 0 70px rgba(236,151,29,.40));
}
.snc-cinematic[data-phase="4"] .snc-glyph{
  color:#ffeca9;
  text-shadow:0 0 5px #fff7d9,0 0 24px #ffcd5f,0 0 55px rgba(255,174,36,.82),0 0 85px rgba(255,135,17,.45);
}
.snc-cinematic[data-phase="4"] .snc-phase-4 strong{
  color:#fff2ce;
  text-shadow:0 0 5px rgba(255,244,194,.65),0 0 23px rgba(255,190,63,.62),0 0 55px rgba(255,171,30,.28);
}
.snc-cinematic[data-phase="4"] .snc-flare{opacity:.94;filter:brightness(1.35)}
@media(prefers-reduced-motion:reduce){
 .snc-cinematic[data-phase="4"] .snc-reactor{filter:drop-shadow(0 0 21px rgba(255,195,83,.62))}
}


/* ===== NEXUS // INLINE SOVEREIGN ROUTE // DESKTOP ONLY =====
   The LIVE #sovereign-route-banner is relocated into .desktop-menubar by
   sovereign_route_inline.js. No duplicate badge, no second row, no route data.
   Mobile restores the original separate bar. */
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner {
    position:relative!important;
    inset:auto!important;
    left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
    flex:1 1 520px;
    order:1;
    width:auto!important;max-width:660px!important;min-width:0!important;
    height:35px!important;min-height:35px!important;
    align-self:center;
    margin:0 auto 0 8px!important;
    padding:0!important;
    border:1px solid color-mix(in srgb,var(--sn-accent) 48%,var(--line))!important;
    border-radius:4px;
    display:grid;
    grid-template-columns:34px minmax(0,1fr) minmax(80px,120px) 62px;
    align-items:stretch;
    overflow:hidden;
    isolation:isolate;
    clip-path:none!important;
    box-shadow:inset 2px 0 0 var(--sn-accent),0 0 9px rgba(var(--sn-rgb),.10);
    background:linear-gradient(100deg,rgba(var(--sn-rgb),.07),rgba(6,11,12,.92) 24%,rgba(6,11,12,.96));
    color:var(--text);
    cursor:pointer;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner.hidden{display:none!important}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner:focus-visible{
    outline:2px solid var(--sn-accent);outline-offset:2px;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner:hover{
    border-color:var(--sn-accent)!important;
    background:linear-gradient(100deg,rgba(var(--sn-rgb),.12),rgba(10,15,16,.96));
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-crest{
    display:flex;align-items:center;justify-content:center;
    border-right:1px solid rgba(var(--sn-rgb),.22);
    padding:0;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-crest b{
    font-size:17px;line-height:1;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-copy{
    display:flex;flex-direction:column;justify-content:center;gap:1px;
    min-width:0;padding:2px 8px;overflow:hidden;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-copy small{
    display:block;font-size:8px;line-height:10px;letter-spacing:.07em;
    color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-copy strong{
    display:block;font-size:11px;line-height:14px;letter-spacing:.04em;
    color:var(--sn-accent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-copy em{
    display:none!important;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-specialty,
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-pulse {
    min-width:0;padding:2px 6px;display:flex;flex-direction:column;justify-content:center;
    border-left:1px solid rgba(var(--sn-rgb),.17);gap:1px;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-specialty small,
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-pulse small {
    font-size:8px;line-height:10px;letter-spacing:.05em;white-space:nowrap;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-specialty b,
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-pulse b {
    font-size:9px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-pulse i {display:none}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-live {display:none!important}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .topbar-status {order:2;flex:0 0 auto;white-space:nowrap}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > div:first-child {order:0;flex:0 0 auto}

/* Remove the route's old 40px (48px in prior hotfix) workspace penalty.
   JS syncDesktopShellGeometry sees no DIRECT child route; routeH becomes 0. */
body:not(.nexus-mobile-shell) #desktop.has-sovereign-route .desktop-workspace{
    top:var(--nexus-menubar-height,54px)!important;
    bottom:var(--nexus-taskbar-height,42px)!important;
    left:0!important;right:0!important;
}
body:not(.nexus-mobile-shell) #desktop.has-sovereign-route .desktop-shortcuts{
    top:54px!important;
}
body:not(.nexus-mobile-shell) #desktop.has-sovereign-route .desktop-workspace .tab-panel:not(.window-maximized) {
    height:min(620px,calc(100vh - 110px));
}
@media(max-width:1520px){
    body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner {
        grid-template-columns:32px minmax(0,1fr) 60px;
        max-width:480px!important;
    }
    body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-specialty{display:none}
}
@media(max-width:1210px){
    body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner {
        flex:0 0 34px;
        width:34px!important;max-width:34px!important;
        margin:0 0 0 3px!important;
        grid-template-columns:32px;
    }
    body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-copy,
    body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-specialty,
    body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-pulse{display:none!important}
}
/* IMPORTANT: no mobile override. On mobile the JS restores the direct-child
   route and the existing phone shell rules remain authoritative. */

/* SOVEREIGN TELEMETRY // 0px ADDITIONAL DESKTOP HEIGHT */
.sn-route-linked,.sn-route-eff{display:none}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner{
  grid-template-columns:34px minmax(112px,1fr) minmax(80px,115px) 65px 69px 70px;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-linked,
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-eff{
  display:flex;flex-direction:column;justify-content:center;min-width:0;padding:2px 6px;
  border-left:1px solid rgba(var(--sn-rgb),.17);gap:1px;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-linked small,
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-eff small{
  font-size:8px;line-height:10px;letter-spacing:.04em;color:var(--muted);white-space:nowrap;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-linked b,
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-eff b{
  color:var(--sn-accent);font-size:10px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-pulse small{
  letter-spacing:0;
}
@media(max-width:1520px){
  body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner{
    grid-template-columns:32px minmax(80px,1fr) 63px 68px 66px;
  }
}
@media(max-width:1210px){
  body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner{
    grid-template-columns:32px;
  }
  body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-linked,
  body:not(.nexus-mobile-shell) #desktop > .desktop-menubar > .sovereign-route-banner .sn-route-eff{display:none!important}
}
body.nexus-mobile-shell #desktop .sovereign-route-banner .sn-route-linked,
body.nexus-mobile-shell #desktop .sovereign-route-banner .sn-route-eff{display:none!important}
