:root{
  --hco-shell-h:64px;
  --hco-shell-offset:84px;
  --hco-shell-green:#7cff8a;
  --hco-shell-yellow:#ffcf58;
  --hco-shell-bg:#101218;
}
body.hco-page-shell-active{padding-top:var(--hco-shell-offset)!important}
body.hco-page-shell-merged{--hco-shell-h:0px;--hco-shell-offset:0px;padding-top:0!important}
#hcoPageShell{
  position:fixed;
  top:10px;
  left:50%;
  transform:translateX(-50%);
  width:min(1800px,calc(100vw - 24px));
  height:var(--hco-shell-h);
  z-index:2147483000;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:10px 14px;
  box-sizing:border-box;
  background:linear-gradient(180deg,rgba(17,19,26,.97),rgba(14,15,20,.96));
  border:1px solid rgba(255,255,255,.075);
  border-radius:15px;
  box-shadow:0 16px 40px rgba(0,0,0,.52),0 0 18px rgba(124,255,138,.055);
  backdrop-filter:blur(9px);
  font-family:system-ui,-apple-system,Segoe UI,sans-serif;
  color:#f4fff6;
}
.hco-shell-left,.hco-shell-user{display:flex;align-items:center;gap:8px;min-width:0}
.hco-shell-btn{
  width:auto!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  max-height:38px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  margin:0!important;
  padding:0 12px!important;
  box-sizing:border-box!important;
  border:1px solid rgba(255,179,0,.34)!important;
  border-radius:999px!important;
  background:rgba(255,179,0,.11)!important;
  color:#ffdc87!important;
  text-decoration:none!important;
  font-family:system-ui,-apple-system,Segoe UI,sans-serif!important;
  font-size:13px!important;
  line-height:1!important;
  font-weight:850!important;
  white-space:nowrap!important;
  cursor:pointer!important;
  box-shadow:inset 0 0 0 1px rgba(255,179,0,.045)!important;
  transition:background .12s ease,border-color .12s ease,box-shadow .12s ease,transform .12s ease!important;
}
#hcoShellHome{
  color:#effff4!important;
  background:rgba(124,255,138,.105)!important;
  border-color:rgba(124,255,138,.38)!important;
  box-shadow:inset 0 0 0 1px rgba(124,255,138,.07)!important;
}
.hco-shell-btn:hover,.hco-shell-btn:focus-visible{
  transform:translateY(-1px)!important;
  border-color:rgba(124,255,138,.58)!important;
  background:rgba(124,255,138,.13)!important;
  color:#effff4!important;
  box-shadow:0 0 16px rgba(124,255,138,.15),inset 0 0 0 1px rgba(124,255,138,.08)!important;
  outline:none!important;
}
.hco-shell-btn:active{transform:translateY(0)!important}
.hco-shell-btn img{width:19px!important;height:19px!important;max-width:19px!important;object-fit:contain!important;flex:0 0 auto!important}
.hco-shell-back-arrow{font-size:24px;line-height:1}
.hco-shell-title{
  min-width:0;
  text-align:center;
  font-size:clamp(16px,2vw,21px);
  font-weight:950;
  letter-spacing:.015em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#fff;
  text-shadow:0 0 10px rgba(124,255,138,.12);
}
.hco-shell-user{justify-content:flex-end}
.hco-shell-haunt-switch{display:block;min-width:170px;max-width:310px}
.hco-shell-haunt-switch[hidden]{display:none!important}
.hco-shell-haunt-switch select{
  width:100%;height:38px;box-sizing:border-box;padding:0 34px 0 12px;
  border:1px solid rgba(80,255,160,.32);border-radius:999px;
  background:#0b1710;color:#effff4;font:800 12px/1 system-ui,-apple-system,Segoe UI,sans-serif;
}
.hco-shell-haunt-switch select:focus{outline:2px solid rgba(80,255,160,.35);outline-offset:2px}
.hco-shell-haunt-switch select:disabled{opacity:.82;cursor:default}
.hco-shell-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.hco-shell-user-pill{
  max-width:280px;
  width:auto!important;
  height:38px!important;
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  margin:0!important;
  padding:0 12px!important;
  box-sizing:border-box!important;
  border:1px solid rgba(124,255,138,.31)!important;
  border-radius:999px!important;
  background:rgba(6,26,14,.82)!important;
  color:#f0fff4!important;
  font-family:system-ui,-apple-system,Segoe UI,sans-serif!important;
  font-size:13px!important;
  line-height:1!important;
  font-weight:850!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  box-shadow:none!important;
}
.hco-shell-user-pill img{width:19px!important;height:19px!important;max-width:19px!important;flex:none!important}
.hco-shell-user-pill>span:first-of-type{overflow:hidden;text-overflow:ellipsis}
.hco-shell-haunt{color:var(--hco-shell-green);font-size:11px;font-weight:900;flex:none}
.hco-shell-loading{opacity:.65}

/* Consolidated mode: pages with their own logo/title keep that richer title block.
   Home, Back, Help, existing page actions, and the user badge share the same header. */
.hco-shell-merge-host{box-sizing:border-box;column-gap:10px!important;row-gap:8px!important;align-items:center!important;flex-wrap:wrap!important}
.hco-shell-force-flex{display:flex!important}
.hco-shell-inline-controls{display:flex!important;align-items:center!important;gap:8px!important;flex:0 0 auto!important;min-width:0!important}
.hco-shell-inline-user{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex:0 1 auto!important;min-width:0!important}
.hco-shell-menu{position:relative;flex:0 0 auto}
.hco-shell-menu>summary{list-style:none;cursor:pointer}
.hco-shell-menu>summary::-webkit-details-marker{display:none}
.hco-shell-menu-popover{position:absolute;top:calc(100% + 7px);left:0;z-index:2147483100;display:grid;min-width:190px;padding:6px;border:1px solid rgba(124,255,138,.3);border-radius:10px;background:#101218;box-shadow:0 16px 35px rgba(0,0,0,.6)}
.hco-shell-menu-popover a{padding:9px 10px;border-radius:7px;color:#effff4;text-decoration:none;font-size:13px;font-weight:800;white-space:nowrap}
.hco-shell-menu-popover a:hover,.hco-shell-menu-popover a:focus-visible{background:rgba(124,255,138,.13);outline:none}
.hco-shell-merge-host>.hco-shell-inline-user{margin-left:0!important}
.hco-shell-merge-host>.actions,.hco-shell-merge-host>.hco-actions,.hco-shell-merge-host>.toolbar,.hco-shell-merge-host>.hco-nav{margin-left:auto!important}
.hco-shell-merge-actions{align-items:center!important}
.hco-shell-merge-actions>.hco-shell-inline-controls{order:-2}
.hco-shell-merge-actions>.hco-shell-inline-user{order:99}
body.hco-page-shell-merged .hco-navpills{display:none!important}
body.hco-page-shell-merged .help-toolbar{top:4px!important}
body.hco-page-shell-merged .help-nav{top:76px!important;max-height:calc(100vh - 92px)!important}
body.hco-page-shell-merged .help-topic{scroll-margin-top:82px!important}

body.hco-page-shell-active #zoomWrap{top:var(--hco-shell-offset)!important;height:calc(100vh - var(--hco-shell-offset))!important}
body.hco-page-shell-active #zoomControls{top:auto!important;bottom:10px!important;zoom:1!important;transform:none!important;height:auto!important;min-height:0!important;max-height:none!important}
[data-hco-access-hidden="1"]{display:none!important}
[data-bd-native-shortcut-hidden="1"]{display:none!important}
.bd-page-nav{order:90;display:flex!important;align-items:center;gap:6px;flex:0 0 100%;width:100%;padding-top:4px;border-top:1px solid rgba(255,255,255,.08);box-sizing:border-box;flex-wrap:wrap}
.bd-page-nav .bd-page-nav-link{display:inline-flex!important;align-items:center;justify-content:center;min-height:32px;padding:6px 9px!important;margin:0!important;border:1px solid rgba(255,207,88,.32)!important;border-radius:9px!important;background:rgba(255,207,88,.07)!important;color:#fff3bd!important;text-decoration:none!important;font-size:12px!important;font-weight:850!important;line-height:1!important;white-space:nowrap}
.bd-page-nav .bd-page-nav-link[aria-current="page"]{border-color:rgba(124,255,138,.46)!important;background:rgba(124,255,138,.12)!important;color:#effff4!important}
.bd-focus-toggle{order:89;display:inline-flex!important;align-items:center;gap:5px;min-height:32px;margin-left:auto!important;padding:6px 9px!important;border:1px solid rgba(124,255,138,.4)!important;border-radius:9px!important;background:rgba(124,255,138,.1)!important;color:#effff4!important;font-size:12px!important;font-weight:850!important;line-height:1!important;white-space:nowrap;z-index:2147482000}
body.bd-focus-mode .hco-shell-inline-controls,
body.bd-focus-mode .hco-shell-inline-user,
body.bd-focus-mode .bd-page-nav{display:none!important}
body.bd-focus-mode>.bd-focus-toggle{display:inline-flex!important;visibility:visible!important;opacity:1!important;position:fixed!important;top:max(8px,env(safe-area-inset-top))!important;right:max(18px,calc(env(safe-area-inset-right) + 8px))!important;min-width:auto!important;width:auto!important;height:40px!important;padding:0 12px!important;margin:0!important;border-color:rgba(255,122,122,.72)!important;background:#3a1010!important;box-shadow:0 5px 22px rgba(0,0,0,.55);z-index:2147483647!important}
body.bd-focus-mode .bd-focus-toggle .bd-focus-label{display:inline!important}
body.bd-focus-mode header.main-header{min-height:0!important}
@media(max-width:1050px){
  .hco-shell-inline-controls .hco-shell-btn{padding:0 10px!important}
  .hco-shell-user-pill{max-width:190px}
  .hco-shell-haunt-switch{min-width:145px;max-width:190px}
}
@media(max-width:760px){
  :root{--hco-shell-h:56px;--hco-shell-offset:72px}
  #hcoPageShell{top:8px;width:calc(100vw - 12px);padding:8px 8px;gap:6px;border-radius:13px}
  .hco-shell-btn{height:36px!important;min-height:36px!important;max-height:36px!important;min-width:36px!important;padding:0 9px!important}
  #hcoPageShell .hco-shell-btn span:not(.hco-shell-back-arrow),.hco-shell-inline-controls .hco-shell-btn span:not(.hco-shell-back-arrow){display:none!important}
  .hco-shell-menu>summary span:first-child{display:none!important}
  .hco-shell-menu>summary span:last-child{display:inline!important}
  .hco-shell-user-pill{height:36px!important;min-height:36px!important;max-width:128px;padding:0 9px!important}
  .hco-shell-haunt-switch{min-width:120px;max-width:150px}
  .hco-shell-title{font-size:15px}
  .hco-shell-merge-host>.hco-shell-inline-user{margin-left:auto!important}
  body.hco-page-shell-merged .help-nav{top:auto!important;max-height:none!important}
  .bd-page-nav{flex-wrap:nowrap!important;overflow-x:auto;padding-bottom:3px;scrollbar-width:thin}
  .bd-page-nav .bd-page-nav-link{flex:0 0 auto}
  .bd-focus-toggle{min-width:36px!important;padding:0 8px!important}
  .bd-focus-toggle .bd-focus-label{display:none}
}
@media(max-width:520px){
  .hco-shell-inline-controls{gap:5px!important}
  .hco-shell-inline-user{width:auto!important}
  .hco-shell-user-pill{max-width:112px}
}
body.hco-page-shell-active .hco-navpills{display:none!important}

/* Existing full-height and sticky layouts begin below the standalone shared row. */
body.hco-page-shell-active .cc-header{top:var(--hco-shell-offset)!important}
body.hco-page-shell-active>.shell{min-height:calc(100vh - var(--hco-shell-offset))}
body.hco-page-shell-active .hco-public-fullscreen{top:var(--hco-shell-offset)!important}
body.hco-page-shell-active .top,
body.hco-page-shell-active header.main-header,
body.hco-page-shell-active > header:not(#hcoPageShell){top:var(--hco-shell-offset)!important}
body.hco-page-shell-active .sticky-filters,
body.hco-page-shell-active .filter-panel{top:calc(var(--hco-shell-offset) + 4px)!important}
body.hco-page-shell-active .list-panel{top:calc(var(--hco-shell-offset) + 84px)!important;height:calc(100vh - var(--hco-shell-offset) - 100px)!important}

/* Phase 17: zoom controls are a fixed-size utility, never part of the scaled canvas. */
#zoomControls{
  align-items:center!important;
  gap:5px!important;
  padding:5px!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  zoom:1!important;
  transform:none!important;
  transform-origin:center!important;
}
#zoomControls button{
  box-sizing:border-box!important;
  width:auto!important;
  min-width:38px!important;
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  margin:0!important;
  padding:0 10px!important;
  font-size:14px!important;
  line-height:1!important;
  border-radius:10px!important;
  flex:0 0 auto!important;
  zoom:1!important;
  transform:none!important;
}
#zoomControls button:active{transform:translateY(1px)!important}
#zoomReadout{
  box-sizing:border-box!important;
  min-width:48px!important;
  height:36px!important;
  padding:0 6px!important;
  justify-content:center!important;
  font-size:12px!important;
  line-height:1!important;
  flex:0 0 auto!important;
  zoom:1!important;
  transform:none!important;
}

@media print{
  .hco-shell-inline-controls,
  .hco-shell-inline-user{display:none!important}
}
[data-hco-native-nav-hidden="1"]{display:none!important}

/* Compact shared controls wrap as one cluster on narrow screens. */
.hco-shell-inline-controls{flex-wrap:wrap!important;flex-shrink:1!important}
.hco-shell-inline-user:empty{display:none!important}
.hco-shell-inline-controls .hco-shell-inline-user{margin-left:auto}
#hcoShellBack{max-width:100%;height:auto!important;min-height:38px!important;white-space:normal!important;line-height:1.2!important}

#hcoPageShell{height:auto;min-height:var(--hco-shell-h)}
@media(max-width:600px){#hcoPageShell{display:flex;flex-wrap:wrap}#hcoPageShell .hco-shell-title{order:-1;flex:1 0 100%}}
