/* Global Search — one clear navigation entry. The expanded input/results
   appear only on demand; normal pages retain their full viewport and header. */
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-global-search-launch{
  display:inline-flex!important;
  box-sizing:border-box!important;
  flex:0 0 auto;
  align-items:center;justify-content:center;gap:8px;
  height:42px;min-height:42px;
  min-width:105px;padding:0 13px;
  border-radius:11px;
  border:1px solid rgba(151,201,244,.43);
  background:linear-gradient(135deg,rgba(91,153,212,.19),rgba(27,67,112,.32));
  color:#e3f3ff;
  font:720 13px/1.2 system-ui,sans-serif!important;
  white-space:nowrap;
  cursor:pointer;
  transition:background .15s,border-color .15s;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-global-search-launch:hover,
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-global-search-launch[aria-expanded="true"]{
  background:linear-gradient(135deg,rgba(100,178,241,.35),rgba(35,91,149,.45));
  border-color:rgba(175,227,255,.88);
  color:#fff;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-global-search-icon{
  width:24px!important;height:24px!important;min-width:24px;
  object-fit:contain;image-rendering:pixelated;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-rail{
  display:none!important;
  box-sizing:border-box;
  position:fixed!important;
  top:69px!important;
  left:var(--gtt-search-left,200px)!important;
  right:auto!important;
  z-index:338!important;
  width:min(592px,calc(100vw - 24px))!important;
  max-width:592px!important;
  height:67px!important;
  min-height:0!important;
  padding:10px 12px;
  align-items:center;justify-content:center;
  border:1px solid rgba(167,219,251,.46);
  border-bottom:0;
  border-radius:16px 16px 0 0;
  background:linear-gradient(160deg,#203e65,#122c4e);
  box-shadow:0 22px 55px rgba(1,10,27,.38);
}
html[data-gtt-design-mode="workbench"] body[data-gtt-spotlight-open] #wb2-shell .wb2-search-rail{
  display:flex!important;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-rail .wb2-desktop-search{
  display:flex!important;
  box-sizing:border-box;
  flex:1 1 auto;
  align-items:center;gap:11px;
  width:100%;max-width:none;min-width:0;
  height:47px;min-height:47px;
  padding:0 12px;
  border:1px solid rgba(166,213,247,.52);
  border-radius:11px;
  background:rgba(9,29,55,.58);
  box-shadow:inset 0 1px rgba(226,244,255,.09);
  cursor:text;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-rail .wb2-desktop-search:focus-within{
  border-color:rgba(158,226,255,.90);
  box-shadow:0 0 0 2px rgba(117,190,246,.15);
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-rail .wb2-desktop-search-art{
  flex:0 0 26px;width:26px;height:26px;
  object-fit:contain;image-rendering:pixelated;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-rail input.wb2-desktop-search-input{
  display:block!important;
  box-sizing:border-box!important;
  min-width:0!important;flex:1 1 auto!important;
  height:44px!important;padding:0!important;margin:0!important;
  border:0!important;outline:0!important;
  background:transparent!important;box-shadow:none!important;
  color:#f2faff!important;caret-color:#b3e5ff;
  font:600 15px/1.25 system-ui,sans-serif!important;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-rail input.wb2-desktop-search-input::placeholder{
  color:#aecfe7!important;opacity:1;
}
html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-shortcut{
  flex:0 0 auto;white-space:nowrap;
  color:#b7d8f0;font:650 11px system-ui,sans-serif;
  padding:5px 7px;border-radius:6px;
  border:1px solid rgba(166,217,251,.24);
  background:rgba(114,158,205,.14);
}
@media(min-width:861px){
  html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-actions .wb2-mobile-search{
    display:none!important;
  }
  /* Restore original content clearance: no permanent second navigation row. */
  html[data-gtt-design-mode="workbench"] body:not(
    [data-current-view="planner-v2"],[data-current-view="planner-v4"],[data-current-view="world-planner-v2"]
  ) .main-area>#content.content{
    padding-top:94px!important;
  }
}
/* The result body is visually joined to the expanded input, but remains
   outside page flow: it never scrolls or resizes the current page. */
html[data-gtt-design-mode="workbench"] body #content #gtt-spotlight{
  position:fixed!important;
  isolation:isolate;z-index:336!important;
  top:136px!important;
  left:var(--gtt-search-left,200px)!important;
  right:auto!important;
  width:min(592px,calc(100vw - 24px))!important;
  max-width:592px!important;min-width:0!important;
  max-height:calc(100dvh - 151px)!important;
  margin:0!important;
  overflow-x:hidden!important;overflow-y:auto!important;
  overscroll-behavior:contain;
  transform:none!important;
  animation:gtt-search-reveal .14s ease-out both!important;
  border:1px solid rgba(167,219,251,.46)!important;
  border-top:0!important;
  border-radius:0 0 16px 16px!important;
  background:linear-gradient(160deg,#203e65,#122c4e)!important;
  box-shadow:0 22px 55px rgba(1,10,27,.38)!important;
  scrollbar-color:rgba(122,188,236,.45) transparent;
}
@keyframes gtt-search-reveal{
  from{opacity:.1;translate:0 -5px}
  to{opacity:1;translate:0 0}
}
html[data-gtt-design-mode="workbench"] body #content #gtt-spotlight .gss-top{display:none!important}
html[data-gtt-design-mode="workbench"] body #content #gtt-spotlight .gss-body{
  padding:15px 16px 18px!important;
}
html[data-gtt-design-mode="workbench"] body #content #gtt-spotlight .gss-results{
  grid-template-columns:minmax(0,1fr);
}
@media(max-width:860px),(pointer:coarse) and (orientation:landscape) and (max-height:600px) and (max-width:1100px){
  html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-global-search-launch{display:none!important}
  html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-rail{
    top:var(--gtt-mobile-top,56px)!important;
    left:10px!important;
    width:calc(100vw - 20px)!important;max-width:none!important;
    height:67px!important;padding:9px;
    z-index:343!important;border-radius:13px 13px 0 0!important;
  }
  html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-rail .wb2-desktop-search{
    height:49px;min-height:49px;padding:0 10px;gap:8px;
  }
  html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-rail input.wb2-desktop-search-input{
    height:46px!important;font-size:16px!important;
  }
  html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-search-shortcut{display:none!important}
  html[data-gtt-design-mode="workbench"] body #content #gtt-spotlight{
    top:calc(var(--gtt-mobile-top,56px) + 67px)!important;
    left:10px!important;
    width:calc(100vw - 20px)!important;max-width:none!important;
    max-height:calc(100dvh - var(--gtt-mobile-top,56px) - var(--gtt-mobile-bottom,65px) - 78px)!important;
    border-radius:0 0 13px 13px!important;
    z-index:342!important;
  }
  html[data-gtt-design-mode="workbench"] body #content #gtt-spotlight .gss-body{padding:12px!important}
}
@media(prefers-reduced-motion:reduce){
  html[data-gtt-design-mode="workbench"] body #content #gtt-spotlight{animation:none!important}
  html[data-gtt-design-mode="workbench"] #wb2-shell .wb2-global-search-launch{transition:none!important}
}
