/* Command Deck interface
   Every rule is scoped so selecting Legacy restores the original UI. */
.ui-style-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:86px;height:36px;padding:0 10px;border:1px solid #505651;border-radius:4px;background:#1d201e;color:#dce6de;font:700 11px Inter;cursor:pointer}.ui-style-button:hover,.ui-style-button:focus-visible{border-color:#6ebc88;background:#20382a;color:#fff;outline:none}.ui-style-button>span{font-size:16px}.ui-style-button[aria-pressed="true"]{border-color:#427e58;color:#83dda0;background:#14261c}

html[data-ui-style="modern"][data-theme="dark"]{--paper:#080c13;--panel:#111824;--ink:#edf3fb;--muted:#8e9bb0;--line:#273449;--green:#58d083;--green2:#2da660;--gold:#e0b84e;--blue:#5b9fca;--shadow:0 12px 30px rgba(0,0,0,.22);color-scheme:dark}
html[data-ui-style="modern"]:not([data-theme="dark"]){--paper:#eef3f6;--panel:#fff;--ink:#17202c;--muted:#647286;--line:#cbd6df;--green:#278452;--green2:#17683c;--gold:#a77919;--blue:#3e789d;--shadow:0 10px 28px rgba(26,43,61,.1);color-scheme:light}
html[data-ui-style="modern"] body{min-width:320px;background:radial-gradient(circle at 65% -20%,color-mix(in srgb,var(--green) 7%,transparent),transparent 34%),var(--paper);font-size:14px}
html[data-ui-style="modern"] h1,html[data-ui-style="modern"] h2,html[data-ui-style="modern"] h3{font-family:Inter,system-ui,sans-serif;letter-spacing:-.025em}
html[data-ui-style="modern"] h1{font-size:34px;font-weight:800}
html[data-ui-style="modern"] h2{font-size:20px}

/* Global command shell */
html[data-ui-style="modern"] .site-header{height:72px;box-sizing:border-box;padding:0 18px;gap:14px;border-bottom:1px solid #273849;background:color-mix(in srgb,var(--paper) 88%,#101a25);box-shadow:0 8px 30px rgba(0,0,0,.2);backdrop-filter:blur(18px)}
html[data-ui-style="modern"] .brand{min-width:226px;gap:10px}
html[data-ui-style="modern"] .brand-mark{width:42px;height:42px;padding:2px;border:1px solid #b98d34;background:#0d151e;box-shadow:0 0 0 3px rgba(224,184,78,.08)}
html[data-ui-style="modern"] .brand strong{font:800 18px Inter;color:var(--ink);letter-spacing:-.02em}
html[data-ui-style="modern"] .brand small{color:var(--green);font-size:9px;font-weight:800;letter-spacing:.18em}
html[data-ui-style="modern"] .site-header nav{min-width:0;flex:1;justify-content:center;gap:2px}
html[data-ui-style="modern"] .site-header nav a{position:relative;height:auto;padding:27px 9px 25px;background:transparent!important;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.01em}
html[data-ui-style="modern"] .site-header nav a:hover{color:var(--ink)}
html[data-ui-style="modern"] .site-header nav a.active{color:var(--ink)}
html[data-ui-style="modern"] .site-header nav a.active:after{content:"";position:absolute;right:9px;bottom:14px;left:9px;height:2px;border-radius:2px;background:var(--green);box-shadow:0 0 12px color-mix(in srgb,var(--green) 55%,transparent)}
html[data-ui-style="modern"] .header-cloud{margin-left:0}
html[data-ui-style="modern"] .cloud-menu-button{position:relative;display:flex;align-items:center;justify-content:center;gap:7px}
html[data-ui-style="modern"] .cloud-menu-button svg{width:18px;height:18px;fill:currentColor}
html[data-ui-style="modern"] .cloud-menu-button>strong{display:none;max-width:105px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:800 10px Inter}
html[data-ui-style="modern"] .cloud-menu-button>i{position:absolute;top:-5px;right:-5px;display:grid;width:15px;height:15px;place-items:center;border-radius:50%;background:#d84d58;color:#fff;font:900 9px Inter}
html[data-ui-style="modern"] .cloud-menu-button,html[data-ui-style="modern"] .patch-icon-button,html[data-ui-style="modern"] .discord-button,html[data-ui-style="modern"] .donate-icon-button,html[data-ui-style="modern"] .theme-button{border-color:var(--line);background:color-mix(in srgb,var(--panel) 82%,transparent);border-radius:6px}
html[data-ui-style="modern"] .header-search{width:min(220px,18vw);height:36px;border-color:var(--line);border-radius:6px;background:color-mix(in srgb,var(--panel) 78%,transparent)}
html[data-ui-style="modern"] .header-search input{color:var(--ink);font-size:12px}
html[data-ui-style="modern"] .ui-style-button{height:36px;border-color:var(--line);border-radius:6px;background:color-mix(in srgb,var(--panel) 82%,transparent)}
html[data-ui-style="modern"] .layout{width:100%;max-width:none;grid-template-columns:176px minmax(0,1fr);min-height:calc(100vh - 116px)}
html[data-ui-style="modern"] .sidebar{position:sticky;top:72px;align-self:start;height:calc(100vh - 72px);box-sizing:border-box;overflow:auto;padding:18px 13px;border-right:1px solid var(--line);background:color-mix(in srgb,var(--panel) 68%,var(--paper))}
html[data-ui-style="modern"] .sidebar .side-title{margin:9px 9px 7px;color:color-mix(in srgb,var(--muted) 75%,var(--gold));font-size:8px;letter-spacing:.17em}
html[data-ui-style="modern"] .sidebar a{min-height:34px;box-sizing:border-box;gap:10px;padding:8px 10px;border:1px solid transparent;border-radius:6px;color:var(--muted);font-size:12px}
html[data-ui-style="modern"] .sidebar a:hover{border-color:color-mix(in srgb,var(--line) 80%,transparent);background:color-mix(in srgb,var(--panel) 88%,var(--green) 4%);color:var(--ink)}
html[data-ui-style="modern"] .sidebar a.active{border-color:color-mix(in srgb,var(--green) 35%,var(--line));border-left:3px solid var(--green);background:linear-gradient(90deg,color-mix(in srgb,var(--green) 14%,transparent),color-mix(in srgb,var(--panel) 82%,transparent));color:var(--ink);font-weight:800}
html[data-ui-style="modern"] .sidebar .side-rule{margin:16px 5px;border-color:var(--line)}
html[data-ui-style="modern"] main{width:100%;box-sizing:border-box;padding:28px clamp(22px,2.5vw,46px)}
html[data-ui-style="modern"] footer{border-top:1px solid var(--line);background:#070b10;color:#758196}

/* Reusable modern surfaces */
html[data-ui-style="modern"] .quick-card,html[data-ui-style="modern"] .stat,html[data-ui-style="modern"] .panel,html[data-ui-style="modern"] .infobox,html[data-ui-style="modern"] table,html[data-ui-style="modern"] .empty{border-color:var(--line);border-radius:8px;background:linear-gradient(145deg,color-mix(in srgb,var(--panel) 96%,white 1%),color-mix(in srgb,var(--panel) 94%,black 3%));box-shadow:var(--shadow)}
html[data-ui-style="modern"] .btn{min-height:36px;padding:9px 14px;border:1px solid color-mix(in srgb,var(--green) 72%,white 4%);border-radius:6px;background:linear-gradient(180deg,color-mix(in srgb,var(--green) 92%,white 4%),color-mix(in srgb,var(--green2) 94%,black 3%));box-shadow:inset 0 1px rgba(255,255,255,.12);font-size:12px}
html[data-ui-style="modern"] .btn:hover{filter:brightness(1.08)}
html[data-ui-style="modern"] .btn.secondary{border-color:var(--line);background:color-mix(in srgb,var(--panel) 90%,white 2%);color:var(--ink);box-shadow:none}
html[data-ui-style="modern"] .form-control,html[data-ui-style="modern"] input,html[data-ui-style="modern"] select,html[data-ui-style="modern"] textarea{border-color:var(--line);border-radius:6px;background:color-mix(in srgb,var(--paper) 74%,var(--panel));color:var(--ink)}
html[data-ui-style="modern"] .breadcrumbs{margin-bottom:16px;color:var(--muted)}
html[data-ui-style="modern"] .breadcrumbs a{color:var(--green)}
html[data-ui-style="modern"] .eyebrow{color:var(--green);font-size:9px;letter-spacing:.18em}
html[data-ui-style="modern"] .modal{border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:0 28px 90px rgba(0,0,0,.55)}
html[data-ui-style="modern"] th{background:color-mix(in srgb,var(--panel) 80%,var(--line));color:var(--ink)}
html[data-ui-style="modern"] th,html[data-ui-style="modern"] td{border-color:var(--line)}

/* Spawn status ribbon */
html[data-ui-style="modern"] .archive-timers{margin-bottom:24px}
html[data-ui-style="modern"] .spawn-timers{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
html[data-ui-style="modern"] .spawn-timer{min-height:72px;box-sizing:border-box;padding:10px 16px;border-color:var(--line);border-radius:8px;background:linear-gradient(110deg,color-mix(in srgb,var(--panel) 95%,black 3%),color-mix(in srgb,var(--panel) 80%,transparent));box-shadow:none}
html[data-ui-style="modern"] .spawn-timer img{width:48px;height:48px}
html[data-ui-style="modern"] .spawn-timer span{color:#a9b9d1;font-size:9px}
html[data-ui-style="modern"] .spawn-timer strong{font:800 30px/1 Inter;letter-spacing:.02em}
html[data-ui-style="modern"] .spawn-timer small{margin-top:4px;font-size:7px;color:#74839b}
html[data-ui-style="modern"] .spawn-mythic{border-color:color-mix(in srgb,#e34668 48%,var(--line));background:linear-gradient(110deg,color-mix(in srgb,#e34668 8%,var(--panel)),var(--panel))}
html[data-ui-style="modern"] .spawn-galactic{border-color:color-mix(in srgb,#8a55f5 58%,var(--line));background:linear-gradient(110deg,color-mix(in srgb,#6d36d7 12%,var(--panel)),color-mix(in srgb,#b036f0 8%,var(--panel)))}

/* Command Deck Base */
html[data-ui-style="modern"] .base-heading{align-items:center;margin:0 0 18px;padding:0 0 16px;border-bottom:1px solid var(--line)}
html[data-ui-style="modern"] .base-heading>div:first-child{display:flex;align-items:center;gap:12px}
html[data-ui-style="modern"] .base-heading .eyebrow{order:2;margin:0;padding:5px 8px;border:1px solid color-mix(in srgb,var(--green) 36%,var(--line));border-radius:4px;background:color-mix(in srgb,var(--green) 8%,transparent)}
html[data-ui-style="modern"] .base-heading h1{font-size:32px}
html[data-ui-style="modern"] .base-actions{gap:7px}
html[data-ui-style="modern"] .base-actions .btn{min-height:36px;padding:8px 12px;font-size:11px}
html[data-ui-style="modern"] .base-actions .base-panel-toggle.active,html[data-ui-style="modern"] .base-actions .base-panel-toggle.active:hover{border-color:#49d982;background:linear-gradient(180deg,#1e5438,#173e2d);color:#7bf0a8;box-shadow:inset 0 0 0 1px rgba(103,235,153,.13),0 0 14px rgba(61,213,119,.11)}
html[data-ui-style="modern"] .base-actions .base-panel-toggle.active .command-icon{color:#69e99a}
html[data-ui-style="modern"] .base-top{position:relative;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0 0 14px;padding:7px 4px;border:1px solid var(--line);border-radius:9px;background:linear-gradient(110deg,color-mix(in srgb,var(--panel) 97%,white 1%),color-mix(in srgb,var(--panel) 90%,var(--green) 2%));box-shadow:var(--shadow)}
html[data-ui-style="modern"] .base-top .stat{position:relative;min-height:58px;box-sizing:border-box;padding:12px 17px;border:0;border-radius:0;background:transparent;box-shadow:none}
html[data-ui-style="modern"] .base-top .stat+.stat:before{content:"";position:absolute;top:9px;bottom:9px;left:0;width:1px;background:var(--line)}
html[data-ui-style="modern"] .base-top .stat small{margin-bottom:7px;font-size:10px}
html[data-ui-style="modern"] .base-top .stat strong{font:800 20px/1 Inter;color:var(--green)}
html[data-ui-style="modern"] .base-layout-v2{gap:10px;margin-top:14px}
html[data-ui-style="modern"] .typed-stations{gap:10px}
html[data-ui-style="modern"] .station,html[data-ui-style="modern"]:not([data-theme="dark"]) .station{min-height:230px;border-color:var(--line);border-radius:9px;background:linear-gradient(155deg,color-mix(in srgb,var(--panel) 98%,white 1%),color-mix(in srgb,var(--panel) 92%,black 3%));box-shadow:var(--shadow)}
html[data-ui-style="modern"] .station>header,html[data-ui-style="modern"]:not([data-theme="dark"]) .station>header{min-height:46px;box-sizing:border-box;padding:10px 13px;border-color:var(--line);background:color-mix(in srgb,var(--panel) 92%,var(--paper));color:var(--ink)}
html[data-ui-style="modern"] .station>header strong{font-size:13px}
html[data-ui-style="modern"] .station>header img{width:23px;height:23px}
html[data-ui-style="modern"] .station>header small{font-size:9px;color:var(--muted)}
html[data-ui-style="modern"] .slot-grid{gap:7px;padding:9px}
html[data-ui-style="modern"] .base-slot{min-height:86px;border-radius:6px}
html[data-ui-style="modern"] .base-slot.occupied,html[data-ui-style="modern"]:not([data-theme="dark"]) .base-slot.occupied{background:linear-gradient(150deg,#19151a,#261318);color:#fff}
html[data-ui-style="modern"] .station,html[data-ui-style="modern"] .base-slot.occupied{overflow:hidden}
html[data-ui-style="modern"] .base-slot.occupied:hover{transform:translateY(-1px);filter:brightness(1.06)}
html[data-ui-style="modern"] .base-slot.occupied{height:100%;min-height:86px}
html[data-ui-style="modern"] .base-slot.occupied>a{min-height:86px;flex:1;padding:7px 20px}
html[data-ui-style="modern"] .base-slot.occupied>a>div{height:42px}
html[data-ui-style="modern"] .base-slot.occupied .slot-droid-name{font-size:12px}
html[data-ui-style="modern"] .modern-slot-wrap{position:relative;display:block;min-width:0;align-self:stretch}
html[data-ui-style="modern"] .modern-slot-wrap>.base-slot{width:100%;height:100%;min-height:inherit}
html[data-ui-style="modern"] .slot-card-actions{position:absolute;z-index:6;top:-10px;right:5px;width:auto;height:22px;background:transparent}
html[data-ui-style="modern"] .slot-card-menu{display:flex;width:auto;height:22px;align-items:center;justify-content:flex-end;gap:3px}
html[data-ui-style="modern"] .slot-card-menu .slot-delete,html[data-ui-style="modern"] .slot-card-menu .slot-variant,html[data-ui-style="modern"] .slot-card-menu .slot-swap,html[data-ui-style="modern"] .slot-card-menu .slot-lock,html[data-ui-style="modern"] .slot-card-menu .slot-complete{position:static;display:grid;width:21px;height:21px;flex:0 0 21px;place-items:center;padding:0;border:1px solid #34465d;border-radius:5px;background:#101a27;color:#aeb9c8;box-shadow:0 1px 3px rgba(0,0,0,.22);font-size:10px;line-height:1;cursor:pointer}
html[data-ui-style="modern"] .slot-card-menu button:after{display:none}
html[data-ui-style="modern"] .slot-card-menu button:hover{border-color:#5b718e;background:#1b2b3e;color:#fff}
html[data-ui-style="modern"] .slot-card-menu .slot-lock.active{background:#453817;color:#ffe184}
html[data-ui-style="modern"] .slot-card-menu .slot-delete{color:#e88686}
html[data-ui-style="modern"] .slot-card-menu .slot-delete:hover{background:#4a2025;color:#fff}
html[data-ui-style="modern"] .cycle-status{font-size:8px}
html[data-ui-style="modern"] .build-side,html[data-ui-style="modern"] .blueprint-side{min-width:0}
html[data-ui-style="modern"] .roster-wide{border-color:var(--line);border-radius:9px;background:var(--panel);box-shadow:var(--shadow)}
html[data-ui-style="modern"] .roster-wide>header{border-color:var(--line);background:color-mix(in srgb,var(--panel) 92%,var(--paper))}
html[data-ui-style="modern"] .roster-card{border-color:var(--line);background:color-mix(in srgb,var(--paper) 58%,var(--panel))}
html[data-ui-style="modern"] .special-stations{gap:10px}
html[data-ui-style="modern"] .base-health,html[data-ui-style="modern"] .scrap-calculator,html[data-ui-style="modern"] .replacement-calculator,html[data-ui-style="modern"] .rebirth-summary-box,html[data-ui-style="modern"] .group-outlook-panel{border-color:var(--line);border-radius:9px;background:linear-gradient(145deg,color-mix(in srgb,var(--panel) 97%,white 1%),color-mix(in srgb,var(--panel) 92%,var(--green) 2%));box-shadow:var(--shadow)}
html[data-ui-style="modern"] .needed-heading{margin-top:24px}

/* Other pages inherit the same shell and surface language. */
html[data-ui-style="modern"] .hero,html[data-ui-style="modern"] .dex-hero,html[data-ui-style="modern"] .groups-hero,html[data-ui-style="modern"] .nova-command,html[data-ui-style="modern"] .cantina-hero,html[data-ui-style="modern"] .donate-hero{border-radius:10px;box-shadow:var(--shadow)}
html[data-ui-style="modern"] .droid-card,html[data-ui-style="modern"] .dex-card,html[data-ui-style="modern"] .group-dashboard,html[data-ui-style="modern"] .group-profiles-section,html[data-ui-style="modern"] .nova-plan-card,html[data-ui-style="modern"] .cantina-card{border-radius:8px}

@media(max-width:1450px){html[data-ui-style="modern"] .brand{min-width:190px}html[data-ui-style="modern"] .site-header nav a{padding-inline:6px;font-size:10px}html[data-ui-style="modern"] .header-search{display:none}html[data-ui-style="modern"] .ui-style-button{min-width:72px}html[data-ui-style="modern"] .ui-style-button strong{display:none}}
@media(max-width:1180px){html[data-ui-style="modern"] .site-header nav{display:none;position:absolute;top:72px;right:0;left:0;height:auto;align-items:stretch;flex-direction:column;padding:10px;background:var(--panel);border-bottom:1px solid var(--line)}html[data-ui-style="modern"] .site-header nav.open{display:flex}html[data-ui-style="modern"] .site-header nav a{padding:11px 14px}html[data-ui-style="modern"] .site-header nav a.active:after{top:8px;right:auto;bottom:8px;left:3px;width:3px;height:auto}html[data-ui-style="modern"] .menu-button{display:block;margin-left:auto}html[data-ui-style="modern"] .header-cloud{margin-left:0}html[data-ui-style="modern"] .typed-stations{grid-template-columns:repeat(2,minmax(230px,1fr))}html[data-ui-style="modern"] .station-battle{grid-column:1/-1}html[data-ui-style="modern"] .station-battle .slot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){html[data-ui-style="modern"] .layout{grid-template-columns:1fr}html[data-ui-style="modern"] .sidebar{display:none;position:fixed;top:72px;bottom:0;left:0;z-index:40;width:min(290px,84vw);height:auto;box-shadow:20px 0 55px rgba(0,0,0,.4)}html[data-ui-style="modern"] .sidebar.mobile-open{display:block}html[data-ui-style="modern"] main{padding:22px 16px}html[data-ui-style="modern"] .spawn-timers{grid-template-columns:1fr}html[data-ui-style="modern"] .spawn-timer{min-height:62px}html[data-ui-style="modern"] .base-heading{align-items:stretch;flex-direction:column}html[data-ui-style="modern"] .base-actions{justify-content:flex-start}html[data-ui-style="modern"] .typed-stations{grid-template-columns:1fr}html[data-ui-style="modern"] .station-battle{grid-column:auto}html[data-ui-style="modern"] .station-battle .slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){html[data-ui-style="modern"] .header-cloud{display:block;flex:0 0 auto;margin-left:0}html[data-ui-style="modern"] .cloud-menu-button{width:auto;min-width:38px;height:38px;padding:0 10px}html[data-ui-style="modern"] .cloud-menu-button>strong{display:block}html[data-ui-style="modern"] .cloud-dropdown{position:fixed;top:66px;right:10px;left:auto;width:min(330px,calc(100vw - 20px));max-height:calc(100vh - 78px);box-sizing:border-box;overflow-y:auto;z-index:120;border-radius:9px}html[data-ui-style="modern"] .cloud-dropdown .cloud-panel>.side-title{margin-top:0;font-size:9px;letter-spacing:.12em}html[data-ui-style="modern"] .cloud-dropdown .side-field select{width:100%;min-height:42px;margin-top:6px}html[data-ui-style="modern"] .cloud-dropdown .cloud-actions .btn{min-height:40px}html[data-ui-style="modern"] .sidebar.mobile-open #baseSidebarControls>.cloud-panel{display:none}}
@media(max-width:650px){.ui-style-button{min-width:34px;width:34px;padding:0}.ui-style-button strong{display:none}html[data-ui-style="modern"] .site-header{height:62px;padding-inline:10px;gap:8px}html[data-ui-style="modern"] .brand{min-width:0;margin-right:auto}html[data-ui-style="modern"] .brand-mark{width:36px;height:36px}html[data-ui-style="modern"] .brand strong{font-size:14px}html[data-ui-style="modern"] .patch-icon-button,html[data-ui-style="modern"] .discord-button,html[data-ui-style="modern"] .donate-icon-button{display:none}html[data-ui-style="modern"] .sidebar{top:62px}html[data-ui-style="modern"] .base-top{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-ui-style="modern"] .base-top .stat:nth-child(3):before{display:none}html[data-ui-style="modern"] .base-top .stat:nth-child(n+3){border-top:1px solid var(--line)}html[data-ui-style="modern"] .base-heading>div:first-child{align-items:flex-start;flex-direction:column-reverse;gap:5px}html[data-ui-style="modern"] .base-heading h1{font-size:27px}html[data-ui-style="modern"] .base-actions .btn{flex:1 1 calc(50% - 5px)}html[data-ui-style="modern"] .base-actions .base-transfer-icon{flex:0 0 38px}html[data-ui-style="modern"] .slot-grid,html[data-ui-style="modern"] .station-battle .slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-ui-style="modern"] .modal{width:calc(100vw - 16px);max-width:calc(100vw - 16px);box-sizing:border-box;padding:18px;overflow-x:hidden}html[data-ui-style="modern"] .patch-notes-modal{max-height:calc(100vh - 16px)}html[data-ui-style="modern"] .patch-notes-list article{min-width:0}html[data-ui-style="modern"] .patch-notes-list li,html[data-ui-style="modern"] .patch-notes-list p{overflow-wrap:anywhere}}
@media(max-width:650px){html[data-ui-style="modern"] .brand{order:0}html[data-ui-style="modern"] .menu-button{order:1;margin-left:0}html[data-ui-style="modern"] .header-cloud{order:2}html[data-ui-style="modern"] .ui-style-button{order:3}html[data-ui-style="modern"] .theme-button{order:4}html[data-ui-style="modern"] .cloud-menu-button{width:36px;min-width:36px;height:36px;padding:0}html[data-ui-style="modern"] .cloud-menu-button>strong{display:none}html[data-ui-style="modern"] .cloud-dropdown{top:62px;right:8px;width:calc(100vw - 16px);max-height:calc(100vh - 70px)}}
@media(max-width:380px){html[data-ui-style="modern"] .site-header{gap:4px;padding-inline:6px}html[data-ui-style="modern"] .brand{gap:6px}html[data-ui-style="modern"] .brand-mark{width:30px;height:30px}html[data-ui-style="modern"] .brand strong{font-size:12px}html[data-ui-style="modern"] .brand small{display:none}html[data-ui-style="modern"] .menu-button,html[data-ui-style="modern"] .cloud-menu-button,html[data-ui-style="modern"] .ui-style-button,html[data-ui-style="modern"] .theme-button{width:34px;min-width:34px;height:34px}}

/* Command Deck fidelity pass */
html[data-ui-style="modern"]{--deck-glow:rgba(74,217,132,.14);--deck-inset:inset 0 1px rgba(255,255,255,.025)}
html[data-ui-style="modern"] .site-header{height:64px;padding-inline:22px;background:linear-gradient(90deg,#070c13,#0a1019 52%,#070c13)}
html[data-ui-style="modern"] .brand{min-width:230px}
html[data-ui-style="modern"] .layout{grid-template-columns:176px minmax(0,1fr);min-height:calc(100vh - 64px)}
html[data-ui-style="modern"] .sidebar{top:64px;height:calc(100vh - 64px);padding:18px 14px;background:linear-gradient(180deg,#101824,#0c131d)}
html[data-ui-style="modern"] .sidebar>a{margin-bottom:4px;text-transform:none}
html[data-ui-style="modern"] main{padding:18px clamp(24px,2.4vw,40px) 34px}
html[data-ui-style="modern"] main>.breadcrumbs{display:none}
html[data-ui-style="modern"] .command-icon{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
html[data-ui-style="modern"] .command-art{width:20px;height:20px;object-fit:contain}
html[data-ui-style="modern"] .btn>.command-art{flex:0 0 20px}
html[data-ui-style="modern"] .modern-metric-icon .command-art{width:21px;height:21px}
html[data-ui-style="modern"] .side-icon{flex:0 0 21px;width:21px;height:21px}
html[data-ui-style="modern"] .btn:has(.command-icon){display:inline-flex;align-items:center;justify-content:center;gap:7px}
html[data-ui-style="modern"] .btn>.command-icon{flex:0 0 17px}

/* One continuous status ribbon, as in the reference. */
html[data-ui-style="modern"] .archive-timers{margin:0 0 22px}
html[data-ui-style="modern"] .archive-timers>.timer-toggle{position:absolute;z-index:2;margin:6px 0 0 6px;opacity:0;transition:opacity .15s}
html[data-ui-style="modern"] .archive-timers:hover>.timer-toggle,html[data-ui-style="modern"] .archive-timers>.timer-toggle:focus-visible{opacity:1}
html[data-ui-style="modern"] .spawn-timers{gap:0;overflow:hidden;border:1px solid var(--line);border-radius:9px;background:linear-gradient(90deg,#101621,#111927)}
html[data-ui-style="modern"] .spawn-timer{min-height:84px;border:0;border-radius:0;background:transparent!important;padding:12px 30px}
html[data-ui-style="modern"] .spawn-timer+ .spawn-timer{border-left:1px solid var(--line)}
html[data-ui-style="modern"] .spawn-mythic{box-shadow:inset 0 0 50px rgba(196,40,93,.05)}
html[data-ui-style="modern"] .spawn-galactic{box-shadow:inset 0 0 60px rgba(125,73,219,.12)}

/* Base command row and icon buttons. */
html[data-ui-style="modern"] #baseSidebarControls{display:none}
html[data-ui-style="modern"] .base-heading{min-height:58px;margin-bottom:0;padding-bottom:14px;border-bottom:0}
html[data-ui-style="modern"] .base-heading .eyebrow{font-size:9px;letter-spacing:.15em}
html[data-ui-style="modern"] .base-actions .btn{gap:7px;min-height:36px;border-color:var(--line);background:#101824;color:var(--ink);box-shadow:var(--deck-inset)}
html[data-ui-style="modern"] .base-actions .btn:hover{border-color:color-mix(in srgb,var(--green) 60%,var(--line));background:#14231d}
html[data-ui-style="modern"] .base-actions #openAdd{border-color:#45bd76;background:linear-gradient(180deg,#42c87c,#259b5b)}
html[data-ui-style="modern"] #transferBase{width:auto;min-width:118px;padding:8px 12px;font-size:10px}
html[data-ui-style="modern"] #transferBase .command-icon{width:16px;height:16px}

/* Collapsible settings command deck. */
html[data-ui-style="modern"] .modern-base-settings{margin:0 0 10px;border:1px solid var(--line);border-radius:8px;background:linear-gradient(100deg,#111925,#0d141f);box-shadow:var(--deck-inset)}
html[data-ui-style="modern"] .modern-base-settings>header{display:flex;align-items:center;justify-content:space-between;min-height:38px;padding:7px 10px 7px 14px;border-bottom:1px solid var(--line)}
html[data-ui-style="modern"] .modern-base-settings>header>span{display:flex;align-items:center;gap:8px;color:var(--green)}
html[data-ui-style="modern"] .modern-base-settings>header strong{color:var(--ink);font-size:11px;text-transform:uppercase;letter-spacing:.08em}
html[data-ui-style="modern"] .modern-base-settings>header small{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.1em}
html[data-ui-style="modern"] .modern-base-settings>header button{width:27px;height:27px;border:1px solid var(--line);border-radius:5px;background:#121c2a;color:var(--muted);font-size:19px;cursor:pointer}
html[data-ui-style="modern"] .modern-settings-body{display:grid;grid-template-columns:1.25fr .8fr 1fr 1.25fr auto;align-items:stretch}
html[data-ui-style="modern"] .modern-settings-body>label,html[data-ui-style="modern"] .modern-settings-link{display:flex;min-width:0;flex-direction:column;justify-content:center;gap:4px;padding:11px 18px;border-right:1px solid var(--line)}
html[data-ui-style="modern"] .modern-settings-body small{color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.07em}
html[data-ui-style="modern"] .modern-settings-body label>span{display:flex;align-items:center;gap:8px}
html[data-ui-style="modern"] .modern-settings-body input,html[data-ui-style="modern"] .modern-settings-body select{width:100%;height:32px;padding:5px 8px;border-color:var(--line);background:#0b121c;font-size:11px;font-weight:700}
html[data-ui-style="modern"] .modern-settings-body input{max-width:90px}
html[data-ui-style="modern"] .modern-settings-body b{color:var(--green);white-space:nowrap}
html[data-ui-style="modern"] .modern-settings-body em{overflow:hidden;color:#bb991f;font-size:8px;font-style:normal;text-overflow:ellipsis;white-space:nowrap}
html[data-ui-style="modern"] .command-stepper{gap:4px!important}
html[data-ui-style="modern"] .command-stepper button{width:30px;height:32px;border:1px solid var(--line);border-radius:5px;background:#121c2a;color:var(--ink);cursor:pointer}
html[data-ui-style="modern"] .modern-settings-link{align-items:center;min-width:170px;flex-direction:row;border:0;border-right:0;background:transparent;color:var(--ink);font:inherit;font-size:10px;font-weight:800;text-align:left;text-decoration:none;text-transform:uppercase;letter-spacing:.06em;cursor:pointer}
html[data-ui-style="modern"] .modern-settings-link>span{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}
html[data-ui-style="modern"] .modern-settings-link strong{font-size:10px}
html[data-ui-style="modern"] .modern-settings-link em{color:var(--muted);font-size:8px;font-weight:600;text-transform:none;letter-spacing:0}
html[data-ui-style="modern"] .modern-settings-link>b{display:grid;width:24px;height:24px;flex:0 0 24px;place-items:center;border:1px solid color-mix(in srgb,var(--green) 45%,var(--line));border-radius:50%;color:var(--green);font-size:16px}
html[data-ui-style="modern"] .modern-base-settings.collapsed>header{border-bottom:0}
html[data-ui-style="modern"] .modern-base-settings.collapsed .modern-settings-body,html[data-ui-style="modern"] .modern-base-settings.collapsed .modern-optimise-settings{display:none}
html[data-ui-style="modern"] .modern-optimise-settings{display:grid;grid-template-columns:minmax(330px,1.35fr) minmax(260px,1fr) minmax(270px,1fr) auto;align-items:stretch;border-top:1px solid var(--line)}
html[data-ui-style="modern"] .modern-optimise-settings[hidden]{display:none}
html[data-ui-style="modern"] .modern-optimise-settings>section,html[data-ui-style="modern"] .modern-sell-priority{min-width:0;padding:14px 16px;border-right:1px solid var(--line)}
html[data-ui-style="modern"] .modern-companion-settings{display:grid;grid-template-columns:1fr 1fr;gap:16px}
html[data-ui-style="modern"] .modern-setting-block{display:flex;min-width:0;flex-direction:column;gap:7px}
html[data-ui-style="modern"] .modern-setting-block>small,html[data-ui-style="modern"] .modern-sell-priority>small{color:#9fb0c5;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
html[data-ui-style="modern"] .modern-setting-block>em,html[data-ui-style="modern"] .modern-sell-priority>em{color:#c5a62d;font-size:8px;font-style:normal;line-height:1.35}
html[data-ui-style="modern"] .modern-setting-pills{display:flex;flex-wrap:wrap;gap:5px}
html[data-ui-style="modern"] .modern-setting-pills label{cursor:pointer}
html[data-ui-style="modern"] .modern-setting-pills input{position:absolute;opacity:0;pointer-events:none}
html[data-ui-style="modern"] .modern-setting-pills span{display:block;padding:6px 9px;border:1px solid var(--line);border-radius:999px;background:#111927;color:#9eb0c8;font-size:9px;font-weight:800}
html[data-ui-style="modern"] .modern-setting-pills input:checked+span{border-color:#3e9d68;background:#143524;color:#64dc94}
html[data-ui-style="modern"] .modern-preferred-companions{display:flex;min-height:30px;flex-wrap:wrap;gap:5px}
html[data-ui-style="modern"] .modern-preferred-companion,html[data-ui-style="modern"] .modern-add-companion{display:flex;min-height:30px;align-items:center;gap:5px;padding:3px 6px;border:1px solid var(--line);border-radius:5px;background:#101824;color:var(--ink);font-size:8px}
html[data-ui-style="modern"] .modern-preferred-companion img{width:23px;height:23px;object-fit:contain}
html[data-ui-style="modern"] .modern-preferred-companion button{padding:0;border:0;background:transparent;color:#ff8c91;font-size:15px;cursor:pointer}
html[data-ui-style="modern"] .modern-add-companion{border-style:dashed;color:var(--green);cursor:pointer}
html[data-ui-style="modern"] .modern-add-companion .slot-icon,html[data-ui-style="modern"] .modern-add-companion img{width:22px;height:22px}
html[data-ui-style="modern"] .modern-optimise-checks{display:grid;align-content:center;gap:7px}
html[data-ui-style="modern"] .modern-optimise-checks label{display:grid;grid-template-columns:16px 1fr auto;align-items:center;gap:8px;color:#c6d1df;font-size:9px;font-weight:700;line-height:1.25;cursor:pointer}
html[data-ui-style="modern"] .modern-optimise-checks input{width:14px;height:14px;accent-color:var(--green)}
html[data-ui-style="modern"] .modern-optimise-checks i,html[data-ui-style="modern"] .modern-sell-priority i{display:inline-grid;width:15px;height:15px;place-items:center;border:1px solid #315846;border-radius:50%;color:var(--green);font-size:9px;font-style:normal}
html[data-ui-style="modern"] .modern-sell-priority{display:flex;flex-direction:column;justify-content:center;gap:7px}
html[data-ui-style="modern"] .modern-sell-priority[hidden]{display:none}
html[data-ui-style="modern"] .modern-sell-priority>small{display:flex;align-items:center;gap:5px}
html[data-ui-style="modern"] .modern-sell-priority select{width:100%;height:32px;border-color:var(--line);background:#0b121c;font-size:10px;font-weight:700}
html[data-ui-style="modern"] .modern-super-rebirth{align-self:center;min-width:118px;margin:14px;border-color:#b95656;background:linear-gradient(180deg,#bd5757,#963d3d);color:#fff}

/* Icon-led metrics, including the Rebirth Outlook block. */
html[data-ui-style="modern"] .base-top{grid-template-columns:repeat(5,minmax(0,1fr));min-height:78px;margin:0 0 10px;padding:0;border:1px solid var(--line);border-radius:8px;background:linear-gradient(105deg,#111a27,#0e1621);box-shadow:var(--deck-inset)}
html[data-ui-style="modern"] .base-top .stat{position:relative;display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto;align-content:center;column-gap:10px;min-width:0;padding:12px 16px;border:0;border-radius:0;background:transparent;box-shadow:none}
html[data-ui-style="modern"] .base-top .stat:before{content:"";position:absolute;top:16px;right:0;bottom:16px;width:1px;background:var(--line)}
html[data-ui-style="modern"] .base-top .stat:last-child:before{display:none}
html[data-ui-style="modern"] .modern-metric-icon{grid-row:1/3;display:grid;width:38px;height:38px;place-items:center;border:1px solid var(--line);border-radius:50%;background:#0d141e;color:#bcc9d9}
html[data-ui-style="modern"] .modern-metric-icon .command-icon{width:19px;height:19px}
html[data-ui-style="modern"] .base-top .stat small{align-self:end;color:#9aa9bd;font-size:10px}
html[data-ui-style="modern"] .base-top .stat strong{align-self:start;color:var(--green);font-size:17px;white-space:nowrap}
html[data-ui-style="modern"] .modern-outlook-stat{color:inherit;text-decoration:none}
html[data-ui-style="modern"] .modern-outlook-stat>b{position:absolute;right:12px;top:24px;display:grid;width:27px;height:27px;place-items:center;border:1px solid var(--line);border-radius:5px;color:var(--muted);font-size:18px}

/* Station density and depth from the reference. */
html[data-ui-style="modern"] .typed-stations{grid-template-columns:repeat(3,minmax(220px,1fr));gap:10px}
html[data-ui-style="modern"] .station-battle{grid-column:auto}
html[data-ui-style="modern"] .station-battle .slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-ui-style="modern"] .station{border-radius:8px;background:linear-gradient(145deg,#121b28,#0e1621);box-shadow:var(--deck-inset),0 8px 24px rgba(0,0,0,.12)}
html[data-ui-style="modern"] .station>header{min-height:44px}
html[data-ui-style="modern"] .station-fuse{min-height:23px;height:23px;padding:0 11px;border-radius:5px;font-size:10px;line-height:1}
html[data-ui-style="modern"] .base-slot{border-width:1px;background:linear-gradient(145deg,#171a22,#251419)}
html[data-ui-style="modern"] .base-layout-v2.modern-station-layout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:10px}
html[data-ui-style="modern"] .modern-station-layout>.typed-stations{grid-column:1/-1}
html[data-ui-style="modern"] .modern-center-stations>.build-side{grid-column:1;min-width:0;margin:0}
html[data-ui-style="modern"] .modern-center-stations>.build-side .station{height:auto}
html[data-ui-style="modern"] .modern-center-stations{grid-column:1;display:grid;grid-template-columns:minmax(0,1fr);min-width:0;align-content:start;gap:10px}
html[data-ui-style="modern"] .modern-center-stations>.blueprint-side{grid-column:1;min-width:0;margin:0}
html[data-ui-style="modern"] .modern-fuse-stations{grid-column:2;display:grid;grid-template-columns:minmax(0,1fr);min-width:0;align-content:start;gap:10px}
html[data-ui-style="modern"] .modern-fuse-stations>.station{grid-column:1;min-width:0;min-height:0;margin:0}
html[data-ui-style="modern"] .modern-support-row{grid-column:1;display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:10px}
html[data-ui-style="modern"] .modern-support-row>.station{min-width:0;min-height:0}
html[data-ui-style="modern"] .modern-support-row>.station>header{min-height:58px;align-items:flex-start;flex-direction:column;justify-content:center;gap:3px;padding:8px 10px}
html[data-ui-style="modern"] .modern-support-row>.station>header small{padding-left:31px}
html[data-ui-style="modern"] .modern-support-row .slot-grid{grid-template-columns:1fr}
html[data-ui-style="modern"] .modern-support-row .base-slot{min-height:86px}
html[data-ui-style="modern"] .modern-station-layout>.station-lounge{grid-column:3;min-width:0;align-self:start}
html[data-ui-style="modern"] .modern-station-layout>.station-lounge .slot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
html[data-ui-style="modern"] .modern-station-layout>.roster-wide{grid-column:1/-1}

/* Shared Command Deck hierarchy for every route. */
html[data-ui-style="modern"] main>h1,html[data-ui-style="modern"] .command-page-heading h1{font-size:clamp(28px,3vw,42px);line-height:1.05}
html[data-ui-style="modern"] .command-page-banner{position:relative;overflow:hidden;margin:0 0 12px;padding:22px 24px;border:1px solid var(--line);border-left:3px solid var(--green);border-radius:8px;background:radial-gradient(circle at 90% 0,var(--deck-glow),transparent 30%),linear-gradient(115deg,#111a27,#0d141e);box-shadow:var(--deck-inset)}
html[data-ui-style="modern"] .command-page-banner:after{content:"";position:absolute;right:-35px;bottom:-75px;width:220px;height:160px;border:1px solid rgba(89,209,133,.13);transform:skewX(-28deg)}
html[data-ui-style="modern"] .command-page-banner h1{margin:3px 0 8px}
html[data-ui-style="modern"] .command-page-banner .lead{margin:0}
html[data-ui-style="modern"] .hero,html[data-ui-style="modern"] .dex-hero,html[data-ui-style="modern"] .nova-hero,html[data-ui-style="modern"] .cantina-hero,html[data-ui-style="modern"] .groups-hero,html[data-ui-style="modern"] .lucky-hero,html[data-ui-style="modern"] .rebirth-hero,html[data-ui-style="modern"] .droid-calc-hero,html[data-ui-style="modern"] .galactic-report-hero,html[data-ui-style="modern"] .patch-page-head,html[data-ui-style="modern"] .donate-hero{position:relative;overflow:hidden;margin-bottom:14px;padding:24px 26px;border:1px solid var(--line);border-left:3px solid var(--green);border-radius:8px;background:radial-gradient(circle at 90% 0,var(--deck-glow),transparent 30%),linear-gradient(115deg,#111a27,#0d141e);box-shadow:var(--deck-inset)}
html[data-ui-style="modern"] .hero:after,html[data-ui-style="modern"] .dex-hero:after,html[data-ui-style="modern"] .nova-hero:after,html[data-ui-style="modern"] .cantina-hero:after{content:"";position:absolute;right:-45px;bottom:-65px;width:210px;height:150px;border:1px solid rgba(89,209,133,.13);transform:skewX(-28deg)}
html[data-ui-style="modern"] .eyebrow{color:var(--green);font-size:9px;letter-spacing:.16em}
html[data-ui-style="modern"] .lead{max-width:850px;color:#a6b3c5;font-size:13px;line-height:1.6}
html[data-ui-style="modern"] .command-toolbar{margin:10px 0 16px;padding:7px;border:1px solid var(--line);border-radius:7px;background:#101824;box-shadow:var(--deck-inset)}
html[data-ui-style="modern"] .command-toolbar button{min-height:34px;border-radius:5px}
html[data-ui-style="modern"] .toolbar{display:grid;grid-template-columns:minmax(220px,1fr) 180px 180px;gap:8px}
html[data-ui-style="modern"] .toolbar input,html[data-ui-style="modern"] .toolbar select{height:38px}
html[data-ui-style="modern"] .quick-grid{gap:10px}
html[data-ui-style="modern"] .quick-card{position:relative;min-height:120px;padding:22px;border-left:3px solid var(--green);background:linear-gradient(135deg,#121b28,#0d141e)}
html[data-ui-style="modern"] .quick-card b{font-size:16px}
html[data-ui-style="modern"] .droid-grid,html[data-ui-style="modern"] .dex-grid,html[data-ui-style="modern"] .nova-grid{gap:9px}
html[data-ui-style="modern"] .droid-card,html[data-ui-style="modern"] .dex-card,html[data-ui-style="modern"] .nova-card{border-color:var(--line);background:linear-gradient(145deg,#131d2a,#0e151f);box-shadow:var(--deck-inset)}
html[data-ui-style="modern"] .article-grid{gap:12px}
html[data-ui-style="modern"] .article-grid>article,html[data-ui-style="modern"] .infobox{padding:22px;border:1px solid var(--line);border-radius:8px;background:linear-gradient(145deg,#121b28,#0e151f);box-shadow:var(--deck-inset)}
html[data-ui-style="modern"] .infobox{padding:0}
html[data-ui-style="modern"] table{overflow:hidden;border-collapse:separate;border-spacing:0}
html[data-ui-style="modern"] th{background:#162131;color:#b8c6d8;font-size:10px;text-transform:uppercase;letter-spacing:.07em}
html[data-ui-style="modern"] td{background:rgba(12,19,29,.55)}
html[data-ui-style="modern"] .cantina-layout,html[data-ui-style="modern"] .nova-command-layout,html[data-ui-style="modern"] .lucky-layout{gap:12px}
html[data-ui-style="modern"] .cantina-card,html[data-ui-style="modern"] .cantina-detail,html[data-ui-style="modern"] .nova-plan-card,html[data-ui-style="modern"] .lucky-card,html[data-ui-style="modern"] .lucky-detail,html[data-ui-style="modern"] .group-dashboard,html[data-ui-style="modern"] .group-profiles-section,html[data-ui-style="modern"] .patch-page-entry{border-color:var(--line);background:linear-gradient(145deg,#121b28,#0d151f);box-shadow:var(--deck-inset)}
html[data-ui-style="modern"] .cantina-card.active,html[data-ui-style="modern"] .lucky-card.active{border-left:3px solid var(--green)}
html[data-ui-style="modern"] .optimise-panel,html[data-ui-style="modern"] .optimise-steps,html[data-ui-style="modern"] .replacement-calculator,html[data-ui-style="modern"] .rebirth-detail-group{border-radius:8px;background:linear-gradient(145deg,#121b28,#0e151f);box-shadow:var(--deck-inset)}

@media(max-width:1180px){html[data-ui-style="modern"] .layout{display:block}html[data-ui-style="modern"] .sidebar{display:none;position:fixed;top:64px;bottom:0;left:0;z-index:40;width:min(290px,84vw);height:auto}html[data-ui-style="modern"] .sidebar.mobile-open{display:block}html[data-ui-style="modern"] .typed-stations{grid-template-columns:repeat(3,minmax(210px,1fr))}html[data-ui-style="modern"] .modern-settings-body{grid-template-columns:repeat(4,minmax(0,1fr))}html[data-ui-style="modern"] .modern-settings-link{grid-column:1/-1;min-height:38px;border-top:1px solid var(--line)}html[data-ui-style="modern"] .modern-optimise-settings{grid-template-columns:1.3fr 1fr}html[data-ui-style="modern"] .modern-optimise-settings>*{border-bottom:1px solid var(--line)}html[data-ui-style="modern"] .modern-super-rebirth{justify-self:stretch}}
@media(max-width:820px){html[data-ui-style="modern"] .typed-stations{grid-template-columns:1fr}html[data-ui-style="modern"] .base-top{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-ui-style="modern"] .base-top .stat:nth-child(2n):before{display:none}html[data-ui-style="modern"] .modern-outlook-stat{grid-column:1/-1}html[data-ui-style="modern"] .modern-settings-body{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-ui-style="modern"] .modern-optimise-settings{grid-template-columns:1fr}html[data-ui-style="modern"] .modern-optimise-settings>section,html[data-ui-style="modern"] .modern-sell-priority{border-right:0}html[data-ui-style="modern"] .toolbar{grid-template-columns:1fr}html[data-ui-style="modern"] .spawn-timer{padding-inline:16px}}
@media(max-width:650px){html[data-ui-style="modern"] main{padding:14px 10px 28px}html[data-ui-style="modern"] .site-header{height:58px}html[data-ui-style="modern"] .ui-style-button{min-width:36px;width:36px}html[data-ui-style="modern"] .spawn-timers{border-radius:7px}html[data-ui-style="modern"] .spawn-timer+ .spawn-timer{border-top:1px solid var(--line);border-left:0}html[data-ui-style="modern"] .base-heading{gap:12px}html[data-ui-style="modern"] .base-actions .btn{flex:1 1 calc(50% - 4px);padding-inline:8px}html[data-ui-style="modern"] .modern-settings-body{grid-template-columns:1fr}html[data-ui-style="modern"] .modern-settings-body>label{border-right:0;border-bottom:1px solid var(--line)}html[data-ui-style="modern"] .modern-companion-settings{grid-template-columns:1fr}html[data-ui-style="modern"] .modern-super-rebirth{margin:12px}html[data-ui-style="modern"] .base-top{grid-template-columns:1fr}html[data-ui-style="modern"] .base-top .stat{min-height:62px}html[data-ui-style="modern"] .base-top .stat:before{top:auto;right:12px;bottom:0;left:12px;width:auto;height:1px}html[data-ui-style="modern"] .base-top .stat:last-child:before{display:none}html[data-ui-style="modern"] .modern-outlook-stat{grid-column:auto}html[data-ui-style="modern"] .slot-grid,html[data-ui-style="modern"] .station-battle .slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-ui-style="modern"] .hero,html[data-ui-style="modern"] .dex-hero,html[data-ui-style="modern"] .nova-hero,html[data-ui-style="modern"] .cantina-hero,html[data-ui-style="modern"] .groups-hero,html[data-ui-style="modern"] .lucky-hero,html[data-ui-style="modern"] .rebirth-hero,html[data-ui-style="modern"] .droid-calc-hero,html[data-ui-style="modern"] .patch-page-head,html[data-ui-style="modern"] .donate-hero{padding:18px}}

/* Scroll-aware status strip. It remains in view, then becomes timer-only. */
html[data-ui-style="modern"] .archive-timers{position:sticky;top:72px;z-index:14;width:100%;max-width:100%;margin:0 0 22px;padding:0;background:transparent;border:0;box-shadow:none;overflow:visible;transition:width .3s ease,max-width .3s ease,margin .3s ease,filter .3s ease}
html[data-ui-style="modern"] .archive-timers .spawn-timers{height:86px;transition:height .3s ease,border-color .3s ease,box-shadow .3s ease}
html[data-ui-style="modern"] .archive-timers .spawn-timer{transition:min-height .3s ease,padding .3s ease,background-color .3s ease}
html[data-ui-style="modern"] .archive-timers .spawn-timer img{transition:width .3s ease,height .3s ease,opacity .2s ease,margin .3s ease}
html[data-ui-style="modern"] .archive-timers .spawn-timer span,html[data-ui-style="modern"] .archive-timers .spawn-timer small{overflow:hidden;max-height:18px;transition:max-height .22s ease,opacity .18s ease,margin .22s ease}
html[data-ui-style="modern"] .archive-timers .spawn-timer strong{transition:font-size .3s ease,margin .3s ease}
html[data-ui-style="modern"] .archive-timers.timers-scrolled{width:min(470px,100%);max-width:470px;margin:0 auto 12px 0;filter:drop-shadow(0 8px 18px rgba(0,0,0,.32))}
html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timers{height:34px;border-color:#344257;box-shadow:0 7px 22px rgba(0,0,0,.28)}
html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timer{min-height:32px;justify-content:center;padding:3px 12px;gap:0}
html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timer img{width:0;height:0;margin:0;opacity:0}
html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timer div{flex:0 1 auto;text-align:center}
html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timer span,html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timer small{max-height:0;margin:0;opacity:0}
html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timer strong{margin:0;font-size:17px;text-align:center}
html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-mythic strong{color:#ff8fae}
html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-beskar strong{color:#f2f5fb}
html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-galactic strong{background:none;color:#bc7cff;-webkit-text-fill-color:currentColor}
html[data-ui-style="modern"] .event-card{margin-bottom:22px!important}
html[data-ui-style="modern"] .event-card+.hero{margin-top:0}

/* One collapse language across Command Deck panels. */
html[data-ui-style="modern"] .modern-base-settings>header .panel-collapse-button,html[data-ui-style="modern"] .optimise-steps-toggle{display:grid;width:28px;height:28px;place-items:center;padding:0;border:1px solid #3a4a61;border-radius:50%;background:#101a28;color:#aebdd0;font:700 17px/1 Inter;box-shadow:none;cursor:pointer;transition:border-color .15s ease,background .15s ease,color .15s ease,transform .15s ease}
html[data-ui-style="modern"] .modern-base-settings>header .panel-collapse-button:hover,html[data-ui-style="modern"] .optimise-steps-toggle:hover{border-color:var(--green);background:#14271e;color:var(--green);transform:scale(1.05)}

@media(max-width:650px){html[data-ui-style="modern"] .archive-timers{top:64px;width:100%;max-width:100%;margin-bottom:16px}html[data-ui-style="modern"] .archive-timers .spawn-timers{height:auto}html[data-ui-style="modern"] .archive-timers.timers-scrolled{width:100%;max-width:100%;margin-right:0}html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timers{display:grid;height:34px;grid-template-columns:repeat(3,minmax(0,1fr))}html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timer{border-top:0;padding-inline:4px}html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timer+ .spawn-timer{border-left:1px solid var(--line)}html[data-ui-style="modern"] .archive-timers.timers-scrolled .spawn-timer strong{font-size:14px}}

/* Compact view switch, neutral dialogs, and a deliberate Nova command layout. */
.ui-style-button,html[data-ui-style="modern"] .ui-style-button{width:38px;min-width:38px;padding:0}
.ui-style-button strong,html[data-ui-style="modern"] .ui-style-button strong{display:none}
html[data-ui-style="modern"] .btn.ghost{border-color:#3a485d;background:#101824;color:#aab7c8;box-shadow:none}
html[data-ui-style="modern"] .btn.ghost:hover{border-color:#5d708b;background:#182335;color:#eef4fb}
html[data-ui-style="modern"] .picker-modal .modal-actions,html[data-ui-style="modern"] .modal .modal-actions{padding-top:12px;border-top:1px solid var(--line)}
html[data-ui-style="modern"] .picker-modal #cancelPicker,html[data-ui-style="modern"] .modal [id^="cancel"]{min-width:96px;background:#151f2e;color:#b9c5d5}
html[data-ui-style="modern"] .slot-picker>#cancelPicker,html[data-ui-style="modern"] .slot-picker>[id^="cancel"]{justify-self:start;margin-top:12px;border-color:#415169;background:#151f2e;color:#c5cfdd}
html[data-ui-style="modern"] .slot-picker>#cancelPicker:hover,html[data-ui-style="modern"] .slot-picker>[id^="cancel"]:hover{border-color:#71849f;background:#1c293b;color:#fff}
html[data-ui-style="modern"] .cloud-dropdown{width:min(310px,calc(100vw - 20px));padding:16px;border-color:#3a485d;border-radius:9px;background:linear-gradient(145deg,#131d2a,#0d151f);box-shadow:0 22px 65px rgba(0,0,0,.58)}
html[data-ui-style="modern"] .nova-command{border-color:#315066;border-radius:9px;background:linear-gradient(145deg,#0b121b,#080d14)}
html[data-ui-style="modern"] .nova-command-head{padding:24px 28px;background:radial-gradient(circle at 82% -20%,rgba(88,208,131,.13),transparent 36%),linear-gradient(110deg,#111c29,#0c141e)}
html[data-ui-style="modern"] .nova-command-head h1{font-size:38px;letter-spacing:-.04em}
html[data-ui-style="modern"] .nova-command-grid{grid-template-columns:minmax(330px,.9fr) minmax(430px,1.25fr);min-height:0}
html[data-ui-style="modern"] .nova-category-rail{grid-column:1/-1;display:grid;grid-template-columns:repeat(7,minmax(110px,1fr));gap:7px;padding:10px 14px;overflow-x:auto;border-right:0;border-bottom:1px solid #2b3a49;background:#0a1018}
html[data-ui-style="modern"] .nova-category-rail button{grid-template-columns:28px minmax(0,1fr);min-height:44px;padding:6px 9px;border-radius:6px;font-size:10px}
html[data-ui-style="modern"] .nova-category-rail button>img,html[data-ui-style="modern"] .nova-category-rail button>span:first-child,html[data-ui-style="modern"] .nova-category-rail button .picture{width:27px;height:27px}
html[data-ui-style="modern"] .nova-category-rail button:hover,html[data-ui-style="modern"] .nova-category-rail button.active{border-color:var(--green);background:linear-gradient(180deg,#14261e,#0f1c19);color:#8ce3aa;box-shadow:inset 0 -2px var(--green)}
html[data-ui-style="modern"] .nova-catalogue{padding:18px;border-right:1px solid #2b3a49}
html[data-ui-style="modern"] .nova-upgrade-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html[data-ui-style="modern"] .nova-upgrade-row{min-height:82px;border-radius:7px;background:linear-gradient(145deg,#121b28,#0d141e)}
html[data-ui-style="modern"] .nova-detail-panel{margin:18px;border-color:#47758c;border-radius:8px;background:radial-gradient(circle at 100% 0,rgba(68,197,156,.09),transparent 34%),linear-gradient(145deg,#101a26,#090f17)}
@media(max-width:900px){html[data-ui-style="modern"] .nova-command-grid{grid-template-columns:1fr}html[data-ui-style="modern"] .nova-category-rail{grid-template-columns:repeat(7,120px)}html[data-ui-style="modern"] .nova-catalogue{border-right:0;border-bottom:1px solid #2b3a49}}

/* Measured fold: the nav folds away as soon as its links stop fitting. */
@media(min-width:1181px){
html[data-ui-style="modern"][data-nav-fit="collapsed"] .site-header nav{display:none}
html[data-ui-style="modern"][data-nav-fit="collapsed"] .menu-button{display:block;margin-left:auto}
html[data-ui-style="modern"][data-nav-fit="collapsed"] .header-cloud{margin-left:0}
html[data-ui-style="modern"][data-nav-fit="collapsed"] .layout{display:block}
html[data-ui-style="modern"][data-nav-fit="collapsed"] .sidebar{display:none;position:fixed;top:64px;right:12px;bottom:auto;left:auto;z-index:40;width:min(410px,calc(100vw - 24px));height:auto;max-height:calc(100vh - 82px);overflow-y:auto;box-shadow:20px 0 55px rgba(0,0,0,.4)}
html[data-ui-style="modern"][data-nav-fit="collapsed"] .sidebar.mobile-open{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:5px;padding:12px}
html[data-ui-style="modern"][data-nav-fit="collapsed"] .sidebar.mobile-open .side-title:first-child{grid-column:1/-1;margin:1px 6px 7px;padding-bottom:9px;border-bottom:1px solid var(--line)}
html[data-ui-style="modern"][data-nav-fit="collapsed"] .sidebar.mobile-open>a{min-height:39px;margin:0;padding:9px 11px;border:1px solid transparent;background:#0e1621}
html[data-ui-style="modern"][data-nav-fit="collapsed"] .sidebar.mobile-open>a:hover{border-color:#3b4b61;background:#162231}
html[data-ui-style="modern"][data-nav-fit="collapsed"] .sidebar.mobile-open>a.active{border-color:color-mix(in srgb,var(--green) 48%,var(--line));border-left:3px solid var(--green);background:linear-gradient(90deg,rgba(72,202,121,.13),#111b27)}
html[data-ui-style="modern"][data-nav-fit="collapsed"] .sidebar.mobile-open>.side-rule,html[data-ui-style="modern"][data-nav-fit="collapsed"] .sidebar.mobile-open>.side-title:not(:first-child){display:none}
}
/* Responsive navigation is a compact command popover, not a full-height rail. */
@media(max-width:1180px){
  html[data-ui-style="modern"] .sidebar.mobile-open{display:grid;position:fixed;top:70px;right:12px;bottom:auto;left:auto;width:min(410px,calc(100vw - 24px));height:auto;max-height:calc(100vh - 82px);grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:5px;padding:12px;overflow-y:auto;border:1px solid #3b4b61;border-radius:10px;background:linear-gradient(145deg,#131d2a,#0b121b);box-shadow:0 24px 70px rgba(0,0,0,.62)}
  html[data-ui-style="modern"] .sidebar.mobile-open .side-title:first-child{grid-column:1/-1;margin:1px 6px 7px;padding-bottom:9px;border-bottom:1px solid var(--line)}
  html[data-ui-style="modern"] .sidebar.mobile-open>a{min-height:39px;margin:0;padding:9px 11px;border:1px solid transparent;background:#0e1621}
  html[data-ui-style="modern"] .sidebar.mobile-open>a:hover{border-color:#3b4b61;background:#162231}
  html[data-ui-style="modern"] .sidebar.mobile-open>a.active{border-color:color-mix(in srgb,var(--green) 48%,var(--line));border-left:3px solid var(--green);background:linear-gradient(90deg,rgba(72,202,121,.13),#111b27)}
  html[data-ui-style="modern"] .sidebar.mobile-open>.side-rule,html[data-ui-style="modern"] .sidebar.mobile-open>.side-title:not(:first-child){display:none}
}
@media(max-width:520px){html[data-ui-style="modern"] .sidebar.mobile-open{top:64px;right:8px;width:calc(100vw - 16px);max-height:calc(100vh - 72px);grid-template-columns:1fr}}
@media(max-width:950px){html[data-ui-style="modern"] .base-layout-v2.modern-station-layout{grid-template-columns:1fr 1.25fr}html[data-ui-style="modern"] .modern-station-layout>.typed-stations,html[data-ui-style="modern"] .modern-station-layout>.roster-wide{grid-column:1/-1}html[data-ui-style="modern"] .modern-center-stations{grid-column:1}html[data-ui-style="modern"] .modern-fuse-stations{grid-column:2}html[data-ui-style="modern"] .modern-station-layout>.station-lounge{grid-column:1/-1}html[data-ui-style="modern"] .modern-station-layout>.station-lounge .slot-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:650px){html[data-ui-style="modern"] .base-layout-v2.modern-station-layout{grid-template-columns:1fr}html[data-ui-style="modern"] .modern-station-layout>.typed-stations,html[data-ui-style="modern"] .modern-center-stations,html[data-ui-style="modern"] .modern-fuse-stations,html[data-ui-style="modern"] .modern-station-layout>.station-lounge,html[data-ui-style="modern"] .modern-station-layout>.roster-wide{grid-column:1}html[data-ui-style="modern"] .modern-support-row{grid-template-columns:1fr 1fr}html[data-ui-style="modern"] .modern-station-layout>.station-lounge .slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Keep account/profile access visible at every phone width. This late override is
   intentional: the Command Deck fidelity rules above otherwise restore the
   desktop brand minimum width after the first responsive pass. */
@media(max-width:650px){html[data-ui-style="modern"] .site-header{padding-inline:8px;gap:6px}html[data-ui-style="modern"] .site-header .brand{min-width:0;flex:1 1 auto;overflow:hidden}html[data-ui-style="modern"] .site-header .brand>span{min-width:0}html[data-ui-style="modern"] .site-header .brand strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}html[data-ui-style="modern"] .site-header .menu-button,html[data-ui-style="modern"] .site-header .header-cloud,html[data-ui-style="modern"] .site-header .ui-style-button,html[data-ui-style="modern"] .site-header .theme-button{flex:0 0 auto}}
@media(max-width:380px){html[data-ui-style="modern"] .site-header .brand strong,html[data-ui-style="modern"] .site-header .brand small{display:none}html[data-ui-style="modern"] .site-header .brand{flex:1 1 auto}html[data-ui-style="modern"] .site-header .brand-mark{width:30px;height:30px}}
@media(max-width:420px){html[data-ui-style="modern"] .modern-support-row{grid-template-columns:1fr}}

/* Number fields in the deck. The browser draws its spinner inside the box,
   where it overlaps the value and gets cut by the 90px cap, so the arrows are
   drawn beside the field instead and the native one is turned off. */
html[data-ui-style="modern"] .deck-stepper{display:flex;align-items:center;gap:5px;min-width:0}
html[data-ui-style="modern"] .deck-stepper input[type=number]{max-width:76px;appearance:textfield;-moz-appearance:textfield}
html[data-ui-style="modern"] .deck-stepper input[type=number]::-webkit-outer-spin-button,html[data-ui-style="modern"] .deck-stepper input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}
html[data-ui-style="modern"] .deck-stepper-arrows{display:flex;flex:0 0 auto;flex-direction:column;gap:2px}
html[data-ui-style="modern"] .deck-stepper-arrows button{display:grid;width:22px;height:15px;padding:0;place-items:center;border:1px solid var(--line);border-radius:3px;background:#0b121c;color:#93a5bd;font-size:7px;line-height:1;cursor:pointer;transition:color .15s,border-color .15s,background .15s}
html[data-ui-style="modern"] .deck-stepper-arrows button:hover{border-color:var(--green);background:#111c28;color:#eaf1f8}

/* Two arrow columns need the field narrower so the cell still fits its badge. */
html[data-ui-style="modern"] .deck-stepper.is-dual{gap:4px}
html[data-ui-style="modern"] .deck-stepper.is-dual input[type=number]{max-width:60px;text-align:center}

/* While the strip is being put back after a re-render it must not animate:
   the shrink already happened, the element is just new. */
html[data-ui-style="modern"] .archive-timers.timers-settling,
html[data-ui-style="modern"] .archive-timers.timers-settling *{transition:none!important;animation:none!important}

/* Keep action buttons compact inside the Advanced settings columns. */
html[data-ui-style="modern"] .modern-optimise-settings{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,1fr)}
html[data-ui-style="modern"] .modern-optimise-priorities{display:flex;flex-direction:column;gap:16px;align-items:stretch}
html[data-ui-style="modern"] .fusion-keep-control{display:flex;flex-direction:column;align-items:flex-start;gap:7px}
html[data-ui-style="modern"] .fusion-keep-control .btn{flex:none;min-height:34px;padding:8px 14px;width:auto}
html[data-ui-style="modern"] .fusion-keep-control small{color:var(--muted);font-size:11px;line-height:1.5}
html[data-ui-style="modern"] .modern-optimise-settings>.modern-super-rebirth{grid-column:1/-1;justify-self:end;align-self:start;width:auto;margin:12px 16px;min-height:34px}
html[data-ui-style="modern"] .modern-optimise-settings>.modern-sell-priority{grid-column:1/-1;border-top:1px solid var(--line);border-right:0}
@media(max-width:1180px){html[data-ui-style="modern"] .modern-optimise-settings{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){html[data-ui-style="modern"] .modern-optimise-settings{grid-template-columns:minmax(0,1fr)}}

/* Paint the Fusion background once, rather than restarting it at Build. */
html[data-ui-style="modern"] .fusion-panel{background:linear-gradient(145deg,#121b28,#0e1621)}
html[data-ui-style="modern"] .modern-min-gain{margin:0}
html[data-ui-style="modern"] .modern-min-gain-title{display:flex;align-items:center;gap:6px}
html[data-ui-style="modern"] .modern-min-gain i{display:inline-grid;width:15px;height:15px;place-items:center;margin-left:4px;border:1px solid #315846;border-radius:50%;color:var(--green);font-size:9px;font-style:normal;vertical-align:middle;cursor:help}
html[data-ui-style="modern"] .modern-min-gain-input{display:flex;align-items:center;gap:8px}
html[data-ui-style="modern"] .modern-min-gain-input input{width:90px;flex:0 0 auto}
html[data-ui-style="modern"] .modern-min-gain-input em{font-style:normal;color:#93a5bd;font-size:11px;font-weight:700;text-transform:none;letter-spacing:0}
